# group/group energy normalization

Hello everyone,
I want to normalize the energy by compute group/group command.
Let’s say we have a system containing 1000 H2O molecules(group 1) and 500 CO2(group 2) molecules.
The compute group/group commands are

compute ge11 1 group/group 1 pair yes kspace yes
compute ge12 1 group/group 2 pair yes kspace yes
compute ge22 2 group/group 2 pair yes kspace yes

If I want to normalize the energy on each pair(H2O-H2O,H2O-CO2,CO2-CO2), should I divide group energy by the number of pair?
That is
for per H2O-H2O, the energy is ge11/(10001000)
for per H2O-CO2, the energy is ge12/(1000
500)
for per H2O-H2O, the energy is ge22/(500*500)

Am I correct here?
Thank you.

well, it should be easy to find out whether you are correct by making some tests with a small system with only a few atoms and lj/cut, so you could determine the normalized energy manually.

Not sure how this works out for kspace as that is no pairwise additive. for such kinds of analysis, i would record a trajectory with long-range electrostatics but then do the analysis using the rerun command with cutoff coulomb. should be faster and more consistent, as all coulomb is computed as pairwise additive in realspace.

FWIW, the number of pairs for a group with itself should be N*(N-1) and not N**2 since each pair counts only once and there are no self pairs.

Axel.