SMIRKS Tutorial

Table of Contents

1. Introduction:  

SMIRKS...

    ...is a reaction transform language.
    ...is a superset of reaction SMILES.
    ...is a subset of reaction SMARTS.
    ...has behaviors that don't exist in the other languages.
    ...can describe reaction mechanisms with varying degrees of specificity and generality.

2. Syntax

SMIRKS Depiction Reaction SMIRKS   and   Note
Reacting carbon 
[C:1]>>[C:1]
Agents aren't allowed in SMIRKS.
The format is " reactants   >>   products ".
Reacting Carbon
(2-Connected)
[C;X2:1]>>[C;X2:1]
SMIRKS allows atomic SMARTS expressions.
The syntax is: [<SMILES_PART>;<SMARTS_PART>:<MAP>]
No Reaction  
[C;X4H3]-[CH2]C>>[C][CH2]C
SMARTS atom specifications may be used for mapped atoms only
(i.e. unmapped atoms must be valid SMILES expressions ).


[NO REACTION]

 
No Reaction 
[C;X2:1]~C>>[C;X2:1]=C
SMIRKS doesn't allow SMARTS Bond Queries (e.g. ~).
Bonds expressions must be valid SMILES. 
Just add water 
>>O
Upon transformation, all unmapped product-side SMILES get created.  
Remove Mercury
(if present) 
[Hg]>>
Upon transformation, all unmapped reactant-side SMILES get deleted. 
Re-generate Mercury 
[Hg]>>[Hg]
If one wishes to retain an unmapped atom, It must be explicitly placed on
both the reactant side and the product side so that it will get deleted
then re-generated.

3. SMILES and SMARTS

2-connected
carbons
double-bonded
to an oxygen 
[C;X2:1]=O>>[C:1]=O
On the reactant side of the SMIRKS, mapped SMILES, unmapped
SMILES, and mapped SMARTS are all used as filters to control
which input SMILES are allowed to react. In order to react,
input SMILES must match all criterion.
Reacting oxygen
(1-connected)  
[O;X1:1]>>[O;X2+:1]
The particular features of the SMARTS part of the product SMIRKS
are not used to filter
output SMILES and don't normally influence the properties of the output
SMILES in the forward reaction unless the product-side SMILES is omitted
entirely (see below).
Make all right 
[C:1][C;@,@@?:2]([F:3])([Cl:4])[Br:5]>>
[*:1][13O+@@:2]([*:3])([*:4])[*:5]
Product-side SMILES do determine the properties of output SMILES.
Product SMILES aquire the charge and stereochemistry of the mapped
product-side SMILES but retain the mass and atomic number of the
input structure (i.e. mass and atomic number are immutable properties).  
Retain charge
and stereo 
[C:1][C:2]([F:3])([Cl:4])[Br:5]>>
[*:1][*&*:2]([*:3])([*:4])[*:5]
If, however, the product-side SMILES is omitted entirely and
the product-side SMARTS isn't a valid SMILES, the output structure
will retain the charge and stereochemistry of the input structure.

4. Hydrogens

Retain
H-count 
[*:1]>>[*:1]
Unless they are explicity shown as atoms ( i.e. [H]s ) on the
reactant side or product side (see below), The H-count of the
output SMILES is detetermined by the H-count of the input SMILES. 
Charge separation 
[*:1][*:2]>>[*+:1][*-:2]
All hydrogens are considered atoms in SMIRKS.  
The SMILES, "*" matches any H (even implicit ones). 
Add 2
Hydrogens 
[*;!#1:1]>>[*:1]([H])[H]  
Hydrogens may be added to the output SMILES by showing them as
explicit atoms ( i.e. [H]s ) in the product side of the SMIRKS.
(The use of the SMARTS, !#1 prevents Hydrogenation of other Hydrogens)
Remove 2
Hydrogens 
[H][*:1]([H])([H])[H]>>[*:1]([H])[H]  
Hydrogens may be removed from the output SMILES by explicitly showing
them as atoms on the reactant side then omitting them on the product
side of the SMIRKS.

5. Mapping

Ortho to Meta
Nitro-Tolulene
[C:1]c1c([N:2])cccc1>>[C:1]c1cc([N:2])ccc1
Mapped atoms don't get deleted or created, just moved.  
No Reaction 
[C:1][O:2]>>[O:2][C:1][O:2]
Atom maps must be pairwise (i.e. every map class has exactly
one reactant and one product atom).
Red-Ox
[H:1][H:2].[H:3][H:4].[O:5]=[O:6]>>
[H:1][O:5][H:2].[H:3][O:6][H:4]
Stoichiometry is defined to be 1-1 for all atoms in the reactant and product
for a transformation. If non-unit stoichiometry is desired, reactants
or products must be repeated.  
Acid Catalized
Esterification 
[#6:1][C:2](=[O:3])[O:4][H].[C:5][O:6][H]>>
[C:1][C:2](=[O:3])[O:6][C:5].[O:4]
Atom maps can convey a reaction's mechanism, if known. 

More Information

Theory Manual
SMIRKS Examples