.. oe:namespace:: OEProton



.. meta::
   :keywords: OETautomerMolFunction, TautomerMolFunction


.. _OEProton_OETautomerMolFunction:

.. oe:class:: OETautomerMolFunction

   .. oe:api::


      class OETautomerMolFunction : public OEMolFunctionBase

   .. warning::
      This class is deprecated.  Use :ref:`OETautomerOptions <OEProton_OETautomerOptions>` instead.

   Currently
   ``OETautomerMolFunction`` and :ref:`OETyperMolFunction <OEProton_OETyperMolFunction>`
   are similar, however it is expected that they will diverge more
   over time.  They share the same first four arguments.  The first
   argument is the oemolstream where the enumerated molecules will be
   placed.  The second argument is a boolean indicating whether
   aromaticity should be calculated for the enumerated structure.  The
   third argument is a boolean indicating whether the enumerated
   states should only be counted (rather than actually listed).  The
   fourth argument is an unsigned int indicating the maximum number of
   states that should be enumerated for any single input molecule.
   The fifth argument for ``OETautomerMolFunction`` states whether
   a 'reasonable' type calculation is being setup and only the most
   aromatic tautomer should be stored.  After the calculation, the
   most aromatic tautomer can be retrieved using
   :oe:meth:`OEProton::OETautomerMolFunction::GetMolecule`.  The sixth argument
   will label the output tautomer titles with @`number` appended.  When using
   the same ``OETautomerMolFunction`` instance for multiple tautomer
   runs, remember to call
   :oe:meth:`OEProton::OETautomerMolFunction::Reset` in between each
   run.

   .. oe:method:: Constructors

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

         .. oe:api::

            OETautomerMolFunction(OEChem::oemolostream& ofp, bool arom,
                                  bool ct = false, unsigned int max = 0,
                                  bool mostAro = false, bool warts = true)

      .. oe:language:: python

         .. oe:api:: python

            OETautomerMolFunction(ofp: oemolostream, arom: bool,
                                  ct: bool = False, max: int = 0,
                                  mostAro: bool = False, warts: bool = True) -> OETautomerMolFunction

      Default and copy constructors.

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

      .. oe:api::

         OETautomerMolFunction & operator=(const OETautomerMolFunction &)

      Assignment operator.

   

   .. oe:method:: operator()

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

         .. oe:api::

            bool operator()(const OEChem::OEMolBase& inmol)

      .. oe:language:: python

         .. oe:api:: python

            __call__(inmol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   .. oe:method:: CreateCopy

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

         .. oe:api::

            base_type* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEMolFunctionBase

   .. oe:method:: GetCount

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

         .. oe:api::

            unsigned int GetCount() const

      .. oe:language:: python

         .. oe:api:: python

            GetCount() -> int

   Returns the number of tautomers generated. Calling
   :oe:meth:`OEProton::OETautomerMolFunction::Reset` will reset this
   number to zero.

   .. oe:method:: GetMolecule

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

         .. oe:api::

            const OEChem::OEMolBase& GetMolecule() const

      .. oe:language:: python

         .. oe:api:: python

            GetMolecule() -> OEGraphMol


   This method is used in conjunction with the mostAro flag to retrieve
   a reasonable looking tautomer.

   .. oe:method:: Reset

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

         .. oe:api::

            void Reset()

      .. oe:language:: python

         .. oe:api:: python

            Reset() -> None

   This method resets the count to zero and clears the stored molecule
   that :oe:meth:`OEProton::OETautomerMolFunction::GetMolecule` has
   access to.

