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

.. oe:namespace:: OEBioisostere

.. meta::
   :keywords: OEBroodScore, BroodScore


.. _OEBioisostere_OEBroodScore:

.. oe:class:: OEBroodScore

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEBroodScore

   This class defines objects that contains results corresponding to a
   bioisosteric fragment overlap.

   The :ref:`OEBroodScore <OEBioisostere_OEBroodScore>` class defines the following public methods:
    * :oe:meth:`Add<OEBioisostere::OEBroodScore::Add>`
    * :oe:meth:`GetAttachCount<OEBioisostere::OEBroodScore::GetAttachCount>`
    * :oe:meth:`GetAttachScore<OEBioisostere::OEBroodScore::GetAttachScore>`
    * :oe:meth:`GetColorScore<OEBioisostere::OEBroodScore::GetColorScore>`
    * :oe:meth:`GetComboScore<OEBioisostere::OEBroodScore::GetComboScore>`
    * :oe:meth:`GetEnergy<OEBioisostere::OEBroodScore::GetEnergy>`
    * :oe:meth:`GetFrag<OEBioisostere::OEBroodScore::GetFrag>`
    * :oe:meth:`GetFragMol<OEBioisostere::OEBroodScore::GetFragMol>`
    * :oe:meth:`GetQueryIDs<OEBioisostere::OEBroodScore::GetQueryIDs>`
    * :oe:meth:`GetScoreType<OEBioisostere::OEBroodScore::GetScoreType>`
    * :oe:meth:`GetShapeScore<OEBioisostere::OEBroodScore::GetShapeScore>`
    * :oe:meth:`GetStatus<OEBioisostere::OEBroodScore::GetStatus>`
    * :oe:meth:`Load<OEBioisostere::OEBroodScore::Load>`
    * :oe:meth:`ToRecord<OEBioisostere::OEBroodScore::ToRecord>`

   

   .. _OEBioisostere_OEBroodScore_Constructors:

   .. oe:method:: Constructors

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

         .. oe:api::

            OEBroodScore()
            OEBroodScore(const OEBroodScore &)

      .. oe:language:: python

         .. oe:api:: python

            OEBroodScore() -> OEBroodScore
            OEBroodScore(arg2: OEBroodScore) -> OEBroodScore

      Default and copy constructors. The scoring type is determined by the
      :oe:meth:`OEBroodGeneralOptions::SetScoreType<OEBioisostere::OEBroodGeneralOptions::SetScoreType>`
      option and defaults to :oe:const:`OEBioisostere::OEBroodScoreType::ROCS`.



   .. _OEBioisostere_OEBroodScore_operator=:

   .. oe:method:: operator=

      .. oe:language:: c++

         .. oe:api::

             OEBroodScore& operator=(const OEBroodScore&)

      Assignment operator.

   .. _OEBioisostere_OEBroodScore_Add:

   .. oe:method:: Add

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

         .. oe:api::

            bool Add(const OEBroodScore& score)

      .. oe:language:: python

         .. oe:api:: python

            Add(score: OEBroodScore) -> bool

      This method merges another :ref:`OEBroodScore <OEBioisostere_OEBroodScore>` into this
      score by appending query provenance and combining similarity components
      (attachment, shape, and color). The method returns ``true`` only when
      both score objects have successful status.

   .. _OEBioisostere_OEBroodScore_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 fragment overlay.


   .. _OEBioisostere_OEBroodScore_GetAttachScore:

   .. oe:method:: GetAttachScore

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

         .. oe:api::

            double GetAttachScore() const

      .. oe:language:: python

         .. oe:api:: python

            GetAttachScore() -> float

      This method returns the attachment score corresponding to fragment overlay.


   .. _OEBioisostere_OEBroodScore_GetColorScore:

   .. oe:method:: GetColorScore

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

         .. oe:api::

            double GetColorScore() const

      .. oe:language:: python

         .. oe:api:: python

            GetColorScore() -> float

      This method returns the color score corresponding to fragment overlay.


   .. _OEBioisostere_OEBroodScore_GetComboScore:

   .. oe:method:: GetComboScore

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

         .. oe:api::

            double GetComboScore() const

      .. oe:language:: python

         .. oe:api:: python

            GetComboScore() -> float

      This method returns the combo (shape+color) score corresponding to fragment overlay.

   .. _OEBioisostere_OEBroodScore_GetEnergy:

   .. oe:method:: GetEnergy

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

         .. oe:api::

            double GetEnergy() const

      .. oe:language:: python

         .. oe:api:: python

            GetEnergy() -> float

      This method returns the *energy* associated with the fragment. *Energy* refers to the entity that
      is used for ranking fragments in building the hit list using :ref:`OEBioisostere_OEScoreHitlist`.

   .. _OEBioisostere_OEBroodScore_GetFrag:

   .. oe:method:: GetFrag

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

         .. oe:api::

            const OEChem::OEMol& GetFrag() const

      .. oe:language:: python

         .. oe:api:: python

            GetFrag() -> OEMol

      This method returns a const reference to the generated molecule with fragment replacement.

   .. _OEBioisostere_OEBroodScore_GetFragMol:

   .. oe:method:: GetFragMol

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

         .. oe:api::

            bool GetFragMol(OEChem::OEMolBase& mol) const

      .. oe:language:: python

         .. oe:api:: python

            GetFragMol(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      This method copies the generated molecule with fragment replacement into the provided
      molecule parameter. It returns ``true`` if successful and ``false`` otherwise.

   .. _OEBioisostere_OEBroodScore_GetQueryIDs:

   .. oe:method:: GetQueryIDs

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

         .. oe:api::

            const std::vector<std::string>& GetQueryIDs() const

      .. oe:language:: python

         .. oe:api:: python

            GetQueryIDs() -> OEStringVector

      This method returns the query identifiers of the originating
      :ref:`OEBroodQuery <OEBioisostere_OEBroodQuery>` objects. Each identifier is the one
      assigned with :oe:meth:`SetQueryID<OEBioisostere::OEBroodQuery::SetQueryID>`, or the
      originating query's isomeric SMILES when no identifier was assigned. In single-query
      workflows this is typically one entry; in combined (combo-built) workflows it can
      contain multiple entries, one per contributing query.

      .. note::

         A score can be associated with multiple query identifiers when multiple queries
         are used to build it. Assign a **unique** identifier to each distinct query with
         :oe:meth:`SetQueryID<OEBioisostere::OEBroodQuery::SetQueryID>` when distinct
         queries could otherwise share the same default (SMILES) identifier; this is what
         disambiguates scores from different queries during hit list deduplication and
         combo building. See the :ref:`combo_builder <section_examples_combo_builder>`
         example for more details.


   .. _OEBioisostere_OEBroodScore_GetScoreType:

   .. oe:method:: GetScoreType

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

         .. oe:api::

            unsigned GetScoreType() const

      .. oe:language:: python

         .. oe:api:: python

            GetScoreType() -> int

      This method returns the scoring mode associated with this result. The value is one
      of the constants from the :oe:constns:`OEBioisostere::OEBroodScoreType` namespace:

      * :oe:const:`OEBioisostere::OEBroodScoreType::ROCS` - shape and color based scoring.
      * :oe:const:`OEBioisostere::OEBroodScoreType::ET` - shape and electrostatics based scoring.
      * :oe:const:`OEBioisostere::OEBroodScoreType::LinkOnly` - attachment-only based scoring.

      The scoring type is set via
      :oe:meth:`OEBroodGeneralOptions::SetScoreType<OEBioisostere::OEBroodGeneralOptions::SetScoreType>`
      before running the overlay. The default is
      :oe:const:`OEBioisostere::OEBroodScoreType::ROCS`.

   .. _OEBioisostere_OEBroodScore_GetShapeScore:

   .. oe:method:: GetShapeScore

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

         .. oe:api::

            double GetShapeScore() const

      .. oe:language:: python

         .. oe:api:: python

            GetShapeScore() -> float

      This method returns the shape score corresponding to fragment overlay.

   .. _OEBioisostere_OEBroodScore_GetStatus:

   .. oe:method:: GetStatus

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

         .. oe:api::

            unsigned GetStatus() const

      .. oe:language:: python

         .. oe:api:: python

            GetStatus() -> int

      This method returns the status of fragment overlay. The method returns
      :oe:const:`OEBioisostere::OEBroodStatusCode::Success` if
      the overlay was successful, otherwise it returns an error code from the
      :oe:constns:`OEBioisostere::OEBroodStatusCode` namespace.

   .. _OEBioisostere_OEBroodScore_Load:

   .. oe:method:: Load

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

         .. oe:api::

            bool Load(const OEDataFlow::OERecord&)

      .. oe:language:: python

         .. oe:api:: python

            Load(arg2: OERecord) -> bool

      This method loads contents of :ref:`OEBroodScore <OEBioisostere_OEBroodScore>`
      from :ref:`OERecord <OEDataFlow_OERecord>`.
      It returns ``true`` if successful and ``false`` otherwise.

   .. _OEBioisostere_OEBroodScore_ToRecord:

   .. oe:method:: ToRecord

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

         .. oe:api::

            bool ToRecord(OEDataFlow::OERecord&) const

      .. oe:language:: python

         .. oe:api:: python

            ToRecord(arg2: OERecord) -> bool

      This method saves the contents of :ref:`OEBroodScore <OEBioisostere_OEBroodScore>`
      into an :ref:`OERecord <OEDataFlow_OERecord>`.
      It returns ``true`` if successful and ``false`` otherwise.
