.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEAssignHybridization

..  _OEChem_OEAssignHybridization:

.. oe:function:: OEAssignHybridization

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

      .. oe:api::

         bool OEAssignHybridization(OEMolBase &)

   .. oe:language:: python

      .. oe:api:: python

         OEAssignHybridization(arg1: Union[OEGraphMol,OEMol,OEQMol]) -> bool


   Assigns hybridization to all atoms in the given
   :ref:`OEMolBase <OEChem_OEMolBase>` using calls to
   :oe:func:`OEChem::OEGetHybridization` function that predicts the
   electronic hybridization/geometry of each atom from simple
   connectivity

   This function updates the hybridization property of each atom in the
   molecule (see namespace :oe:constns:`OEChem::OEHybridization`).
   The assigned hybridization value can be accessed by the
   :oe:meth:`GetHyb<OEChem::OEAtomBase::GetHyb>` method of
   :ref:`OEAtomBase <OEChem_OEAtomBase>`.

   .. warning::

      The predicted atom hybridization depends on the perceived aromaticity.

      #. If the aromaticity is not perceived prior to calling the
         :oe:func:`OEChem::OEAssignHybridization` function,
         then :oe:func:`OEChem::OEAssignAromaticFlags` is automatically called
         to perceive the OpenEye aromaticity  model.
         For more details about aromaticity models, see :ref:`chapter_aromaticity`)

      #. Otherwise, the already perceived aromaticity information is used.


