.. oe:namespace:: OEChem


.. meta::
   :keywords: OEHasResidueNumber, HasResidueNumber


.. _OEChem_OEHasResidueNumber:

.. oe:class:: OEHasResidueNumber

   .. oe:api::

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

   This class represents :ref:`OEHasResidueNumber <OEChem_OEHasResidueNumber>` functor
   that identifies atoms (:ref:`OEAtomBase <OEChem_OEAtomBase>`) with a specific
   residue number.

   .. seealso::

      :ref:`section_predicates_reside_data_functors` section

   The following methods are publicly inherited from :ref:`OEUnaryPredicate <OESystem_OEUnaryPredicate>`:

   ============================================================================== ============================================================================== ===============================================================================
   :oe:meth:`operator()<OESystem::OEUnaryPredicate::operator()>`                  :oe:meth:`CreateCopy<OESystem::OEUnaryPredicate::CreateCopy>`                  :oe:meth:`CreatePredicateCopy<OESystem::OEUnaryPredicate::CreatePredicateCopy>`
   ============================================================================== ============================================================================== ===============================================================================

   The following methods are publicly inherited from :ref:`OEUnaryFunction <OESystem_OEUnaryFunction>`:

   ============================================================ ============================================================ ===========================================================
   :oe:meth:`operator()<OESystem::OEUnaryFunction::operator()>` :oe:meth:`CreateCopy<OESystem::OEUnaryFunction::CreateCopy>`                                                            
   ============================================================ ============================================================ ===========================================================

   .. oe:method:: Constructors

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

         .. oe:api::

            OEHasResidueNumber(int num)

      .. oe:language:: python

         .. oe:api:: python

            OEHasResidueNumber(num: int) -> OEHasResidueNumber

      Constructs the functor with the internal residue number.

   .. 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 :oe:func:`OEChem::OEAtomGetResidue`
      (atom). :oe:meth:`GetResidueNumber()<OEChem::OEResidue::GetResidueNumber>` is
      equivalent to the residue number with which the functor is
      constructed.

   .. oe:method:: CreateCopy

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEHasResidueNumber

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

      .. oe:language:: c++ 

         The returned copy should be deallocated using C++
         delete operator in order to prevent a memory leak. 
