Bug #696

g_energy gives incorrect average pressures

Added by Denzil Frost over 9 years ago. Updated over 9 years ago.

Target version:
Affected version - extra info:
Affected version:


When using to g_energy command in versions 4.5.1 and 4.5.3 to find average thermodynamic properties after a NPT run, the interactive output gives average values for pressure (and its tensors) that do not match the energy.xvg output file. For example, in the xvg file (and in the log file) the pressures will fluctuate between 300 and -300 bar, but the g_energy output says the average value for pressure is 997 bar. This inconsistency exists the PXX, PYY, and PZZ tensors as well as the surface tension. Also, calculation of surface tension using these pressure tensors from the summary and from the output file show that each source is internally consistent, but they differ by several orders of magnitude and sometimes sign.

TestCase.tar.gz (679 KB) TestCase.tar.gz Denzil Frost, 02/02/2011 07:08 PM

Associated revisions

Revision f5368bee (diff)
Added by Berk Hess over 9 years ago

fixed incorrect virial and pressure averages

Removed a second, incorrect setting of flags for storage of energy averages
in mdrun.
This would cause incorrect averages of the virial and pressure to be stored
in the energy file and printed at the end of the log file when the lowest
common denominator of nstcomm, nsttcouple and/or nstpcouple was less than
nstcalcenergy. Note that the instantaneous values and the actual simulation
results were all correct.
Additionally there was a potential issue with parallel checkpoint signalling
with -gcom larger than nstlist which could lead to hanging of mdrun.
This fixes #696


#1 Updated by Denzil Frost over 9 years ago

Tried to upload test case with .trr file - too big. Here's the test case without the trr file.

#2 Updated by Berk Hess over 9 years ago

  • Category set to mdrun
  • Status changed from New to Closed
  • Assignee set to Berk Hess
  • Target version set to 4.5.4

Fixed for 4.5.4.
The virial and pressure averages would be incorrect when the lowest
common denominator of nstcomm, nsttcouple and/or nstpcouple was less
than nstcalcenergy.

#3 Updated by Rossen Apostolov over 9 years ago

  • Affected version - extra info set to 4.5.1

Also available in: Atom PDF