Collection of potentials that act between the atoms contained in
one or more groups of atoms. This group iterates over all such atom-groups
assigned to it. For each group it iterates over the potentials it contains,
instructing these sub-potentials to perform their calculations over the atoms
relevant to them in the groups.
Makes a potential group defined on the position of nBody atom or atom groups.
This constructor should only be called by the PotentialMaster. Use
potentialMaster.makePotentialGroup method to create PotentialGroups.
Adds the given potential and sets it up to apply to the atoms in the basis
having the given types. Another addPotential method should be used if iteration
is not based on atom types. Length of types array must not exceed the order of
the potential (as given by the nBody method, and set in the constructor).
If length of types array is 1, this must be a one-body potential and iteration is
done over the atoms of the basis having the given type. If types is of length 2
and this is a one-body potential, pairs are formed from atoms in the (single)
basis having the two given types (which might be the same); if this is a two-body
potential, pairs are formed from the first-type atoms taken from the first basis
atom, with the second-type atoms taken from the second basis.
Returns the AtomTypes that the given potential applies to if the given
potential is within this potential group. If the potential is not
within this group or does not apply to specific AtomTypes, null is
Informs the potential of the box on which it acts. Typically this
requires at least that it update the nearestImageTransformer of its
coordinatePair (if it uses one), e.g.: