[gmx-developers] printing to edr in source code

Inon Sharony InonShar at TAU.ac.IL
Tue Sep 8 18:31:22 CEST 2009



Hi GMX developers! 

(note: if this seems too rudimentary -- I posted first on the users' list but no one picked up the glove...)

I'm trying to check that the energies I can calculate using the trajectory output are the same as those given by g_energy. I'm running a diatomic for only a couple of steps and already there are inconsistencies. I'm using g_traj to print out the x's and v's from the .trr file (indouble precision). The steps I'm looking at are at the beginningof the trajectory, but since my initial conditions are zero velocitiesand configuration very close to the energy-minimized one, I don't thinkthere should be any excessively large forces (the total energy is about21 kJ/mole). 

I suspect that one possible factor could be that the leap-frog algorithm uses trajectory data (i.e. positions and velocities) different from those printed to the trajectory file. For example, it appears that the velocity printed out in the .trr file is notstrictly the velocity at that time-step, but the velocity given by anaverage of the kinetic energies half a time-step forwards and back(since GMX uses the leap-frog algorithm). This has managed to explainthe discrepancy in the kinetic energies (the one given by g_energy andthe one calculated from v's given by g_traj). As for the potentialenergy, I'm still trying to figure that out... 

Could you please direct me to the file and line in the source code where the kinetic and potential energies are calculated, just before they are printed to the edr file?

Thanks very much in advance,

-- 
Inon   Sharony
ינון     שרוני
+972(3)6407634
atto.TAU.ac.IL/~inonshar
Please consider your environmental responsibility before printing this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20090908/e25d537a/attachment.html>


More information about the gromacs.org_gmx-developers mailing list