OEGetTorsionΒΆ

double OEGetTorsion(const OEMolBase &mol, const OEAtomBase *a, const OEAtomBase *b,
                    const OEAtomBase *c, const OEAtomBase *d)
double OEGetTorsion(const OEConfBase &conf, const OEAtomBase *a,
                    const OEAtomBase *b, const OEAtomBase *c,
                    const OEAtomBase *d)

Returns the torsion formed by the four atoms a, b, c, and d. The return value is in radians and varies from +PI to -PI. All of the atoms must be contained in the molecule (or conformer) which is passed to the function. The OEConfBase is strictly for efficiency. If the absolute value of the torsion can be used instead, the function OEGetAbsTorsion is much more efficient than calculating the absolute value of the return of this function.

mol
The molecule that the atoms belong to.
conf
The conformer that the atoms belong to.
a
One of the end atoms in the torsion.
b
Atom that is connected to a in the torsion.
c
Atom that is connected to d in the torsion.
d
The other end atom in the torsion.