Menu

#111 gzip reading on Mol2, XML formats can't do multi-mol

open
nobody
None
5
2012-10-23
2007-03-09
No

In the current SVN trunk, conversion of a gzip encoded file only generates one molecule:

tools/babel ~/Desktop/Downloads/MMFF94_dative.mol2.gz -osmi
C(C(O)=O)N AGLYSL01

But there are, in fact, 761 molecules in the file:
tools/babel ~/Desktop/Downloads/MMFF94_dative.mol2 -osmi
...
761 molecules converted
9 warnings 9281 audit log messages

(Perhaps it's faster and better to implement a gzip decoder like the lineend.h code? This might also solve other PR in this list.)

-Geoff

Discussion

  • Geoff Hutchison

    Geoff Hutchison - 2007-03-11

    Logged In: YES
    user_id=21420
    Originator: YES

    Interesting. Further debugging implies that this is a problem with Mol2 and XML formats. SDF, PDB, XYZ... these formats work correctly.

    So perhaps it's an issue with seekg()

     
  • Geoff Hutchison

    Geoff Hutchison - 2007-03-18

    Logged In: YES
    user_id=21420
    Originator: YES

    This is, in fact, an issue with seekg. The zipstream code doesn't properly handle seekg -- the bug also exists in 2.0.x.

    -Geoff