[SPAM] Can lammps compute the energy of each molecules in certain group?

Dear Lammps users/developers,

Now, I want to get the total interaction energy of a certain molecule with all the molecules of a certain group. For example, if there is some H2O and some CH3COOH molecules in my system, I want to compute the total interaction energy of each H2O molecules with all the other CH3COOH molecules. Can LAMMPS do this?

Thanks!

Deng Chao

If by “total interaction energy”, you mean the per-atom

potential energy summed over the atoms in the molecule,

then yes. See the compute chunk/atom command and

define each chunk as a molecule (in your group).

Then use the fix ave/chunk command to sum the per-atom

energy over atoms in each chunk. You can also time average it.

If you want to exclude intra-molecule energies, I think you

would have to do the same thing but read snapshots from a previous simulation

with the rerun command and use a pair style where you

had turned off intra-molecular interactions.

Steve