.. oe:namespace:: OEBio


.. _OEBio_OEIsNucleicAcidBase:

.. oe:class:: OEIsNucleicAcidBase

   .. oe:api::

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

   This class represents :ref:`OEIsNucleicAcidBase <OEBio_OEIsNucleicAcidBase>` functor that
   identifies nucleic acid base atoms (:ref:`OEAtomBase <OEChem_OEAtomBase>`).

   .. seealso::

      * :oe:func:`OEChem::OEGetPDBAtomIndex` function
      * :ref:`section_predicates_reside_data_functors` section
      * :ref:`OEIsNucleicAcidSugar <OEBio_OEIsNucleicAcidSugar>` 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::C2`, :oe:const:`OEChem::OEPDBAtomName::C5`,
        :oe:const:`OEChem::OEPDBAtomName::C6`, :oe:const:`OEChem::OEPDBAtomName::C8`

      * :oe:const:`OEChem::OEPDBAtomName::N1`, :oe:const:`OEChem::OEPDBAtomName::N2`,
        :oe:const:`OEChem::OEPDBAtomName::N3`, :oe:const:`OEChem::OEPDBAtomName::N4`,
        :oe:const:`OEChem::OEPDBAtomName::N6`, :oe:const:`OEChem::OEPDBAtomName::N7`,
        :oe:const:`OEChem::OEPDBAtomName::N9`

      * :oe:const:`OEChem::OEPDBAtomName::O2`, :oe:const:`OEChem::OEPDBAtomName::O4`,
        :oe:const:`OEChem::OEPDBAtomName::O6`

   .. oe:method:: CreateCopy

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEIsNucleicAcidBase

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