.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEChem

.. oe:constnamespace:: OESMARTSAtomFlag

   .. attention::

      |PRELIMINARY-API|

   This namespace contains constants representing various supported
   SMARTS pattern constraints for atoms.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: AAmap

      This constant requests the explicit inclusion of non-zero mapping number information.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: AtomType
   .. oe:constant:: AnyAtomType
   .. oe:constant:: IgnoreArom

      These constants control the output of atom type information.
      The returned atom SMARTS string will only be ``[]`` delimited if one of ``AnyAtomType`` or ``AtomType`` are specified
      which allows using non-atype flags to build up SMARTS qualifiers for alternate custom SMARTS generation activities.

      ``AtomType`` will encode the atom symbol of the atom type which is downcased for aromatic atoms.
      ``AnyAtomType`` will encode ``a,A`` for any atom type, depending on aromatic atom state.
      ``IgnoreArom`` will encode just the atomic number value of the atom.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: Charge
   .. oe:constant:: Charge0

      These constants control the output of atom formal charge information.
      For ``Charge``, only non-zero charge information is output, and for
      ``Charge0``, information is output explicitly regardless of value.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: Chirality

      This constant requests the encoding of atom parity information via
      the ``@``, ``@@`` designation on the atom.  Note that this information requires the
      presence of the neighbor atoms in the SMARTS query to be a meaningful
      mapping constraint.  Additionally, the encoded parity state is explicitly
      dependent on the ordering of neighbor atoms, requiring suppression of any
      reordering of atoms when generating the full molecule SMARTS.

      .. seealso::
         * :oe:constns:`OEChem::OESMILESFlag`
         * :oe:func:`OEChem::OECreateSmartsString`

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: Connectivity

      This constant controls the output of the connectivity for the atom, see :ref:`GetDegree <OEChem_OEAtomBase_GetDegree>`.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: DegreeCount

      This constant controls the output of the explicit degree for the atom, see :ref:`GetExplicitDegree <OEChem_OEAtomBase_GetExplicitDegree>`.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: HCount
   .. oe:constant:: HCount0

      These constants control the output of atom total hydrogen count information.
      For ``HCount``, only non-zero information is output, and for
      ``HCount0``, information is output explicitly regardless of value.
      See :ref:`GetTotalHCount <OEChem_OEAtomBase_GetTotalHCount>`.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: Hybridization

      This constant controls the output of nonzero hybridization for the atom, see :ref:`GetHyb <OEChem_OEAtomBase_GetHyb>`.
      The hybridization of atoms should be set up via :ref:`OEAssignHybridization <OEChem_OEAssignHybridization>` for this flag to be active.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: ImplicitHCount
   .. oe:constant:: ImplicitHCount0

      These constants control the output of implicit hydrogen counts for the atom which can be assigned via :oe:func:`OEChem::OEAssignImplicitHydrogens`,
      but may already be assigned depending on how the molecule was instantiated and from what source.
      For ``ImplicitHCount``, only non-zero information is output, and for ``ImplicitHCount0``, information is output explicitly regardless of value.
      See :ref:`GetImplicitHCount <OEChem_OEAtomBase_GetImplicitHCount>`.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: Isotope

      This constant controls whether isoptopic information on the atom should be encoded.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: LeavingGroup

      This constant is experimental.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: RingBondCount

      This constant controls the output of the ring bond count for the atom.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: Valence

      This constant controls the output of the valence value for the atom, see :ref:`GetValence <OEChem_OEAtomBase_GetValence>`.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: AtomAll

      This constant is a collection of all available flags.
      Equivalent to

      ``(AtomType | IgnoreArom | AnyAtomType |
      DegreeCount |
      HCount | HCount0 |
      Charge | Charge0 |
      RingBondCount |
      Valence |
      Connectivity |
      AAmap |
      LeavingGroup |
      Isotope |
      Chirality |
      Hybridization |
      ImplicitHCount | ImplicitHCount0)``

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: DEFAULT
   .. oe:constant:: AtomDefault

      These two constant values equivalently request that no atom pattern constraints are generated.

   .. ################################################################
      #
      ################################################################

   .. oe:constant:: AtomExact

      This constant provides a collection of atom pattern constraints suitable for exact-match searching.
      Equivalent to ``(AtomType | Isotope | RingBondCount | Valence | HCount0 | Connectivity | Charge0)``
      These flags are not included, as they require consideration of neighbor atoms, or need setup perception activity to be meaningful,
      but should be carefully considered for augmenting an exact-match context: ``Chirality``, ``Hybridization``, ``ImplicitHCount``, ``ImplicitHCount0``.
