.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEInvertCenter

.. oe:function:: OEInvertCenter

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

      .. oe:api::

         bool OEInvertCenter(OEMolBase& mol, const OEAtomBase* atom)
         bool OEInvertCenter(OEMolBase& mol, const OEAtomBase* atom,
                             const OEAtomBase* ref1, const OEAtomBase* ref2)

   .. oe:language:: python

      .. oe:api:: python

         OEInvertCenter(mol: Union[OEGraphMol,OEMol,OEQMol], atom: OEAtomBase) -> bool
         OEInvertCenter(mol: Union[OEGraphMol,OEMol,OEQMol], atom: OEAtomBase,
                        ref1: OEAtomBase, ref2: OEAtomBase) -> bool

   These functions perform a geometric inversion around the atom passed
   as the second argument.  The second overloaded function allows the
   reference atoms that are held fixed during the inversion to be
   specified as the third and fourth arguments.  The functions return ``true``
   if inversion completes successfully.  The functions return ``false`` if
   the center is not either degree three or degree four, if the reference atoms
   are invalid, if the center to invert has more than two rings bonds, or
   if a geometric inversion is ill defined.


   *mol*
      The molecule on which to perform inversion.

   *atom*
      The atom around which to perform the geometric inversion.

   *ref1*
      The first reference atom to be held fixed.

   *ref1*
      The second reference atom to be held fixed.


