.. oe:namespace:: OEGrapheme


.. meta::
   :keywords: OEDepictionFrom3DOptions, DepictionFrom3DOptions


.. _OEGrapheme_OEDepictionFrom3DOptions:

.. oe:class:: OEDepictionFrom3DOptions

   .. oe:api::

      class OEDepictionFrom3DOptions

   This class represents :ref:`OEDepictionFrom3DOptions <OEGrapheme_OEDepictionFrom3DOptions>` that
   stores parameters that are used when generating 2D coordinates by
   calling the :oe:func:`OEGrapheme::OEPrepareDepictionFrom3D` function.

   .. list-table::
      :widths: 150 100 100
      :header-rows: 1

      * - Property
        - Get method
        - Set method

      * - inertial frame
        - :oe:meth:`GetCoordsToInertialFrame<OEGrapheme::OEDepictionFrom3DOptions::GetCoordsToInertialFrame>`
        - :oe:meth:`SetCoordsToInertialFrame<OEGrapheme::OEDepictionFrom3DOptions::SetCoordsToInertialFrame>`

      * - max number of bond rotations
        - :oe:meth:`GetMaxBondRotations<OEGrapheme::OEDepictionFrom3DOptions::GetMaxBondRotations>`
        - :oe:meth:`SetMaxBondRotations<OEGrapheme::OEDepictionFrom3DOptions::SetMaxBondRotations>`

      * - rotate to 2D reference
        - :oe:meth:`GetRotateTo2DReference<OEGrapheme::OEDepictionFrom3DOptions::GetRotateTo2DReference>`
        - :oe:meth:`SetRotateTo2DReference<OEGrapheme::OEDepictionFrom3DOptions::SetRotateTo2DReference>`

      * - suppressing hydrogens
        - :oe:meth:`GetSuppressHydrogens<OEGrapheme::OEDepictionFrom3DOptions::GetSuppressHydrogens>`
        - :oe:meth:`SetSuppressHydrogens<OEGrapheme::OEDepictionFrom3DOptions::SetSuppressHydrogens>`


   .. oe:method:: Constructors

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

         .. oe:api::

            OEDepictionFrom3DOptions(bool suppressH = true)

      .. oe:language:: python

         .. oe:api:: python

            OEDepictionFrom3DOptions(suppressH: bool = True) -> OEDepictionFrom3DOptions

      Default constructor that initializes an :ref:`OEDepictionFrom3DOptions <OEGrapheme_OEDepictionFrom3DOptions>`
      object with the following properties:

      .. list-table::  **Default parameters of the OEDepictionFrom3DOptions class**
         :widths: 100 100
         :header-rows: 1

         * - Property
           - Default value

         * - inertial frame
           - false

         * - max number of bond rotations
           - :math:`2^{16} = 65536`

         * - rotate to 2D reference
           - false

         * - suppressing hydrogens
           - true

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

         .. oe:api::

            OEDepictionFrom3DOptions(const OEDepictionFrom3DOptions& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEDepictionFrom3DOptions(rhs: OEDepictionFrom3DOptions) -> OEDepictionFrom3DOptions

      Copy constructor.


   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEDepictionFrom3DOptions &operator=(const OEDepictionFrom3DOptions &rhs)

      Assignment operator.


   .. oe:method:: GetCoordsToInertialFrame

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

         .. oe:api::

            bool GetCoordsToInertialFrame() const

      .. oe:language:: python

         .. oe:api:: python

            GetCoordsToInertialFrame() -> bool

      Returns whether the 3D molecule is moved to its inertial frame
      before generating the 2D coordinates.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::SetCoordsToInertialFrame` method


   .. oe:method:: GetMaxBondRotations

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

         .. oe:api::

            unsigned int GetMaxBondRotations() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxBondRotations() -> int

      Returns the maximum number of bond rotations performed during the 
      2D coordinate generation process.

      The default value for maximum number of bond rotations is
      :math:`2^{16} = 65536`. This means that by default only the first
      16 single bonds of the molecule will be rotated to find the 'closest'
      2D layout to the original 3D conformation.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::SetMaxBondRotations` method


   .. oe:method:: GetRotateTo2DReference

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

         .. oe:api::

            bool GetRotateTo2DReference() const

      .. oe:language:: python

         .. oe:api:: python

            GetRotateTo2DReference() -> bool

      Returns whether after the 2D coordinate generation a final rotation
      is performed to orient the 2D coordinates according
      to the 3D conformation.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::SetRotateTo2DReference` method


   .. oe:method:: GetSuppressHydrogens

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

         .. oe:api::

            bool GetSuppressHydrogens() const

      .. oe:language:: python

         .. oe:api:: python

            GetSuppressHydrogens() -> bool

      Returns whether the explicit hydrogens are suppressed in the 
      molecule prior to generating the 2D coordinates.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::SetSuppressHydrogens` method


   .. oe:method:: SetCoordsToInertialFrame

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

         .. oe:api::

            void SetCoordsToInertialFrame(bool)

      .. oe:language:: python

         .. oe:api:: python

            SetCoordsToInertialFrame(arg2: bool) -> None

      Sets whether the 3D molecule is moved to its inertial frame
      before generating the 2D coordinates.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::SetCoordsToInertialFrame` method


   .. oe:method:: SetMaxBondRotations

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

         .. oe:api::

            void SetMaxBondRotations(unsigned int maxrotations)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxBondRotations(arg2: int) -> None

      Sets the maximum number of bond rotations performed during the 
      2D coordinate generation process.

      *maxrotations*

         The zero value means that there is no limit. Upon reaching this limit, 
         the process terminates and returns the 2D coordinates that is the "closest"
         to the original 3D coordinates up to that point.

      .. hint::

         The default value for maximum number of bond rotations is
         :math:`2^{16} = 65536`. This means that by default only the first
         16 single bonds of the molecule will be rotated to find the
         2D layout that is the 'closest' to the original 3D conformation.

         It is recommended to use this parameter if the input 3D molecule has 
         a large number of rotatable bonds.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::GetMaxBondRotations` method


   .. oe:method:: SetRotateTo2DReference

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

         .. oe:api::

            void SetRotateTo2DReference(bool)

      .. oe:language:: python

         .. oe:api:: python

            SetRotateTo2DReference(arg2: bool) -> None

      Sets whether after the 2D coordinate generation a final rotation
      is performed to orient the 2D coordinates according
      to the 3D conformation.
      This can be used to ensure that 2D molecules are oriented similarly
      when they 3D conformations were similar.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::GetRotateTo2DReference` method


   .. oe:method:: SetSuppressHydrogens

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

         .. oe:api::

            void SetSuppressHydrogens(bool suppressH)

      .. oe:language:: python

         .. oe:api:: python

            SetSuppressHydrogens(arg2: bool) -> None

      Sets whether the explicit hydrogens are suppressed in the
      molecule prior to generating the 2D coordinates.
      Only hydrogens that are necessary to faithfully represent tetrahedral
      stereochemistry will be kept.

      .. seealso::

         * :oe:meth:`OEGrapheme::OEDepictionFrom3DOptions::GetSuppressHydrogens` method

