Dear LAMMPS users,

I have a question about the command “compute group/group”. From the doc, it can be used to calculate the total energy between two groups as long as the pair styles are supported by this command. I know there is an equation to calculate interaction energy: E = E_total - (E_1 + E_2), where E_1 and E_2 is the total potential energy of group1 and group2, respectively; E_total is the total potential energy of the whole system (group1 + group2). So, is there any difference between the results from the compute group/group command and the equation? Are they calculating the same interaction energy of a two groups system? Thank you very much!