LAMMPS compute group/group command

Dear all,

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.

compute interaction2 subset_calcite group/group subset_polymer kspace yes

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

https://postimg.cc/Wtk9Vv6f

Why is there such a big difference in the value? And which one is the more suitable method to compute the interaction energy?

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.

Sorry for the late reply. Below are some input of the script:

compute interaction2 subset_calcite group/group subset_polymer kspace yes
fix INTERACTION2 all ave/time 1 25000 25000 c_interaction2 file calcite_interaction.txt

fix E_all all ave/time 1 25000 25000 v_etotal v_pe v_ke v_coulomb v_evdwl file all_energies.txt

fix 1 movable nvt temp 373 373 100 drag 1.0
timestep 1
run 500000

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)

I have try to recalculate by comparing with the potential energy difference only (without including KE), however the results are still similar