<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi all,<br>
      <br>
      I am a new user/developer of GROMACS. I am using GROMACS 4.6.3<br>
      My goal is to extend the package GromPy, created by Ren&eacute; Pool but
      I am still new to the code.<br>
      <br>
      In the meanwhile I wanted to calculate the excess chemical
      potential using TPI/TPIC. TPIC is preferable as my systems tend to
      be highly anisotropic and therefore TPIC allows me to choose where
      to sample.<br>
      <br>
      I noticed that some energies for the insertion of molecules were
      extremely low. To check if everything was working ok, I prepared
      the following test:<br>
      <br>
    </tt>
    <ul>
      <li><tt>I have a configuration without the inserted molecule and
          the same configuration with the molecule inserted.</tt></li>
      <li><tt>The molecule in question is monoethanolamine (MEA).</tt></li>
      <li><tt>MEA topology was modified with nrexcl=5 so that intra
          molecular interactions were not an issue for comparing
          insertion energies.</tt></li>
      <li><tt>I run 1 time step in each and then run "echo '1 2 3 4 5 6
          0' | g_energy" to get the different terms for potential
          energy.<br>
        </tt></li>
      <li><tt>When calculating the differences between the "inserted"
          and "non inserted" configurations I corrected for the
          potential energy due to angles and dihedrals.</tt></li>
      <li><tt>I hacked the tpi.c source code and forced it to insert the
          same configuration as in the tests described above.</tt></li>
    </ul>
    <p><tt>I prepared at tgz with the tests and the code for the hacked
        tpi.c. I can be downloaded from:<br>
        <a
          href="https://www.dropbox.com/s/0lnjancduzi2frf/example_to_send.tgz">https://www.dropbox.com/s/0lnjancduzi2frf/example_to_send.tgz</a><br>
      </tt></p>
    <p><tt>As I have tested it, if you compile GROMACS 4.6.3 with the my
        modified version of tpi.c and run "bash run_examples.bash" in
        the example folder you should get the file result.txt as shown
        below (really hope it works for you too):<br>
      </tt></p>
    <tt><br>
      You can see from the results below that the energies between the
      standard calculation for potential energy and the TPIC potential
      energy do not match. I searched the archives and the only
      reference to a problem like this was due to problems in the
      reciprocal sum in PME. In my case the problem is in the Coulomb
      real space sum. This is affected by a cutoff and I could not
      locate the exact place in the code where these calculations are
      done.<br>
      <br>
      The LJ sums match, apart from long range corrections. I also find
      it strange that the reciprocal part of the coulomb term is 0.0 in
      TPIC.<br>
      <br>
      I would be really thankful if someone could help me understand
      where the problem is. Hopefully you already know.<br>
      <br>
      Kind regards,<br>
      <br>
      Rui Fartaria <br>
      <br>
      <br>
      <br>
      &nbsp; Angle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LJ&nbsp;&nbsp;&nbsp; Coul(SR)&nbsp;&nbsp; Coul(RECIP)&nbsp; Potential<br>
      &nbsp;15611.243&nbsp; -9512.769&nbsp; -9837.916 -13497.961&nbsp;&nbsp; -174.225 -17411.627
      <br>
      &nbsp;15649.481&nbsp; -9521.968&nbsp; -9842.127 -13493.568&nbsp;&nbsp; -174.517 -17382.699
      <br>
      &nbsp;&nbsp;&nbsp; 38.238&nbsp;&nbsp;&nbsp;&nbsp; -9.199&nbsp;&nbsp;&nbsp;&nbsp; -4.211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.393&nbsp;&nbsp;&nbsp;&nbsp; -0.292&nbsp;&nbsp;&nbsp;&nbsp; 28.928
      <br>
      Potential - Angle - RB =&nbsp;&nbsp;&nbsp;&nbsp; -0.111<br>
      <br>
      <br>
      ******************************************<br>
      RESULTS FROM TPI<br>
      ******************************************<br>
      Using GMX_CAVITY_CENTER cavity <br>
      <br>
      <br>
      <br>
      <br>
      WARNING: USING CUSTOM CONF FOR INSERTION<br>
      <br>
      <br>
      epot = -65.895645<br>
      embU = 21686035981.671570<br>
      F_COUL_RECIP = 0.000000<br>
      F_COUL_SR = -61.993370<br>
      F_LJ = -3.902278<br>
      beta = 0.361176<br>
      BEGIN INSERTED CONFIGURATION<br>
      Frame time: 0.000000<br>
      14.00 2.058448 1.753919 2.382128<br>
      &nbsp;1.00 2.116501 1.707533 2.312707<br>
      12.00 1.961425 1.845027 2.319632<br>
      &nbsp;1.00 2.037138 1.699207 2.464866<br>
      &nbsp;1.00 2.021572 1.899345 2.245694<br>
      12.00 1.895999 1.942494 2.418418<br>
      &nbsp;1.00 1.896307 1.780891 2.259156<br>
      &nbsp;1.00 1.853303 1.890639 2.505562<br>
      &nbsp;1.00 1.961367 2.024441 2.449268<br>
      16.00 1.780418 1.997807 2.356455<br>
      &nbsp;1.00 1.751046 2.084993 2.389755<br>
      END INSERTED CONFIGURATION<br>
      <br>
    </tt><tt></tt>
  </body>
</html>