gcorso / DiffDock

Implementation of DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking
https://arxiv.org/abs/2210.01776
MIT License
1.1k stars 265 forks source link

Visualizing complexes in protein 3D structures #99

Open Yueming-Yin opened 1 year ago

Yueming-Yin commented 1 year ago

What a great job! Only the SDF files of small molecules are output in the "results/user_predictions_small" folder when I infer with the example code:

python -m inference --protein_ligand_csv data/protein_ligand_example_csv.csv --out_dir results/user_predictions_small --inference_steps 20 --samples_per_complex 40 --batch_size 10 --actual_steps 18 --no_final_step_noise

How can I visualize the 3D structure of the complexes docked with the protein? Like you showed in the 'visualization' folder.

HannesStark commented 1 year ago

I would recommend using pymol for this

Yueming-Yin commented 1 year ago

Thank you for your suggestion. After importing the pdb file of the input protein and inference ligand together into pymol, is the resulting complex the visualization after docking?

gcorso commented 1 year ago

Yes it should be!

dan9thsense commented 1 year ago

This did not work for me, as the ligand was offset far from the protein. Also, the only output I see are a set of .sdf files. How do we get ranked poses and confidence scores?

dan9thsense commented 1 year ago

Here is an example of two ligands from the results along with the protein in pyMol. One ligand is on the far left, the other on the far right, lower down.

image

dan9thsense commented 1 year ago

Oh, I see the rank and confidence score is included in the sdf filename. Still have the issue of the ligands being far apart from the protein.

dan9thsense commented 1 year ago

I enabled --save_visualizations and got both sdf and pdb files in the output. In this case, the pdb files are offset from the protein but the corresponding sdf files are right in the pocket.

image

HannesStark commented 1 year ago

Potentially DiffDock's predictions were incorrect and produced the outputs at this location. Have you looked at multiple of the high confidence predictions and were all of them this far away?

gcorso commented 1 year ago

Hi @dan9thsense, DiffDock saves in the pdb file the whole reverse diffusion process so you should only look at the last frames of the pdb which should correspond to the sdf