deepmodeling / Uni-Mol

Official Repository for the Uni-Mol Series Methods
MIT License
655 stars 117 forks source link

docking.py error #248

Open Golden-proteogenomics opened 1 month ago

Golden-proteogenomics commented 1 month ago

I wish to perform a docking simulation involving a single ligand and a single protein. And then use this code in 'https://github.com/deepmodeling/Uni-Mol/tree/main/unimol'

nthreads=20 # Num of threads predict_file="./infer_pose/save_pose_test.out.pkl" # Your inference file dir reference_file="./protein_ligand_binding_pose_prediction/test.lmdb" # Your reference file dir output_path="./protein_ligand_binding_pose_prediction" # Docking results path python ./unimol/utils/docking.py --nthreads $nthreads --predict-file $predict_file --reference-file $reference_file --output-path $output_path

However, I only obtained this error or result.

图片

So, what steps should I take to ensure a successful complementary docking between the ligand and the protein?

ZhouGengmo commented 1 month ago

Traceback(most recent call last): File "./unimol/utils/conformer model.py" line 261,in def kabsch(x:th.Tensor,y: th.Tensor,weight:0ptional[th.Tensor]=None)-> th.Tensor: NameError:name'Optional'is not defined

To directly solve this, you can change this line to from typing import List, Optional. We will fix this ASAP.

Golden-proteogenomics commented 1 month ago

Thank you for your assistance. Following your guidance, I have completed the task. However, I have obtained three docking scores related to the ligand and protein. Could you please advise which one of these scores is the most relevant to my description of the docking process? 图片

ZhouGengmo commented 1 month ago

The issue has been fixed in this pr https://github.com/deepmodeling/Uni-Mol/pull/249.

Could you please advise which one of these scores is the most relevant to my description of the docking process?

These three scores are used as losses during the optimization process to obtain the docking pose. They are the ligand-pocket distance score, the intra-ligand distance score, and the ligand-pocket clash score, respectively.