Menu

#940 Canonical SMILES error: cyclobutadiene c1ccc1

2.3.x
open
nobody
None
1
2014-08-22
2014-08-05
No

This is all referring to the OpenSMILES spec:
http://www.opensmiles.org/opensmiles.html

The SMILES string "c1ccc1" canonicalizes to "C1CCC1", which according to the OpenSMILES spec is not valid -- it should be identical to "C1=CC=C1", both being equivalent to cyclobutadiene.

To reproduce this issue:

$ python
>>> import openbabel
>>> obc = openbabel.OBConversion()
>>> obc.SetInAndOutFormats("smi", "can")
True
>>> outMol = openbabel.OBMol()
>>> obc.ReadString(outMol, "c1ccc1")
True
>>> print obc.WriteString(outMol)
C1CCC1

I'm using apt-get install python-openbabel.

$ apt-show-versions python-openbabel
python-openbabel/precise uptodate 2.3.0+dfsg-3ubuntu3

Discussion