Hello
I’m trying to run 500ns simulation but willing to split the trajectory into 10 continuous simulations (50ns for each one).
in order to do that for each simulation I’ve created a tpr file using the same md.mdp file by looping on
Maybe it would be easier to first run your single, regular job for 500 ns, and then use the -b/-e options of gmx trjcat to concatenate the trajectories in 50 ns blocks?
Your version would be a bit harder to restart correctly since the script starts from 1 each time it is evoked. You’d have to check the latest one and restart the loop from the correct iteration.
If the only thing you need is intermediate checkpoints, consider adding -cpnum to your mdrun command - this will keep numbered .cpt files instead of overwriting them. You can specify the interval between saving consecutive .cpts with -cpt (default is 15 minutes).
Alternatively, if you want the velocities at exact timesteps but don’t care about exact continuation of thermostats/barostats, set nstvout and nstxout to e.g. 500000 in your .mdp, and every 1 ns your coordinates/velocities will be saved to the .trr file. From there, you can read the velocities & positions using grompp.
Otherwise, go for Justin’s solution which should work the way you originally intended.