.. include:: ../substitutions

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEAddResidueHighlighting

.. oe:function:: OEAddResidueHighlighting

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

      .. oe:api::

         void OEAddResidueHighlighting(OE2DActiveSiteDisplay& adisp,
                                       const OEDepict::OEPen& pen,
                                       const OEChem::OEResidue& residue)

   .. oe:language:: python

      .. oe:api:: python

         OEAddResidueHighlighting(adisp: OE2DActiveSiteDisplay, pen: OEPen,
                                  residue: OEResidue) -> None

   Highlights the given residues in the active site display.

   *adisp*
      The :ref:`OE2DActiveSiteDisplay <OEGrapheme_OE2DActiveSiteDisplay>` object of which residues
      being highlighted.
   *pen*
      The :ref:`OEPen <OEDepict_OEPen>` object that specifies the style of the highlighting.

   *residue*
      The residue being highlighted.

   **Example:** (See image generated in :ref:`figure_OEAddResidueHighlighting`)

   The :oe:func:`OESystem::OEGetLightColors` function in the below example returns
   eight colors that is used to highlight only the first eight residues in the generated
   image.

   .. oe:source:: ActiveSiteHighlight.py
      :language: python
      :noindent:
      :frag:     SNIPPET-ACTIVESITE-OEADDHIGHLIGHTING-OERESIDUE

   .. oe:source:: ActiveSiteHighlight.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-ACTIVESITE-OEADDHIGHLIGHTING-OERESIDUE

   .. oe:source:: ActiveSiteHighlight.java
      :language: java
      :noindent:
      :frag:     SNIPPET-ACTIVESITE-OEADDHIGHLIGHTING-OERESIDUE

   .. oe:source:: ActiveSiteHighlight.cs
      :language: csharp
      :noindent:
      :frag:     SNIPPET-ACTIVESITE-OEADDHIGHLIGHTING-OERESIDUE

   .. _figure_OEAddResidueHighlighting:

   .. figure:: ../images/OEAddHighlighting-ActiveSite-OEResidue.*
      :align:  center

      **Example of highlighting residues**
