Starting a new simulation from a frame different than the last frame of the prev. simulation

GROMACS version: 2022.3
GROMACS modification: No
Here post your question

Hi all,

I am trying to start a new simulation as a continuation of my equilibration protocol. Doing my nvt-npt cycles, I want to start my nvt simulation that follows an npt simulation where the pressure is close to the target pressure and not at a high fluctuation point.

I believe the flag -time in grompp would solve my problem but I cannot seem to get it to work. My grompp command line goes as such:

mpirun -np 1 gmx_mpi grompp -f $mdp/pressure_benchmark_1/10ns_nvt.mdp -c 10ns_npt.gro -t 10ns_npt.cpt -p $begin/topol.top -time 9975.30 -o 10ns_nvt.tpr -maxwarn 2

This line is read by Gromacs without producing any errors, then my mdrun command starts the simulation. But the new simulation starts from the last frame of my previous one. I must be missing something but I can’t find what. I have looked into the forum and the manual but have not found something to help me with this.

Any help is appreciated! Thank you.

Hi @ege,

This line is read by Gromacs without producing any errors, then my mdrun command starts the simulation.

Why are you using -maxwarn 2? What are the warnings?

I am not familiar with the -time option. I think the problem is that you are providing no information to GROMACS for that specific state at that time. The .gro file is just a snapshot, so there is no way you can reconstruct from there where you were before. Similarly, the .cpt file contains only the last frame information for a proper continuation. I think the -time flag works only if you provide to -t a full precision trajectory (.trr), so that GROMACS can really recover the full state, to an extent at least. If you do not have a .trr file (and noone has usually because they’re too chunky) the best option is to extract from the .xtc the frame closest to the time you want and proceed from there, even if this means to regenerate velocities etc (so start anew).

On a side note, pressure fluctuates a ton all the time, and extracting a frame at a given pressure won’t do much in my experience. If you are running a NPT simulation to then go back to NVT then I think a more robust approach might be to let the system relax at NPT and then extract a frame where the volume is equal to the average volume of the box and continue the NVT from there.