.. role:: raw-html(raw)
   :format: html

.. oe:namespace:: OEChem


.. meta::
   :keywords: OEUniMolecularRxnOptions, UniMolecularRxnOptions


.. _OEChem_OEUniMolecularRxnOptions:

.. oe:class:: OEUniMolecularRxnOptions

   .. oe:api::

      class OEUniMolecularRxnOptions

   This class represents the :ref:`OEUniMolecularRxnOptions <OEChem_OEUniMolecularRxnOptions>` options class
   that encapsulates properties to control transforms using :ref:`OEUniMolecularRxn <OEChem_OEUniMolecularRxn>`
   and :oe:func:`OEChem::OEGetUniMolecularRxnIter`.

   .. seealso::

      * :ref:`OEUniMolecularRxn <OEChem_OEUniMolecularRxn>` class
      * :oe:func:`OEChem::OEGetUniMolecularRxnIter`

   .. ################################################################
      # Constructors
      ################################################################

   .. oe:method:: Constructors

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

         .. oe:api::

            OEUniMolecularRxnOptions()

      .. oe:language:: python

         .. oe:api:: python

            OEUniMolecularRxnOptions() -> OEUniMolecularRxnOptions

      Default constructor that initializes an :ref:`OEUniMolecularRxnOptions <OEChem_OEUniMolecularRxnOptions>`
      object with the following properties:

      .. list-table::  **Default parameters of OEUniMolecularRxnOptions**
         :widths: 50 50
         :header-rows: 1

         * - Option
           - Default value

         * - Strict SMIRKS
           - ``true``

         * - Validate Kekule
           - ``true``

         * - Clear Coordinates
           - ``false``

         * - Hydrogen Conversions
           - ``true``

         * - Fix Valences
           - :oe:const:`OEChem::OEUniMolecularRxnFixValence::Explicit`

         * - Altered Tag
           - empty

         * - Max Matches
           - 10000

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

         .. oe:api::

            OEUniMolecularRxnOptions(const OEUniMolecularRxnOptions& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEUniMolecularRxnOptions(arg2: OEUniMolecularRxnOptions) -> OEUniMolecularRxnOptions

      Copy constructor.

   .. ################################################################
      # operator=
      ################################################################

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

      .. oe:api::

         OEUniMolecularRxnOptions &operator=(const OEUniMolecularRxnOptions &rhs)

      Assignment operator.

   .. ################################################################
      # GetAlteredTag
      ################################################################

   .. oe:method:: GetAlteredTag

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

         .. oe:api::

            std::string GetAlteredTag() const

      .. oe:language:: python

         .. oe:api:: python

            GetAlteredTag() -> str

      Return the desired generic data tag that captures the boolean state
      indicating specific atoms that are modified by the transformation.
      If empty or blank, no generic data is returned on the transformation
      product atoms.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetAlteredTag` method

   .. ################################################################
      # GetClearCoordinates
      ################################################################

   .. oe:method:: GetClearCoordinates

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

         .. oe:api::

            bool GetClearCoordinates() const

      .. oe:language:: python

         .. oe:api:: python

            GetClearCoordinates() -> bool

      Returns whether the coordinates of a molecule are cleared
      before performing the chemical transformation.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetClearCoordinates` method

   .. ################################################################
      # GetFixValence
      ################################################################

   .. oe:method:: GetFixValence

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

         .. oe:api::

            unsigned GetFixValence() const

      .. oe:language:: python

         .. oe:api:: python

            GetFixValence() -> int

      Returns what type of valence corrections should be applied
      to the transformation products.   The legal values are
      taken from :oe:constns:`OEChem::OEUniMolecularRxnFixValence`.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetFixValence` method

   .. ################################################################
      # GetHydrogenConversions
      ################################################################

   .. oe:method:: GetHydrogenConversions

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

         .. oe:api::

            bool GetHydrogenConversions() const

      .. oe:language:: python

         .. oe:api:: python

            GetHydrogenConversions() -> bool

      Returns whether hydrogen count conversions are allowed to be performed
      on transformation targets based on the transformation SMIRKS requirements.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetHydrogenConversions` method
         * :oe:func:`OEChem::OEPrepareSearch` function

   .. ################################################################
      # GetMaxMatches
      ################################################################

   .. oe:method:: GetMaxMatches

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

         .. oe:api::

            unsigned GetMaxMatches() const

      .. oe:language:: python

         .. oe:api:: python

            GetMaxMatches() -> int

      The maximum number of transformations returned or applied.
      A value of ``0`` indicates there is no constraint.
      Note that if this value is low, the transformations returned will
      be arbitrarily truncated to this limit.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetMaxMatches` method

   ..   _OEChem_GetStrictSmirks:

   .. oe:method:: GetStrictSmirks

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

         .. oe:api::

            bool GetStrictSmirks() const

      .. oe:language:: python

         .. oe:api:: python

            GetStrictSmirks() -> bool

      Returns the current setting of the ``strict`` flag that
      controls how to interpret the :term:`SMIRKS` for the transformation.
      This setting value controls the interpretation of the :term:`SMIRKS` semantics.
      By default, the :term:`SMIRKS` string is interpreted using strict
      semantics (i.e., with the setting value of ``true``).

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetStrictSmirks` method

   .. ################################################################
      # GetValidateKekule
      ################################################################

   .. oe:method:: GetValidateKekule

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

         .. oe:api::

            bool GetValidateKekule() const

      .. oe:language:: python

         .. oe:api:: python

            GetValidateKekule() -> bool

      Returns whether the transformation validates the Kekulé
      form of the returned products.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::SetValidateKekule` method

   .. ################################################################
      # SetAlteredTag
      ################################################################

   .. oe:method:: SetAlteredTag

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

         .. oe:api::

            bool SetAlteredTag(const std::string& alteredtag)

      .. oe:language:: python

         .. oe:api:: python

            SetAlteredTag(tag: str) -> bool

      Sets the desired generic data tag value used to capture boolean data
      indicating specific atoms that are modified by the transformation.
      If empty or blank, no generic data is returned on the transformation
      product atoms.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::GetAlteredTag` method

   .. ################################################################
      # SetClearCoordinates
      ################################################################

   .. oe:method:: SetClearCoordinates

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

         .. oe:api::

            bool SetClearCoordinates(bool clearcoords)

      .. oe:language:: python

         .. oe:api:: python

            SetClearCoordinates(arg2: bool) -> bool

      Sets whether the coordinates of a molecule should be cleared
      before performing the chemical transformation.

     .. note::

         The :ref:`OEUniMolecularRxn <OEChem_OEUniMolecularRxn>` modifies the molecular
         graph when applying the transformations.
         Generating valid 2D or 3D coordinates for the products is
         beyond the scope of the :ref:`OEUniMolecularRxn <OEChem_OEUniMolecularRxn>`
         class.

         It is recommended to either clear the coordinates by
         invoking the :oe:meth:`OEChem::OEUniMolecularRxn::SetClearCoordinates`
         method or regenerate the coordinates of the molecule afterwards.

         If no transformation is applied the molecule will not be changed.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::GetClearCoordinates` method

   .. ################################################################
      # SetFixValence
      ################################################################

   .. oe:method:: SetFixValence

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

         .. oe:api::

            bool SetFixValence(unsigned fixvalence)

      .. oe:language:: python

         .. oe:api:: python

            SetFixValence(arg2: int) -> bool

      Sets the type of valence corrections that should be applied
      to the transformation products.   The legal values are
      taken from :oe:constns:`OEChem::OEUniMolecularRxnFixValence`.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::GetFixValence` method

   .. ################################################################
      # SetHydrogenConversions
      ################################################################

   .. oe:method:: SetHydrogenConversions

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

         .. oe:api::

            bool SetHydrogenConversions(bool allowed)

      .. oe:language:: python

         .. oe:api:: python

            SetHydrogenConversions(arg2: bool) -> bool

      Sets whether hydrogen count conversions are allowed to be performed
      on transformation targets based on the transformation SMIRKS requirements.
      If ``true``, :oe:func:`OEChem::OEPrepareSearch` is called to reconcile the
      hydrogen state between the target and query as well as any other perception
      information needed for the query (aromaticity, etc.).

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::GetHydrogenConversions` method
         * :oe:func:`OEChem::OEPrepareSearch` function

   .. ################################################################
      # SetMaxMatches
      ################################################################

   .. oe:method:: SetMaxMatches

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

         .. oe:api::

            bool SetMaxMatches(unsigned maxmatches)

      .. oe:language:: python

         .. oe:api:: python

            SetMaxMatches(maxMatches: int) -> bool

      Sets the maximum number of transformations that should
      be returned or applied. Setting the value to ``0`` removes
      the constraint. Note that if this value is low, the transformations returned will
      be arbitrarily truncated to this limit.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::GetMaxMatches` method

   .. ################################################################
      # SetStrictSmirks
      ################################################################

   .. oe:method:: SetStrictSmirks

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

         .. oe:api::

            bool SetStrictSmirks(bool strict)

      .. oe:language:: python

         .. oe:api:: python

            SetStrictSmirks(arg2: bool) -> bool

      Sets the desired value of the ``strict`` flag that
      controls how to interpret the :term:`SMIRKS` for the transformation.
      This setting value controls the interpretation of the :term:`SMIRKS` semantics.
      By default, the :term:`SMIRKS` string is interpreted using strict
      semantics (i.e., with the setting value of ``true``).

      .. seealso::

         * :ref:`GetStrictSmirks <OEChem_GetStrictSmirks>` method
         * :term:`SMIRKS` definition describing the strict SMIRKS semantics

   .. ################################################################
      # SetValidateKekule
      ################################################################

   .. oe:method:: SetValidateKekule

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

         .. oe:api::

            bool SetValidateKekule(bool validatekekule)

      .. oe:language:: python

         .. oe:api:: python

            SetValidateKekule(arg2: bool) -> bool

      Sets whether the generated products are simply returned after a
      Kekulization attempt, or if the Kekulé form is validated more
      rigorously. If the extra validation is enabled and an invalid
      Kekulé form is identified, alternatives are tried by adding
      and removing implicit hydrogens from aromatic nitrogens to
      produce a valid Kekulé form.  No further attempt is made to
      return the most reasonable or chemically sensible result.  By
      default, the extra Kekulé validation is enabled.

      .. seealso::

         * :oe:meth:`OEChem::OEUniMolecularRxnOptions::GetValidateKekule` method
