[lammps-users] Can LAMMPS....? (question about time output)

Can LAMMPS print total time (in fs) from the beginning of a simulation (even after a restart file is used)?

thermo_style “time” re-sets to zero each time I restart a simulation

Thanks,
Emily

this can be easily worked around.

in the first run define the variable:

variable mytime equal time

and then after the run statement has finished insert:

print “${mytime}” file saved.time

for all following runs you can now do:

variable svtime file saved.time
variable mytime v_svtime+time

and, again, after the run you do:

print “${mytime}” file saved.time

this way the file “saved.time” will contain the accumulated time after a run and the variable mytime will always have the current time.

axel.