Gmx mdrun -rerun to rerun the simulation starting from any time

GROMACS version: 2023
GROMACS modification: Yes - Patched with Plumed v2.7

Dear Developers,

I need to do a gmx mdrun -rerun across fixed time increments. So I need to rerun from t=0-500 ns, change some settings in Plumed, and rerun from t=500-750 ns, change settings again, and run from t=750-1200 ns. I am doing this to regenerate the HILLS files.

I have this script, however the simulation does not restart from the checkpoint as no checkpoint was written.
for i in {00…11}; do cd $i; mpirun -np 204 gmx_mpi mdrun -v -deffnm meta -o meta-rerun.trr -plumed plumed-rerun.dat -rerun -ntomp 1 -pf meta_pullf.xvg -px meta_pullx.xvg -nsteps 125000000 -cpt 0.5 -cpo meta-rerun.cpt; cd …/; done

sed -i ‘s/HEIGHT=4.2/HEIGHT=21/g’ ./??/plumed-rerun.dat
sed -i ‘s/BIASFACTOR=10/BIASFACTOR=50/g’ ./??/plumed-rerun.dat

for i in {00…11}; do cd $i; mpirun -np 204 gmx_mpi mdrun -v -deffnm meta -o meta-rerun.trr -plumed plumed-rerun.dat -rerun -ntomp 1 -pf meta_pullf.xvg -px meta_pullx.xvg -nsteps 187500000 -cpt 0.5 -cpo meta-rerun.cpt -cpi meta-rerun.cpt; cd …/; done

sed -i ‘s/BIASFACTOR=50/BIASFACTOR=30/g’ ./??/plumed-rerun.dat

for i in {00…11}; do cd $i; mpirun -np 204 gmx_mpi mdrun -v -deffnm meta -o meta-rerun.trr -plumed plumed-rerun.dat -rerun -ntomp 1 -pf meta_pullf.xvg -px meta_pullx.xvg -nsteps 300000000 -cpt 0.5 -cpo meta-rerun.cpt -cpi meta-rerun.cpt; cd …/; done

I can think of a couple other solutions: (1) I break the trajectory into the chunks I want and do a rerun on those chunks. (2) use the current approach but tell GROMACS to begin at the time I want, and rerun for the number of steps I want.

I do not think (2) is possible.
If I do (1) will this append to the HILLS file correctly? Or will the HILLS file be re-written?

Kind Regards,
Billy

Dear All,

Have fixed my problem. Option 1 works with RESTART on the first line of the Plumed file.

Kind Regards,
Billy