On 12/03/2013 11:28, Chris Swain wrote: >> Message: 4 >> Date: Sun, 10 Mar 2013 21:02:41 +0000 >> From: Chris Morley <c.mor...@gaseq.co.uk <mailto:c.mor...@gaseq.co.uk>> >> Subject: Re: [Open Babel] obabel and fingerprints >> To: openbabel-discuss@lists.sourceforge.net >> <mailto:openbabel-discuss@lists.sourceforge.net> >> Message-ID: <513cf4f1.2000...@gaseq.co.uk <http://gaseq.co.uk/>> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> On 10/03/2013 12:45, Chris Swain wrote: >>> I'm moving to use obabel rather than babel and I'm having a few >>> problems working out the syntax >>> >>> obabel /Users/swain/obsmiles.smiles -osmi -s "c1ccccc1" -xt >>> >>> Gives a list of 907 molecule names >>> >>> I've created the fastsearch index >>> >>> obabel /Users/swain/obsmiles.smiles -ofs >>> >>> this created /Users/swain/obsmiles.fs as expected. >>> >>> I then tried >>> >>> obabel /Users/swain/obsmiles.fs -ifs -s "c1ccccc1" -osmi >>> 907 candidates from fingerprint search phase >>> OC1C2NC(C1O)CC(C2)(F)FF)001377cc1c1371O 001376 >>> 1 molecule converted >>> >>> Any help appreciated. >> >> I don't see anything wrong with the syntax. (The -ifs is actually not >> needed.) Something similar works ok for me on Windows with both v2.3.2 >> and trunk. >> >> You could try >> obabel /Users/swain/obsmiles.fs -osmi >> which should give info on the .fs index, in case it hasn't been made >> properly. Otherwise I'm stumped. >> >> Chris > > Thanks > obabel /Users/swain/obsmiles.fs -osmi > Shows the index to be formed correctly, but I think I've found a > potential problem. This is a very old smiles file I use for testing, it > seems to have the old Mac line endings, if I convert to unix it all runs > fine. Is it possible that everything works fine with the old Mac line > endings except the fs search? > > This is probably not a big issue since I think all files created now > will have Unix line endings.
I think this is the correct diagnosis. OB's input stream is usually filtered to convert the line endings to the unix (LF) form. But this not done for binary formats, which includes fastsearch, forgetting that it does a ordinary text read in its second stage. A data file with Mac endings gave similar errors for me also. The lack of filtering is not so problematical with Windows line endings (CR LF) because the end of the lines are found ok using the LF and the CR is just whitespace at the end of the lines, which is usually cleaned up anyway. I guess there may be some cases where this not good enough and a proper filtering should be applied. I'll think how to do the repair, but do not regard it as urgent. The Mac line endings are obsolete, and most data sets that fastsearch is applied to are unix anyway. Chris ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss