evdwl ecoul

Dear all,

I’m a little confused about the computation of total evdwl and ecoul. The output file results in “pe/mol/tally” and "thermo_style " are different.

In my system ,there are a,b,c and d.

The output of thermo_style evdwl ecoul is 31034.856 and -76830.515

The output of pe/mol/tally is the following:

compute apair a pe/mol/tally a

0 298315 17478.33529 -99421.15882

compute bpair b pe/mol/tally b
1446.858824 19150.07647 -15496.78824 32.20585882

compute cpair c pe/mol/tally c

27.93761176 272.8468824 -372.8372941 -199.7706471

compute dpair d pe/mol/tally d

22174 -247652 255.4768824 -2363.910588
compute allpair all pe/mol/tally all

23648.79412 70086.41765 7358.913529 -146867.5294

In addition, I use formula E=Etotal-(Ea+Eb+Ec+Ed) to calculate the results as follows

0 0 5494.726882 -44914.89521

Why the evdwl and ecoul results calculated by “pe/mol/tally” do not correspond to “thermo_style”?

(From the manual and mail list,

Compute pe/mol/tally calculates a global 4-element vector containing (in this order): evdwl and ecoul for intramolecular pairs and evdwl and ecoul for intermolecular pairs)

Looking forward to your reply. Thank you very much

Sincere regards to you


they are different, because you are computing different things.

when you are computing the partial tallies, you only compute the sum over pairs of atoms from a group with atoms from the same group.
you are missing the contributions from interactions of group a with group b, group a with group c and so on. those are included in the global sums.

you would get the global sum only with something like this.

compute apair a pe/mol/tally all

compute bpair b pe/mol/tally all


Thank you very much, Axel.

I still have a little question. Here is my understanding of your explanation.

I learned about the interaction energy (Ea−b) Between a molecules and b is defined as Ea−b = Eab − (Ea + Eb) from a literature, where Eab is the total energy of a molecules and b and E****b and Ea are the energies of individual a Molecules and the b aggregate, respectively.

Combined with my understanding of your explanation, it can be calculated as follows.
compute apair a pe/mol/tally all
compute bpair b pe/mol/tally all

compute abpair ab pe/mol/tally all

Ea−b=abpair - (apair + bpair)

The above is my understanding of your explanation, I don’t know whether it is accurate or no.

Thank you very much