How can I continue a simulation from the midway of a trajectory (possibly from a trr file)

GROMACS version: 2021.4
GROMACS modification: No

I remember that tbpconv module in old gromacs version can continue a simulation from any time point from a trr file, which preserved all the velocity and force information. However, I found that this function was removed in newer versions of gromacs. I am wondering if there is an alternative method to continue the simulation from the midway of a simulation (possibly from a trr file)?

I was preparing a bunch of initial configurations for a series of steered MD simulations. However, after I simulated a long trajectory with a trapping potential centered at the initial coordinate, I found that I cannot continue the simulation from the trr file with tbpconv command anymore. If this function was completely removed without any alternative, I ask if it’s possible to add this function back. It will be very useful in extracting configurations for preparing initial states for Umbrella sampling, fast protocol in Alchemy, and steered MD.

For the record, continuation from a .trr file is not perfect, because the actual full state of the simulation also includes the state of auxiliary systems like thermostat and barostat that can have internal variables (the discontinuity caused by resetting their values might not be a big deal in practice if done rarely, but formally they should be conserved to produce the desired ensemble).

Continuation in more recent versions of gromacs rely on checkpoint files (.cpt), that take care of this problem. See the -cpi option of mdrun. Also, tpbconv was renamed to convert-tpr, and can extend simulations. Combination of both of these should do what you want.

One case that is not covered is, when it is necessary to change the simulation setting mid simulation. In this case, a “perfect” restart with checkpoint file is not possible, and you should go through grompp with the -t option to specificy position/velocity for restart.

1 Like