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

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEDrawMonomerGraph

.. oe:function:: OEDrawMonomerGraph

   .. attention::

      |PRELIMINARY-API|


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

      .. oe:api::

         bool OEDrawMonomerGraph(OEDepict::OEImageBase& image,
                                 const OEChem::OEMolBase& mol)
         bool OEDrawMonomerGraph(OEDepict::OEImageBase& image,
                                 const OEChem::OEMolBase& mol,
                                 const OEMonomerGraphDisplayOptions& opts)

   .. oe:language:: python

      .. oe:api:: python

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


   The :oe:func:`OEGrapheme::OEDrawMonomerGraph` function is designed to depict the monomer graph of
   a molecule initialized from a :term:`HELM` string.

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

   *mol*
      The molecule being depicted.

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


   **Example:**

   .. oe:source:: DrawMonomerGraph.py
      :language: python
      :noindent:
      :frag:     SNIPPET-DRAW-MONOMER-GRAPH

   .. oe:source:: DrawMonomerGraph.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-DRAW-MONOMER-GRAPH

   .. _figure_draw_monomer_graph:

   .. only:: oehtml

      .. raw:: html

         <p align="center">
         <b>hover cursor over graph</b>
         </p>

         <p align="center">
         <object data="../../_images/DrawMonomerGraph.svg" type="image/svg+xml"  width = "500" ></object>
         <p>

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

      .. image:: ../images/DrawMonomerGraph.svg
         :width: 1pt

   .. only:: oepdf

      .. figure:: ../images/DrawMonomerGraph.*
         :align:  center

         **Example of using the OEDrawMonomerGraph function**

   .. seealso::

      * :oe:func:`OEChem::OEHelmToMol` function
      * :oe:func:`OEGrapheme::OEHighlightMonomers` function to depict the molecules 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 peptides

   .. admonition:: Code Example

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

