Can we calculate the van der waals energy of a specific group?

Dear Lammps Users,

I just wonder if we can calculate the van der waals portion of potential energy contributed by a specific group of atoms? For compute pair command the group must be all but don’t want to sum them together.
Any suggestion will be appreciated.

Thanks
Qingchang

Dear Lammps Users,

I just wonder if we can calculate the van der waals portion of potential
energy contributed by a specific group of atoms? For compute pair command
the group must be all but don't want to sum them together.

you can use re-run to postprocess a given trajectory while disabling
the parts of the interactions you are not interested in.

axel.

please also note that there is the compute group/group command. there
is no such thing as "the energy of a group", there is only the
interaction energy of one group with another (which may consist of the
same atoms).

axel.

sorry, to expand my reply one more time.
there is another case to consider: you can compute the per-atom
potential energy contributions and then sum them via compute reduce.
but that likely still requires to do post-processing with re-run.

axel.