Graylab / GeoDock

Flexible Protein-Protein Docking with a Multi-Track Iterative Transformer.
https://www.biorxiv.org/content/10.1101/2023.06.29.547134v1
MIT License
84 stars 14 forks source link

Train error: too many indices for tensor of dimension 2 #17

Open azir12345 opened 3 weeks ago

azir12345 commented 3 weeks ago

When I use the dips database for training, the run.py script reports an error: IndexError: too many indices for tensor of dimension 2.The position of the pt file obtained by gen_dips_datasets.py has only two dimensions: sequence position and three-dimensional coordinates. There’s no dimension of atomic type. Could you please provide guidance on how to handle this issue?

Original Traceback (most recent call last):
  File "/root/miniconda3/envs/geo/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/root/miniconda3/envs/geo/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/miniconda3/envs/geo/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/GeoDock-main/geodock/datasets/geodock_dataset.py", line 257, in __getitem__
    label_rotat = self.get_rotat(label_coords)
  File "/root/GeoDock-main/geodock/datasets/geodock_dataset.py", line 322, in get_rotat
    n_coords = coords[:, 0, :]
kdinashi commented 4 days ago

Hi, I am facing exactly the same issue. Did you find any solution?