On 1 March 2010 22:34, Craig A. James <cja...@emolecules.com> wrote: > Noel O'Boyle wrote: >> >> Does anyone have any ideas about how to stop inchi complaining about >> undefined stereocenters? We know it's undefined - we don't need to >> hear all about it. >> >>>>> pybel.readstring("smi", "FC(Br)(Cl)I").write("inchi") >> >> ============================== >> *** Open Babel Warning in InChI code >> #0 :Omitted undefined stereo >> 'InChI=1S/CBrClFI/c2-1(3,4)5\n' > > Are you sure it's InChI? I had to take a line out of the smilesformat.cpp > code because of this very problem.
I'm sure. But can you provide a test case for this patch so I can look into it. > Craig > > svn diff smilesformat.cpp Index: smilesformat.cpp > =================================================================== > --- smilesformat.cpp (revision 3495) > +++ smilesformat.cpp (working copy) > @@ -682,7 +682,10 @@ > if (ChiralSearch != _tetrahedralMap.end() && ChiralSearch->second != > NULL) > { > int insertpos = NumConnections(ChiralSearch->first) - 2; > - if (insertpos < 0) { > + if (insertpos > 2) { > + obErrorLog.ThrowError(__FUNCTION__, "Warning: Tetrahedral center > with > 4 bonds.", obWarning); > + } > + else if (insertpos < 0) { > if (ChiralSearch->second->from != OBStereo::NoRef) > obErrorLog.ThrowError(__FUNCTION__, "Error: Overwriting previous > from reference id.", obError); > > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel