There are six generic SMILES encoding rules, corresponding to
specification of atoms, bonds, branches, ring closures, and
disconnections and isomerism.
Basics of SMILES
• SMILES specifically represents a valence model of a molecule, not a
computer data structure, a mathematical abstraction, or an “actual
• The function of SMILES is to clearly represent a particular valence
model, not dictate which one should be used. For example one chemist
might represent nitromethane as C[ N+](=O)[O-] with a nitrogen of valence
4 in a charge-separated structure whereas another might represent it as
CN(=O)=O with a neutral five-valent nitrogen. Both of them are correct.
QUIZ : Is this a correct SMILES for nitormethane CN([O])[O]?
• SMILES represents a chemist’s model of molecules, not a computer
scientist’s model of a chemical data structures.
• SMILES grammar is such that it may be canonicalized, i.e., among all
possible valid SMILES for a given molecule or reaction, a single, canonical
1. Atom Specifications
• The SMILES atom specification sublanguage represents the atomic
properties: element identity, isotope, formal charge, and implicit hydrogen
• Elements in the "organic subset" B, C, N, O, P, S, F, Cl, Br, and I may be
written without brackets if the number of attached hydrogens conforms to
the lowest normal valence consistent with explicit bonds. "Lowest normal
valences" are B (3), C (4), N (3,5), O (2), P (3,5), S (2,4,6), and 1 for the
• Atoms in aromatic rings are specified by lower case letters, e.g., aliphatic
carbon is represented by the capital letter C, aromatic carbon by lower case
• The symbol ‘*’ (“star” or “asterisk”) is treated by SMILES as a valid atomic
symbol meaning “unspecified atomic number” and is represented as an
atom of atomic number zero.
Examples of Atom specifications
Structure SMILES Name Remarks
S [S] Elemental sulfur Defaults inside brackets: mass
unspecified, charge 0, hcount 0.
Au [Au] Elemental gold Second character of two-character
symbols is lower case
PH3 P Phosphine Lowest normal valence of phosphorus is
OH- [OH-] or
Hydroxide anion If charge value is missing, 1 is
assumed. i.e., ‘+’ is equivalent to
‘+1’ and ‘-’ is equivalent to ‘-1’.
Fe2+ [Fe2+] or
Iron(II) cation Charge sign may be repeated or have a
signed value, e.g., ‘+-t’is
equivalent to ‘+2’.
235U [235U] Uranium-235 A leading integer represents a
specified atomic mass
H2S S Hydrogen sulfide Lowest normal valence of sulfur is 2.
2. Bond Specifications
• Single, double, triple, and aromatic bonds are represented in SMILES
by the symbols -, =, #, and :, respectively. Adjacent atoms without an
intervening symbol are connected by a valence-dictated bond
(typically a single or aromatic bond). “-” (single) and “:” (aromatic)
bond symbols may always be omitted on input.
• There is no “preferred’ or “correct” ordering in SMILES, e.g. CCO and
OCC are equally valid SMILES for ethanol.
SMILES Name Emp Formula
cc Ethane (CH3CH3)
C=C Ethene (CH2=CH2)
C#N Hydrogen Cyanide HCN
CCO Ethanol CH3CH2OH
Structure SMILES Name
CC( C)C( =O)O Isobutyric acid
FC(F)F or C(F)(F)F Fluroform
?? Perchlorate anion
Branches are specified in SMILES by enclosing them in parentheses, which
may be nested or stacked. First three rules (atoms, bonds, branching) allow
specification of any non-cyclic molecule
4. Ring Specifications
Taken from Handbook of Cheminformatics J.Gasteiger
A useful way of thinking about SMILES ring specification is as follows. There is
a graph theorem that says, “There is always a way of breaking one bond per ring in
a connected molecule which leaves you with a still-connected but acyclic molecule.’’
(Actually, graph theoreticians talk about “graphs” instead of ‘‘molecules’’and “edges”
instead of “bonds”, but if they thought about chemistry, that is how
they might say it.) Pick one bond in each ring in this way, numbering them in any
order. Break the numbered bonds, appending the bond number to the atoms on
the ends of the bonds so broken.
• The ‘. ‘ (“period” or “dot”) is used in SMILES to represent
disconnections. In terms of the valence model being
represented, the dot literally represents a bond of formal
order zero: the atoms on either side of the dot are explicitly
not bonded to each other.
• It is often a surprise to SMILES-parser implementers that
c1cc([O-].[Na+])ccc1 is a valid synonym for[Na+].[O-
]c1ccccc1.Because bonds can be specified with “ring closures”,
not all SMILES which contain dots are disconnected nor are all
SMILES which contain ring closures cyclic. Although somewhat
perverse, C1.02.Cl2 is a valid SMILES for ethanol.
• SMILES provides for four types of specification which are so
important to the molecular model that they are included even
though they are outside the valence model. They are: isotopism,
orientation about double bonds, stereo specification, and (for
reactions) reactant-product atom mapping. These are
collectively known as “isomeric SMILES”.