Basic Examples (3)
Get the SMILES string from a molecule:
This is equivalent to the molecule property "SMILES":
Get the SMILES string without stereochemistry information:
Scope (3)
Get the SMILES string for a chemical entity:
The SMILES string returned can be used to construct a new Molecule object:
Use ToEntity to get back to the entity:
Options (8)
By default, single bonds are omitted from the string. Use the "AllBondsExplicit" option to control this:
Two equivalent molecules will give the same SMILES string even if their atom ordering is different:
To disable canonicalization of the atom ordering, use "Canonical"→False:
With the default setting of IncludeAromaticBonds→Automatic, aromaticity in the SMILES string reflects the aromaticity in the Molecule expression:
Giving an explicit setting for the IncludeAromaticBonds option will override this behavior:
The "IncludedAtoms" option allows finding the SMILES string for a molecule fragment. The value of the option should be All or a list of atom indices:
Note that the SMILES for a fragment will not necessarily be a valid:
When the included atoms are not bonded, the fragment SMILES will be disconnected:
With the default setting of IncludeHydrogens→Automatic, hydrogen atoms explicitly present in a Molecule expression will be in the resulting string:
Giving an explicit setting for the IncludeHydrogens option will override this behavior:
Use the "Isomeric" option to control whether isotope information is encoded:
Double–bond and tetrahedral stereochemistry is controlled by this option as well:
Use "RootedAtom"→n to create a SMILES string starting at the atom with index n:
These SMILES strings all create equivalent molecules:
Implicit hydrogens are not included in a SMILES string when their presence can be inferred from normal valence rules. Use "WriteImplicitHydrogens"→True to write all implicit hydrogens: