This API is currently available in C++ and Python.
The OEInteraction class provides a general mechanism to report individual interactions calculated within a function or force field component. For instance, pairwise atom interactions in an intramolecular VdW component calculation can be obtained by the OEMolFunc::GetInteractions method that returns an iterator over the OEInteraction instances.
OEInteraction(OEInteractImpl &) OEInteraction(const OEInteraction &)
Default and copy constructors.
OEInteraction &operator=(const OEInteraction &)
OESystem::OEIterBase<OEChem::OEAtomBase> *GetAtoms() const
Returns an iterator over the atoms involved in the calculated interaction.
const char *GetName() const
Returns a clear text human readable identifier for the type of interaction.
double GetValues(double *grads=0) const
Returns the energy associated with the calculated interaction. The associated gradients may also be obtained by passing in an array of the length returned by the OEInteraction::NumValues method. The derivatives correspond to the atom ordering returned by the OEInteraction::GetAtoms method.
unsigned NumAtoms() const
Returns the number of atoms involved in the calculated interactions. One-body interactions, such as an atom in a field, will only have one atom involved in the interaction. VdW interactions will consist of two atoms. Torsions are composed of four interacting atoms.
unsigned NumValues() const
Returns the number of gradients associated with the particular interaction. For interactions calculated from Cartesian coordinates of atoms, this method will typically return three times the number of atoms involved in the interaction as x, y, and z gradient values are calculated for each atom.