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
This is the exception that was raised / this is what went wrong.
Unable to read the file. Errors are below.
== /data/temp/TAD-03001_minimised.sdf ==
This file could not be parsed by any of the file parsers! It was recognised as a file of type sdf, but all parsers failed to parse this file. The errors from the parsers associated with the suffix sdf are printed below:
*-- Failed to parse '/data/temp/TAD-03001_minimised.sdf' with parser 'SDF'.
The file is not recognised as being of the required format.
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module> │
│ │
│ ❱ 1 mola = BSS.IO.readMolecules('TAD-03001_minimised.sdf') │
│ 2 │
│ │
│ /data/miniconda3/envs/openbiosim-dev/lib/python3.9/site-packages/BioSimSpace/IO/_io.py:528 in │
│ readMolecules │
│ │
│ 525 │ │ │ │ if _isVerbose(): │
│ 526 │ │ │ │ │ raise IOError(msg) from e0 │
│ 527 │ │ │ │ else: │
│ ❱ 528 │ │ │ │ │ raise IOError(msg) from None │
│ 529 │ │
│ 530 │ return _System(system) │
│ 531 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
OSError: Failed to read molecules from: ['TAD-03001_minimised.sdf']
Expected behavior
It should not raise an exception.
OS: Linux (centos)
Version of Python: 3.9
Version of sire: latest dev
The text was updated successfully, but these errors were encountered:
Thanks for reporting. The issue is that sire's SDF parser is expecting every molecule to end with a separator line ($$$$). Because this isn't present, it doesn't think that there are any SDF molecules in the file.
This is a bug, caused by my mis-reading of the specification. I'll fix it by assuming that there is only one molecule if we are missing the separator line.
For now, you can read your file by adding the separator to the end of your file. Just add $$$$ as the last line, e.g.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not raise an exception.
dev
The text was updated successfully, but these errors were encountered: