[gmx-users] checkpoint file and *.gro -- energy calculation

Yongchul Chung yxc169 at case.edu
Sat Nov 13 17:40:23 CET 2010


Hello gmx-users,

I ran two short simulation in series (simulation A --> simulation B). The
output *.gro file from the simulation A was used as an input file for the
simulation B. If I compare the energy value at the end of simulation A, and
t=0 at simulation B, they are different (<0.1% deviation). However, if you
supply checkpoint file, you get exactly the same value of the energy at t=0
for simulation B. I used gmxdump to check out the contents of cpt file. It
seems like the file has some extra components compared to gro file (which
has position, and velocity information). Several extra things I found that
might be relevant were 'energy_aver', 'energy_sum', and 'energy_n[0]'. It
seems like gromacs somehow use these values internally to match the energy
value at the start of simulation B to the end of simulation A.

Can someone tell me why there's an error in the energy value if we don't
supply the cpt file, but with cpt file, there's no error? I suspect it has
to do with the extra information I mentioned above, but not sure where in
the source code to look for more information.

Thanks,

Greg

I'm appending the data, commands, and mdp file below for the reference.

// commands
1) Simulation A
grompp -f grompp.mdp -c input_to_A.gro -n index.ndx -p topol.top
mdrun -s topol.tpr -c output_of_A.gro

2-1) Simulation B (w/o checkpoint)
grompp -f grompp.mdp -c output_of_A.gro -n index.ndx -p topol.top
mdrun -s topol.tpr -c output_of_B.gro

2-2) Simulation B(w/ checkpoint)
grompp -f grompp.mdp -c output of A.gro -n index.ndx -p topol.top -t
state.cpt
mdrun -s topol.tpr -c output_of_B_with_state.gro

// data
Simulation A energy data
time                     bond                     bond-nc
angles                  dihedral
LJ(SR)                             potential
kinetic                   total energy
    0.000000  29233.408203  43995.722656  45702.835938  51693.003906
-144114.109375    26510.859375  85977.609375  112488.468750
    0.003000  29246.806641  44015.367188  45684.222656  51694.019531
-144110.906250    26529.500000  85964.890625  112494.390625
    0.006000  29247.708984  44022.949219  45585.886719  51695.375000
-144107.500000    26444.421875  86054.156250  112498.578125
    0.009000  29241.958984  44016.546875  45426.968750  51697.175781
-144104.265625    26278.390625  86218.250000  112496.640625
    0.012000  29235.324219  44005.812500  45257.687500  51699.402344
-144101.031250    26097.203125  86396.218750  112493.421875
    0.015000  29231.802734  43999.378906  45130.500000  51701.945312
-144098.000000    25965.625000  86528.429688  112494.054688
    0.018000  29231.041016  43994.878906  45067.519531  51704.746094
-144094.390625    25903.796875  86595.398438  112499.195312
    0.021000  29227.580078  43988.855469  45058.753906  51707.007812
-144091.468750    25890.718750  86615.390625  112506.109375
    0.024000  29213.531250  43979.210938  45072.437500  51708.511719
-144088.968750    25884.718750  86626.640625  112511.359375
    0.027000  29182.050781  43970.894531  45074.558594  51708.472656
-144086.500000    25849.468750  86666.546875  112516.015625
    0.030000  29130.822266  43963.402344  45045.148438  51706.945312
-144083.968750    25762.343750  86753.906250  112516.250000

Simulation B energy data (w/o checkpoint supply)
time                     bond                     bond-nc
angles                  dihedral
LJ(SR)                              potential
kinetic                   total energy
    0.000000  29177.361328  43958.375000  45142.761719  51717.425781
-144082.890625     25913.031250  86762.046875  112675.078125
    0.003000  29105.240234  43942.156250  45086.699219  51714.648438
-144080.843750     25767.906250  86901.765625  112669.671875
    0.006000  29024.171875  43924.238281  45048.691406  51711.386719
-144079.562500     25628.921875  87035.437500  112664.359375
    0.009000  28946.726562  43907.777344  45057.507812  51707.562500
-144078.187500     25541.375000  87120.882812  112662.257812
    0.012000  28883.349609  43891.914062  45115.203125  51703.593750
-144076.875000     25517.187500  87146.593750  112663.781250
    0.015000  28838.960938  43876.933594  45194.253906  51698.367188
-144075.921875     25532.578125  87133.734375  112666.312500
    0.018000  28811.880859  43862.824219  45258.449219  51691.171875
-144074.359375     25549.968750  87119.765625  112669.734375
    0.021000  28797.781250  43848.613281  45278.308594  51680.550781
