.. include:: ../substitutions

.. oe:namespace:: OEGrapheme

.. meta::
   :keywords: OEPrepareDepictionFrom3D


.. _OEGrapheme_OEPrepareDepictionFrom3D:

.. oe:function:: OEPrepareDepictionFrom3D

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

      .. oe:api::

         bool OEPrepareDepictionFrom3D(OEChem::OEMolBase& mol,
                                       bool suppressH = true)

   .. oe:language:: python

      .. oe:api:: python

         OEPrepareDepictionFrom3D(mol: Union[OEGraphMol,OEMol,OEQMol],
                                  suppressH: bool = True) -> bool

   Takes a 3D molecule and generates its 2D coordinates.
   The layout and orientation of the 2D coordinates are driven by the 3D
   coordinates. The molecule must have 3D coordinates assigned.

   *mol*
      The 3D molecule for which 2D coordinates are generated.

   *suppressH*
      If true, then explicit hydrogens are suppressed in the input molecule.
      Only hydrogens that are necessary to faithfully represent tetrahedral
      stereochemistry will be kept.

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

      .. oe:api::

         bool OEPrepareDepictionFrom3D(OEChem::OEMolBase& mol,
                                       const OEDepictionFrom3DOptions& opts)

   .. oe:language:: python

      .. oe:api:: python

         OEPrepareDepictionFrom3D(mol: Union[OEGraphMol,OEMol,OEQMol],
                                  opts: OEDepictionFrom3DOptions) -> bool

   Takes a 3D molecule and generates its 2D coordinates using the
   given options.
   The layout and orientation of the 2D coordinates are driven by the 3D
   coordinates.

   *mol*
      The 3D molecule for which 2D coordinates are generated.

   *opts*
      The :ref:`OEDepictionFrom3DOptions <OEGrapheme_OEDepictionFrom3DOptions>` object that stores
      options controlling the generation of 2D coordinates.

   See the 2D molecule depictions in
   :ref:`Table: 2D representation of the 3D molecule<table_OEPrepareDepictionFrom3D>`
   and the corresponding 3D molecule in
   :ref:`Figure: Example of 3D molecule displayed in VIDA<figure_OEPrepareDepictionFrom3D>`.

   .. _figure_OEPrepareDepictionFrom3D:

   .. figure:: ../images/OEPrepareDepictionFrom3D-VIDA.png
      :align:  center

      **Example of 3D molecule displayed in VIDA**

   .. _table_OEPrepareDepictionFrom3D:

   .. list-table:: **2D representation of the 3D molecule**
      :widths: 150 150
      :header-rows: 0

      * -  **OEPrepareDepictionFrom3D**
        -  **OEPrepareDepiction**
      * - .. image:: ../images/DrawMoleculeFrom3D.*
             :align:  center
        - .. image:: ../images/DrawMoleculeFrom2D.*
             :align:  center
