Computing interaction energy of each atom in group1 with another group2

Dear all,

I have been looking for the answer to my question in the mailing list but did not find anything. Therefore, I am posting here.

I would like to calculate the interaction energy between atoms in group1 with those of group 2, and this, for each atom of group1. In particular, I would like to determine the min interaction energy of atoms of group1.

I have tried the compute group/group command. I got some error from LAMMPS which make me understand that compute group/group returns a global value of the interaction energy between groups, not a per-atom value. Is that correct?

Thus, I am thinking of compute pair/local command.
The point here, if I understand correctly this command, is that if I use group1, I guess it will calculate for each atom of group1, the interaction energy with its neighbours in group1. Atoms from group2 will be excluded.

Is there a way to do what I need with some compute command?

With best regards,

yes, compute group/group produces a single global value.

You could use compute pair/local with a group that is the union of group1 + group2

Then a dump local file will contain 1/1, 2/2, and 1/2 interactions.

You can extract subsets of 1/2 interactinos for each atom in group1.

E.g. using a post-processing script.