.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEMDLStereoFromBondStereo

.. oe:function:: OEMDLStereoFromBondStereo

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

      .. oe:api::

         bool OEMDLStereoFromBondStereo(OEMolBase& mol,
                                        bool alterBondMarks = false)

   .. oe:language:: python

      .. oe:api:: python

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

   Sets the **OEChem TK** stereochemistry of each atom from the
   wedge and hash bonds in the connection table. 
   See example in :ref:`Figure: Example of using default OEMDLStereoFromBondStereo<figure_OEMDLStereoFromBondStereo>`

   *mol*
     The molecule of which stereochemistry is being set.
     The given molecule has to have 2D coordinates.

   *alterBondMarks*
     The boolean argument controls whether an attempt should be made to repair stereocenters that throw warnings
     due to ambiguous bond marking patterns (disabled by default with alterBondMarks=``false``).
     If this action is enabled, warnings will continue to be issued to allow user inspection and verification
     of the modified bond marks.  However, once the corrected structure(s) have been rewritten
     with any format that captures bond stereomark information, a re-read of the structure(s)
     should emit fewer stereocenter correction warnings.  Enabling the bond mark alteration activity will
     aggressively attempt to repair ambiguous bond marking patterns by possibly applying more than one stereo mark, or marking ring bond(s).
     See example in :ref:`Figure: Example of enabling alterBondMarks OEMDLStereoFromBondStereo<figure_OEMDLStereoFromBondStereoFixMarks>`


   .. _figure_OEMDLStereoFromBondStereo:

   .. figure:: ../images/OEMDLStereoFromBondStereo.*
      :scale:  100
      :align:  center

      **Example of using default OEMDLStereoFromBondStereo behavior: before (A) and after (B) calling the OEMDLStereoFromBondStereo function**

   .. _figure_OEMDLStereoFromBondStereoFixMarks:

   .. figure:: ../images/OEMDLStereoFromBondStereoFixMarks.*
      :scale:  100
      :align:  center

      **Example of enabling alterBondMarks OEMDLStereoFromBondStereo behavior: before (A) and after (B) calling the OEMDLStereoFromBondStereo function**

   .. note::

      This function is the opposite of the
      :oe:func:`OEChem::OEMDLPerceiveBondStereo` function.

   .. seealso::

      * :ref:`chapter_atomstereo` chapter
      * :oe:constns:`OEChem::OEAtomStereo` namespace
      * :oe:const:`OEChem::OEIFlavor::SDF::FixBondMarks` input flavor


