.. oe:namespace:: OEBio



.. meta::
   :keywords: OEResidueCategoryData, ResidueCategoryData


.. _OEBio_OEResidueCategoryData:

.. oe:class:: OEResidueCategoryData

   .. oe:api::


      class OEResidueCategoryData

   This class represents a container for a collection of residue name lists,
   each list associated with a category in the
   :oe:constns:`OEBio::OEResidueDatabaseCategory` namespace.
   These lists define various types of components found in a
   macromolecular complex. The main use of these lists is to identify
   molecules that are *not* ligands, so that ligands may be recognized more easily.

   The :ref:`OEMolComplexCategorizer <OEBio_OEMolComplexCategorizer>` class makes use of a
   `OEResidueCategoryData` object.
   The following :ref:`OEMolComplexCategorizer <OEBio_OEMolComplexCategorizer>` methods get
   or set an `OEResidueCategoryData`:

   ========================================================================================= =========================================================================================
   :oe:meth:`GetResidueCategoryData<OEBio::OEMolComplexCategorizer::GetResidueCategoryData>`                     :oe:meth:`SetResidueCategoryData<OEBio::OEMolComplexCategorizer::SetResidueCategoryData>`
   ========================================================================================= =========================================================================================

   .. oe:method:: Constructors

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

         .. oe:api::

            OEResidueCategoryData()
            OEResidueCategoryData(const OEResidueCategoryData& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEResidueCategoryData() -> OEResidueCategoryData
            OEResidueCategoryData(rhs: OEResidueCategoryData) -> OEResidueCategoryData

      Constructor and copy constructor.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEResidueCategoryData &operator=(const OEResidueCategoryData &rhs)

      Assignment operator.

   .. oe:method:: AddToDB

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

         .. oe:api::

            bool AddToDB(const unsigned category, const std::string& resName)
            bool AddToDB(const unsigned category,
                         const std::vector<std::string>& list)

      .. oe:language:: python

         .. oe:api:: python

            AddToDB(category: int, list: OEStringVector) -> bool

      Add an entry to the list associated with the specified category.

      .. note:: The overload that takes a std::vector parameter is only available in C++.


   .. oe:method:: ClearDBCategory

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

         .. oe:api::

            bool ClearDBCategory(const unsigned category)

      .. oe:language:: python

         .. oe:api:: python

            ClearDBCategory(category: int) -> bool

      Remove all entries in the list associated with the specified category.

   .. oe:method:: RemoveFromDB

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

         .. oe:api::

            bool RemoveFromDB(const unsigned category,
                              const std::string& resName)
            bool RemoveFromDB(const unsigned category,
                              const std::vector<std::string>& list)

      .. oe:language:: python

         .. oe:api:: python

            RemoveFromDB(category: int, list: OEStringVector) -> bool

      Remove an entry from the list associated with the specified category.

      .. note:: The overload that takes a std::vector parameter is only available in C++.


   .. oe:method:: FoundInDB

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

         .. oe:api::

            bool FoundInDB(const unsigned category, const std::string& resName) const

      .. oe:language:: python

         .. oe:api:: python

            FoundInDB(category: int, resName: str) -> bool

      Is the specified residue name found in the list associated
      with the specified category.

   .. oe:method:: AllInDB

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

         .. oe:api::

            bool AllInDB(const unsigned category,
                         const std::vector<std::string>& resNames) const

      .. oe:language:: python

         .. oe:api:: python

            AllInDB(category: int, resNames: OEStringVector) -> bool

      Are all the specified residue names found in the list associated
      with the specified category.

   .. oe:method:: GetEntries

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

         .. oe:api::

            OESystem::OEIterBase<const std::string>* GetEntries(const unsigned category) const

      .. oe:language:: python

         .. oe:api:: python

            GetEntries(category: int) -> Iterable[str]

      Return an iterator of all the entries in the list associated
      with the specified category.

   .. oe:method:: Size

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

         .. oe:api::

            unsigned Size(const unsigned category) const

      .. oe:language:: python

         .. oe:api:: python

            Size(category: int) -> int

      Return the size of the list associated with the specified category.
