Canonical SMILES gives one standardized text representation to a chemical structure. This matters when storing, indexing, comparing, or deduplicating molecules: equivalent structures should not appear as separate records merely because their atoms or hydrogens were written differently. section 1.2.1 section 2.2.2
Canonicalization aims to provide:
- Uniqueness: the same chemical structure produces the same string despite atom-label ordering or explicit hydrogen choices. section 1.2.1
- Invariance: changes such as atom renumbering do not change the canonical representation. section 1.2.1
- Compactness: structural information remains available in a concise form suitable for storage and comparison. section 1.2.1
- Consistent stereochemical handling: retaining isotope and chiral information produces unique isomeric, or absolute, SMILES. section 2.2.2
Equivalent methane representations
Methane can be written as C, [CH4], [H][C]([H])([H])[H], or [#1][#6]([H])([#1])[#1]. Canonicalization selects one standardized representation rather than treating these equivalent forms as different compounds. With RDKit, use Chem.MolToSmiles(mol, canonical=True, isomericSmiles=True) to canonicalize a molecule while retaining stereochemistry. section 1.2.1 section 2.2.2
Table 1.1 Examples of SMILES. A complete reference on SMILES can be found in the Daylight manual.
|
SMILES
|
Name
|
|
CC
|
Ethane
|
|
O=C=O
|
Carbon
Dioxide
|
|
C#N
|
Hydrogen
Cyanide
|
|
CCN(CC)CC
|
Triethylamine
|
|
CC(=O)O
|
Acetic Acid
|
|
C1CCCCC1
|
Cyclohexane
|
|
c1ccccc1
|
Benzene
|
Use the SMILES examples to connect compact strings with familiar structures such as ethane, acetic acid, cyclohexane, and benzene. section 1.2.1
