.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEBioisostere

.. meta::
   :keywords: OEBroodQuery, BroodQuery


.. _OEBioisostere_OEBroodQuery:

.. oe:class:: OEBroodQuery

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEBroodQuery

   This class defines objects that represent a **Brood** query.

   The :ref:`OEBroodQuery <OEBioisostere_OEBroodQuery>` class defines the following public methods:
    * :oe:meth:`GetAttachCount<OEBioisostere::OEBroodQuery::GetAttachCount>`
    * :oe:meth:`GetHeavyCount<OEBioisostere::OEBroodQuery::GetHeavyCount>`
    * :oe:meth:`GetQueryID<OEBioisostere::OEBroodQuery::GetQueryID>`
    * :oe:meth:`SetQueryID<OEBioisostere::OEBroodQuery::SetQueryID>`
    * :oe:meth:`HasProtein<OEBioisostere::OEBroodQuery::HasProtein>`
    * :oe:meth:`HasProteinSelect<OEBioisostere::OEBroodQuery::HasProteinSelect>`
    * :oe:meth:`Init<OEBioisostere::OEBroodQuery::Init>`

   

   .. _OEBioisostere_OEBroodQuery_Constructors:
   .. oe:method:: Constructors

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

         .. oe:api::

            OEBroodQuery()
            OEBroodQuery(const OEBroodQuery &)

      .. oe:language:: python

         .. oe:api:: python

            OEBroodQuery() -> OEBroodQuery
            OEBroodQuery(arg2: OEBroodQuery) -> OEBroodQuery

      Default and copy constructors.


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

      .. oe:api::

         OEBroodQuery &operator=(const OEBroodQuery &)

      Assignment operator.

   .. _OEBioisostere_OEBroodQuery_GetAttachCount:    

   .. oe:method:: GetAttachCount

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

         .. oe:api::

            unsigned GetAttachCount() const

      .. oe:language:: python

         .. oe:api:: python

            GetAttachCount() -> int

      This method returns the number of attachment points in the query fragment.

   .. _OEBioisostere_OEBroodQuery_GetHeavyCount:   

   .. oe:method:: GetHeavyCount

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

         .. oe:api::

            unsigned GetHeavyCount() const

      .. oe:language:: python

         .. oe:api:: python

            GetHeavyCount() -> int

      This method returns the number of heavy atoms in the query fragment.

   .. _OEBioisostere_OEBroodQuery_GetQueryID:

   .. oe:method:: GetQueryID

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

         .. oe:api::

            std::string GetQueryID() const

      .. oe:language:: python

         .. oe:api:: python

            GetQueryID() -> str

      This method returns the identifier associated with the query. If no identifier has
      been assigned with :oe:meth:`SetQueryID<OEBioisostere::OEBroodQuery::SetQueryID>`, it
      returns the query's isomeric SMILES (the fragment representation) as a sensible
      default, so every query always has a non-empty, meaningful identifier.

   .. _OEBioisostere_OEBroodQuery_SetQueryID:

   .. oe:method:: SetQueryID

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

         .. oe:api::

            void SetQueryID(const std::string& id)

      .. oe:language:: python

         .. oe:api:: python

            SetQueryID(id: str) -> None

      This method assigns a user-defined identifier to the query. The identifier is stored
      as string data on the query molecule, so it persists when the query is written and
      read with :oe:func:`OEWriteBroodQuery<OEBioisostere::OEWriteBroodQuery>` and
      :oe:func:`OEReadBroodQuery<OEBioisostere::OEReadBroodQuery>`, and it is carried onto
      every :ref:`OEBroodScore <OEBioisostere_OEBroodScore>` produced from the query
      (see :oe:meth:`GetQueryIDs<OEBioisostere::OEBroodScore::GetQueryIDs>`). When no
      identifier is assigned, :oe:meth:`GetQueryID<OEBioisostere::OEBroodQuery::GetQueryID>`
      falls back to the query's isomeric SMILES.

      .. note::

         Assigning an identifier is optional: by default the identifier is the query's
         SMILES, which keeps queries apart during hit-list de-duplication. Assign a
         **unique** identifier when two *distinct* queries can share the same SMILES, so
         that their hits are not merged during de-duplication. In the combo-building
         process the identifier is also used to map each hit back to its originating query,
         so a unique identifier is recommended there. Two queries that share an identifier
         (for example, two distinct queries that share a SMILES and neither overrides the
         default) are treated as the same query.

   .. _OEBioisostere_OEBroodQuery_HasProtein:

   .. oe:method:: HasProtein

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

         .. oe:api::

            bool HasProtein() const

      .. oe:language:: python

         .. oe:api:: python

            HasProtein() -> bool

      This method returns *true* if the query contains an associated protein.

   .. _OEBioisostere_OEBroodQuery_HasProteinSelect:
   
   .. oe:method:: HasProteinSelect

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

         .. oe:api::

            bool HasProteinSelect() const

      .. oe:language:: python

         .. oe:api:: python

            HasProteinSelect() -> bool

      This method returns *true* if the query contains an associated selectivity protein.

   .. _OEBioisostere_OEBroodQuery_Init:

   .. oe:method:: Init

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

         .. oe:api::

            unsigned Init(const OEChem::OEMCMolBase& queryMol)

      .. oe:language:: python

         .. oe:api:: python

            Init(queryMol: OEMol) -> int

      This method initializes the query from contents in the specified `query molecule`.
      A `query molecule` is an :ref:`OEMol <OEChem_OEMol>` containing a set
      of specific data tags. The method returns
      :oe:const:`OEBioisostere::OEBroodStatusCode::Success` if
      the initialization is successful, otherwise it returns an error code from the
      :oe:constns:`OEBioisostere::OEBroodStatusCode` namespace.
