From: Andreas K. <ka...@in...> - 2006-12-15 16:15:50
|
Hi all, I hope I don't have to send this to the developer list... I have installed the latest version of openbabel (2.1.0b3) including =20 the python bindings... (openbabel and pybel), Linux Suse 9.2 I wanted to parse a gzipped SDF file (zipped file size 14 M) to =20 extract specific molecules (by name), for this I first tried to do =20 the normal routine, i.e.: sdfFileName =3D <someGzippedSDFFile> obconversion =3D OBConversion() obconversion.SetInFormat("sdf") obconversion.SetOutFormat("smi") obmol =3D OBMol() notatend =3D obconversion.ReadFile(obmol,sdfFileName) export =3D obconversion.WriteFile(obmol,'myTest.smi') while notatend: obconversion.Write(obmol) obmol =3D OBMol() notatend =3D obconversion.Read(obmol) On a normal (i.e. unzipped) SDF File it works fine. But not on a =20 gzipped one -> Segmentation Fault. It can only get access the first =20 single molecule The same is true when using the new pybel lib. -> Segmentation Fault! I assume that OpenBabel keeps a pointer to the last read molecule in =20 the SDF file, which would not work when accessing the zipped one... I don't want to unpack the file, as I have a few hundred of those.. =20 (disk space!) Did anyone have the same problem and knows an elegant workaround? I guess the problem should occur for other scripting languages as =20 well... Regards, A. Karwath ----------------- Dr. Andreas Karwath Machine Learning Lab Institute for Computer Science Albert-Ludwigs-Universit=E4t Freiburg Georges-K=F6hler-Allee 079 D-79110 Freiburg Germany |