Hi Jean-Marc, This seems to be a bug in the SMILES parser. Here's a more compact demonstration of the problem:
In [2]: 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-5 ...: H3/b14-12+,17-8+,18-10-,19-11-/t20-/m0/s1' ...: m1 = Chem.MolFromInchi(inchi) In [3]: for bond in m1.GetBonds(): ...: if bond.GetStereo() != Chem.BondStereo.STEREONONE: ...: print(bond.GetStereo()) STEREOE STEREOZ STEREOZ STEREOE In [4]: smi = Chem.MolToSmiles(m1) In [5]: print(smi) C/C1=C/C/C=C(\C)CC/C=C(/C)CC[C@@H](C(C)C)/C=C/1 In [6]: m2 = Chem.MolFromSmiles(smi) In [8]: for bond in m2.GetBonds(): ...: if bond.GetStereo() != Chem.BondStereo.STEREONONE: ...: print(bond.GetIdx(),bond.GetStereo(),bond.GetBeginAtomIdx(),bond.GetEndAtomIdx()) 4 STEREOE 4 5 9 STEREOZ 9 10 18 STEREOE 18 19 It may be that a fix for this is already in progress (as part of the work I'm doing on this issue: https://github.com/rdkit/rdkit/issues/2148), but I will do a bit of looking there.[1] -greg [1] and do the PR for that branch, which I seem to have forgotten On Thu, Feb 14, 2019 at 6:28 AM Jean-Marc Nuzillard < jm.nuzill...@univ-reims.fr> wrote: > Dear all, > > looking at the attached file, you will see that the Mol -> SMILES -> Mol > conversions did not return the original molecule. > Could there be a particular problem here either in SMILES generation > or in SMILES reading? > Reading complains with > # [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. > However, as far as I can judge, smi1 looks good. > > Many thanks in advance, > > Jean-Marc > -- > > 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 > 66http://www.univ-reims.fr/ICMRhttp://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 >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss