.. oe:namespace:: OEChem

.. oe:constnamespace:: OESmartsParseOpts

   The :oe:constns:`OEChem::OESmartsParseOpts` namespace encodes symbolic
   constants used as bit-masks to indicate how to interpret :term:`SMARTS`
   and :term:`SMIRKS` strings.

   .. seealso:: 

      * :oe:func:`OEChem::OEParseSmarts` function
      * :oe:func:`OEChem::OEParseSmirks` function


   This namespace contains constants.

   .. oe:constant:: Default

      The combination of the following flags.

      * :oe:const:`OEChem::OESmartsParseOpts::RingConstraint`
      * :oe:const:`OEChem::OESmartsParseOpts::Optimize`

   .. oe:constant:: None

      Only constraints explicitly specified in the :term:`SMARTS` and :term:`SMIRKS` 
      strings are added to the :ref:`OEQMolBase <OEChem_OEQMolBase>` query structure.

   .. oe:constant:: Optimize

      When the :oe:const:`OEChem::OESmartsParseOpts::Optimize` option is
      turned on, the atom and bond expressions are optimized for
      substructure search.

   .. oe:constant:: RingConstraint

      Additional ring constraint is added to each ring atom of the 
      generated :ref:`OEQMolBase <OEChem_OEQMolBase>` query molecule.

      This can significantly increase the performance of the substructure 
      search. 
      For example, matching the ``C1CCCCC1`` ring against the ``CCCCCCCC`` chain
      will fail much faster, since none of the query ring atoms can be mapped to 
      any of the target chain atom.
