Bugs item #3526866, was opened at 2012-05-15 01:18
Message generated for change (Tracker Item Submitted) made by jvoorhees
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3526866&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: Library Functions
Group: 2.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Giorgio (jvoorhees)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrect reading number of bonds from V2000 MOL/SDF

Initial Comment:
File format: SDF/MOL file with V2000 Connection Table

Situation
If both number of atoms and number of bonds are greater than 99 (thus both have 
3 digits) the function OBConversion::Read() fails to read properly the molecule.

Comment
The standard Counts Line (in CTAB V2000) must have the following format: 
"aaabbblllfffcccsssxxxrrrpppiiimmmvvvvvv "
where "aaa" is the number of atoms and "bbb" is the number of bonds, but if 
both have 3 digits as in the following example
"102107  0  0  0  0  0  0  0  0  1 V2000"
the function OBConversion::Read() does not read the molecule and return the 
error
*** Open Babel Warning  in ReadMolecule
  WARNING: Problems reading a MDL file
Invalid bond specification, atom numbers or bond order are wrong.

Example
In the attachment file there is a molecule with 102 atoms and 107 bonds that 
the function can not read, with two different forms of Counts Line.
In the first the counts line is: "102 107  0  0  0  0  0  0  0  0  1 V2000", 
with the number of atoms and bonds separated by a space; in this case the 
function reads a molecule with 102 atoms but 10 bonds, and returns the error:
*** Open Babel Warning  in ReadMolecule
  Either the file contains Atom Lists, which are not currently supported and 
are ignored
or the atom or bond count is >999, which is not allowed in V2000 MDL files.
In the second the counts line is: "102107  0  0  0  0  0  0  0  0  1 V2000" and 
the molecule is not read, with the error
*** Open Babel Warning  in ReadMolecule
  WARNING: Problems reading a MDL file
Invalid bond specification, atom numbers or bond order are wrong.

OpenBabel Version: 2.3.1
System: Linux

Thanks, Giorgio.


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

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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to