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

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OERenderActiveSite


.. _OEGrapheme_OERenderActiveSite:

.. oe:function:: OERenderActiveSite

   .. list-table:: **The overloaded versions of the OERenderActiveSite function**
      :widths: 100 200
      :header-rows: 1

      * - Link
        - Description

      * - :ref:`OERenderActiveSite(image, adisp)<api_OERenderActiveSite_OEImageBase>`
        - renders an active site into an image

      * - :ref:`OERenderActiveSite(filename, adisp)<api_OERenderActiveSite_filename>`
        - writes an active site display into a file

      * - :ref:`OERenderActiveSite(stream, ext, adisp)<api_OERenderActiveSite_oeostream>`
        - writes an active site display into an output stream

   .. seealso::

      * :oe:func:`OEGrapheme::OEDrawActiveSiteLegend` function
      * :oe:func:`OEGrapheme::OERenderActiveSiteMaps` function
      * :oe:func:`OEGrapheme::OERenderBFactorMap` function
      * :oe:func:`OEGrapheme::OERenderContactMap` function
      * :oe:func:`OEGrapheme::OERenderUnpairedInteractionMap` function

   .. admonition:: Code Example

      * :ref:`section_examples_summary_complex2img` example
      * `Visualizing Protein-Ligand Interactions`_  **OpenEye Python Cookbook** recipe

   .. _figure_OERenderActiveSite:

     .. only:: oehtml

      .. raw:: html

         <p align="center">
         <object data="../../_images/OERenderActiveSite-image-adisp.svg" type="image/svg+xml"  width = "600" ></object>
         <p>

         <p align="center">
         <b>Example of using the OERenderActiveSite function</b>
         <p>

      .. image:: ../images/OERenderActiveSite-image-adisp.svg
         :width: 1pt

   .. only:: oepdf

      .. figure:: ../images/OERenderActiveSite-image-adisp.pdf
         :align:  center

         **Example of using the OERenderActiveSite function**

   .. #############################################################

   .. _api_OERenderActiveSite_OEImageBase:

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

      .. oe:api::

         bool OERenderActiveSite(OEDepict::OEImageBase& image,
                                 const OE2DActiveSiteDisplay& adisp)

   .. oe:language:: python

      .. oe:api:: python

         OERenderActiveSite(image: OEImageBase, adisp: OE2DActiveSiteDisplay) -> bool

   Renders the active site display into an image.

   *image*
      The image in which the active site is drawn.

   *adisp*
      The :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` object that holds the
      data necessary to depict the interactions of an active site.

   **Example:**

   .. oe:source:: OERenderActiveSite_image.py
      :language: python
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-IMAGE-ADISP

   .. oe:source:: OERenderActiveSite_image.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-IMAGE-ADISP

   .. oe:source:: OERenderActiveSite_image.java
      :language: java
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-IMAGE-ADISP

   .. oe:source:: OERenderActiveSite_image.cs
      :language: csharp
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-IMAGE-ADISP

   .. seealso::

      * :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` class
      * :ref:`OE2DActiveSiteDisplayOptions <OEGrapheme_OE2DActiveSiteDisplayOptions>` class

   .. #############################################################

   .. _api_OERenderActiveSite_filename:

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

      .. oe:api::

         bool OERenderActiveSite(const std::string& filename,
                                 const OE2DActiveSiteDisplay& adisp)

   .. oe:language:: python

      .. oe:api:: python

         OERenderActiveSite(filename: str, adisp: OE2DActiveSiteDisplay) -> bool

   Writes the active site display into a file.

   *filename*
      The name of the file into which the active site display is being
      written.
      The extension of the filename determine the type of the image.

   *adisp*
      The :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` object that holds the
      data necessary to depict the interactions of an active site.

   **Example:**

   .. oe:source:: OERenderActiveSite_fname.py
      :language: python
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-FNAME-ADISP

   .. oe:source:: OERenderActiveSite_fname.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-FNAME-ADISP

   .. oe:source:: OERenderActiveSite_fname.java
      :language: java
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-FNAME-ADISP

   .. oe:source:: OERenderActiveSite_fname.cs
      :language: csharp
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-FNAME-ADISP

   .. seealso::

      * :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` class
      * :ref:`OE2DActiveSiteDisplayOptions <OEGrapheme_OE2DActiveSiteDisplayOptions>` class

   .. #############################################################

   .. _api_OERenderActiveSite_oeostream:

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

      .. oe:api::

         bool OERenderActiveSite(OEPlatform::oeostream& os,
                                 const std::string& extension,
                                 const OE2DActiveSiteDisplay& adisp)

   .. oe:language:: python

      .. oe:api:: python

         OERenderActiveSite(os: oeostream, extension: str,
                            adisp: OE2DActiveSiteDisplay) -> bool

   Writes the active site display into a stream.

   *os*
      The stream into which the active site is being written.

   *ext*
      The extension which determine the type of the image.

   *adisp*
      The :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` object that holds the
      data necessary to depict the interactions of an active site.

   **Example:**

   .. oe:source:: OERenderActiveSite_stream.py
      :language: python
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-STREAM-ADISP

   .. oe:source:: OERenderActiveSite_stream.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-STREAM-ADISP

   .. oe:source:: OERenderActiveSite_stream.java
      :language: java
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-STREAM-ADISP

   .. oe:source:: OERenderActiveSite_stream.cs
      :language: csharp
      :noindent:
      :frag:     SNIPPET-OERENDERACTIVESITE-STREAM-ADISP

   .. seealso::

      * :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` class
      * :ref:`OE2DActiveSiteDisplayOptions <OEGrapheme_OE2DActiveSiteDisplayOptions>` class
