From literature, the definition of the interaction energy is the difference of the total energy between the complexed system and the isolated system of 2 groups (For example, interaction energy of a polymer adsorbed on solids layer = difference of total energy between the adsorbed and isolated system).

In LAMMPS, the compute group/group command is used to compute the total force and energy interaction between 2 groups. I plan to use this command to compute the interaction energy between the polymer and solids.

However when comparing to the results of system total energy difference, there are some difference in the value calculated, as shown in following table:

Without a detailed input script, it’s not easy to comment further. For example, I am not sure whether you included kinetic energies in your energy calculations, which might explain (or exacerbate) the difference you see.

I think this is the key command… basically I try to compare the interaction energy from the calcite_interaction.txt and the difference of the etotal of the adsorbed and isolated system. (For isolated system, I will remove the command compute group/group and calculate etotal only)