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

.. oe:namespace:: OEBioisostere

.. meta::
   :keywords: OEBroodOverlay, BroodOverlay


.. _OEBioisostere_OEBroodOverlay:

.. oe:class:: OEBroodOverlay

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEBroodOverlay: public OEBroodOverlayBase

   This class defines an interface for fragment overlay optimization
   against a :ref:`Brood query <OEBioisostere_OEBroodQuery>`.

   The :ref:`OEBroodOverlay <OEBioisostere_OEBroodOverlay>` class defines the following public methods:
    * :oe:meth:`Overlay<OEBioisostere::OEBroodOverlay::Overlay>`
    * :oe:meth:`SetupRef<OEBioisostere::OEBroodOverlay::SetupRef>`
    * :oe:meth:`Transform<OEBioisostere::OEBroodOverlay::Transform>`



   .. _OEBioisostere_OEBroodOverlay_Constructors:
   .. oe:method:: Constructors

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

         .. oe:api::

            OEBroodOverlay(const OEBroodGeneralOptions& genOpts = OEBroodGeneralOptions(),
                           const OEBroodScoreOptions& scoreOpts = OEBroodScoreOptions())

      .. oe:language:: python

         .. oe:api:: python

            OEBroodOverlay(genOpts: OEBroodGeneralOptions = OEBroodGeneralOptions(),
                           scoreOpts: OEBroodScoreOptions = OEBroodScoreOptions()) -> OEBroodOverlay

      Default constructor.


   .. _OEBioisostere_OEBroodOverlay_Overlay:

   .. oe:method:: Overlay

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

         .. oe:api::

            std::vector<OEBroodScore> Overlay(const OEBroodDBPacket&)
            unsigned Overlay(std::vector<OEBroodScore>&, const OEBroodDBPacket&)
            unsigned Overlay(OEChem::OEMCMolBase& fragment, OEBroodScore& score)

      .. oe:language:: python

         .. oe:api:: python

            Overlay(packet: OEBroodDBPacket) -> OEBroodScoreVector
            Overlay(vecScores: OEBroodScoreVector, packet: OEBroodDBPacket) -> int
            Overlay(fragment: OEMol, match: OEBroodScore) -> int

      Performs overlay optimization against the specified fragments. The first
      two overloads optimize against all fragments in the provided
      :ref:`OEBroodDBPacket <OEBioisostere_OEBroodDBPacket>`, and return
      a vector of :ref:`OEBroodScore <OEBioisostere_OEBroodScore>` values.
      The third overload performs optimization against the specified fragment
      and populates the specified
      :ref:`OEBroodScore <OEBioisostere_OEBroodScore>` with optimization results.
      Both the second and third overloads return an optimization status from
      :oe:constns:`OEBioisostere::OEBroodStatusCode`.


   .. _OEBioisostere_OEBroodOverlay_SetupRef:

   .. oe:method:: SetupRef

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

         .. oe:api::

            unsigned SetupRef(const OEBroodQuery& query)

      .. oe:language:: python

         .. oe:api:: python

            SetupRef(query: OEBroodQuery) -> int

      Sets up the overlay optimization with the desired 
      :ref:`OEBroodQuery <OEBioisostere_OEBroodQuery>`.  Method returns
      :oe:const:`OEBioisostere::OEBroodStatusCode::Success` if
      the initialization is successful, otherwise returns an error code from the
      :oe:constns:`OEBioisostere::OEBroodStatusCode` namespace.


   .. _OEBioisostere_OEBroodOverlay_Transform:

   .. oe:method:: Transform

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

         .. oe:api::

            bool Transform(OEChem::OEMolBase& mol) const

      .. oe:language:: python

         .. oe:api:: python

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

      Transforms the specified molecule to the optimized overlay position
      determined by a prior call to
      :oe:meth:`Overlay<OEBioisostere::OEBroodOverlay::Overlay>`.
