.. include:: ../../toolkit-substitutions
.. include:: ../substitutions

.. oe:namespace:: OEDepict

.. meta::
   :keywords: OEAnnotateDepictionProblems

.. _OEDepict_OEAnnotateDepictionProblems:


.. oe:function:: OEAnnotateDepictionProblems


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

      .. oe:api::

         bool OEAnnotateDepictionProblems(OE2DMolDisplay& disp)

   .. oe:language:: python

      .. oe:api:: python

         OEAnnotateDepictionProblems(disp: OE2DMolDisplay) -> bool

   Annotates various depiction problems on the molecule.
   Currently it can mark double bonds which are not depicted
   correctly according to their cis/trans stereo
   specifications.

   *disp*
      The :ref:`OE2DMolDisplay <OEDepict_OE2DMolDisplay>` object being
      annotated.

   The following code snippet show how to use the
   :oe:func:`OEDepict::OEAnnotateDepictionProblems` function.
   See the generated image in :ref:`Figure: Example of incorrect
   trans double bond depiction <figure_OEAnnotateDepictionProblems>`.
   The highlighting indicates that the double bond specified in the
   input SMILES string as trans is depicted as cis.

   .. oe:source:: OEAnnotateDepictionProblems.py
      :language: python
      :noindent:
      :frag:     SNIPPET-ANNOTATE-DEPICTION-PROBLEMS

   .. oe:source:: OEAnnotateDepictionProblems.cpp
      :language: c++
      :noindent:
      :frag:     SNIPPET-ANNOTATE-DEPICTION-PROBLEMS

   .. oe:source:: OEAnnotateDepictionProblems.java
      :language: java
      :noindent:
      :frag:     SNIPPET-ANNOTATE-DEPICTION-PROBLEMS

   .. oe:source:: OEAnnotateDepictionProblems.cs
      :language: csharp
      :noindent:
      :frag:     SNIPPET-ANNOTATE-DEPICTION-PROBLEMS

   .. _figure_OEAnnotateDepictionProblems:

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

      **Example of incorrect trans double bond depiction**

   .. note::

      **OEDepict TK** uses built-in ring system templates when
      generating 2D coordinates.
      Generating 2D coordinates which are inconsistent with
      cis/trans stereo bond specification can occur due to
      a missing ring template.
      The :oe:func:`OEDepict::OEPrepareDepiction` function throws
      a warning when this problem occurs.

