Problems in restarting simulation

GROMACS version: 2016.3
GROMACS modification: Yes/No
Here post your question

Hi everyone,

I am restarting my simulation from the last point in my trajectory. As I want to sample steps with more frequency for the simulation after restart I have to supply a new mdp file and use these commands as mentioned in the manual::

gmx_mpi grompp -f tmp.mdp -p water.top -t c.cpt -c confout.gro -o new.tpr
gmx_mpi mdrun -s new.tpr -cpi c.cpt -ntomp 1 -v -deffnm cnt -reprod -noappend

The simulation runs to infinity after mdrun and the output on the screen is –

WARNING: This run will generate roughly 641868500016085376 Mb of data
300 steps, infinite ps (continuing from step 1000000, 1000.0 ps).

However supplying mdrun with only tpr file and without cpt file helps prevent this and runs only for the desired steps.

Output is -:
300 steps, 0.3 ps.

I am storing data at 1 fs interval, earlier I was storing it every 100 fs and I am using Gromacs/2016.3 .

Running gmx check on the c.cpt file I obtain

Last frame -1 time 1000.000

Item #frames Timestep (ps)
Step 1
Time 1
Lambda 1
Coords 1
Velocities 1
Forces 0
Box 1

What sequence of steps should I use in order to sample my restart simulation at a different frequency ?

Thnx everyone

http://manual.gromacs.org/documentation/current/user-guide/managing-simulations.html#changing-mdp-options-for-a-restart

I had gone through this and used the commands mentioned in “Changing mdp options for a restart” as mentioned above but still could not figure out why i am running into an infinite simulation . How should i use the checkpoint file with mdrun ?

The infinite time probably comes from failing to set tinit as the information in the link notes. Without your .mdp file, we can’t be sure.

The syntax for grompp and mdrun is exactly as shown in that link. That’s how you make use of the checkpoint file.

1 Like

Thnx @jalemkul , @Dr_DBW .
According to the above replies ,
I tried all possible combinations to restart my simulation from 1000 ps to 1000.3 ps (
1000000 to 1000300 steps).

1.nsteps = 300 tinit = 0 ps init-step = 0

OUTPUT --> 300 steps, infinite ps (continuing from step 1000000, 1000.0 ps).

0th step on log file -->

Step Time
1000000 1000.00000

  1. nsteps = 300 tinit = 1000 ps init-step = 0

OUTPUT --> 300 steps, infinite ps (continuing from step 1000000, 1000.0 ps).

0th step on log file -->

Step Time
1000000 2000.00000

  1. nsteps = 300 tinit = 0 ps init-step = 1000000

OUTPUT --> 1000300 steps, 1000.3 ps (continuing from step 1000000, 1000.0 ps).

0th step on log file -->

Step Time
1000000 1000.00000

  1. nsteps = 300 tinit = 1000 ps init-step = 1000000

OUTPUT --> 1000300 steps, 1000.3 ps (continuing from step 1000000, 1000.0 ps).

0th step on log file -->

Step Time
1000000 2000.00000

The 3rd simulation began and ended at the desired time and correct number of steps.

Is this the correct way to restart the simulation mentioning both the beginning time and the number of steps ?

The mdp file is pasted below -->

; Define can be used to control processes
define = -DPOSRES

; Parameters describing what to do, when to stop and what to save
integrator = md-vv ; Algorithm
nsteps = 300 ; Maximum number of (minimization) steps to perform(10 ns)
init-step = 1000000 ;
dt = 0.001 ; time step(1 fs or .001 ps)
nstfout = 1 ;
nstxout = 1 ;
nstvout = 1 ;
nstlog = 1 ;
nstenergy = 1 ; Write energies to disk every nstenergy steps
nstcalcenergy = 10 ;
nstxout-compressed = 1 ;
energygrps = SOL ; Which energy group(s) to write to disk

;NVE
nstcomm = 10 ; frequency for center of mass motion removal
comm-mode = Linear ; remove com translation and rotation around com
comm-grps = SOL ; group(s) for center of mass motion removal

;SEARCHLIST
cutoff-scheme = Verlet ;
nstlist = 10 ; Frequency to update the neighbor list(default)
ns_type = grid ; Method to determine neighbor list (simple, grid)
pbc = xyz ;
verlet-buffer-tolerance = 0.005 ; maximum error for pair interactions per particle(default)

;USING LJ-PME
coulombtype = PME
vdwtype = PME

rlist = 1.4
rvdw = 1.4
rcoulomb = 1.4
fourierspacing = 0.12
pme-order = 4
ewald-rtol-lj = 0.001
lj-pme-comb-rule = geometric
DispCorr = Ener

;BOND CONSTRAINTS
continuation = yes ; Continue NVT after the box has been resized
constraints = h-bonds ; Bond types to replace by constraints
constraint_algorithm = shake ;

;Velocity generation
gen-vel = no ;
gen-temp = 298 ;

Thnx everyone

As noted at http://manual.gromacs.org/documentation/current/user-guide/mdp-options.html#mdp-init-step t = tinit + dt * (init-step + i) to get the correct starting time of t=1000 for your extension you have to set tinit=0, init-step=1000000, dt=0.001.