Extracting the coulombic and Lennard-Jones contributions to the interaction between two groups of atoms


As well as the total interaction energy between two groups of atoms (which I achieve via the compute group/group command), I would like to be able to separate out the Lennard-Jones and coulombic contributions. Any advice on how this may be done?

I am not using a kspace style, and am instead using pair_style lj/cut/coul/cut for the coulombic forces.

Apologies if it’s in the docs, I have looked but might have missed something.

You could try using compute pe/tally
That would also be more efficient, since you collect the already computed per-atom energy contributions.
While the total value is the sum of both evdwl and ecoul, the per-atom data is separate and then you can sum those using compute reduce.

Thanks a lot Axel! Unfortunately we’re having trouble with our HPC and are unable to test this for the time being, but I’ll let you know how it goes when it’s back up and running.