MolDraw › Chemistry tools › SMILES Validator and Canonicalizer

SMILES Validator and Canonicalizer

In short: Check a SMILES string for errors with their exact position, and get its canonical, non-isomeric and Kekulé SMILES, formula and molecular weight. Paste a list to find duplicates. It is free, works in your web browser and needs no download.

Errors found: unclosed or unmatched brackets and parentheses, unclosed ring numbers, ring bonds on the same atom, two bond symbols in a row, unknown elements, lowercase aromatic atoms outside a ring, rings that cannot be kekulized, and atoms with too many bonds.

What the checks mean

ErrorExampleFix
Unclosed ringC1CCCCCEvery ring number appears twice: C1CCCCC1
Unclosed or unmatched parenthesisCC(=O, CC)OEach ( needs one ): CC(=O)O
Unclosed bracketC[NH3+C[NH3+]
Element not allowed outside bracketsC[Fe]C is fine, CFeC is notOnly B, C, N, O, P, S, F, Cl, Br, I may be written without brackets
Bad valenceCC(C)(C)(C)(C)CCarbon has at most 4 bonds; N 3 (4 as N⁺); O 2
Pentavalent nitrogenO=N(=O)c1ccccc1Write nitro as [N+](=O)[O-]
Cannot kekulizec1cccc1, c1ccnc1Check the ring; pyrrole is c1cc[nH]c1
Aromatic atom outside a ringccUse uppercase for chain atoms: C=C

Canonical, isomeric and Kekulé SMILES

Aspirin can be written CC(=O)Oc1ccccc1C(=O)O or OC(=O)C1=CC=CC=C1OC(C)=O. Both give the same canonical SMILES here, which is how the duplicate finder knows they are one molecule. Isomeric SMILES keep @/@@, / \ and isotopes; non-isomeric SMILES drop them. Kekulé SMILES write aromatic rings with alternating double bonds.

Duplicates are compared with OpenChemLib's canonical ID code at three levels: identical (stereo, isotopes and charges included), same apart from stereo or isotopes, and same largest part after removing counter-ions or solvent and neutralising charges (so sodium acetate, acetate and acetic acid match at this level).

How to validate SMILES

  1. Paste one SMILES, or a list with one per line. A name after a space is kept as a label.
  2. Press Validate. Errors are listed with their character position and highlighted in the string.
  3. For a valid SMILES, copy the canonical, non-isomeric or Kekulé form, and read the formula and molecular weight.
  4. With a list, look at the Duplicates section and press Download results CSV to keep the table.

Limitations

Want to see the structure? Turn the SMILES into a publication-quality picture, or draw it in the free MolDraw editor.

SMILES to image

Frequently asked questions

How do I check if a SMILES string is valid?

Paste it and press Validate. The tool checks brackets, branches, ring-closure numbers, bond symbols, element symbols, lowercase aromatic atoms and valences, and shows the position of each problem. A valid SMILES also gets a formula and molecular weight.

What is a canonical SMILES?

One molecule can be written as many SMILES. A canonical SMILES is the single form a program produces for that molecule whatever order the atoms were typed in, so two inputs are the same molecule when their canonical SMILES match. Each toolkit has its own canonical form; this tool uses OpenChemLib.

What is the difference between isomeric and non-isomeric SMILES?

Isomeric SMILES keep stereochemistry (@, @@, / and \) and isotopes such as [13C] or [2H]. Non-isomeric SMILES drop both, so L- and D-alanine give the same non-isomeric SMILES.

What is the Kekulé form of a SMILES?

Aromatic SMILES write ring atoms in lowercase, as in c1ccccc1. The Kekulé form writes alternating single and double bonds with uppercase atoms, as in C1=CC=CC=C1. Both describe benzene.

Why does my SMILES say it cannot be kekulized?

The lowercase atoms cannot be given alternating double bonds. The usual causes are a five-membered ring with a pyrrole-type nitrogen written as n instead of [nH], or a ring with an odd number of aromatic carbons.

Last updated: