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