[gmx-users] Pressure Calculation in Gromacs

Brandon Wiebe Brandon.Wiebe at ufv.ca
Tue Jul 17 04:08:10 CEST 2018

Hi there,

I am wondering if anyone can break down exactly how the instantaneous pressure of any given frame is calculated in Gromacs?

According to section 3.4.3 of the manual, the pressure tensor is given by: P = (2/V) * (Ek - W), where Ek is kinetic energy and W is the virial.
I have taken a particular frame and calculated the volume, kinetic energy and virial.
My calculated quantities all match quite closely with the values reported by Gromacs, however, the pressure that I get is significantly lower than the value reported by Gromacs.
The elements of my calculated pressure tensor are all approximately 16.5 times smaller than those reported by Gromacs, even though the component quantities that go into the pressure calculation are nearly identical.

I have repeated this calculation for a number of frames, and have tried using Gromacs 4.6.7 and 5.0.4 to no avail.
Clearly there is some systematic error in my methodology, where could this discrepancy come from?


More information about the gromacs.org_gmx-users mailing list