What is SMILES?
SMILES (Simplified Molecular Input Line Entry System) describes a molecule with a single line of text. It’s the most widely used format for exchanging structures between software, databases and publications.
Atoms
Each atom is written with its symbol, and hydrogens are implicit: C is methane, CH4, and CCO is ethanol. Atoms outside the “organic subset” (B, C, N, O, P, S, F, Cl, Br, I), or carrying a charge, go in square brackets: [Na+], [NH4+].
Bonds
- single: nothing (or
-),CCfor ethane - double:
=,C=Cfor ethylene - triple:
#,C#Cfor acetylene
Branches
A branch goes in parentheses: acetic acid is CC(=O)O, isobutane CC(C)C.
Rings
A ring opens and closes with the same digit: cyclohexane is C1CCCCC1.
Aromaticity
Aromatic atoms are written in lowercase: benzene is c1ccccc1, pyridine c1ccncc1.
Stereochemistry
/ and \ describe double-bond geometry (F/C=C/F is trans-1,2-difluoroethylene), and @ and @@ the configuration of stereocenters.
Examples to open in the editor
CCOethanolCC(=O)Oacetic acidc1ccccc1benzeneCC(=O)Oc1ccccc1C(=O)OaspirinCN1C=NC2=C1C(=O)N(C(=O)N2C)Ccaffeine
One SMILES, or several?
The same molecule can have several valid SMILES: OCC and CCO are both ethanol. To compare structures, software computes a canonical SMILES, unique to each molecule.