If I am not mistaken, there is currently no option to dump the last structure in a MD run. It would be nice to have a canonical way of achieving this.
Why this matters? If a multiple of the n_print does not exactly fall on n_ionic_steps, the last structure of the MD is never dumped and therefore never stored. However, only structures that are dumped are accessible in the parsed output dict. This means that in a workflow where several MD simulations with different settings (that might be controlled by the input of an unaware user) are run, it is not necessarily the last structure of the previous run that is used as starting structure for the next.
Manually appending the dump of the last frame via the lammps write_dump command is not working. This is because any user-specific modifications that are given to input_control_file are added to the lammps input file before the run command. Asking current LLMs propose to add a last yes to the dump_modify in the same spirit as first yes ensures that frame 0 is dumped. However, I do not find the option last yes in the current lammps documentation. This is probably a LLM hallucination or a deprecated lammps feature (but would actually solve the issue).
The only way to surely get a hand on the last structure is via write_restart_file. But parsing the written restart_file and translating it to a dump feels too over-engineered.
Am I missing something?
If I am not mistaken, there is currently no option to dump the last structure in a MD run. It would be nice to have a canonical way of achieving this.
Why this matters? If a multiple of the
n_printdoes not exactly fall onn_ionic_steps, the last structure of the MD is never dumped and therefore never stored. However, only structures that are dumped are accessible in the parsed output dict. This means that in a workflow where several MD simulations with different settings (that might be controlled by the input of an unaware user) are run, it is not necessarily the last structure of the previous run that is used as starting structure for the next.Manually appending the dump of the last frame via the lammps
write_dumpcommand is not working. This is because any user-specific modifications that are given toinput_control_fileare added to the lammps input file before theruncommand. Asking current LLMs propose to add alast yesto thedump_modifyin the same spirit asfirst yesensures that frame 0 is dumped. However, I do not find the optionlast yesin the current lammps documentation. This is probably a LLM hallucination or a deprecated lammps feature (but would actually solve the issue).The only way to surely get a hand on the last structure is via
write_restart_file. But parsing the written restart_file and translating it to a dump feels too over-engineered.Am I missing something?