<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>
        <p>
            Thanks for the reply, Berk.<br />
            So, it is as I suspected. But whatabout the potential energy? using the positions from the .trr file(extracted using g_traj) the potential energy I get is not exactly thesame as that given by the .edr file (via g_energy).<br />
            <br />
            Inon.<br />
            <br />
            <br />
            Quoting "Inon Sharony" &lt;InonShar@TAU.ac.IL&gt;:<br />
            <br />
            &gt;<br />
            &gt;<br />
            &gt; Hi GMX developers!<br />
            &gt;<br />
            &gt; (note: if this seems too rudimentary -- I posted first on the users'<br />
            &gt; list but no one picked up the glove...)<br />
            &gt;<br />
            &gt; I'm trying to check that the energies I can calculate using the<br />
            &gt; trajectory output are the same as those given by g_energy. I'm<br />
            &gt; running a diatomic for only a couple of steps and already there are<br />
            &gt; inconsistencies. I'm using g_traj to print out the x's and v's from<br />
            &gt; the .trr file (indouble precision). The steps I'm looking at are at<br />
            &gt; the beginningof the trajectory, but since my initial conditions are<br />
            &gt; zero velocitiesand configuration very close to the energy-minimized<br />
            &gt; one, I don't thinkthere should be any excessively large forces (the<br />
            &gt; total energy is about21 kJ/mole).<br />
            &gt;<br />
            &gt; I suspect that one possible factor could be that the leap-frog<br />
            &gt; algorithm uses trajectory data (i.e. positions and velocities)<br />
            &gt; different from those printed to the trajectory file. For example, it<br />
            &gt; appears that the velocity printed out in the .trr file is notstrictly<br />
            &gt; the velocity at that time-step, but the velocity given by anaverage<br />
            &gt; of the kinetic energies half a time-step forwards and back(since GMX<br />
            &gt; uses the leap-frog algorithm). This has managed to explainthe<br />
            &gt; discrepancy in the kinetic energies (the one given by g_energy andthe<br />
            &gt; one calculated from v's given by g_traj). As for the potentialenergy,<br />
            &gt; I'm still trying to figure that out...<br />
            &gt;<br />
            &gt; Could you please direct me to the file and line in the source code<br />
            &gt; where the kinetic and potential energies are calculated, just before<br />
            &gt; they are printed to the edr file?<br />
            &gt;<br />
            &gt; Thanks very much in advance,<br />
            &gt;<br />
            &gt; --<br />
            &gt; Inon&#160; &#160;Sharony<br />
            &gt; ינון&#160; &#160; &#160;שרוני<br />
            &gt; +972(3)6407634<br />
            &gt; atto.TAU.ac.IL/~inonshar<br />
            &gt; Please consider your environmental responsibility before printing<br />
            &gt; this e-mail.<br />
        </p>
        <p class="imp-signature">
            --<br />
            Inon&#160; &#160;Sharony<br />
            ינון&#160; &#160; &#160;שרוני<br />
            +972(3)6407634<br />
            atto.TAU.ac.IL/~inonshar<br />
            Please consider your environmental responsibility before printing this e-mail.
        </p>
    </body>
</html>