Need Assistance with Extending MD Simulation from Specific Timepoint

GROMACS version: 2022
GROMACS modification: No
Here post your question
Hi everyone!

I’m writing to seek your assistance regarding a challenge I’ve encountered while attempting to extend an MD simulation using GROMACS.
Here’s the situation: I was performing an MD simulation, and unfortunately, due to power fluctuations, my simulation was interrupted. The simulation had already progressed up to 37 ns. However, when I attempted to extend the simulation using the checkpoint (cpt) file, it started from 3 ns instead of continuing from the previous 37 ns.

I’ve tried various methods to extend the simulation, including using the gmx mdrun command with the -append and -noappend options. Additionally, I attempted to create a new input file (.tpr) based on the last frame of the trajectory using the gmx grompp command, but to no avail, I encountered the error: no. of coordinates in coordinate file does not match topology.

Could you please guide me on how I can modify my checkpoint file back to the 37 ns timepoint or suggest alternative methods to extend the simulation from the desired timepoint?

I appreciate any insights or suggestions you may have to resolve this issue. Thank you in advance for your time and assistance.

Do you have a .trr trajectory? While it will not create an exact continuation (due to technical reasons, like barostat/thermostat history etc), you can use gmx grompp with -t and -time to read positions and velocities into a new .tpr file. That’s one reason it sometimes makes sense to save positions/velocities to .trr with a very low frequency, say every 1-2 ns.

It’s strange that your coordinate file generated from the trajectory does not match your topology though. Are you dumping the full system?

First, you may have a look here Managing long simulations - GROMACS 2024.1 documentation, if you haven’t already done so. In your case, given that the simulation was interrupted, you only need to restart the simulation, not extend the simulation time. The way to do this is simply “gmx mdrun -cpi file.cpt”. Is this what you also did, when you say “attempted to extend the simulation”? I don’t know the details of your simulation e.g. simulation time, timestep, system size, which might help understanding the issue, but it might be that the last checkpoint file was saved at 3ns. The checkpoint files are saved by default every 15 min. Can this be the case?