Hi Andrew, Good to hear from you, and thanks for the info. I might go for a quick-n-dirty fix then. The reason I am asking is that I am rewriting an OEChem script to RDkit to share with a collaborator, and this way of doing it (with parentheses) works fine in OEChem, with the OESmilesToMol function. Cheers Jonas
tis 20 nov. 2018 kl. 17:04 skrev Andrew Dalke <da...@dalkescientific.com>: > Hi Jonas, > > > On Nov 20, 2018, at 16:36, Jonas Boström <dr.jonas.bost...@gmail.com> > wrote: > > not_ok_smiles = "C%43CCC%42.CC%42.CC(%43)C" > > The error message from RDKit is the not-very-helpful: > > SMILES Parse Error: syntax error for input: 'C%43CCC%42.CC%42.CC(%43)C' > > If you try out my 'smiview' (available via 'pip install smiview' for > Python): > > % python smiview.py 'C%43CCC%42.CC%42.CC(%43)C' > Cannot parse --smiles: Unexpected term > C%43CCC%42.CC%42.CC(%43)C > ^ Tokenizing stopped here > An open branch must be followed by an atom, bond, or dot. > > In Daylight and OpenSMILES, the ring closures must occur immediately after > the atom symbol. More specifically, quoting > http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html : > > The bonds are numbered in any order, designating ring opening (or ring > closure) > bonds by a digit immediately following the atomic symbol at each ring > closure. > > > RDKit also allows ring closures after a ')', which is connected to the > atom symbol before the matching '('. > > Cheers, > > Andrew > da...@dalkescientific.com > > > > > _______________________________________________ > Rdkit-devel mailing list > Rdkit-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-devel >
_______________________________________________ Rdkit-devel mailing list Rdkit-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-devel