cheminformatics toolkits:a personal perspective
Roger Sayle
Nextmove software ltd
Cambridge uk

1st RDKit User Group Meeting, London, UK, 4th October 2012

overview• Models of Chemistry– Implicit and Explicit Hydrogens– Atom types– Aromaticity Models– Valence Models• The “mdlbench.sdf” benchmark• Some words on performance

about the author• RasMol, 1989-1997.
• GSK (Glaxo Wellcome), 1994-1997.
• Daylight/Metaphorics, 1998-2001.
• OpenEye Scientific Software, 2001-2010.
• AstraZeneca, Abbott & NCBI, 2009.
• NextMove Software, 2010-models of chemistry• Algorithms + Data Structures = Programs• Abstraction of storage and representationfrom assumptions about the “real world”.

connection table compression• A distinguishing feature between
computational chemistry and cheminformatics
is the representation of hydrogens.
• Typically in organic chemistry, approximately
half of the bonds in a “full” connection table
are the bonds to terminal hydrogen atoms.

hydrogen representations• The two representations of the structure are
equivalent, and either form can be deduced
from the other [or even a hybrid form].
• In OEChem terminology:– OESuppressHydrogens(mol)– OEAddExplicitHydrogens(mol)• Confusingly, Daylight’s SMILES toolkit autosupresses hydrogens during dt_modoff, and abug in OEChem sprouts chiral hydrogens.

handle with care
• Isotopes of Hydrogen; deuterium, tritium andprotium.
• Charged hydrogens.
• Bridging hydrogens.
• Hydrogens with atom maps.
• Hydrogens with none single bonds.
• Preserving chirality on tetrahedral parent.

hydrogens in file formats• Implicit/Explicit is also preserved with file I/O.
• SMILES: [H]C([H])([H])[H] vs C (or [CH4]).
• MDL connection tables:
[CH4]
RDKit
1 0 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0M END$$$$

OpenBabel10021215582D
5 4 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 00.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 00.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 00.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 00.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
1 3 1 0 0 0 0
1 4 1 0 0 0 0
1 5 1 0 0 0 0
M END
$$$$

hydrogen related properties• A number of properties are influenced by thechoice of hydrogen representation.
– NumAtoms()– ImplicitHCount() / ExplicitHCount()/TotalHCount()– Degree() / ExplicitDegree() / HvyDegree()– Valence() / ExplicitValence() / HvyValence()• Several of these are exposed by SMARTS.

atom types• Another distinction between computationalchemistry toolkits and cheminformatics
toolkits concerns the roles of “atom types”.
• In cheminformatics, atoms can be describedby the atomic number and charge, but inmolecular modeling simulations more isrequired → Domain of applicability.
• Ideally, integer atom types should be anannotation not a fundamental pre-requisite.

aromaticity• The primary function of aromaticity incheminformatics is to treat the multiple
Kekulé forms of benzenoid rings as equivalent.

slippery slope• Unfortunately the problem with aromaticity isthat its a useful physical property of amolecule with uses beyond cheminformatics!
• Conjugated structures behave differently tosaturated systems, and hence the degree towhich a pi-system is shared and resonancestablized is useful in computational chemistry.

Aromaticity and qsar
Original XLogPR-O-R:
R=CHX
R=CHR
H

0.327
-0.1660.236
0.046

Total:
Name: Furan
Test: #96
Exptl: 1.34

0.651

Aromatic Furan XLogP
R-O-R
R-CH-X
R-CH-R
H

Total:

0.327-0.332
0.472
0.184

0.327
0.142
0.281
0.046

0.327
0.284
0.562
0.184

1.357aromaticity• The upshot is that different notions ofaromaticity make sense in different contexts,
with no one universally accepted [acceptable]
answer.
– Aromaticity is one of those unpleasant topics that issimultaneously simple and impossibly complicated. Since
neither experimental nor theoretical chemists can agreewith each other about a definition, it’s necessary to picksomething arbitrary and stick to it. This is the approachtaken in the RDKit.

aromaticity models• A better approach is to acknowledge thedifferent (conflicting) definitions ofaromaticity and support them much like atomtypes; using the Tripos aromaticity model for
XLogP and handling Sybyl mol2 files, theDaylight aromaticity model for SMILES strings,
the MDL aromaticity model for MACCS keys,
the CACTVS aromaticity model for PubChem
fingerprints and so on.

quinonoid forms• Unfortunately, quinonoid forms make eventhe simplest aromaticity models (MDL’s) more
complex than just alternating single anddouble bonds around a six membered ring.

longer paths• MDL’s aromaticity model doesn’t consider
azulene to be aromatic.

anti-aromaticity• Some conjugated rings systems perhaps
shouldn’t be considered equivalent...

buried ring aromaticity

avoid sssr for aromaticity

SMILES: C12P3P1P23

SMILES: P12C3P1P23

you don’t want sssr anyway!

aromaticity models by atom type
ToolKit

*CH=*

*O*

*N*

*C(=O)**As=* *Te**B*

*B=* *S(=O)*

MDL

1N

N

N

N

N

N

N

NTripos

1N

N

N

N

N

N

N

N

Merck

122N

N

N

N

N

N

Daylight

12201NN

N

2OEChem

122012NN

2RDKit1220N

2N

12ChemAxon

12201NNN

2OpenBabel

1220N

N

N

N2Indigo

122N

12!

01N

CDK

122N

1NN

N

NDerwent

11?

π Electrons contributed to Huckel 4n+2 calculation

valence models• To provide life an interesting challenge,
developers of cheminformatics file formats
that support implicit hydrogens (Daylight andMDL) can optionally omit the number of
implicit hydrogens on an atom, to save space,instead relying on the default number ofimplicit hydrogens for a given atoms
environment.

example valence model• For example, Daylight’s valence model for
SMILES is that all aromatic nitrogens have noimplicit hydrogens by default.
• If a hydrogen is present, it has to be specified
as “[nH]”.
• This means that “[n]” should never occur in a
generated/canonical SMILES string.

the “mdlbench.sdf” benchmark• To test the fidelity of MDL valence
implementations in the SD file readers, weevaluate the SMILES generated from astandard reference test file.
• This SD file contains 10,208 connection tables:– 114 different elements plus “D” and “T”– 11 charge states (from -4 to +6 inclusive)– 8 environments (minimum valences from 0 to 7)– 116*11*8 = 10208

mdlbench.sdf examples• The correct valence is specified by MDL/ISIS.
• Neutral carbon should be four valent.
– Everyone agrees on this (hopefully).

• +1 Nitrogen cation should be four valent.
• +1 Carbon cation should be three valent.
• -4 Boron should a have valence 1.
– OEChem says 0, OpenBabel says 3, RDKit says 7...

mdlbench.sdf results
ToolKitFailures

IncorrectCorrect

RecallPrecision

OEChem v1.9264229922

97.20%

99.78%CDK v1.4.13

2644869458

95.11%

95.11%OpenBabel v2.3.90

1766689364

91.73%

93.34%CACTVS v3.407

3525119339

91.49%

94.81%MDL Direct v8.096822921890.30%

99.76%

ChemAxon v5.104406859083

88.98%

92.99%

Pipeline Pilot v9.0

968

243

8997

88.14%

97.37%

ChemDraw v12.0

704

548

8956

87.74%

94.23%GGA Indigo v1.1.4

2797

184

7227

70.80%

97.52%

MOE v2011.10

4221936505149.48%

84.37%

RDKit v2012_09

4095

4723

1390

13.62%

22.74%mdlbench.sdf summary• Although many toolkits can read MDL SD files,
they don’t all agree on the semantics.
• Different readers, sometimes from the samecompany, can generate different SMILES fromthe exact same MOL file.
• Fortunately, most compounds encountered in
the pharmaceutical industry fall into thewidely understood “well-behaved” subset.

a little about performance• Time to find molecules containing chlorine in the250,251 SMILES of the NCI August 2000 data set.
ToolKitTimes (secs)

UnfairCountUNIX grep

0.06

0.06

43509

OpenEye OEChem v1.8

4.7

2.543509

Daylight Toolkit v4.95

8.0

OELib CVS (2002-04-01)

32.8

ChemAxon JChem v5.10

39.443509

GGA Indigo Toolkit v1.1.4

41.6

43508*

RDKit v2011_03_2

109.642692*

OpenBabel v2.3.1

148.0

43509

CDK v1.4.13

1278

43501*

PerlMol v0.35

1775

43509

43509
3.25

43509

conclusions• There is a one-to-one mapping between MDL
connection tables and SMILES, and perfectportable round-tripping should be possible.
• A major step towards this is to separate thechemistry from the computer science incheminformatics toolkits to permit flexible
models of valence and aromaticity.

acknowledgements• Sorel Muresan and Plamen Petrov, AstraZeneca,Molndal, Sweden.
• Richard Hall, Astex Pharmaceuticals, Cambridge, UK.
• Markus Sitzmann, NCI, Washington DC, USA.
• Daniel Lowe and Noel O’Boyle, NextMove Software,
Cambridge, UK.
• Thank you for you time. Questions?