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


Mol1
 OpenBabel12221014542D

 21 20  0  0  0  0  0  0  0  0999 V2000
    6.1643   -9.2613    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.1872   -8.6708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.1643  -10.4424    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.1415  -11.0330    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.1415  -12.2141    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.1186  -12.8046    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.1186  -13.9857    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.0958  -14.5763    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.0958  -15.7574    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.0729  -16.3480    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.1872   -7.4897    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.2101   -6.8991    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.2101   -5.7180    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.2329   -5.1275    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.2329   -7.4897    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   10.2558   -6.8991    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    9.2329   -3.9464    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    8.2101   -3.3558    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.1872   -5.1275    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    7.1872   -3.9464    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    6.1643   -5.7180    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  2 11  1  0  0  0  0
  4  5  1  0  0  0  0
  4  3  1  0  0  0  0
  5  6  1  0  0  0  0
  6  7  1  0  0  0  0
  7  8  1  0  0  0  0
  8  9  1  0  0  0  0
  9 10  1  0  0  0  0
 11 12  1  0  0  0  0
 12 13  1  0  0  0  0
 12 15  1  0  0  0  0
 13 14  1  0  0  0  0
 13 19  1  0  0  0  0
 14 17  1  0  0  0  0
 15 16  1  0  0  0  0
 17 18  1  0  0  0  0
 19 20  1  0  0  0  0
 19 21  1  0  0  0  0
M  END
$$$$
Mol2
 OpenBabel12221014572D

 23 22  0  0  0  0  0  0  0  0999 V2000
    7.9748   -8.0600    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.9977   -7.4695    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.9748   -9.2411    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.9520   -9.8317    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.9520  -11.0128    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.9291  -11.6033    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.9291  -12.7844    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.9063  -13.3750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.9063  -14.5561    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.8834  -15.1467    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.9977   -6.2884    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.0206   -5.6978    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.0206   -4.5167    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   11.0434   -3.9262    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   11.0434   -6.2884    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   12.0663   -5.6978    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   11.0434   -2.7451    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   10.0206   -2.1545    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    8.9977   -3.9262    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    8.9977   -2.7451    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.9748   -4.5167    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.9748   -5.6978    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    6.9520   -6.2884    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  2 11  1  0  0  0  0
  4  5  1  0  0  0  0
  4  3  1  0  0  0  0
  5  6  1  0  0  0  0
  6  7  1  0  0  0  0
  7  8  1  0  0  0  0
  8  9  1  0  0  0  0
  9 10  1  0  0  0  0
 11 12  1  0  0  0  0
 11 22  1  0  0  0  0
 12 13  1  0  0  0  0
 12 15  1  0  0  0  0
 13 14  1  0  0  0  0
 13 19  1  0  0  0  0
 14 17  1  0  0  0  0
 15 16  1  0  0  0  0
 17 18  1  0  0  0  0
 19 20  1  0  0  0  0
 19 21  1  0  0  0  0
 22 23  1  0  0  0  0
M  END
$$$$
Mol3
 OpenBabel12221015052D

 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
    8.7653   -8.7021    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424  -10.4737    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7196  -11.0643    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7196  -12.2454    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6967  -12.8359    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6967  -14.0170    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.6739  -14.6076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.6739  -15.7887    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.6510  -16.3793    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -7.5210    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -6.9304    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -5.7493    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -5.1588    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -7.5210    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   11.8339   -6.9304    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -3.9777    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -3.3871    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -5.1588    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -3.9777    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424   -5.7493    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424   -6.9304    0.0000 O   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
  1  3  1  0  0  0  0
  2 11  1  0  0  0  0
  4  5  1  0  0  0  0
  4  3  2  0  0  0  0
  5  6  1  0  0  0  0
  6  7  1  0  0  0  0
  7  8  1  0  0  0  0
  8  9  1  0  0  0  0
  9 10  1  0  0  0  0
 11 12  1  0  0  0  0
 11 22  1  0  0  0  0
 12 13  1  0  0  0  0
 12 15  1  0  0  0  0
 13 14  1  0  0  0  0
 13 19  1  0  0  0  0
 14 17  1  0  0  0  0
 15 16  1  0  0  0  0
 17 18  1  0  0  0  0
 19 20  1  0  0  0  0
 19 21  1  0  0  0  0
 22 23  1  0  0  0  0
M  END
$$$$
Mol4
 OpenBabel12221015062D

 21 20  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
    8.7653   -8.7021    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424  -10.4737    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7196  -11.0643    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7196  -12.2454    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6967  -12.8359    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6967  -14.0170    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.6739  -14.6076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.6739  -15.7887    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.6510  -16.3793    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -7.5210    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -6.9304    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -5.7493    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -5.1588    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -7.5210    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   11.8339   -6.9304    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -3.9777    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -3.3871    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -5.1588    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -3.9777    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424   -5.7493    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  2 11  1  0  0  0  0
  4  5  1  0  0  0  0
  4  3  2  0  0  0  0
  6  7  1  0  0  0  0
  6  5  1  0  0  0  0
  7  8  1  0  0  0  0
  8  9  1  0  0  0  0
  9 10  1  0  0  0  0
 11 12  1  0  0  0  0
 12 13  1  0  0  0  0
 12 15  1  0  0  0  0
 13 14  1  0  0  0  0
 13 19  1  0  0  0  0
 14 17  1  0  0  0  0
 15 16  1  0  0  0  0
 17 18  1  0  0  0  0
 19 20  1  0  0  0  0
 19 21  1  0  0  0  0
M  END
$$$$
Mol5
 OpenBabel12221015062D

 21 20  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
    8.7653   -8.7021    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424  -10.4737    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7196  -11.0643    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.7196  -12.2454    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6967  -12.8359    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.6967  -14.0170    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.6739  -14.6076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    4.6739  -15.7887    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    3.6510  -16.3793    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -7.5210    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -6.9304    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -5.7493    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -5.1588    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -7.5210    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   11.8339   -6.9304    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
   10.8110   -3.9777    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    9.7882   -3.3871    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -5.1588    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    8.7653   -3.9777    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
    7.7424   -5.7493    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  2 11  1  0  0  0  0
  4  5  1  0  0  0  0
  4  3  2  0  0  0  0
  5  6  2  0  0  0  0
  6  7  1  0  0  0  0
  7  8  1  0  0  0  0
  8  9  1  0  0  0  0
  9 10  1  0  0  0  0
 11 12  1  0  0  0  0
 12 13  1  0  0  0  0
 12 15  1  0  0  0  0
 13 14  1  0  0  0  0
 13 19  1  0  0  0  0
 14 17  1  0  0  0  0
 15 16  1  0  0  0  0
 17 18  1  0  0  0  0
 19 20  1  0  0  0  0
 19 21  1  0  0  0  0
M  END
$$$$
------------------------------------------------------------------------------
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

Reply via email to