[gmx-users] Difference between kinetic energy from .xvg file and calculated kinetic energy from velocities

Mark Abraham Mark.Abraham at anu.edu.au
Sat Mar 27 04:43:10 CET 2010

On 27/03/2010 1:57 PM, Samantha Sanders wrote:
> Hello!
> I have run a simulation and using g_energy on the .edr file, I have been
> looking at the kinetic energies in the resulting .xvg file. It is my
> understanding that these are the instantaneous kinetic energies for
> those times. However, when I try to calculate the kinetic energy on my
> own using the frames from my trajectory file and being sure to compare
> the same timestamps of the trajectory and the .edr file, I am not
> getting the same values for the kinetic energy. My first question is
> should I get the same values between the two sources: the .xvg file and
> the velocities in the frames of my trajectory file? If so, any
> suggestions for why I may not be getting the same values or if there are
> any other adjustments I should make? I have simply been calculating the
> kinetic energy as the sum of .5mv^2 for all particles. I have read the
> manual and the various mailing list responses and I am still unsure
> about this. There may be something simple I am missing. Any help is
> appreciated. Thank you!

See manual 3.4.4. The leap-frog integration algorithm never computes the 
velocities and positions at the same time point. Thus, your 
after-the-fact computation cannot agree with those reported by GROMACS.


More information about the gromacs.org_gmx-users mailing list