.. oe:namespace:: OEBio



.. meta::
   :keywords: OEMolComplexCategorizerBase, MolComplexCategorizerBase


.. _OEBio_OEMolComplexCategorizerBase:

.. oe:class:: OEMolComplexCategorizerBase

   .. oe:api::


      class OEMolComplexCategorizerBase

   Abstract base class functor for objects
   stored in :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` objects
   which are used by :oe:func:`OEBio::OESplitMolComplex` and
   :oe:func:`OEBio::OEGetMolComplexComponents` to assign
   functional roles to molecular fragments.

   The following :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` methods get
   or set an `OEMolComplexCategorizerBase`:

   ========================================================================================= =========================================================================================
   :oe:meth:`GetCategorizer<OEBio::OESplitMolComplexOptions::GetCategorizer>`                     :oe:meth:`SetCategorizer<OEBio::OESplitMolComplexOptions::SetCategorizer>`
   ========================================================================================= =========================================================================================


   The following classes derive from this class:
    * :ref:`OEMolComplexCategorizer <OEBio_OEMolComplexCategorizer>`


   .. oe:method:: operator()

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

         .. oe:api::

            std::string operator()(OESystem::OERoleSet& roles, OEMolComplexResCounts& counts, const OEChem::OEAtomBondSet& frag, bool isCovalent = false) const = 0

      .. oe:language:: python

         .. oe:api:: python

            __call__(roles: OERoleSet, counts: OEMolComplexResCounts,
                     frag: OEAtomBondSet, isCovalent: bool = False) -> str

      Method to examine the :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>` ``frag``
      and return three things
      required by :oe:func:`OEBio::OESplitMolComplex` and
      :oe:func:`OEBio::OEGetMolComplexComponents` to process the component:

      * a new title string
      * a :ref:`OERoleSet <OESystem_OERoleSet>` containing the functional roles
        associated with this fragment (see :oe:constns:`OEBio::OEMolComplexFilterCategory`)
      * an updated map of how many times a residue has been seen to date

      If ``isCovalent`` is true, additional tests may be performed to determine
      whether the fragment might be considered a (covalent) ligand which is indicated
      with the :oe:const:`OEBio::OEMolComplexFilterCategory::Ligand` :ref:`OERole <OESystem_OERole>`
      in ``roles``.

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEMolComplexCategorizerBase* CreateCopy() const = 0

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEMolComplexCategorizerBase

      CreateCopy method.

   .. oe:method:: GetBundleCofactors

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

         .. oe:api::

            bool GetBundleCofactors() const

      .. oe:language:: python

         .. oe:api:: python

            GetBundleCofactors() -> bool

      Returns ``true`` if cofactors (other than metals) are associated with
      the category :oe:const:`OEBio::OEMolComplexFilterCategory::Cofactor`.

   .. oe:method:: GetResidueCategoryData

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

         .. oe:api::

            OEResidueCategoryData* GetResidueCategoryData() const = 0

      .. oe:language:: python

         .. oe:api:: python

            GetResidueCategoryData() -> OEResidueCategoryData

      Pure virtual method.

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

         .. oe:api::

            OEResidueCategoryData& GetResidueCategoryData() = 0

      .. oe:language:: python

         .. oe:api:: python

            GetResidueCategoryData() -> OEResidueCategoryData

      Pure virtual method.

   .. oe:method:: UsingExplicitLigandName

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

         .. oe:api::

            bool UsingExplicitLigandName() const

      .. oe:language:: python

         .. oe:api:: python

            UsingExplicitLigandName() -> bool

      Returns ``true`` if  an explicit ligand residue name is
      being used to identify the ligand.
