.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEAssignAromaticFlags

.. oe:function:: OEAssignAromaticFlags

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

      .. oe:api::

         void OEAssignAromaticFlags(OEMolBase& mol,
                                    unsigned int aromodel = OEAroModelOpenEye,
                                    bool clearflags = true,
                                    unsigned int maxpath = 0,
                                    bool prune = false)

   .. oe:language:: python

      .. oe:api:: python

         OEAssignAromaticFlags(mol: Union[OEGraphMol,OEMol,OEQMol],
                               aromodel: int = OEAroModelOpenEye,
                               clearflags: bool = True, maxpath: int = 0,
                               prune: bool = False) -> None

   Perceives the aromatic atoms and bonds of a molecule.
   The assigned atom and bond aromaticity can be accessed by
   :oe:meth:`OEChem::OEAtomBase::IsAromatic` and
   :oe:meth:`OEChem::OEBondBase::IsAromatic` methods, respectively.

   *model*
     The parameter that  specifies that aromaticity model that are perceived by the
     :oe:func:`OEChem::OEAssignAromaticFlags` function.
     The default aromaticity 'model' is :oe:const:`OEChem::OEAroModel::OpenEye`.
     Other predefined aromaticity models provided by **OEChem TK**
     include :oe:const:`OEChem::OEAroModel::Daylight`,
     :oe:const:`OEChem::OEAroModel::Tripos`,
     :oe:const:`OEChem::OEAroModel::MMFF` and
     :oe:const:`OEChem::OEAroModel::MDL` that represent the Daylight,
     Tripos, MMFF and MDL definitions, respectively.

   *clearflags*
     The parameter that specifies whether to clear the
     aromaticity flags by calling :oe:func:`OEChem::OEClearAromaticFlags` prior
     to re-perceiving the aromaticity.
     Newly created molecules that have not had their aromaticity assigned
     yet can specify ``false``, for a very small performance advantage.

   *maxpath*
      The parameter that specifies the maximum path
      length to consider an aromatic cycle, or zero (the default) to specify
      no upper bound on aromatic cycle length.  Some formal models of
      aromaticity use the value six, limiting aromaticity to six membered
      rings like benzene or pyridine.

   *prune*
      The parameter that specifies whether or not to run a
      post-processing step to consider rings with exo-double bonds as not
      aromatic. This is also required by some formal models of aromaticity.

.. seealso::

  .. oe:language:: c++

      * :oe:constns:`OEChem::OEAroModel` constant namespace
      * :oe:func:`OEChem::OEClearAromaticFlags` to remove atom and bond aromaticity properties
      * :ref:`chapter_aromaticity` chapter
      * Example program :ref:`cansmi.cpp<section_example_oechem_cansmi>`

  .. oe:language:: python

      * :oe:constns:`OEChem::OEAroModel` constant namespace
      * :oe:func:`OEChem::OEClearAromaticFlags` to remove atom and bond aromaticity properties
      * :ref:`chapter_aromaticity` chapter
      * Example program :ref:`cansmi.py<section_example_oechem_cansmi>`

  .. oe:language:: java

      * :oe:constns:`OEChem::OEAroModel` constant namespace
      * :oe:func:`OEChem::OEClearAromaticFlags` to remove atom and bond aromaticity properties
      * :ref:`chapter_aromaticity` chapter
      * Example program :ref:`CanSmi.java<section_example_oechem_cansmi>`

  .. oe:language:: csharp

      * :oe:constns:`OEChem::OEAroModel` constant namespace
      * :oe:func:`OEChem::OEClearAromaticFlags` to remove atom and bond aromaticity properties
      * :ref:`chapter_aromaticity` chapter
      * Example program :ref:`CanSmi.cs<section_example_oechem_cansmi>`
