Project

General

Profile

Bug #365

Incorrect scaling of some values with g_energy -nmol

Added by Teemu Murtola about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
analysis tools
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Calling g_energy with -nmol N (N > 1) and selecting an intensive quantity such as density prints out the correct average values, but the values written to energy.xvg are divided by N.

Also, the -nmol flag does not have any effect on the Tot-Drift value reported, and the Fluct. value is also incorrect:
Plain g_energy call gives

Energy Average RMSD Fluct. Tot-Drift
-------------------------------------------------------------------------------
Potential 7426.24 278.365 260.934 -335.868 (kJ/mol)

while g_energy -nmol 128 for the same data gives

Energy Average RMSD Fluct. Tot-Drift
-------------------------------------------------------------------------------
Potential 58.0175 2.17473 0 -335.868 (kJ/mol)

The first problem is easy to work around by calling g_energy several times when both extensive and intensive quantities are of interest, and the incorrect values in the second case are easy to calculate by hand, but can still be a minor annoyance.

Associated revisions

Revision 1c2fab9c (diff)
Added by Teemu Murtola about 10 years ago

Better g_energy -nmol behavior (bug #365).

The -nmol switch is now applied consistently to both XVG output and to
the calculated averages. The calculated total drift is also correctly
scaled with -nmol.

Revision dc81be6b (diff)
Added by Teemu Murtola about 10 years ago

Better g_energy -nmol behavior (bug #365).

The -nmol switch is now applied consistently to both XVG output and to
the calculated averages. The calculated total drift is also correctly
scaled with -nmol.
(backported commit 1c2fab9ceb04b8a8cb7e7c24b816861dea88ffdb)

History

#1 Updated by Teemu Murtola about 10 years ago

Both issues are now fixed in git master and release-4-0-patches branches. Currently, only real energy terms get scaled with -nmol, but for example the volume is not scaled (this was the situation earlier as well). Also, the XVG output is never scaled with -all, but the sum calculated with -sum always is (both behaviors are unchanged from earlier versions).

Also available in: Atom PDF