Compute group/group kspace yes

Dear Lammps users.
My test system is two copper atoms, using thermo_style to output etotal, epair, evdwl, elong, ecoul, using compute group/group to calculate the interaction between the two copper atoms. When I use the lj/cut/coul/cut force field, compute group/group calculates the interaction between two atoms, and I get the result c_1=epair=evdwl+ecoul, which is what I expected. A screenshot of log is attached below.

When I use the lj/cut/coul/ long force field and kspace_style pppm 1.0e-4, the calculated etotal, epair, evdwl, elong, ecoul, and compute group/group kspace yes calculate that the interaction between the two copper atoms is different, epair=evdwl+elong+ecoul,c_1 is not equal to epair. I want to know what interactions are included in compute group/group kspace yes .Log screenshots and in files using compute group/group kspace yes are attached below.
Thank you very much.
Best regards. (779 Bytes)

Computing the interaction between group atom1 and group atom2 only contains the inter-group interactions. To reproduce TotEng (and E_pair), you need to use:

compute 2 all group/group all kspace yes

Now for a cutoff coulomb and only two atoms, you only have the short range contributions and then the two compute commands return the same energy, but with kspace every atom interacts with an infinite number of periodic replica and there is a difference if those are only atoms from one group or from all atoms.


Thank you very much for your patient answer, it was very helpful to me.