Best way for extending molecular dynamics simulation

GROMACS version:2020.4
Hello everyone,

I want to ask to extend my molecular dynamics simulation. I’ve searched the forum before but I’ve seen different answers about this and I want to be sure before doing extended simulation.

I have a 1 µs long completed MD trajectory, I want to extend this simulation to 2 µs. I want to start the new simulation from the end of the first simulation, as a continuation. I also want to append the extended simulation to my previous simulation.

I’ve seen these two sets of commands for this:

1st:
(By editing tpr file)
gmx convert-tpr -s complex.tpr -extension 1000000 -o complex_new.tpr
gmx mdrun -deffnm complex_new -cpi complex.cpt -append

2nd:
(by editing the md.mdp file for 2µs simulation)
gmx grompp -f md.mdp -c complex.gro -p complex.top -o complex_new.tpr
gmx mdrun -deffnm complex_new -append -cpi complex.cpt

Which is the most reliable way? My simulations are too long and I hesitate to do anything wrong.

I’m waiting for your help.

Bests,

1 Like

Use convert-tpr. You only ever need to invoke grompp when you are changing something about the .mdp options. Note that the convert-tpr option is -extend, not extension.

1 Like

Thank you very much. Indeed, in the second command set includes changing mdp file and running the simulation from checkpoint.

gmx convert-tpr -s complex.tpr -extend 1000000 -o complex_new.tpr
gmx mdrun -deffnm complex_new -cpi complex.cpt -append

You recommend this one, thanks again.

Hi again,

I am not sure about appending the second simulation to the first one. In this command, I guess it is not possible because of -deffnm option.

I think appending the simulation as a continuation of the first part would be more useful for the analysis part, what do you suggest?

Thanks in advance

It doesn’t matter whether you append now or not. You can concatenate trajectory and energy files after the run if you don’t do it directly with mdrun.

Thank you very much. After this simulation, for whole part (previous 1µs simulation + extended 1 µs), how can I do image correction? Which tpr file should I use? First one (complex.tpr) or extended tpr (complex_new.tpr) file?

It doesn’t matter, the coordinates in both are the same.