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

.. oe:namespace:: OEEon

.. meta::
   :keywords: OEEonOverlay, EonOverlay


.. _OEEon_OEEonOverlay:

.. oe:class:: OEEonOverlay

   .. attention::

      |PRELIMINARY-API|

   .. oe:api::

      class OEEonOverlay : public OEShape::OEOverlay

  This class calculates charge density overlay. It defines the following public methods that implement shape and charge overlays of molecules:
    * :oe:meth:`Overlay<OEEon::OEEonOverlay::Overlay>`
    * :oe:meth:`SortedOverlay<OEEon::OEEonOverlay::SortedOverlay>`
    * :oe:meth:`BestOverlay<OEEon::OEEonOverlay::BestOverlay>`


The following methods are publicly inherited from :ref:`OEShape::OEOverlay <OEShape_OEOverlay>`.


   .. oe:method:: Constructors

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

         .. oe:api::

            OEEonOverlay(const OEShape::OEOverlayOptions& opts = OEShape::OEOverlayOptions())

      .. oe:language:: python

         .. oe:api:: python

            OEEonOverlay(opts: OEOverlayOptions = OEOverlayOptions()) -> OEEonOverlay

      Constructor. This class is not copyable.


   .. oe:method:: Destructor
      
      .. oe:api::

         ~OEEonOverlay()


   .. oe:method:: Overlay

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

         .. oe:api::

            OESystem::OEIterBase<OEEonOverlayResults>* Overlay(const OEChem::OEMCMolBase& fitMol)

      .. oe:language:: python

         .. oe:api:: python

            Overlay(fitMol: OEMol) -> Iterable[OEEonOverlayResults]

      This method returns all shape and charge density overlays for a fit molecules with respect to a reference molecule.

   .. oe:method:: SortedOverlay

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

         .. oe:api::

            OESystem::OEIterBase<OEEonOverlayScore>* SortedOverlay(const OEChem::OEMCMolBase& fitmol,
                                                                   const unsigned maxHits,
                                                                   const OESystem::OEBinaryPredicate<OEShape::OEBestOverlayScore, OEShape::OEBestOverlayScore>& pred = OEHighestShapeChargeTanimotoCombo())

      .. oe:language:: python

         .. oe:api:: python

            SortedOverlay(fitmol: OEMol, maxHits: int,
                          pred: OEBestOverlayScoreSorterPred = OEHighestShapeChargeTanimotoCombo()) -> Iterable[OEEonOverlayScore]

      This method returns all sorted using sorting dictated by the predicate in use. By default, it is the shape and charge density Tanimoto combo.

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

         .. oe:api::

            bool BestOverlay(OEEonOverlayScore& score,
                             const OEChem::OEMCMolBase& fitmol,
                             const OESystem::OEBinaryPredicate<OEShape::OEBestOverlayScore, OEShape::OEBestOverlayScore>& pred = OEHighestShapeChargeTanimotoCombo())

      .. oe:language:: python

         .. oe:api:: python

            BestOverlay(score: OEEonOverlayScore, fitmol: OEMol,
                        pred: OEBestOverlayScoreSorterPred = OEHighestShapeChargeTanimotoCombo()) -> bool


      This method returns the best overlay according to the respective predicate used. By default, it is the shape and charge density Tanimoto combo.
