.. include:: ../../common/cookbook/cookbook-hyperlinks

.. oe:namespace:: OEGrapheme


.. _OEGrapheme_OEShapeOverlapDisplay:

.. oe:class:: OEShapeOverlapDisplay

   .. oe:api::

      class OEShapeOverlapDisplay

   This class represents :ref:`OEShapeOverlapDisplay <OEGrapheme_OEShapeOverlapDisplay>` that
   stores the depiction information of depicting the for molecule of 
   shape overlap.
   See example in :ref:`Table: Example of depicting the shape and the color overlap<table_OEShapeOverlapDisplay>`.

   .. seealso::

      * The Theory chapter of the **Shape TK** manual.
      * :oe:func:`OEGrapheme::OERenderColorOverlap` function
      * :oe:func:`OEGrapheme::OERenderShapeOverlap` function

   .. _table_OEShapeOverlapDisplay:

   .. list-table:: **Example of depicting the shape and the color overlap**
      :widths: 150 150 
      :header-rows: 0

      * - .. image:: ../images/RenderShapeOverlap.*
             :align:  center
        - .. image:: ../images/RenderColorOverlap.*
             :align:  center

   .. admonition:: Code Example

      * `Visualizing Shape and Color Overlap`_ **OpenEye Python Cookbook** recipe

   .. oe:method:: Constructors

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

         .. oe:api::

            OEShapeOverlapDisplay(const OEShapeQueryDisplay& refdisp,
                                  const OEChem::OEMolBase& fitmol)

      .. oe:language:: python

         .. oe:api:: python

            OEShapeOverlapDisplay(refdisp: OEShapeQueryDisplay,
                                  fitmol: Union[OEGraphMol,OEMol,OEQMol]) -> OEShapeOverlapDisplay

      Constructs an :ref:`OEShapeOverlapDisplay <OEGrapheme_OEShapeOverlapDisplay>` object
      with default depiction options.

      *refdisp* 
        The :ref:`OEShapeQueryDisplay <OEGrapheme_OEShapeQueryDisplay>` object that
        stores the reference molecule of the shape overlap.

      *fitmol*
        The **3D** molecule that is overlaid to the reference molecule.

      .. warning::

         **No overlay is performed to maximize the shape and color overlap**
         between the reference and the fit molecule *i.e.*
         the *fitmol* has to be pre-aligned to the reference molecule
         stored in the :ref:`OEShapeQueryDisplay <OEGrapheme_OEShapeQueryDisplay>`
         object.

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

         .. oe:api::

            OEShapeOverlapDisplay(const OEShapeQueryDisplay& refdisp,
                                  const OEChem::OEMolBase& fitmol,
                                  const OEColorOverlapDisplayOptions& copts)
            OEShapeOverlapDisplay(const OEShapeQueryDisplay& refdisp,
                                  const OEChem::OEMolBase& fitmol,
                                  const OEShapeOverlapDisplayOptions& sopts)
            OEShapeOverlapDisplay(const OEShapeQueryDisplay& refdisp,
                                  const OEChem::OEMolBase& fitmol,
                                  const OEShapeOverlapDisplayOptions& sopts,
                                  const OEColorOverlapDisplayOptions& copts)

      .. oe:language:: python

         .. oe:api:: python

            OEShapeOverlapDisplay(refdisp: OEShapeQueryDisplay,
                                  fitmol: Union[OEGraphMol,OEMol,OEQMol],
                                  sopts: OEShapeOverlapDisplayOptions) -> OEShapeOverlapDisplay
            OEShapeOverlapDisplay(refdisp: OEShapeQueryDisplay,
                                  fitmol: Union[OEGraphMol,OEMol,OEQMol],
                                  copts: OEColorOverlapDisplayOptions) -> OEShapeOverlapDisplay
            OEShapeOverlapDisplay(refdisp: OEShapeQueryDisplay,
                                  fitmol: Union[OEGraphMol,OEMol,OEQMol],
                                  sopts: OEShapeOverlapDisplayOptions,
                                  copts: OEColorOverlapDisplayOptions) -> OEShapeOverlapDisplay

      Constructs an :ref:`OEShapeOverlapDisplay <OEGrapheme_OEShapeOverlapDisplay>` object
      with given depiction options.

      *refdisp* 
        The :ref:`OEShapeQueryDisplay <OEGrapheme_OEShapeQueryDisplay>` object that
        stores the reference molecule of the shape overlap.

      *fitmol*
        The **3D** molecule that is overlaid to the reference molecule.

      *copts*
        The :ref:`OEColorOverlapDisplayOptions <OEGrapheme_OEColorOverlapDisplayOptions>` object
        that defines how the color atom overlap between the reference and the 
        fit molecule is depicted.

      *sopts*
        The :ref:`OEShapeOverlapDisplayOptions <OEGrapheme_OEShapeOverlapDisplayOptions>` object
        that defines how the shape overlap between the reference and the 
        fit molecule is depicted.

      .. warning::

         **No overlay is performed to maximize the shape and color overlap**
         between the reference and the fit molecule *i.e.*
         the *fitmol* has to be pre-aligned to the reference molecule
         stored in the :ref:`OEShapeQueryDisplay <OEGrapheme_OEShapeQueryDisplay>`
         object.

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

         .. oe:api::

            OEShapeOverlapDisplay(const OEShapeOverlapDisplay& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEShapeOverlapDisplay(rhs: OEShapeOverlapDisplay) -> OEShapeOverlapDisplay

      Copy constructor.


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

      .. oe:api::

         OEShapeOverlapDisplay &operator=(const OEShapeOverlapDisplay &rhs)

      Assignment operator.


   .. oe:method:: GetTitle

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

         .. oe:api::

            std::string GetTitle() const

      .. oe:language:: python

         .. oe:api:: python

            GetTitle() -> str

      Returns the title of the molecule the
      :ref:`OEShapeOverlapDisplay <OEGrapheme_OEShapeOverlapDisplay>` object was initialized.


   .. oe:method:: IsValid

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

         .. oe:api::

            bool IsValid() const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool

      Returns whether the :ref:`OEShapeOverlapDisplay <OEGrapheme_OEShapeOverlapDisplay>` object
      was initialized successfully.
      If initialization was attempted either with an invalid
      :ref:`OEShapeOverlapDisplay <OEGrapheme_OEShapeOverlapDisplay>`
      object, an empty fit molecule or a fit molecule without
      3D coordinates, then this method returns false.
