Subject: RE: Looking for BABEL and DRAGON users

From: "Clair W. Cabal" <[email-masked]>
Date: Mon, 04 Dec 2000 12:44:32 -0700

I am very grateful to everyone who sent me information.  A copy of part  of
my original message is followed by a few of the responses.

=============================================================
I am using Babel to convert a chemical data set from SMILES notation to
MOL file notation so that I can use Prof. Todeschini's DRAGON program to
generate theoretical descriptors.  I think the conversion is OK (based on
comparing my generated files to the sample files in DRAGON.  However, I
always get an error in trying to calculate the descriptors with Dragon.  I
was in hopes that someone with a real understanding of these two formats
might point out my error.

Here is the output from Babel for one molecule.  This SMILES data does not
even list the molecule name, so on line two Babel puts the SMILES
representation of the molecule.  I have added the .mol2 which is necessary
for DRAGON to recognize this file.

@<TRIPOS>MOLECULE
O=C(Cn1ccnc1)c2ccc3ccccc3c2.mol2
   18    20     0     0     0
SMALL
NO_CHARGES

@<TRIPOS>ATOM
      1 O1          0.0000    0.0000    0.0000 O.2     1  <1>   0.0000
      2 C1          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
      3 C2          0.0000    0.0000    0.0000 C.3     1  <1>   0.0000
      4 N1          0.0000    0.0000    0.0000 N.pl3   1  <1>   0.0000
      5 C3          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
      6 C4          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
      7 N2          0.0000    0.0000    0.0000 N.pl3   1  <1>   0.0000
      8 C5          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
      9 C6          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     10 C7          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     11 C8          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     12 C9          0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     13 C10         0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     14 C11         0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     15 C12         0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     16 C13         0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     17 C14         0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
     18 C15         0.0000    0.0000    0.0000 C.2     1  <1>   0.0000
@<TRIPOS>BOND
     1     1     2    2
     2     2     3    1
     3     2     9    1
     4     3     4    1
     5     4     5   ar
     6     4     8   ar
     7     5     6   ar
     8     6     7   ar
     9     7     8   ar
    10     9    10   ar
    11     9    18   ar
    12    10    11   ar
    13    11    12   ar
    14    12    13   ar
    15    12    17   ar
    16    13    14   ar
    17    14    15   ar
    18    15    16   ar
    19    16    17   ar
    20    17    18   ar

With this exact input, the error I get in DRAGON when I attempt to
calculate descriptors is:
  Errors reading molecules .....
 1    Mol. 1    d:\user\cabal\chemdata\out15-~2.mol    Input past end of
        file. (62)

RESPONSES:
=============================================================
Date: Fri, 01 Dec 2000 10:51:12 +1000
From: Frank Burden <[email-masked]>
Subject: Babel and Dragon
To: [email-masked]

Hi Clair
 
I received your message through my collaborator David Winkler just when
I was working on exactly the same problem. I have found that the
converted file works in Dragon if you add  just @<TRIPOS> to the end of
the Babel generated file.
 
Its a difficult life! or as a former prime minister of Australia
(Malcolm Fraser) put it 'Life is not meant to be easy'. This has now
become part of the Australian vernacular and it certainly fits anything
to do with molecule files and their conversions.
 
Cheers
 
Frank
==========================
Associate Professor Frank Burden
School of Chemistry
Monash University
VIC 3800
Australia
Voice:+613 9905 4559
Fax:+613 9905 4597
http://web.chem.monash.edu.au/Staff/Burden/
==========================
=============================================================

MY NOTE:  It turns out that Frank Burden was actually doing MDL to MOL file
conversion, however he correctly identifies a problem - see below.
=============================================================

From: "R.Todeschini" <[email-masked]>
To: <[email-masked]>
Subject: Dragon
Date: Fri, 1 Dec 2000 11:53:05 +0100

Dear Clair,
                I know you have some troubles in converting SMILES notation
to MOL file by Babel in order to use the software DRAGON.
The difference between standard MOL file and those converted by Babel is the
lacking of a final row with a string:
@<TRiPOS>..... The reaidng routine that I programmed try to check a final
row for the final searching for @<TRIPOS>.
Today I will try to solve this problem and put in my Website the new version
(without change the version number) which will be simply updated at December
1.

Best regards,
                     Roberto Todeschini

----------------------------------------------------------------------------
--
Milano Chemometrics and QSAR Research Group
Dept. of Environmental Sciences
P.za della Scienza, 1 - 20126 Milano (italy)
WebSite: http://www.disat.unimib.it/chm/

=============================================================
From: Doug Henry <[email-masked]>
To: "'Clair W Cabal'" <[email-masked]>
Cc: Doug Henry <[email-masked]>
Subject: RE: Looking for BABEL and DRAGON users
Date: Thu, 30 Nov 2000 17:51:46 -0800

I found Dragon to be sensitive to spaces within lines and at the ends of
lines.  I have been able to make it run on .hin and mdl SDFiles.  For .hin
files, I have to remove some blanks - I use sed.exe for Windows:

http://ftp.yars.free.net/pub/software/windows/programming/cygwin/latest/sed/

with the following bat file:
--------------------------
@ECHO OFF
REM runs babel on input smiles convert to sdfile
REM runs sed to squeeze blanks(say this bat file is "convert.bat")
REM   convert test.smi test.hin

setlocal
set ARG1=%1

if exist %ARG1%.smi goto file_exists
echo File not found: %ARG1%.smi
goto exit

:file_exists
..\babel -ismiles %ARG1%.smi -ohin temp1.tmp
type temp1.tmp | sed -e "s/  / /g" | sed -e "s/  / /g" > temp2.tmp
copy temp2.tmp %ARG1%.hin
erase *.tmp
 
:exit
------------------------
For MDL sdfiles, it seems Dragon chokes on 0.0000 coordinates which Babel
puts out, so I use a Perl script to replace 0.0000 with some arbitrary
value:

# Perl script to read a molfile, convert 0.0000 to n.0000 where n is mod
line no, 10
# Usage:
#   babel -ismiles <smiles_file> -osdf <sdfile1>
#   perl <this_script_name> <sdfile1> <sdfile2>
#   Then run Dragon on sdfile2

open (IFILE, "<$ARGV[0]") or die("Unable to open input file: ",$ARGV[0]);
open (OFILE, ">$ARGV[1]") or die("Unable to open output file: ",$ARGV[1]);
$lineno = 0;
while (<IFILE>) {
  $lineno += 1;
  $linemod = $lineno % 10;
  s/ 0.0000/ $linemod.0000/;
  print OFILE;
}

You can get perl for windows at:
www.activestate.com/Products/ActivePerl/Download.html

Good luck...
DH 
=============================================================
From: "Elena Fioravanzo" <[email-masked]>
To: "Clair W Cabal" <[email-masked]>
Subject: R: Looking for BABEL and DRAGON users
Date: Fri, 1 Dec 2000 11:35:52 +0100

Dear Clair,

unfortunately DRAGON, as it is not the ultimate version, works only with a
well defined format of MOL files. I had the same problem and I solved it
just deleting the blank spaces at the end of lines. I do not know if it is
your case, just check everything.
... and, please, let Prof. Todeschini know your problem, maybe he will fix
it
in the next version of the program.

Sincerely
Elena
---------------------------------------------------------
dott. Elena Fioravanzo - Consultant
S.IN - Soluzioni Informatiche S.a.s.
Via Salvemini 9
I-36100 Vicenza
Italy - Europe

Voice   ++39 0444 240341
Mobile  ++39 0347 4054991
Fax      ++39 0444 533954
E-mail  [email-masked]
Web     http://www.goldnet.it/sin/
=============================================================

I hope this information will be helpful.
Clair
-----------------------------------------------------
Clair Cabal
Research Assistant
Machine Learning Research Lab
Department of Computer Science
University of Montana
Missoula, Montana 59812
[email-masked]
fax: (406) 243-5139
-----------------------------------------------------