Thanks, Mark.<div><br></div><div>Greg<br><br><div class="gmail_quote">On Sat, Nov 13, 2010 at 12:35 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
  
  <div text="#000000" bgcolor="#ffffff"><div class="im">
    On 14/11/2010 4:06 AM, Yongchul Chung wrote:
    <blockquote type="cite">Thanks Justin for your prompt reply. I am aware of the
      link you provided, but it seems they are rather hand-waving. It
      would be nice if I could be directed to a source code of some
      sort.</blockquote>
    <br></div>
    They&#39;re &quot;hand-waving&quot; by design of course - a normal user doesn&#39;t
    care about the details so long as they know how to make it work
    right.<br>
    <br>
    src/gmxlib/checkpoint.c has the details (in 4.5 at least), which
    vary quite a bit with MD algorithm and GROMACS version.<br><font color="#888888">
    <br>
    Mark</font><div><div></div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div><br>
      </div>
      <div>Greg<br>
        <br>
        <div class="gmail_quote">
          On Sat, Nov 13, 2010 at 11:50 AM, Justin A. Lemkul <span dir="ltr">&lt;<a href="mailto:jalemkul@vt.edu" target="_blank">jalemkul@vt.edu</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            <div><br>
              <br>
              Yongchul Chung wrote:<br>
              <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                Hello gmx-users,<br>
                <br>
                I ran two short simulation in series (simulation A
                --&gt; 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 (&lt;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
                &#39;energy_aver&#39;, &#39;energy_sum&#39;, and &#39;energy_n[0]&#39;. 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. <br>
                Can someone tell me why there&#39;s an error in the energy
                value if we don&#39;t supply the cpt file, but with cpt
                file, there&#39;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. <br>
              </blockquote>
              <br>
            </div>
            I can&#39;t provide any information on the specifics in the
            code, but if you think about the purpose and function of the
            .cpt file, it makes sense.  The .cpt file contains
            information about the entire state of the system, which is
            described by more than just position and velocities, which,
            in the .gro file, are in limited precision.<br>
            <br>
            For a bit more:<br>
            <br>
            <a href="http://www.gromacs.org/Documentation/How-tos/Extending_Simulations#Exact_vs_binary_identical_continuation" target="_blank">http://www.gromacs.org/Documentation/How-tos/Extending_Simulations#Exact_vs_binary_identical_continuation</a><br>

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

<br>--<br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br></blockquote></div><br></div>