.. oe:namespace:: OEChem

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

.. _oechem_OESMILESFlag:

.. oe:constnamespace:: OESMILESFlag

   This namespace contains constants that controls the generation of
   SMILES when calling the low-level :oe:func:`OEChem::OECreateSmiString`
   function.

   .. list-table:: **The following function calls generate identical SMILES**
      :widths: 50 200
      :header-rows: 1

      * - OEChem function
        - calling :oe:func:`OEChem::OECreateSmiString` with flags from the :oe:constns:`OEChem::OESMILESFlag` namespace

      * - :oe:func:`OEChem::OECreateAbsSmiString`
        - :oe:const:`AtomMaps<OEChem::OESMILESFlag::AtomMaps>` | :oe:const:`RGroups<OEChem::OESMILESFlag::RGroups>`

      * - :oe:func:`OEChem::OECreateCanSmiString`
        - :oe:const:`DEFAULT<OEChem::OESMILESFlag::DEFAULT>` identical to :oe:const:`Canonical<OEChem::OESMILESFlag::Canonical>` | :oe:const:`AtomMaps<OEChem::OESMILESFlag::AtomMaps>` | :oe:const:`RGroups<OEChem::OESMILESFlag::RGroups>`

      * - :oe:func:`OEChem::OECreateIsoSmiString`
        - :oe:const:`ISOMERIC<OEChem::OESMILESFlag::ISOMERIC>` identical to :oe:const:`Isotopes<OEChem::OESMILESFlag::Isotopes>` | :oe:const:`AtomStereo<OEChem::OESMILESFlag::AtomStereo>` | :oe:const:`BondStereo<OEChem::OESMILESFlag::BondStereo>` | :oe:const:`Canonical<OEChem::OESMILESFlag::Canonical>` | :oe:const:`AtomMaps<OEChem::OESMILESFlag::AtomMaps>` | :oe:const:`RGroups<OEChem::OESMILESFlag::RGroups>`

      * - :oe:func:`OEChem::OEMolToSmiles`
        - :oe:const:`ISOMERIC<OEChem::OESMILESFlag::ISOMERIC>` identical to :oe:const:`Isotopes<OEChem::OESMILESFlag::Isotopes>` | :oe:const:`AtomStereo<OEChem::OESMILESFlag::AtomStereo>` | :oe:const:`BondStereo<OEChem::OESMILESFlag::BondStereo>` | :oe:const:`Canonical<OEChem::OESMILESFlag::Canonical>` | :oe:const:`AtomMaps<OEChem::OESMILESFlag::AtomMaps>` | :oe:const:`RGroups<OEChem::OESMILESFlag::RGroups>`

   [1] :oe:func:`OEChem::OEMolToSmiles` is a high-level function that perceives necessary properties before generating :term:`canonical isomeric SMILES`


   .. oe:constant:: AllBonds

      Controls whether all bonds are written explicitly to the generated
      SMILES string.  By default, aromatic bonds and most single bonds will
      be omitted since the semantics are unambiguous.

      This option is convenient for using SMILES as a generic graph
      representation language and for simple SMILES processors which do not
      perceive aromaticity.

      For example, will generate ``c:1:c:c:c:c:c1`` for benzene rather than
      ``c1ccccc1``.

   .. oe:constant:: AtomMaps

      Controls whether atom map indices are written to the generated SMILES string.
      *OEChem* allows the use of atom map indices on molecules other than reactions,
      *e.g.* ``[CH4:1]`` SMILES.

   .. _oechem_OESMILESFlag_AtomStereo:

   .. oe:constant:: AtomStereo

      Controls whether the specified chirality at tetrahedral atomic stereocenters
      should be written to the generated SMILES string.

   .. oe:constant:: BondStereo

      Controls whether the specified cis/trans chirality at bond stereocenters
      should be written to the generated SMILES string.

   .. oe:constant:: Canonical

      Controls whether to generate canonical SMILES strings.
      The canonical SMILES strings generated by *OEChem* are not canonicalized by the same
      algorithm used by Daylight Chemical Information Systems, and hence some molecules
      will be assigned a different unique representation by each toolkit.
      Indeed, the algorithms used both by OpenEye and Daylight evolve and improve over time,
      so SMILES should always be recanonicalized by the same version of a toolkit,
      before comparing them for equivalence.

   .. oe:constant:: EnhStereo

      Controls whether explicit enhanced stereogroup information is exported as a :term:`CXSMILES`
      formatted appendix following the generated SMILES string.  The :term:`CXSMILES` appendix is
      whitespace delimited and begins and ends with ``|``.

   .. oe:constant:: ExtBonds

      Controls whether atoms with atomic number zero (as determined by the
      :oe:meth:`OEChem::OEAtomBase::GetAtomicNum` method),
      and a non-zero map index (as determined by the :oe:meth:`OEChem::OEAtomBase::GetMapIdx`
      method) should be generated the external bond ``&1`` notation.
      In this notation, the integer value following the ``&`` corresponds to
      the atom's map index.
      When this flag isn't set, such atoms are written in the Daylight convention ``[*:1]``.

   .. oe:constant:: Hydrogens

      Controls whether explicit hydrogens are included in the SMILES string.  If not set,
      explicit hydrogens are included in each atom's implicit hydrogen count.

   .. oe:constant:: ImpHCount

      Controls whether implicit hydrogen count is written to the generated
      SMILES strings.  For example, to generate ``[cH]1[cH][cH][cH][cH][cH]1``
      for benzene rather than ``c1ccccc1``.

   .. oe:constant:: Isotopes

      Controls whether isotopic mass is written to the generated SMILES strings.

   .. oe:constant:: Kekule

      Controls whether to generate |Kekule| or aromatic SMILES strings.
      The :oe:func:`OEChem::OECreateSmiString` function uses the currently assigned
      aromaticity model.
      There are known portability problems with different SMILES parsers having
      varying degrees of ability in parsing aromatic systems, hence writing |Kekule|
      SMILES or using a simple model of aromaticity
      (see the function :oe:func:`OEChem::OEAssignAromaticFlags`)
      can be used to improve interoperability with non-OpenEye software.

   .. oe:constant:: RGroups

      Controls whether atoms with atomic number zero (as determined by the
      :oe:meth:`OEChem::OEAtomBase::GetAtomicNum` method),
      and a non-zero map index (as determined by the :oe:meth:`OEChem::OEAtomBase::GetMapIdx`
      method) should be displayed using the ``[R1]`` notation.
      In this notation, the integer value following the ``R`` corresponds to the atom's map
      index.
      When this flag isn't set, such atoms are written in the Daylight convention ``[*:1]``.

   .. oe:constant:: SuperAtoms

      Controls whether atoms with atomic number zero (as determined by the
      :oe:meth:`OEChem::OEAtomBase::GetAtomicNum` method),
      and a non-empty name string property (as determined by the
      :oe:meth:`OEChem::OEAtomBase::GetName`) should be displayed in SMILES *superatom*
      notation, rather than just ``[*]``.
      For example, this can be used to generate the SMILES ``[Asp][Gly][Lys]``.

   .. oe:constant:: DEFAULT

      The combination of
      :oe:const:`OEChem::OESMILESFlag::RGroups`,
      :oe:const:`OEChem::OESMILESFlag::AtomMaps` and
      :oe:const:`OEChem::OESMILESFlag::Canonical` flavors,
      that is used to generate :term:`canonical SMILES`

   .. oe:constant:: ISOMERIC

      The combination of
      :oe:const:`OEChem::OESMILESFlag::RGroups`,
      :oe:const:`OEChem::OESMILESFlag::AtomMaps`,
      :oe:const:`OEChem::OESMILESFlag::Canonical`,
      :oe:const:`OEChem::OESMILESFlag::Isotopes`,
      :oe:const:`OEChem::OESMILESFlag::AtomStereo` and
      :oe:const:`OEChem::OESMILESFlag::BondStereo` flavors,
      that is used to generate :term:`canonical isomeric SMILES`.
