Dear all,
I needed to test whether RDKit-generated SMILES strings were readable again
so that structures could be retrieved after storage.
The following script produced unexpected results.
*****************
from rdkit import Chem
#from rdkit.Chem import rdCoordGen
#from rdkit.Chem.Draw import IPythonConsole
# PubChem CID 6436662
inchi =
'InChI=1/C20H32/c1-16(2)20-14-12-18(4)10-6-8-17(3)9-7-11-19(5)13-15-20/h8,10-12,14,16,20H,6-7,9,13,15H2,1-5H3/b14-12+,17-8+,18-10-,19-11-/t20-/m0/s1'
m1 = Chem.MolFromInchi(inchi)
#rdCoordGen.AddCoords(m1)
#m1
# looks good, like the structure drawn by PubChem
smi1 = Chem.MolToSmiles(m1)
print('smi1 =', smi1)
# smi1 = C/C1=C/C/C=C(\C)CC/C=C(/C)CC[C@@H](C(C)C)/C=C/1
m2 = Chem.MolFromSmiles(smi1)
# [14:01:45] Conflicting single bond directions around double bond at
index 1.
# [14:01:45] BondStereo set to STEREONONE and single bond directions
set to NONE.
#rdCoordGen.AddCoords(m2)
#m2
# a double bond looks bad
smi2 = Chem.MolToSmiles(m2)
print('smi2 =', smi2)
# smi2 = CC1=CC/C=C(\C)CC/C=C(/C)CC[C@@H](C(C)C)/C=C/1
# a double bond is missing
******************************
For the moment, this molecule will be discarded from my collection...
Best regards,
--
Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France
Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss