[ openbabel-Bugs-1370212 ] Error reading sdf file with group abbreviation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ openbabel-Bugs-1370212 ] Error reading sdf file with group abbreviation

SourceForge.net
Bugs item #1370212, was opened at 2005-11-30 08:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=1370212&group_id=40728

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error reading sdf file with group abbreviation

Initial Comment:
I'm using openbabel-2.0.0 on Linux/Suse 9.1.

I tried to convert an sdf file exported from IsisBase,
that contains the following section:
...
  5  6  2  0  0  0  0
  6  1  1  0  0  0  0
 10 11  1  0  0  0  0
G   10  3
OMe
M  STY  1   1 SUP
M  SLB  1   1   1
...

.../temp> babel -isdf test01.sdf -osdf test.sdf
Conversion failed with an exception. Count=0
0 molecules converted

It seems to be a valid construct in the property
section of an sdf according to ctfile-1.pdf p. 16 cf. MDL:
...
Group Abbreviation [MDL ISIS/Desktop]
G aaappp
x...

aaa:  Atom number
ppp:  Atom number
x:    Abbreviation label
...

mdlformat.cpp seems to stumble over the OMe label

replacing line 222
220 while(ifs.getline(buffer,BUFF_SIZE))
221  {
222   if(!strchr(buffer,'M')) continue;
by
222   if(strncmp(buffer,"M  ",3)) continue;
seems to fix things.

Probably better is:
222   if(!strncmp(buffer,"M  END",6)) break;
223   if(strncmp(buffer,"M  CHG",6) 224     || strncmp(buffer,"M  RAD",6) 225 || strncmp(buffer,"M  ISO",6)) continue;

test01.sdf attached

Yours
th
[hidden email]

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=1370212&group_id=40728


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss