luwei0917 / DynamicBind

repo for DynamicBind: Predicting ligand-specific protein-ligand complex structure with a deep equivariant generative model
MIT License
192 stars 42 forks source link

RuntimeError: no cross edge found #29

Open zersalsion opened 3 months ago

zersalsion commented 3 months ago

Thank you for your fantastic work.

Protein: af2_3zzf_aligned.pdb and as a ligand.csv

ligand
C(=[OH+])O

results in

Traceback (most recent call last):
  File "/…/DynamicBind/inference.py", line 322, in <module>
    raise(e)
  File "/…/DynamicBind/inference.py", line 318, in <module>
    affinity_pred, complete_affinity = predict_one_complex(affinity_pred, df, orig_complex_graph, model, 
  File "/…/DynamicBind/inference.py", line 235, in predict_one_complex
    raise e
  File "/…/DynamicBind/inference.py", line 208, in predict_one_complex
    outputs = sampling(data_list=data_list[i*args.batch_size:(i+1)*args.batch_size], model=model,
  File "/…/DynamicBind/utils/sampling.py", line 122, in sampling
    lddt_pred, affinity_pred, tr_score, rot_score, tor_score, res_tr_score, res_rot_score, res_chi_score = model(complex_graph_batch)
  File "/…/miniconda3/envs/dynamicbind/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/…/DynamicBind/models/score_model.py", line 285, in forward
    cross_edge_index, cross_edge_attr, cross_edge_sh = self.build_cross_conv_graph(data, cross_cutoff)
  File "/…/DynamicBind/models/score_model.py", line 472, in build_cross_conv_graph
    raise RuntimeError('no cross edge found')
RuntimeError: no cross edge found
inference complete.

The error is reproducible, and it seems to mainly depend on the ligand, independent of the protein.

The version is abdcd83f313cd20d50c3917e04615e989a8f63e5.