.. oe:namespace:: OEChem



.. meta::
   :keywords: OEIsAtomHybridization, IsAtomHybridization


.. _OEChem_OEIsAtomHybridization:

.. oe:class:: OEIsAtomHybridization

   .. oe:api::

      class OEIsAtomHybridization : public OESystem::OEUnaryPredicate<OEChem::OEAtomBase>

   This class represents :ref:`OEIsAtomHybridization <OEChem_OEIsAtomHybridization>` functor
   that identifies atoms with the given hybridization.

   .. seealso::

      * :oe:func:`OEChem::OEAssignHybridization` function
      * :oe:constns:`OEChem::OEHybridization` namespace

   .. ################################################################
      #
      ################################################################

   .. oe:method:: Constructors

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

         .. oe:api::

            OEIsAtomHybridization(unsigned int hyb)

      .. oe:language:: python

         .. oe:api:: python

            OEIsAtomHybridization(h: int) -> OEIsAtomHybridization

      Default constructors that creates an 
      :ref:`OEIsAtomHybridization <OEChem_OEIsAtomHybridization>` functor with the given
      hybridization.

   .. ################################################################
      #
      ################################################################

   .. oe:method:: operator()

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

         .. oe:api::

            bool operator()(const OEAtomBase& atom) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(atom: OEAtomBase) -> bool

      Returns ``true``, if the  :oe:meth:`OEChem::OEAtomBase::GetHyb`
      method returns the same hybridization with which the 
      :ref:`OEIsAtomHybridization <OEChem_OEIsAtomHybridization>` object was initialized.
  
      .. warning::
 
         Prior to using the :ref:`OEIsAtomHybridization <OEChem_OEIsAtomHybridization>` functor,
         the hybridization of a molecule should be perceived by calling
         the :oe:func:`OEChem::OEAssignHybridization` function.
         Otherwise the :oe:func:`OEChem::OEGetHybridization` function is 
         called every time to perceive the hybridization of the atom 
         on the fly.

   .. ################################################################
      #
      ################################################################

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OESystem::OEUnaryFunction<OEChem::OEAtomBase, bool>* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEIsAtomHybridization

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEIsAtomHybridization <OEChem_OEIsAtomHybridization>`
      object is dynamically allocated  and owned by the caller.
