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

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEHighlightMonomers


.. oe:function:: OEHighlightMonomers

   .. attention::

      |PRELIMINARY-API|

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

      .. oe:api::

         bool OEHighlightMonomers(OEDepict::OEImageBase& image,
                                  const OEChem::OEMolBase& mol)
         bool OEHighlightMonomers(OEDepict::OEImageBase& image,
                                  const OEChem::OEMolBase& mol,
                                  const OEHighlightMonomerDisplayOptions& opts)

   .. oe:language:: python

      .. oe:api:: python

         OEHighlightMonomers(image: OEImageBase,
                             mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool
         OEHighlightMonomers(image: OEImageBase,
                             mol: Union[OEGraphMol,OEMol,OEQMol],
                             opts: OEHighlightMonomerDisplayOptions) -> bool

   The :oe:func:`OEGrapheme::OEHighlightMonomers` function is designed to depict a molecule
   initialized from a :term:`HELM` string and highlight its monomer components.

   *image*
     The image on which the molecule is drawn.

   *mol*
      The molecule being depicted.

   *opts*
      The :oe:cls:`OEGrapheme::OEHighlightMonomerDisplayOptions` object that stores
      properties that determine the styles of the molecule depiction.

   **Example:**

   .. oe:source:: HighlightMonomers.py
      :language: python
      :noindent:
      :frag:     SNIPPET-HIGHLIGHT-MONOMERS

   .. oe:source:: HighlightMonomers.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-HIGHLIGHT-MONOMERS

   .. figure:: ../images/HighlightMonomers.*
      :width: 450pt
      :align:  center

      **Example of using OEHighlightMonomers function**

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

      .. oe:api::

         bool OEHighlightMonomers(OEDepict::OE2DMolDisplay& disp,
                                  const OEHighlightMonomerDisplayOptions& opts)

   .. oe:language:: python

      .. oe:api:: python

         OEHighlightMonomers(molDisplay: OE2DMolDisplay,
                             opts: OEHighlightMonomerDisplayOptions) -> bool

   This overload of the  :oe:func:`OEGrapheme::OEHighlightMonomers` function renders the
   molecule with the monomer highlighting to the display object.

   *disp*
      The display object for the molecule being depicted.

   *opts*
      The :oe:cls:`OEGrapheme::OEHighlightMonomerDisplayOptions` object that stores
      properties that determine the styles of the molecule depiction.

.. seealso::

   * :oe:func:`OEGrapheme::OEDrawMonomerGraph` function to depict the monomer graph of molecule initialized from HELM
   * :oe:func:`OEGrapheme::OEDrawPeptide` function to depict a peptide with standard amino acids
   * :oe:func:`OEGrapheme::OEDrawResidues` function to depict residues of a peptide

.. admonition:: Code Example

   * `Depict Peptide`_ **OpenEye Python Cookbook** recipe

