HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
479 stars 109 forks source link

ValueError: list.remove(x): x not in list in process_mols.py line 692, in get_geometry_graph #21

Closed moritzschaefer closed 2 years ago

moritzschaefer commented 2 years ago

I get the following error for a specific ligand-protein pair:

Trying to load ligand_106.sdf
Docking the receptor protein_A.pdb
To the ligand ligand_106.sdf
Traceback (most recent call last):
  File "inference.py", line 473, in <module>
    inference_from_files(args)
  File "inference.py", line 350, in inference_from_files
    geometry_graph = get_geometry_graph(lig)
  File "/home/moritz/Projects/EquiBind/commons/process_mols.py", line 692, in get_geometry_graph
    all_dst_idx.remove(src_idx)
ValueError: list.remove(x): x not in list

(I followed the instruction in the README and ran python inference.py --config=configs_clean/inference.yml)

HannesStark commented 2 years ago

Hi, Thanks for mentioning the problem! Would you mind sending me the specific ligand-protein pair? hstark@mit.edu (or uploading it here if that works)

HannesStark commented 2 years ago

Thanks for sending it over - I fixed the issue and it should work now after pulling the most recent commit!

The problem was that this version of the graph creation for the geometry regularization did not work with ligand atoms that do not have any neighbors in the sense of not having any bonds that connect them to another atom. This is now supported, however, the model was never trained with ligand files that have a completely disconnected atom. Likely the predictions are better if the "lone atom" is removed.

I hope that helps!