.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OE3DToBondStereo

.. oe:function:: OE3DToBondStereo

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

      .. oe:api::

         bool OE3DToBondStereo(OEMolBase& mol, unsigned char* bmask = 0)

   .. oe:language:: python

      .. oe:api:: python

         OE3DToBondStereo(mol: Union[OEGraphMol,OEMol,OEQMol],
                          bmask: str = None) -> bool

   Set the stereochemistry at the chiral bonds of a molecule, as
   specified by the molecule's 3D (or possibly 2D) coordinates.  The
   affected bonds are those with a 'chiral' bond property of ``true``, as
   discovered by a call to :oe:func:`OEChem::OEPerceiveChiral`, or set
   manually by the user calling
   :oe:meth:`OEChem::OEBondBase::SetChiral` method.  If no chirality
   has been perceived or set on the molecule,
   :oe:func:`OEChem::OEPerceiveChiral` will be called inside this
   function.

   After stereochemistry is set
   :oe:meth:`SetPerceived<OEChem::OEMolBase::SetPerceived>` is called with
   the :oe:const:`OEChem::OEPerceived::BondStereo` flag set to
   ``true``. Subsequent calls to :oe:func:`OEChem::OE3DToBondStereo` will
   return ``true`` immediately as the value of
   :oe:meth:`HasPerceived<OEChem::OEMolBase::HasPerceived>` is checked on
   entry. Stereochemistry can be forced to be reperceived by setting the
   :oe:const:`OEChem::OEPerceived::BondStereo` flag to ``false``.

