.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetTorsions

.. oe:function:: OEGetTorsions

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

      .. oe:api::

         OESystem::OEIterBase<OETorsion>* OEGetTorsions(const OEMolBase &,
                                                        const OESystem::OEUnaryPredicate<OEBondBase>& isRotor = static_cast<const OESystem::OEUnaryPredicate<OEBondBase>&> \ (IsRotor()))

   .. oe:language:: python

      .. oe:api:: python

         OEGetTorsions(arg1: Union[OEGraphMol,OEMol,OEQMol],
                       isRotor: OEUnaryBondPred = (IsRotor())) -> OETorsionIter

   Return an iterator over all torsions in the molecule as
   :ref:`OETorsion <OEChem_OETorsion>` objects. What bonds are considered
   torsions can be changed by passing a different predicate to the
   ``isRotor`` argument.

   *mol*
      The molecule to get torsions of.

   *isRotor*
      Predicate to define which bonds should be considered torsions.
