Writing restart file for every step

Hello all,

I want to know whether it is possible to write out a single restart file that gets updated in every timestep. This would be similar to &RESTART &EACH MD 1 command in CP2k.

This would be helpful because I am running long Metadynamics simulations with fix plumed. When I restart the simulation, PLUMED restarts from the current timestep whereas LAMMPS restarts from the timestep of the last generated restart file.

I thank you in advance for your help/suggestions.

Please check out the manual: restart command — LAMMPS documentation
Please also note that writing out restarts in every step will cause a significant drop in performance of your simulation.

Please explain why that would be a problem. In my limited understanding of the method I seem to recall that when running metadynamics you don’t really have a time axis any more and thus to have additional bias data upon restart should not make a difference. When doing metadynamics with multiple walkers, i.e. running multiple independent MTD simulations that share the accumulated bias data, then this same thing happens all the time even during a run.