Project

General

Profile

Bug #460

g_energy nmol switch

Added by Jesper Soerensen about 9 years ago. Updated about 9 years ago.

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

Description

Hello,

When I run g_energy with different -nmol numbers, only the bonded energy gets divided by the nmol number. As far as I can understand from the mailinglist this is incorrect...

I am running version 4.0.7

Best regards,
Jesper

two_molecules.log (2.51 KB) two_molecules.log Log file from -nmol 2 Jesper Soerensen, 07/07/2010 08:17 PM
one_molecules.log (2.51 KB) one_molecules.log log file from -nmol 1 Jesper Soerensen, 07/07/2010 08:18 PM
512DPPC_9728W_E325K_300ns.edr (431 KB) 512DPPC_9728W_E325K_300ns.edr 1.5ns simulation edr file Jesper Soerensen, 07/07/2010 08:47 PM

History

#1 Updated by Teemu Murtola about 9 years ago

g_energy -nmol works fine for me with 4.0.7. Please provide the exact command line and (small) input files necessary to reproduce the problem.

#2 Updated by Jesper Soerensen about 9 years ago

Created an attachment (id=485)
Log file from -nmol 2

#3 Updated by Jesper Soerensen about 9 years ago

Created an attachment (id=486)
log file from -nmol 1

#4 Updated by Jesper Soerensen about 9 years ago

Commands:

echo 1 9 10 11 13 15 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | g_energy -f *300ns.edr -nmol 1 -o one_molecules.xvg > one_molecules.log

Example Output:
Bond 4807.73 85.892 85.8913 -1.64436e-05 -1.23327
LJ-SR:W-W -177734 512.346 511.494 -0.000682092 -102.314
LJ-SR:T-T -59625.1 241.942 241.85 0.000154055 23.1082

echo 1 9 10 11 13 15 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | g_energy -f *300ns.edr -nmol 2 -o two_molecules.xvg > two_molecules.log

Example Output:
Bond 9615.46 171.784 171.783 -1.64436e-05 -2.46654
LJ-SR:W-W -177734 512.346 511.494 -0.000682092 -102.314
LJ-SR:T-T -59625.1 241.942 241.85 0.000154055 23.1082

I only have a large (48MB) .edr file, is there a way to shorten this, or should I run a new shorter simulation?

#5 Updated by Jesper Soerensen about 9 years ago

Created an attachment (id=487)
1.5ns simulation edr file

#6 Updated by Teemu Murtola about 9 years ago

It seems that energy terms reported for pairs of energy monitoring groups are not affected by -nmol. All total energy terms, however, are, whether bonded or non-bonded. It would be easy to divide the former with nmol as well, but it's not clear to me that that would be the desired behavior here. Given two energy monitoring groups, there's no unique "number of molecules" for the pairwise energy, and even if there were, it would generally be different for different pairs of groups. So I would say that the current behavior is by design, and not a bug as it is.

It might be possible to add an additional option for normalizing all these terms based on a run input file (provided that one comes up with a good definition of how the normalization should be done). If you have some concrete suggestions, or would like to implement this and provide a patch, you are welcome. There's a significant amount of work and thinking involved, so this is not very high on the priority list otherwise, because the normalization is easy to do manually afterwards as well.

#7 Updated by Jesper Soerensen about 9 years ago

Thanks for the reply. I see your point. I think I will just normalize the numbers after g_energy is done with them, it will be easier in any case and I think coding a patch would be troublesome as people may have several cross terms and such. Thanks for the help...

#8 Updated by Teemu Murtola about 9 years ago

Marked the bug as wontfix, because the current behavior is by design, and it would be a lot of work to scale the energy group energy terms reasonably, while the advantages would be limited.

Also available in: Atom PDF