You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python -m spyrmsd with Open Babel backend for I/O does not work with gzipped files.
Traceback (most recent call last):
File "/home/lina3015/.conda/envs/gsoc/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/lina3015/.conda/envs/gsoc/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/lina3015/.conda/envs/gsoc/lib/python3.6/site-packages/spyrmsd/__main__.py", line 33, in <module>
ref = io.loadmol(args.reference)
File "/home/lina3015/.conda/envs/gsoc/lib/python3.6/site-packages/spyrmsd/io.py", line 66, in loadmol
mol = load(fname)
File "/home/lina3015/.conda/envs/gsoc/lib/python3.6/site-packages/spyrmsd/optional/obabel.py", line 33, in load
obmol = next(pybel.readfile(fmt, fname))
File "/home/lina3015/.conda/envs/gsoc/lib/python3.6/site-packages/openbabel/pybel.py", line 159, in readfile
raise ValueError("%s is not a recognised Open Babel format" % format)
ValueError: gz is not a recognised Open Babel format
To Reproduce
python -m spyrmsd reference.sdf.gz docking.sdf.gz
Expected behavior
python -m spyrmsd should work with compressed files since Open Babel can deal with those.
Environment
OS: CentOS Linux 8
Python: Python 3.6.13
Package Manager [e.g. pip, conda]: conda
Additional Context
For file.ext.gz, the following return gz as extension:
Describe the bug
python -m spyrmsd
with Open Babel backend for I/O does not work with gzipped files.To Reproduce
Expected behavior
python -m spyrmsd
should work with compressed files since Open Babel can deal with those.Environment
pip
,conda
]:conda
Additional Context
For
file.ext.gz
, the following returngz
as extension:spyrmsd/spyrmsd/utils.py
Line 25 in 00207e3
File extensions are used as format string for
pybel
and therefore lead to errors.
spyrmsd/spyrmsd/optional/obabel.py
Lines 31 to 33 in 00207e3
The function
spyrmsd/spyrmsd/utils.py
Lines 30 to 32 in 00207e3
needs to deal with this problem.
The text was updated successfully, but these errors were encountered: