[gmx-users] Computing energies using g_energy (is -nmol mandatory?)

Justin Lemkul jalemkul at vt.edu
Thu Nov 29 20:02:42 CET 2012

On 11/29/12 11:53 AM, André Ferreira wrote:
> Hello all,
> I am trying to compute total energies of several systems, but I am not sure if I
> am doing it the right way. Until now I simply used the command:
> g_energy -f file.edr -s file.tpr -o ener.xvg
> But after reading the manual, I found the -nmol (number of molecules in your
> sample) flag. If you are comparing systems formed by the same amount of
> molecules the relative energy is not affected. Still, if I am comparing energies
> of systems with different compositions this flag will affect them drastically...
> Is this option mandatory?

I suppose it depends on what your systems are and what you are trying to 
measure.  The -nmol flag will simply divide the energy values by this value, 
which is useful for certain metrics in homogeneous systems.  By default, the 
total energy printed is in kJ/(mol of equivalent systems).

It wouldn't make sense, for instance, in a membrane-protein system that includes 
water, since there are several types of distinct molecules there.  The statement 
"you always need to set the number of molecules with -nmol" only refers to the 
properties shown in that table in the manual/help description.



Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080


More information about the gromacs.org_gmx-users mailing list