.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetAbsTorsion

.. oe:function:: OEGetAbsTorsion

   .. oe:language:: c++ java csharp

      .. oe:api::

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

   .. oe:language:: python

      .. oe:api:: python

         OEGetAbsTorsion(arg1: Union[OEGraphMol,OEMol,OEQMol], a: OEAtomBase,
                         b: OEAtomBase, c: OEAtomBase, d: OEAtomBase) -> float
         OEGetAbsTorsion(arg1: OEConfBase, a: OEAtomBase, b: OEAtomBase,
                         c: OEAtomBase, d: OEAtomBase) -> float

   Returns the absolute value of the torsion defined by atoms `a`, `b`,
   `c`, and `d`.  The return value is in radians and varies from ``0`` to
   ``+PI``.  This function returns the same value as
   fabs( :oe:func:`OEChem::OEGetTorsion` ), yet it is more efficient.  These
   functions assume that the four atoms are members of the molecule or
   conformer which is passed to the function.  The
   :ref:`OEConfBase <OEChem_OEConfBase>` overload is strictly for efficiency.

   *mol*
      The molecule that the pair of atom belongs to.

   *conf*
      The conformer that the pair of atom belongs 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.

