Hi Steffen, Don't rely on accuracy when reading InChI. Remember that the InChI format is not designed to be read, just written. Only if you include auxiliary information can it accurately reconstruct the molecule. I've just done an InChI to InChI conversion myself, and I think that in about 1% of cases the InChI code just refuses to read its own InChI. (Note that I haven't dug down into this in detail - these were just my first impressions...)
Are the examples below using SVN head? - Noel On 5 October 2010 13:50, Steffen Neumann <sneum...@ipb-halle.de> wrote: > Hi, > > I seem to have hit a roundtrip problem, which occurs > both in OB-2.2.3 and SVN head (r4132). The molecule in question > is http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=10052993 > Similarly, http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=10054537 > is also affected. Both have a lone Br- or Cl- ion. > > Is that a bug, or should I have done some preprocessing, > or set an option somewhere ? > > Yours, > Steffen > > > # InChI to SMILES: > echo > "InChI=1S/C26H26N4O2S.BrH/c1-3-14-27-26(33)29-22-8-4-19(5-9-22)18-30-15-12-21(13-16-30)25-28-17-24(32-25)20-6-10-23(31-2)11-7-20;/h4-13,15-17H,3,14,18H2,1-2H3,(H-,27,29,33);1H" > | babel -i inchi - -o smi - > > # CCCN=C(Nc1ccc(cc1)Cn1ccc(=C2N=CC(=[O+]2)c2ccc(cc2)OC)cc1)[S-].Br > # 1 molecule converted > > # And now to Canonical SMILES is OK: > echo 'CCCN=C(Nc1ccc(cc1)Cn1ccc(=C2N=CC(=[O+]2)c2ccc(cc2)OC)cc1)[SH-].Br' | > babel -i smi - -o can - > # Br.CCCN=C([SH-])Nc1ccc(cc1)Cn1ccc(=C2N=CC(=[O+]2)c2ccc(OC)cc2)cc1 > # 1 molecule converted > > # Now back to InChI gives Error: > echo 'CCCN=C(Nc1ccc(cc1)Cn1ccc(=C2N=CC(=[O+]2)c2ccc(cc2)OC)cc1)[SH-].Br' | > babel -i smi - -o inchi - > > # Also InChI key also gives an Error: > echo 'CCCN=C(Nc1ccc(cc1)Cn1ccc(=C2N=CC(=[O+]2)c2ccc(cc2)OC)cc1)[SH-].Br' | > babel -i smi - -o inchi -xK - > > # Also not with the canonical SMILES: > echo "Br.CCCN=C([SH-])Nc1ccc(cc1)Cn1ccc(=C2N=CC(=[O+]2)c2ccc(OC)cc2)cc1" | > babel -i can - -o inchi - > > > -- > IPB Halle AG Massenspektrometrie & Bioinformatik > Dr. Steffen Neumann http://www.IPB-Halle.DE > Weinberg 3 http://msbi.bic-gh.de > 06120 Halle Tel. +49 (0) 345 5582 - 1470 > +49 (0) 345 5582 - 0 > sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409 > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > OpenBabel-Devel mailing list > OpenBabel-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel