<span class="Apple-style-span" style="font-size: 13px; border-collapse: collapse; color: rgb(51, 51, 51); "><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">Hello gmx-users,</font><br><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">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. </font><br>
<br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">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. </font><br>
<br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">Thanks,</font><br><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">Greg</font><br><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">I'm appending the data, commands, and mdp file below for the reference.</font><br>
<br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">// commands</font><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">1) Simulation A</font><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">grompp -f grompp.mdp -c input_to_A.gro -n index.ndx -p topol.top</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">mdrun -s topol.tpr -c output_of_A.gro</span><br>
<br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">2-1) Simulation B (w/o checkpoint)</font><br><span style="font-family: 'courier new', monospace; ">grompp -f grompp.mdp -c output_of_A.gro -n index.ndx -p topol.top</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">mdrun -s topol.tpr -c output_of_B.gro</span><br><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">2-2) Simulation B(w/ checkpoint)</font><br>
<span style="font-family: 'courier new', monospace; ">grompp -f grompp.mdp -c output of A.gro -n index.ndx -p topol.top -t state.cpt</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">mdrun -s topol.tpr -c output_of_B_with_state.gro</span><br>
<br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">// data</font><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">Simulation A energy data</font><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">time bond bond-nc angles dihedral LJ(SR) </font><font face="arial, sans-serif" style="font-family: arial, sans-serif; "> potential kinetic total energy</font><br>
<span style="font-family: 'courier new', monospace; "> 0.000000 29233.408203 43995.722656 45702.835938 51693.003906 -144114.109375 26510.859375 85977.609375 112488.468750</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.003000 29246.806641 44015.367188 45684.222656 51694.019531 -144110.906250 26529.500000 85964.890625 112494.390625</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.006000 29247.708984 44022.949219 45585.886719 51695.375000 -144107.500000 26444.421875 86054.156250 112498.578125</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.009000 29241.958984 44016.546875 45426.968750 51697.175781 -144104.265625 26278.390625 86218.250000 112496.640625</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.012000 29235.324219 44005.812500 45257.687500 51699.402344 -144101.031250 26097.203125 86396.218750 112493.421875</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.015000 29231.802734 43999.378906 45130.500000 51701.945312 -144098.000000 25965.625000 86528.429688 112494.054688</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.018000 29231.041016 43994.878906 45067.519531 51704.746094 -144094.390625 25903.796875 86595.398438 112499.195312</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.021000 29227.580078 43988.855469 45058.753906 51707.007812 -144091.468750 25890.718750 86615.390625 112506.109375</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.024000 29213.531250 43979.210938 45072.437500 51708.511719 -144088.968750 25884.718750 86626.640625 112511.359375</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.027000 29182.050781 43970.894531 45074.558594 51708.472656 -144086.500000 25849.468750 86666.546875 112516.015625</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.030000 29130.822266 43963.402344 45045.148438 51706.945312 -144083.968750 25762.343750 86753.906250 112516.250000</span><br><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">Simulation B energy data (w/o checkpoint supply)</font><br>
<font face="arial, sans-serif" style="font-family: arial, sans-serif; ">time bond bond-nc angles dihedral LJ(SR) </font><font face="arial, sans-serif" style="font-family: arial, sans-serif; "> potential kinetic total energy</font><span style="font-family: 'courier new', monospace; "></span><br>
<span style="font-family: 'courier new', monospace; "> 0.000000 29177.361328 43958.375000 45142.761719 51717.425781 -144082.890625 25913.031250 86762.046875 112675.078125</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.003000 29105.240234 43942.156250 45086.699219 51714.648438 -144080.843750 25767.906250 86901.765625 112669.671875</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.006000 29024.171875 43924.238281 45048.691406 51711.386719 -144079.562500 25628.921875 87035.437500 112664.359375</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.009000 28946.726562 43907.777344 45057.507812 51707.562500 -144078.187500 25541.375000 87120.882812 112662.257812</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.012000 28883.349609 43891.914062 45115.203125 51703.593750 -144076.875000 25517.187500 87146.593750 112663.781250</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.015000 28838.960938 43876.933594 45194.253906 51698.367188 -144075.921875 25532.578125 87133.734375 112666.312500</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.018000 28811.880859 43862.824219 45258.449219 51691.171875 -144074.359375 25549.968750 87119.765625 112669.734375</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.021000 28797.781250 43848.613281 45278.308594 51680.550781 -144072.375000 25532.875000 87136.203125 112669.078125</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.024000 28790.947266 43837.628906 45248.121094 51666.472656 -144069.750000 25473.421875 87192.453125 112665.875000</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.027000 28788.593750 43833.882812 45184.238281 51649.878906 -144066.250000 25390.343750 87271.281250 112661.625000</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.030000 28791.101562 43838.437500 45111.562500 51631.695312 -144062.437500 25310.359375 87347.335938 112657.695312</span><br style="font-family: 'courier new', monospace; ">
<br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">Simulation B energy data (w/ checkpoint supply)</font><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">time bond bond-nc angles dihedral LJ(SR) </font><font face="arial, sans-serif" style="font-family: arial, sans-serif; "> potential kinetic total energy</font><span style="font-family: 'courier new', monospace; "></span><span style="font-family: 'courier new', monospace; "></span><br>
<span style="font-family: 'courier new', monospace; "> 0.000000 29130.822266 43963.402344 45045.148438 51706.945312 -144083.968750 25762.343750 86753.906250 112516.250000</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.003000 29062.935547 43950.101562 45003.597656 51704.625000 -144082.593750 25638.671875 86871.796875 112510.468750</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.006000 28987.000000 43933.789062 44987.125000 51702.902344 -144080.546875 25530.265625 86977.445312 112507.710938</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.009000 28915.218750 43915.363281 45016.925781 51700.277344 -144079.140625 25468.640625 87037.531250 112506.171875</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.012000 28857.343750 43895.234375 45089.933594 51697.753906 -144077.906250 25462.359375 87046.164062 112508.523438</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.015000 28817.451172 43875.136719 45177.636719 51693.886719 -144077.312500 25486.796875 87024.257812 112511.054688</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.018000 28794.009766 43857.585938 45244.371094 51687.488281 -144075.656250 25507.796875 87008.031250 112515.828125</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.021000 28782.230469 43840.925781 45260.535156 51677.023438 -144073.578125 25487.140625 87028.789062 112515.929688</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.024000 28777.083984 43828.734375 45221.421875 51662.421875 -144071.265625 25418.390625 87094.679688 112513.070312</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.027000 28775.339844 43824.812500 45144.421875 51644.714844 -144067.640625 25321.656250 87187.125000 112508.781250</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; "> 0.030000 28777.638672 43829.210938 45058.011719 51625.828125 -144064.296875 25226.390625 87277.976562 112504.367188</span><br><br><font face="arial, sans-serif" style="font-family: arial, sans-serif; ">// mdp</font><br>
<br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; RUN CONTROL PARAMETERS</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">integrator = md</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Start time and timestep in ps</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">tinit = 0.0</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">dt = 0.003</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">;nsteps = 10000000</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">nsteps = 10</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; For exact run continuation or redoing part of a run</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">init_step = 0</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; mode for center of mass motion removal</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">comm-mode = Linear</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; number of steps for center of mass motion removal</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">nstcomm = 100</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; group(s) for center of mass motion removal</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">comm-grps =</span><br style="font-family: 'courier new', monospace; "><br style="font-family: 'courier new', monospace; "><font class="Apple-style-span" face="arial, sans-serif"><font face="'courier new', monospace"></font></font><span style="font-family: 'courier new', monospace; ">; OUTPUT CONTROL OPTIONS</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Output frequency for coords (x), velocities (v) and forces (f)</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">nstxout = 1</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">nstvout = 1</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">nstfout = 1</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Checkpointing helps you continue after crashes</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">nstcheckpoint = 1</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Output frequency for energies to log file and energy file</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">nstlog = 1</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">nstenergy = 1</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; Output frequency and precision for xtc file</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">nstxtcout = </span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">xtc_precision = 1000</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; This selects the subset of atoms for the xtc file. You can</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; select multiple groups. By default all atoms will be written.</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">xtc-grps =</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; Selection of energy groups</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">energygrps = A B</span><br style="font-family: 'courier new', monospace; "><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; NEIGHBORSEARCHING PARAMETERS</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; nblist update frequency</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">nstlist = 1</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; ns algorithm (simple or grid)</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">ns_type = grid</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Periodic boundary conditions: xyz (default), no (vacuum)</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; or full (infinite systems only)</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">pbc = xyz</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; nblist cut-off</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">rlist = 1.1</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">;domain-decomposition = no</span></span><div>
<span class="Apple-style-span" style="font-size: 13px; border-collapse: collapse; color: rgb(51, 51, 51); "><font class="Apple-style-span" face="'courier new', monospace"><br></font><span style="font-family: 'courier new', monospace; ">; OPTIONS FOR WEAK COUPLING ALGORITHMS</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Temperature coupling</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">;tcoupl = no</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">tcoupl = Berendsen</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">;tcoupl = v-rescale</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Groups to couple separately</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">tc-grps = system</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; Time constant (ps) and reference temperature (K)</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">tau_t = 0.5</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">ref_t = 363</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; Pressure coupling</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">Pcoupl = no</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">;Pcoupl = Berendsen</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">Pcoupltype = Anisotropic</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; Time constant (ps), compressibility (1/bar) and reference P (bar)</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">tau_p = 0.33</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">compressibility = 0 0 0 0 0 0</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">ref_p = 1.01325 1.01325 1.01325 0 0 0</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">; Random seed for Andersen thermostat</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">andersen_seed = -1</span><br style="font-family: 'courier new', monospace; "><font class="Apple-style-span" face="arial, sans-serif"><font face="'courier new', monospace"></font></font><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">; GENERATE VELOCITIES FOR STARTUP RUN</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">gen_vel = no</span><br style="font-family: 'courier new', monospace; ">
<span style="font-family: 'courier new', monospace; ">gen_temp = 363</span><br style="font-family: 'courier new', monospace; "><span style="font-family: 'courier new', monospace; ">gen_seed = 57597</span><br style="font-family: 'courier new', monospace; ">
<font class="Apple-style-span" face="'courier new', monospace"><br></font></span></div>