instable restart file

Hello there,
I’m a beginner in LAMMPS and I’m trying to use restart files to save time.

At the start of my script, I use:

restart 5000 rbc_equilibrated.restart

And at the end, I include:

write_restart final_rbc_equilibrated.restart

However, every time I try to use my restart file with read_restart, the simulation becomes unstable. Meanwhile, if I use read_data to do the same equilibration and then simulate, everything runs stably.

Am I doing something wrong?
Thanks for your help!

Not sure what you mean by “the simulation becomes unstable”? Does it throw an error?

Impossible to say without having more information. There is more to continuing a simulation correctly than just the read_restart command. Please study the documentation.
Please also read the “guidelines” post to learn more about what kind of help you can get here and what you have to do for it. Keep in mind, that we don’t know what you do and cannot look over your shoulder while you are doing it.

Since you haven’t shared your input .in file yet (I hope you’ll share it later!), I’ll demonstrate using my own .in file. Hopefully, this will still be helpful.

First, double-check that your temporary (tmp) file name is correct. Below are my configurations for the read_restart and restart commands.

read_restart tmp.restart.58000 # Located at the standard position for read_data in the input file
restart 1000 tmp.restart # Placed above the run command

Second, regarding your mention of “the simulation becomes unstable”—I’m not entirely sure what specific behavior you’re observing. However, in my experience with restarting simulations using a thermostat, I almost always need to reinitialize the initial temperature. Here are the relevant commands I use:

velocity all create 492.77033 4928459 rot yes dist gaussian
fix 2 all temp/berendsen 492.77033 3000.0 25
run 742000

This is the best advice I can offer based on the current information. Let me know if you need further clarification!
PS: For large-scale atomic systems, consider using Linux with GPU acceleration (e.g., CUDA-enabled LAMMPS) to significantly reduce computation time.