restart command to overwrite restartfiles

Dear lammps users,

I am using lammps to equilibrate montmorillonite clay in water box.

I am trying to run for 100ps with a timestep of 0.1fs and generating restart files after every 5ps with following command

restart 5000 mont.*.restart

run 1000000

but this command is generating restart file after every 5000ts

I want to overwrite an old restart file with new restart file where current timestep can be included in restart filename.

How can I do this?

I tried using command

restart 5000 mont1 mont2

but it does not give the current timstep for which restart file is written?

any suggestion will be of great help.

-Shravani

Dear lammps users,
I am using lammps to equilibrate montmorillonite clay in water box.
I am trying to run for 100ps with a timestep of 0.1fs and generating restart files after every 5ps with following command

restart 5000 mont.*.restart
run 1000000

but this command is generating restart file after every 5000ts
I want to overwrite an old restart file with new restart file where current timestep can be included in restart filename.
How can I do this?

there is no internal way to do this in LAMMPS and - frankly - i don't
see much of a point there. you can just write to a restart file given
*without* the star and thus without the time step included. those will
be overwritten automatically (since they have the same name) and you
can look up the time step when it was written in your log file (by
just making some output, e.g. thermo output for with fix print at the
same frequency outputting the current time step). at the end of the
job you could automate renaming the restart file by using the "shell"
command.

axel.