How to capture last frame before system crush

Hi,

My all-atom system is kind of unstable during heating, it would raise a non-numerial pressure and shake determinant < 0 error. I strongly suspect that incorrect force field parameters caused severe deformation of some conformations. I try to increase dump frequency but timing of the system crash is very uncertain.

I want to ask if there is a command to capture the previous frame before simulation exits.

Thanks a lot for your kind help!!

Hi,
Since LAMMPS uses pseudo-random numbers, running the same simulations multiple times should always result in crashes occurring at the exact same time. This makes it possible to anticipate in advance which frame should be printed with a dump command.
Best,
Simon

Hi, thanks for your advice! I know lammps has no randomness. I save restart file every 10000 timestep and restart the system with same command, but I can not reproduce problem.

Here is the script I used to rerun:

read_restart heating.restart.*
include system.ff

fix sk all shake 0.0001 20 0 m 1.008
fix 1 all npt temp 600.0 700.0 100.0 iso 1.0 1.0 1000.0 drag 2.0
dump 1 all custom 1 weired.lammpstrj id mol type x y z vx vy vz
restart 100 debug.restart
run 1300000 upto

Maybe I have omitted something that restart file not save…

I canno’t comment on that, may be some more experienced users on here will know better. On the side note, it seems that you are printing the dump every step already, therefore you should be able to visualize the system right before the crash.

the dump_modify ‘maxfiles’ option was designed to capture the last frames before system crash