Extending simulations

GROMACS version: 2019
GROMACS modification: Yes/No

Hi All,

Please forgive the potential ignorance of my question and would happily dig up the answers myself if pointed to the right website / manual section.

I followed the tutorial of simulating lysozyme for my protein of interest and it worked beautifully. The question I had when going from the end of the 1 ns sim, how do people typically extend the simulation? I saw an answer on research gate that they use following command string.

gmx convert-tpr -s old.tpr -extend X -o new.tpr
gmx mdrun -deffnm new -cpi old.cpt -noappend

Is this the best way to do it?

Also, the when using this method to extend the simulation… I get new.cpt and new_prev.cpt files as output. If I wanted to extend further, which one do I use?

Thanks so much for helping this old man learn GROMACS as a convert from AMBER.

Your new_prev.cpt is always previous checkpoint file. For example You have simulation and then you stopped the simulation by ctrl+c at step 400000, so gromacs write a .cpt file. Then you continued simulation by adding -cpi new.cpt and again you stopped the simulation by ctrl+c at step 450000. So right now gromacs will generate new.cpt file, which is checkpoint file for step 450000, and generate new_prev.cpt file which is for step 400000. Probably always you will use new.cpt file, because this is the cpt file for the latest step of your simulation.
Your approach about extanding simulation is ok. You can read more here.
Managing long simulations — GROMACS 2022.2 documentation
To be honest you don’t need to use gmx convert-tpr. You can just use grompp, but with changing nnumber of steps in your mdp. file. For example:
gmx grompp -f *.mdp -c *.gro -p *.top -o md1.tpr
gmx mdrun -deffnm md1 -v
Then simulation is complete
Then you increase number of steps in your .mdp file and again you use grompp and mdrun (name of .tpr must be the same)
gmx grompp -f *.mdp -c *.gro -p *.top -o md1.tpr
gmx mdrun -deffnm md1 -v -noappend -cpi md1.cpt
But your approach is ok. It’s up to you, which approach you prefer.

Thank you for the information. If you don’t mind clarifying a point… when you say increase the number of steps in the .mdp file, is this only a one time thing? For example, if your .mdp file has the number of steps that equates to 50 ns… can you just leave that parameter alone since that is an appropriate length for my setup?

My goal is to extend to about 500 ns so I can just repeat these commands with the appropriate files.

Yeah. I will show in example. You have simulation which number of steps that equates 50 ns. Your mdp file looks like (I paste here only small part)

; Run parameters
integrator  = md        ; leap-frog integrator
nsteps      = 25000000    ; 2 * 25000000 = 50000 ps (50 ns)
dt          = 0.002     ; 2 fs

Then after this simulation will end you want to extend to about 500 ns (another 450 ns), so you modify your .mdp file (only nsteps)

; Run parameters
integrator  = md        ; leap-frog integrator
nsteps      = 250000000    ; 2 * 250000000 = 500000 ps (500 ns)
dt          = 0.002     ; 2 fs

and again run grompp (with the same .tpr file name) and mdrun with .cpt file
gmx grompp -f *.mdp -c *.gro -p *.top -o md1.tpr
gmx mdrun -deffnm md1 -v -noappend -cpi md1.cpt

Thanks!

Unfortunately, my time limits on the cluster limits my sims to about 100 ns a day to use the GPUs. I would assume that I can adjust nsteps for that and then just restart them again just like you indicated above. That correct?

Thanks again!

Yeah sure

So the initial extension worked perfectly. When I tried to extend the extension, the simulation ran but basically immediately finished and there was no error other than it used a large percentage of time for calculations and it suggested that i use “-gcom”.

Is this not the way people typically run long simulations? Specifically, do they normally just run a very long simulation and not break it up into say 50 ns pieces?