compute intermolecular energy with compute command


In lammps old version, such as Oct.2011, I could use ‘compute ID all inter group-ID’ command to calculate intermolecular energy. But now I have updated lammps to latest version and this command doesn’t work. It just told me ‘Invalid compute style’. Please tell me which command should I use to perform this function.

Best regards

Your input line indicates there used to be a compute of
style "inter", which I don't think was ever the case.

Perhaps you are looking for compute group/group. The
doc page explains what it does and how to use it.


By the way, if you need to include long-range coulombic interactions,
then take a look at this thread.

(I wonder if there are any plans to merge this into LAMMPS. Definitely useful.)

for situations like this, i can offer to include 'experimental'
code into LAMMPS-ICMS. this has multiple benefits:

- it doesn't get lost

- when integrating it, i will audit the code and either eliminate
  myself or ask to eliminate any issues with code quality
  and portability that i can spot.

- i can forward the resulting code to steve at a convenient time
  (to him) and in a way that is minimizes his effort and thus
  allows him to be more productive.