New pair style

I am attempting to write a new pair style based on a force field for proteins called PACE. It is basically a Lennard Jones potential with some extra terms for certain atoms to better represent hydrogen bonding. The hydrogen bonding terms are calculated only if the atoms are two or more amino acids apart. This leads me to two questions:

  1. Does LAMMPS determine neighbor lists (for pair styles) based on molecule ID? I.e., if I wanted to distinguish two segments of the same molecule by giving them different molecule IDs, would LAMMPS calculate nonbonded interactions for these two segments (because they are “different” molecules) even though there are bonds and angles between them? If not, I will simply give each amino acid a different molecule ID, even though they are all part of the same protein.

  2. Assuming there are no problems with giving each amino acid a different molecule ID, what is the internal LAMMPS variable that stores the molecule ID associated with a particular atom and how would I access it in pair_pace.cpp?

I am attempting to write a new pair style based on a force field for
proteins called PACE. It is basically a Lennard Jones potential with some
extra terms for certain atoms to better represent hydrogen bonding. The
hydrogen bonding terms are calculated only if the atoms are two or more
amino acids apart. This leads me to two questions:

1. Does LAMMPS determine neighbor lists (for pair styles) based on molecule
ID? I.e., if I wanted to distinguish two segments of the same molecule by

no. the molecule id is just a label.

giving them different molecule IDs, would LAMMPS calculate nonbonded
interactions for these two segments (because they are "different" molecules)
even though there are bonds and angles between them? If not, I will simply
give each amino acid a different molecule ID, even though they are all part
of the same protein.

yes, you can do that.

2. Assuming there are no problems with giving each amino acid a different
molecule ID, what is the internal LAMMPS variable that stores the molecule
ID associated with a particular atom and how would I access it in
pair_pace.cpp?

please have a look at the developer's guide. per atom properties are
managed by classes derived from AtomVec to which the Atom class holds
pointers and has flags to show if they are present or not.

the list of molecule ids is available through atom->molecule provided
atom->molecular is not 0.

axel.