I read the discussion on Blue Obelisk immediately after posting. But in fact the problem was that the sdf was malformed (extra lines). OB will read titles with $$$$, but the -f option, which skips molecules, doesn't like it.
Chris On 25/01/2011 16:45, Noel O'Boyle wrote: > Regarding the use of $$$$ in the title, Chris, you might want to read > http://blueobelisk.shapado.com/questions/what-is-the-minimum-needed-to-correctly-identify-records-in-an-sd-file. > It seems that this is not allowed by the spec... > > - Noel > > 2011/1/25 Chris Morley<c.mor...@gaseq.co.uk>: >> Your file othermol.sdf was a proper sdf file but the molecules all had a >> title "$$$$". The use of the delimiter string as a title is not good >> practice and confused OpenBabel. I'll see if I can correct this, but if you >> change the titles to Mol1, Mol2, etc. and name PatternMol, the command below >> gives: >> >>> PatternMol >>> Mol1 Tanimoto from PatternMol = 0.5 >>> Mol2 Tanimoto from PatternMol = 0.575 >>> Mol3 Tanimoto from PatternMol = 0.95 >>> Mol4 Tanimoto from PatternMol = 0.825 >>> Mol5 Tanimoto from PatternMol = 0.673913 >> which is I think what you want. The revised othermols.sdf is attached. >> >> Chris >> >> >> On 25/01/2011 02:47, chakravar...@ncbs.res.in wrote: >>> Dear Chris Morley, >>> >>> I tried your technique of holding ctrl to input more than one file. It >>> helps, but, >>> I did not get desired output. >>> >>> Here is my input and output. >>> >>> ======================================================== >>> Input: >>> [ OpenBabel12221015072D >>> >>> 23 22 0 0 0 0 0 0 0 0999 V2000 >>> 7.7424 -9.2926 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>> ................................................................. >>> ................................................................. >>> 2.6281 -18.1511 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>> 1 2 1 0 0 0 0 >>> ................... >>> ................... >>> 22 23 1 0 0 0 0 >>> M END >>> $$$$ >>> $$$$ ] n times >>> >>> OpenBabel12221015072D >>> >>> 25 24 0 0 0 0 0 0 0 0999 V2000 >>> 7.7424 -9.2926 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>> ................................................................. >>> ................................................................. >>> 6.7196 -7.5210 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 >>> 1 2 1 0 0 0 0 >>> ................... >>> ................... >>> 24 25 1 0 0 0 0 >>> M END >>> $$$$ >>> ===================================================== >>> Output: >>>> Tanimoto from first mol = 0.869565 >>> Possible superstructure of first mol >>> >>> ===================================================== >>> The command I am using is (in linux) -> babel patternmol.sdf >>> othermols.sdf -ofpt >>> Both in Windows GUI and linux I receive same error message. It reads... >>> >>> ================================================= >>> *** Open Babel Warning in ReadMolecule >>> WARNING: Problems reading a MDL file >>> Cannot read atom and bond count >>> Expected standard 6 character atom and bond count >>> ================================================== >>> >>> Both in linux and windows, output contains tanimoto coefficient only for >>> first >>> molecule in othermols.sdf. >>> >>> Is the problem arising because of othermols.sdf format ? Molecule >>> separators "M >>> END" "$$$$" ? ( Enclosed patternmol.sdf and othermols.sdf files ) >>> >>> It must be a trivial problem, but I could not figure it out all by myself. >>> >>> Any help is greatly appreciated >>> >>> Thankyou >>> Chakravarthy >>> >>> From: Chris Morley<c.morley@ga...> - 2011-01-24 10:34 >>> >>> When there are only a small number of molecules, fpt format will give >>> you what you want; you are nearly there. >>> >>> In the GUI, select sdf for the input format and ftp for the output. >>> Open the sdf file with the pattern molecule, then open the sdf file with >>> all the other molecules you want to compare to it, holding CTRL as you >>> leave the open dialog (which allows more than one input file). >>> Click Convert, and you will get a list of the Tanimoto coefficients >>> between the first molecule and each of the rest, using the default FP2 >>> fingerprint. >>> >>> On the command line (Windows or Linux): >>> obabel patternmol.sdf othermols.sdf -ofpt >>> >>> Chris >>> >> >> ------------------------------------------------------------------------------ >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >> Finally, a world-class log management solution at an even better price-free! >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >> February 28th, so secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsight-sfd2d >> _______________________________________________ >> OpenBabel-discuss mailing list >> OpenBabel-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >> >> > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss