<div dir="ltr"><div><div><div>Thanks to all!!!<br></div>Your help has been very valuable for me. I was stuck with this problem and now I know how to continue.<br></div>You will read me again if I have got new questions (Sure I will have :) ).<br><br></div>Thanks!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-13 12:50 GMT+02:00 Berk Hess <span dir="ltr">&lt;<a href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>&gt;</span>:<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>Hi,<br>
      <br>
      This issue was already resolved, but somehow my answer didn&#39;t go
      to the list.<br>
      <br>
      Using vdw-modifier=none made the energy match ACEMD. Apparently
      ACEMD doesn&#39;t correct for the jump in the LJ energy at the
      cut-off.<br>
      <br>
      Cheers,<br>
      <br>
      Berk<div><div class="h5"><br>
      <br>
      On 10/10/2014 07:21 PM, Mark Abraham wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Fri, Oct 10, 2014 at 4:27 PM,
            Szilárd Páll <span dir="ltr">&lt;<a href="mailto:pall.szilard@gmail.com" target="_blank">pall.szilard@gmail.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
              <br>
              I think you&#39;ll have the easiest time with the plain C
              reference<br>
              kernels; the actual kernels used in production are
              compiled from SIMD<br>
              intrinsics code which you likely don&#39;t want to start
              reading (and from<br>
              where you can&#39;t even print).<br>
              <br>
              For the Verlet cut-off scheme (default in 5.0) these are
              the files<br>
              with the reference implementation you should be looking
              at:<br>
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref{,_inner,_outer}.c/h<br>
              - there is no single source file, but this should be quite
              easy to read.<br>
              There is a bit more readable GPU reference kernel (trigger
              with<br>
              GMX_EMULATE_GPU env. var.):<br>
              src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c<br>
              Finally, for the group scheme there&#39;s also self-contained
              reference kernel here:<br>
              src/gromacs/gmxlib/nonbonded/nb_generic.c<br>
              <br>
              The first and last kernels for the CPU Verlet and Group
              scheme you can<br>
              trigger with the GMX_DISABLE_SIMD_KERNELS environment
              variable.<br>
              <br>
              Cheers,<br>
              --<br>
              Szilárd<br>
              <br>
              PS: make sure that the same interaction modifiers (switch,
              shift) are<br>
              used by both GROMACS and ACEMD.<br>
            </blockquote>
            <div><br>
            </div>
            <div>Szilard&#39;s point here is really important. Some quality
              time with the docs of both packages is always needed to
              try to get them to do exactly the same thing as each
              other. Ultimately they can&#39;t do the addition of a large
              bunch of floating-point numbers in exactly the same way,
              but you need to make sure all the non-bonded settings are
              really the same.</div>
            <div><br>
            </div>
            <div>Also, start by verifying the LJ potential between two
              atoms, because now there&#39;s no accumulation to have
              different behaviour ;-) Then, observe how much the
              potential in each code varies even upon &quot;invariant&quot;
              operations, like a rotation of the entire system (which
              will change the order of the accumulation). By now, maybe
              you&#39;ve observed that the deviation is of an expected
              magnitude (YMMV, I have no idea).</div>
            <div><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              On Fri, Oct 10, 2014 at 4:07 PM, IÑIGO SAENZ<br>
              <div>
                <div>&lt;<a href="mailto:inigo.saenz01@estudiant.upf.edu" target="_blank">inigo.saenz01@estudiant.upf.edu</a>&gt;
                  wrote:<br>
                  &gt; Hi all,<br>
                  &gt;<br>
                  &gt; I&#39;ll try to explain to you my situation.<br>
                  &gt; I have a simple system of 3000 Argon atoms
                  without bonds, without angles,<br>
                  &gt; without dihedrals, only with LJ parameters and I
                  run it with ACEMD and I<br>
                  &gt; obtained a VDW potential of -1.34 KJ/mol.<br>
                  &gt; After this, I generate the same system for
                  running in gromacs (.top and .gro<br>
                  &gt; files), I run it and I obtain a LJ energy of
                  -1.32524.<br>
                  &gt; What I want is to include some print statements
                  into the source files of<br>
                  &gt; gromacs in order to be able to analyze how
                  gromacs performs the calculation<br>
                  &gt; of LJ potential to find where the desviation in
                  the results between ACEMD<br>
                  &gt; and GROMACS is produced.<br>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>You could do this, but the different order of
              operations in the two codes is going to make it hard to
              get meaningful output to compare.</div>
            <div><br>
            </div>
            <div>Mark</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div>
                <div>
                  &gt;<br>
                  &gt; The electrostatic configuration that I use in the
                  .mdp file is the<br>
                  &gt; following:<br>
                  &gt;<br>
                  &gt; coulombtype = cut-off<br>
                  &gt; rlist                    = 0<br>
                  &gt; rcoulomb                 = 0.9<br>
                  &gt; rvdw                     = 0.9<br>
                  &gt;<br>
                  &gt; And here some lines of the mdp.log that might be
                  of interest:<br>
                  &gt;<br>
                  &gt; Gromacs version:    VERSION 5.0.1<br>
                  &gt; Precision:          single<br>
                  &gt; Memory model:       64 bit<br>
                  &gt; MPI library:        thread_mpi<br>
                  &gt; OpenMP support:     enabled<br>
                  &gt; GPU support:        disabled<br>
                  &gt; invsqrt routine:    gmx_software_invsqrt(x)<br>
                  &gt; SIMD instructions:  AVX_256<br>
                  &gt;<br>
                  &gt; Thank you very much in advance.<br>
                  &gt;<br>
                  &gt; Iñigo Sáenz<br>
                  &gt; Universitat Pompeu Fabra, Barcelona.<br>
                  &gt;<br>
                  &gt;<br>
                  &gt;<br>
                  &gt;<br>
                  &gt; 2014-10-10 14:40 GMT+02:00 Berk Hess &lt;<a href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>&gt;:<br>
                  &gt;&gt;<br>
                  &gt;&gt; Hi,<br>
                  &gt;&gt;<br>
                  &gt;&gt; We might need a wiki entry for this, since
                  this is a question that keeps<br>
                  &gt;&gt; popping up, but it&#39;s unfortunately not easy
                  to answer.<br>
                  &gt;&gt;<br>
                  &gt;&gt; Berk<br>
                  &gt;&gt;<br>
                  &gt;&gt;<br>
                  &gt;&gt; On 10/10/2014 02:37 PM, Mark Abraham wrote:<br>
                  &gt;&gt;<br>
                  &gt;&gt; Hi,<br>
                  &gt;&gt;<br>
                  &gt;&gt; The simple answer is &quot;in most of them&quot; :-)
                  The non-bonded kernels where<br>
                  &gt;&gt; they are computed come in lots of physics and
                  hardware flavours, and then<br>
                  &gt;&gt; there is a lot infrastructure that
                  coordinates accumulating them properly.<br>
                  &gt;&gt; We can point you in the right direction if we
                  know what you&#39;re trying to<br>
                  &gt;&gt; achieve, though.<br>
                  &gt;&gt;<br>
                  &gt;&gt; Mark<br>
                  &gt;&gt;<br>
                  &gt;&gt; On Fri, Oct 10, 2014 at 12:53 PM, IÑIGO SAENZ<br>
                  &gt;&gt; &lt;<a href="mailto:inigo.saenz01@estudiant.upf.edu" target="_blank">inigo.saenz01@estudiant.upf.edu</a>&gt;
                  wrote:<br>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; Hi,<br>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; Does anyone know in which .C file are the
                  LJ and Coulomb short range<br>
                  &gt;&gt;&gt; interactions energies calculated, please?<br>
                  &gt;&gt;&gt; I&#39;m getting crazy studying the gromacs&#39;
                  source code and I cannot find the<br>
                  &gt;&gt;&gt; right .C file where those calculations
                  are made.<br>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; Iñigo Sáenz<br>
                  &gt;&gt;&gt; Universitat Pompeu Fabra, Barcelona.<br>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; --<br>
                  &gt;&gt;&gt; Gromacs Developers mailing list<br>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; * Please search the archive at<br>
                  &gt;&gt;&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a>
                  before<br>
                  &gt;&gt;&gt; posting!<br>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; * 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>
                  &gt;&gt;&gt;<br>
                  &gt;&gt;&gt; * For (un)subscribe requests visit<br>
                  &gt;&gt;&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
                  &gt;&gt;&gt; or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
                  &gt;&gt;<br>
                  &gt;&gt;<br>
                  &gt;&gt;<br>
                  &gt;&gt;<br>
                  &gt;&gt;<br>
                  &gt;&gt;<br>
                  &gt;&gt; --<br>
                  &gt;&gt; Gromacs Developers mailing list<br>
                  &gt;&gt;<br>
                  &gt;&gt; * Please search the archive at<br>
                  &gt;&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a>
                  before<br>
                  &gt;&gt; posting!<br>
                  &gt;&gt;<br>
                  &gt;&gt; * 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>
                  &gt;&gt;<br>
                  &gt;&gt; * For (un)subscribe requests visit<br>
                  &gt;&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a>
                  or<br>
                  &gt;&gt; send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
                  &gt;<br>
                  &gt;<br>
                  &gt;<br>
                  &gt; --<br>
                  &gt; Gromacs Developers mailing list<br>
                  &gt;<br>
                  &gt; * Please search the archive at<br>
                  &gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a>
                  before<br>
                  &gt; posting!<br>
                  &gt;<br>
                  &gt; * 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>
                  &gt;<br>
                  &gt; * For (un)subscribe requests visit<br>
                  &gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a>
                  or<br>
                  &gt; send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
                  --<br>
                  Gromacs Developers mailing list<br>
                  <br>
                  * Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a>
                  before posting!<br>
                  <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>
                  <br>
                  * For (un)subscribe requests visit<br>
                  <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a>
                  or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<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>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br></blockquote></div><br></div>