-144072.375000     25532.875000  87136.203125  112669.078125
    0.024000  28790.947266  43837.628906  45248.121094  51666.472656
-144069.750000     25473.421875  87192.453125  112665.875000
    0.027000  28788.593750  43833.882812  45184.238281  51649.878906
-144066.250000     25390.343750  87271.281250  112661.625000
    0.030000  28791.101562  43838.437500  45111.562500  51631.695312
-144062.437500     25310.359375  87347.335938  112657.695312

Simulation B energy data (w/ checkpoint supply)
time                     bond                     bond-nc
angles                  dihedral
LJ(SR)                            potential
kinetic                   total energy
    0.000000  29130.822266  43963.402344  45045.148438  51706.945312
-144083.968750    25762.343750  86753.906250  112516.250000
    0.003000  29062.935547  43950.101562  45003.597656  51704.625000
-144082.593750    25638.671875  86871.796875  112510.468750
    0.006000  28987.000000  43933.789062  44987.125000  51702.902344
-144080.546875    25530.265625  86977.445312  112507.710938
    0.009000  28915.218750  43915.363281  45016.925781  51700.277344
-144079.140625    25468.640625  87037.531250  112506.171875
    0.012000  28857.343750  43895.234375  45089.933594  51697.753906
-144077.906250    25462.359375  87046.164062  112508.523438
    0.015000  28817.451172  43875.136719  45177.636719  51693.886719
-144077.312500    25486.796875  87024.257812  112511.054688
    0.018000  28794.009766  43857.585938  45244.371094  51687.488281
-144075.656250    25507.796875  87008.031250  112515.828125
    0.021000  28782.230469  43840.925781  45260.535156  51677.023438
-144073.578125    25487.140625  87028.789062  112515.929688
    0.024000  28777.083984  43828.734375  45221.421875  51662.421875
-144071.265625    25418.390625  87094.679688  112513.070312
    0.027000  28775.339844  43824.812500  45144.421875  51644.714844
-144067.640625    25321.656250  87187.125000  112508.781250
    0.030000  28777.638672  43829.210938  45058.011719  51625.828125
-144064.296875    25226.390625  87277.976562  112504.367188

// mdp

; RUN CONTROL PARAMETERS
integrator               = md
; Start time and timestep in ps
tinit                    = 0.0
dt                       = 0.003
;nsteps                   = 10000000
nsteps                   = 10
; For exact run continuation or redoing part of a run
init_step                = 0
; mode for center of mass motion removal
comm-mode                = Linear
; number of steps for center of mass motion removal
nstcomm                  = 100
; group(s) for center of mass motion removal
comm-grps                =

; OUTPUT CONTROL OPTIONS
; Output frequency for coords (x), velocities (v) and forces (f)
nstxout                  = 1
nstvout                  = 1
nstfout                  = 1
; Checkpointing helps you continue after crashes
nstcheckpoint            = 1
; Output frequency for energies to log file and energy file
nstlog                   = 1
nstenergy                = 1
; Output frequency and precision for xtc file
nstxtcout                =
xtc_precision            = 1000
; This selects the subset of atoms for the xtc file. You can
; select multiple groups. By default all atoms will be written.
xtc-grps                 =
; Selection of energy groups
energygrps               = A B

; NEIGHBORSEARCHING PARAMETERS
; nblist update frequency
nstlist                  = 1
; ns algorithm (simple or grid)
ns_type                  = grid
; Periodic boundary conditions: xyz (default), no (vacuum)
; or full (infinite systems only)
pbc                      = xyz
; nblist cut-off
rlist                    = 1.1
;domain-decomposition     = no

; OPTIONS FOR WEAK COUPLING ALGORITHMS
; Temperature coupling
;tcoupl                   = no
tcoupl                   = Berendsen
;tcoupl                   = v-rescale
; Groups to couple separately
tc-grps                  = system
; Time constant (ps) and reference temperature (K)
tau_t                    = 0.5
ref_t                    = 363
; Pressure coupling
Pcoupl                   = no
;Pcoupl                   = Berendsen
Pcoupltype               = Anisotropic
; Time constant (ps), compressibility (1/bar) and reference P (bar)
tau_p                    = 0.33
compressibility          = 0 0 0 0 0 0
ref_p                    = 1.01325 1.01325 1.01325 0 0 0
; Random seed for Andersen thermostat
andersen_seed            = -1

; GENERATE VELOCITIES FOR STARTUP RUN
gen_vel                  = no
gen_temp                 = 363
gen_seed                 = 57597
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20101113/6726595a/attachment.html>


More information about the gromacs.org_gmx-users mailing list