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

.. oe:namespace:: OEBioisostere

.. meta::
   :keywords: OEFragOverlay, FragOverlay


.. _OEBioisostere_OEFragOverlay:

.. oe:class:: OEFragOverlay

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEFragOverlay: public OEBroodOverlayBase

   This class defines an interface for fragment overlay optimization
   against another fragment.

   The :ref:`OEFragOverlay <OEBioisostere_OEFragOverlay>` class defines the following public methods:
    * :oe:meth:`GetRefFrag<OEBioisostere::OEFragOverlay::GetRefFrag>`
    * :oe:meth:`SetupRef<OEBioisostere::OEFragOverlay::SetupRef>`
    * :oe:meth:`Transform<OEBioisostere::OEFragOverlay::Transform>`

   The following methods are publicly inherited from :ref:`OEBroodOverlayBase <OEBioisostere_OEBroodOverlayBase>`:
    * :oe:meth:`Overlay<OEBioisostere::OEBroodOverlayBase::Overlay>`



   .. _OEBioisostere_OEFragOverlay_Constructors:
   .. oe:method:: Constructors

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

         .. oe:api::

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

      .. oe:language:: python

         .. oe:api:: python

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

      Default constructor.


   .. _OEBioisostere_OEFragOverlay_GetRefFrag:

   .. oe:method:: GetRefFrag

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

         .. oe:api::

            bool GetRefFrag(OEChem::OEMolBase& mol) const

      .. oe:language:: python

         .. oe:api:: python

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

      Gets the reference fragment currently set to perform overlay.
      Method returns ``true`` if successful, ``false`` otherwise.


   .. _OEBioisostere_OEFragOverlay_SetupRef:

   .. oe:method:: SetupRef

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

         .. oe:api::

            unsigned SetupRef(const OEChem::OEMolBase& fragment)

      .. oe:language:: python

         .. oe:api:: python

            SetupRef(queryFrag: Union[OEGraphMol,OEMol,OEQMol]) -> int

      Sets up the overlay optimization with the desired fragment molecule.
      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_OEFragOverlay_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::OEBroodOverlayBase::Overlay>`.
