Running a simulation with multiple steps

I have a couple of basic questions: (a) My simulation consists of 5 steps in the input file, and I’d like to run it step by step after a delay of lets say 5 second. is it possible? (b) Suppose if I create 5 different input scripts (with include command for previous steps) and If I made changes to, let’s say, step 3, is it possible to run that step alone without rerunning the previous steps but still taking input from the setup in step 2?"

Yes. Here is a trivial example for Linux/MacOS:

print "step 1"
shell "sleep 5"
print "step 2"
shell "sleep 5"
print "step 3"
shell "sleep 5"
print "step 4"
shell "sleep 5"
print "step 5"

If you are on a Windows machine, you need to replace ‘sleep’ with ‘timeout’

Please have a look at the “write_restart” and “read_restart” commands in the LAMMPS documentation.

Thanks

I have observed temperature variations when executing a simulation with a single input file compared to dividing it into 5 parts using the ‘write_restart’ and ‘read_restart’ commands. I believe this behavior is unexpected.

This is a very vague statement. Without sharing a complete input deck to verify your claim, there is nothing that can be said.
If I was to bet, I would say LAMMPS is executing your script in the expected manner, but you don’t fully appreciate/understand what is going on.

1 Like