torchdrug icon indicating copy to clipboard operation
torchdrug copied to clipboard

Error when loading the QM9 dataset.

Open zlpure opened this issue 2 years ago • 1 comments

When I loaded the QM9 dataset, I have got the following error trace:

>>> dataset = datasets.QM9("data/")
22:37:18   Downloading http://deepchem.io.s3-website-us-west-1.amazonaws.com/datasets/gdb9.tar.gz to data/gdb9.tar.gz
22:38:13   Extracting gdb9.sdf from data/gdb9.tar.gz to data/gdb9.sdf
22:38:16   Extracting gdb9.sdf.csv from data/gdb9.tar.gz to data/gdb9.sdf.csv
Loading data/gdb9.sdf.csv: 100%|█████████████████████████████████████████████████████████████████████████████████| 133886/133886 [00:08<00:00, 15933.14it/s]
Constructing molecules from SMILES: 100%|█████████████████████████████████████████████████████████████████████████| 133885/133885 [01:00<00:00, 2200.35it/s]
Constructing molecules from SDF:   0%|                                                                                 | 19/133885 [00:00<11:47, 189.22it/s][22:39:29] Warning: molecule is tagged as 3D, but all Z coords are zero
Constructing molecules from SDF:   0%|▎                                                                               | 429/133885 [00:00<02:29, 895.43it/s][22:39:29] Warning: molecule is tagged as 3D, but all Z coords are zero
Constructing molecules from SDF:   3%|██▎                                                                            | 3837/133885 [00:04<02:16, 952.44it/s]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<decorator-gen-91>", line 2, in __init__
  File "/home/zengliang/anaconda3/lib/python3.7/site-packages/torchdrug-0.1.2-py3.7.egg/torchdrug/core/core.py", line 282, in wrapper
    return init(self, *args, **kwargs)
  File "/home/zengliang/anaconda3/lib/python3.7/site-packages/torchdrug-0.1.2-py3.7.egg/torchdrug/datasets/qm9.py", line 66, in __init__
    d = data.Molecule.from_molecule(mol, **kwargs)
  File "/home/zengliang/anaconda3/lib/python3.7/site-packages/torchdrug-0.1.2-py3.7.egg/torchdrug/data/molecule.py", line 229, in from_molecule
    stereo_atoms = torch.tensor(stereo_atoms)[:-2]
ValueError: expected sequence of length 2 at dim 1 (got 0)

zlpure avatar May 01 '22 14:05 zlpure

Same here

pmorerio avatar Mar 02 '23 10:03 pmorerio