Closed blakemertz closed 1 week ago
Question for anyone out there -- does python -m inference
assume that you are running in the DiffDock home directory where inference.py can be referenced to generate a module named 'inference'?
I tried the following:
python -m inference --config default_inference_args.yaml --protein_path examples/1a46_protein_processed.pdb --ligand examples/1a46_ligand.sdf --out_dir test
in the DiffDock home directory and am patiently waiting for results. However, it really looks like my terminal is just hanging (been waiting for 10+ minutes now....)
UPDATE: DiffDock ran my example I just submitted, running out of the diffdock parent directory:
(diffdock) [centos@modbind-dy-modbind-cr-0-1 DiffDock]$ python -m inference --config default_inference_args.yaml --protein_path examples/1a46_protein_processed.pdb --ligand examples/1a46_ligand.sdf --out_dir test
/shared/binaries/github/DiffDock/utils/so3.py:59: RuntimeWarning: invalid value encountered in sqrt
_exp_score_norms = np.sqrt(np.sum(_score_norms**2 * _pdf_vals, axis=1) / np.sum(_pdf_vals, axis=1) / np.pi)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 201/201 [01:27<00:00, 2.29it/s]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 201/201 [01:36<00:00, 2.09it/s]
/shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/Bio/pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module.
warnings.warn(
Generating ESM language model embeddings
Downloading: "https://dl.fbaipublicfiles.com/fair-esm/models/esm2_t33_650M_UR50D.pt" to /home/centos/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D.pt
Downloading: "https://dl.fbaipublicfiles.com/fair-esm/regression/esm2_t33_650M_UR50D-contact-regression.pt" to /home/centos/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D-contact-regression.pt
Processing 1 of 1 batches (2 sequences)
/shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:110: UserWarning: 'has_cuda' is deprecated, please use 'torch.backends.cuda.is_built()'
torch.has_cuda,
/shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:111: UserWarning: 'has_cudnn' is deprecated, please use 'torch.backends.cudnn.is_available()'
torch.has_cudnn,
/shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:117: UserWarning: 'has_mps' is deprecated, please use 'torch.backends.mps.is_built()'
torch.has_mps,
/shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:118: UserWarning: 'has_mkldnn' is deprecated, please use 'torch.backends.mkldnn.is_available()'
torch.has_mkldnn,
0it [00:00, ?it/s]/shared/binaries/github/DiffDock/datasets/parse_chi.py:91: RuntimeWarning: invalid value encountered in cast
Y = indices.astype(int)
1it [00:57, 57.48s/it]
So success, right?!?! Can anyone tell me what the difference is in the .sdf files that are produced?
(base) [centos@modbind-dy-modbind-cr-0-1 complex_0]$ ls
rank10_confidence-4.57.sdf rank1.sdf rank3_confidence-2.43.sdf rank5_confidence-3.57.sdf rank7_confidence-4.09.sdf rank9_confidence-4.43.sdf
rank1_confidence-1.79.sdf rank2_confidence-2.20.sdf rank4_confidence-2.78.sdf rank6_confidence-4.08.sdf rank8_confidence-4.27.sdf
I couldn't find any clues in the preprint or the README here. Thanks.
Hi so for my issue, I manually download all the file from the website, and I can run the diffdock calculation later on successfully. However, when I try to use the new one as you, with pytorch 2.5.1 and cuda 12.1, it takes me over 30 mins stuck at the first step of the new model. How long did you wait for the downloading parameter?
UPDATE: DiffDock ran my example I just submitted, running out of the diffdock parent directory:
(diffdock) [centos@modbind-dy-modbind-cr-0-1 DiffDock]$ python -m inference --config default_inference_args.yaml --protein_path examples/1a46_protein_processed.pdb --ligand examples/1a46_ligand.sdf --out_dir test /shared/binaries/github/DiffDock/utils/so3.py:59: RuntimeWarning: invalid value encountered in sqrt _exp_score_norms = np.sqrt(np.sum(_score_norms**2 * _pdf_vals, axis=1) / np.sum(_pdf_vals, axis=1) / np.pi) 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 201/201 [01:27<00:00, 2.29it/s] 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 201/201 [01:36<00:00, 2.09it/s] /shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/Bio/pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module. warnings.warn( Generating ESM language model embeddings Downloading: "https://dl.fbaipublicfiles.com/fair-esm/models/esm2_t33_650M_UR50D.pt" to /home/centos/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D.pt Downloading: "https://dl.fbaipublicfiles.com/fair-esm/regression/esm2_t33_650M_UR50D-contact-regression.pt" to /home/centos/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D-contact-regression.pt Processing 1 of 1 batches (2 sequences) /shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:110: UserWarning: 'has_cuda' is deprecated, please use 'torch.backends.cuda.is_built()' torch.has_cuda, /shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:111: UserWarning: 'has_cudnn' is deprecated, please use 'torch.backends.cudnn.is_available()' torch.has_cudnn, /shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:117: UserWarning: 'has_mps' is deprecated, please use 'torch.backends.mps.is_built()' torch.has_mps, /shared/miniconda3/envs/diffdock/lib/python3.10/site-packages/torch/overrides.py:118: UserWarning: 'has_mkldnn' is deprecated, please use 'torch.backends.mkldnn.is_available()' torch.has_mkldnn, 0it [00:00, ?it/s]/shared/binaries/github/DiffDock/datasets/parse_chi.py:91: RuntimeWarning: invalid value encountered in cast Y = indices.astype(int) 1it [00:57, 57.48s/it]
So success, right?!?! Can anyone tell me what the difference is in the .sdf files that are produced?
(base) [centos@modbind-dy-modbind-cr-0-1 complex_0]$ ls rank10_confidence-4.57.sdf rank1.sdf rank3_confidence-2.43.sdf rank5_confidence-3.57.sdf rank7_confidence-4.09.sdf rank9_confidence-4.43.sdf rank1_confidence-1.79.sdf rank2_confidence-2.20.sdf rank4_confidence-2.78.sdf rank6_confidence-4.08.sdf rank8_confidence-4.27.sdf
I couldn't find any clues in the preprint or the README here. Thanks.
Yes, your results are correct, be aware that the confidence score here are negative, and you can read the confidence score descrption from the README:
** c > 0 high confidence
** -1.5 < c < 0 moderate confidence
** c < -1.5 low confidence
After working on setting up the proper environment for diffdock, I thought I had a system that would allow me to roll with pytorch 2 and cuda 12. I went to run a pdb/ligand pair out of the example folder and got the following error:
I found one other closed issue #175 that had the exact same error message but no expalnation for how it was resolved, so I am opening up a new issue. To take this from the beginning.....
My cloud environment is using cuda 12:
and this was not downgradeable to cuda11. After looking through the many issues trying to install OpenFold to get DiffDock to work (and failing several times myself to set up a DiffDock environment first and then installing OpenFold), I decided to try to get a working version of OpenFold on my cluster. Following the meticulous work and advice from another contributor on the OpenFold git page, I was able to get a working version of OpenFold based on pytorch2 and cuda12 installed.
I then cloned my OpenFold environment into a DiffDock environment so I could work on getting DiffDock running successfully.
Next step was to pull in the remaining dependencies for DiffDock:
I specified the versions of ProDy, e3nn, rdkit, and gradio to stay consstent with the environment.yml in the DiffDock source code. I specified the versions for the torch_ dependencies based on my installed version of pytorch (2.1.2). I had to pull a forked version of esm-fold to stay compatible with a pytorch2/cuda12 installation.
The following is my list of conda packages for this environment:
And here are my modules:
You'll notice that inference is conspicuosly absent from my module list. Which brings up a couple of questions:
Thanks for the help -- been banging my head against this problem for nearly 3 weeks and thought I was THISCLOSE to a working install after getting OpenFold to work.