.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEPerceiveChiral

.. oe:function:: OEPerceiveChiral

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

      .. oe:api::

         bool OEPerceiveChiral(OEMolBase& mol, bool carbonOnly = false)

   .. oe:language:: python

      .. oe:api:: python

         OEPerceiveChiral(mol: Union[OEGraphMol,OEMol,OEQMol],
                          carbonOnly: bool = False) -> bool

   Perceives whether an atom or a bond in a molecule is chiral and
   updates the 'chiral' property accordingly.
   Because this function is based on the symmetry classes of a molecule,
   as a side-effect, it also sets the 'symmetry' property of all the atoms the molecule
   to be their 'explicit hydrogen suppressed' symmetry class, by calling the **OEChem TK**
   function :oe:func:`OEChem::OEPerceiveSymmetry`.
   The default behavior is to perceive nitrogens that can undergo nitrogen inversion as
   chiral centers. This behavior can be turned off with the optional carbonOnly flag.
   Before calling OEPerceiveChiral with a different flag it is important to first clear
   the existing chiral perception using :oe:func:`OEChem::OEClearChiralPerception`.

   .. seealso::

      * :oe:func:`OEChem::OEClearChiralPerception` to clear existing chiral perception
