.. oe:namespace:: OEBio


.. _OEBio_OEIsNucleicAcidSugar:

.. oe:class:: OEIsNucleicAcidSugar

   .. oe:api::

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

   This class represents :ref:`OEIsNucleicAcidSugar <OEBio_OEIsNucleicAcidSugar>` functor that
   identifies nucleic acid sugar atoms (:ref:`OEAtomBase <OEChem_OEAtomBase>`).

   .. seealso::

      * :oe:func:`OEChem::OEGetPDBAtomIndex` function
      * :ref:`section_predicates_reside_data_functors` section
      * :ref:`OEIsNucleicAcidBase <OEBio_OEIsNucleicAcidBase>` predicate
      * :ref:`OEIsNucleicAcidPhosphate <OEBio_OEIsNucleicAcidPhosphate>` predicate

   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:: operator()

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

         .. oe:api::

            bool operator()(const OEChem::OEAtomBase& atom) const

      .. oe:language:: python

         .. oe:api:: python

            __call__(atom: OEAtomBase) -> bool

      Returns ``true``, if the atom read from a :file:`pdb` file with the following
      pdb atom names:

      * :oe:const:`OEChem::OEPDBAtomName::O2_`, :oe:const:`OEChem::OEPDBAtomName::O3_`,
        :oe:const:`OEChem::OEPDBAtomName::O4_`, :oe:const:`OEChem::OEPDBAtomName::O5_`,
      * :oe:const:`OEChem::OEPDBAtomName::C1_`, :oe:const:`OEChem::OEPDBAtomName::C2_`,
        :oe:const:`OEChem::OEPDBAtomName::C3_`, :oe:const:`OEChem::OEPDBAtomName::C4_`,
        :oe:const:`OEChem::OEPDBAtomName::C5_`

   .. oe:method:: CreateCopy

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEIsNucleicAcidSugar

      Deep copy constructor that returns a copy of the object.
      The memory for the returned :ref:`OEIsNucleicAcidSugar <OEBio_OEIsNucleicAcidSugar>`
      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.
