hi ,
i downloaded the Docker image as in:
docker pull omendezlucio/deepdock
docker run -it omendezlucio/deepdock:latest
then copy/paste the source from
https://github.com/OptiMaL-PSE-Lab/DeepDock/blob/main/examples/Score_example.ipynb
into a python script:
from rdkit import Chem
import deepdock
from deepdock.models import *
from deepdock.DockingFunction import score_compound
from deepdock.DockingFunction import calculate_atom_contribution
import numpy as np
import torch
np.random.seed(123)
torch.cuda.manual_seed_all(123)
device = 'cuda' if torch.cuda.is_available() else 'cpu'
ligand_model = LigandNet(28, residual_layers=10, dropout_rate=0.10)
target_model = TargetNet(4, residual_layers=10, dropout_rate=0.10)
model = DeepDock(ligand_model, target_model, hidden_dim=64, n_gaussians=10, dropout_rate=0.10, dist_threhold=7.).to(device)
checkpoint = torch.load(deepdock.path[0]+'/../Trained_models/DeepDock_pdbbindv2019_13K_minTestLoss.chk', map_location=torch.device(device))
model.load_state_dict(checkpoint['model_state_dict'])
target_ply = deepdock.path[0]+'/../data/1z6e_protein.ply'
real_mol = Chem.MolFromMol2File(deepdock.path[0]+'/../data/1z6e_ligand.mol2',sanitize=False, cleanupSubstructures=False)
score = score_compound(real_mol, target_ply, model, dist_threshold=3., seed=123, device=device)
score
I called the script test.py and said:
python3 test.py
this runs for a few seconds, without any errors or warnings, and then exits without giving me any output,
shouldn't the final command (score) print out the score to stdout?
talking about commands ... are there any plans to make a documentation for deepdock?
when inside docker i cannot execute the jupyter notebook, as there is no browser in this image.
therefore i tried to install form source as outlined on the webpage.
I say:
git clone https://github.com/OptiMaL-PSE-Lab/DeepDock.git
cd DeepDock/
conda create --name mydd
conda activate mydd
git submodule update --init --recursive
conda install -c conda-forge rdkit=2019.09.1
pip install -r requirements.txt
the last command starts running, and then i get:
[...]
Looking in links: https://pytorch-geometric.com/whl/torch-1.4.0.html, https://pytorch-geometric.com/whl/torch-1.4.0.html, https://pytorch-geometric.com/whl/torch-1.4.0.html, https://pytorch-geometric.com/whl/torch-1.4.0.html
Collecting torch==1.4.0
Using cached torch-1.4.0-cp38-cp38-manylinux1_x86_64.whl (753.4 MB)
Collecting torch-scatter==2.0.4+cu101
Using cached https://data.pyg.org/whl/torch-1.4.0/torch_scatter-2.0.4%2Bcu101-cp38-cp38-linux_x86_64.whl (10.6 MB)
Discarding https://data.pyg.org/whl/torch-1.4.0/torch_scatter-2.0.4%2Bcu101-cp38-cp38-linux_x86_64.whl (from https://pytorch-geometric.com/whl/torch-1.4.0.html): Requested torch-scatter==2.0.4+cu101 from https://data.pyg.org/whl/torch-1.4.0/torch_scatter-2.0.4%2Bcu101-cp38-cp38-linux_x86_64.whl (from -r requirements.txt (line 3)) has inconsistent version: filename has '2.0.4+cu101', but metadata has '2.0.4'
ERROR: Could not find a version that satisfies the requirement torch-scatter==2.0.4+cu101 (from versions: latest+cpu, latest+cu92, latest+cu100, latest+cu101, 0.3.0, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 2.0.2, 2.0.3, 2.0.3+cpu, 2.0.3+cu100, 2.0.3+cu101, 2.0.3+cu92, 2.0.4, 2.0.4+cpu, 2.0.4+cu100, 2.0.4+cu101, 2.0.4+cu92, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9)
ERROR: No matching distribution found for torch-scatter==2.0.4+cu101
any suggestions on how to deal with that?
(my system is Ubuntu 20.04.4)
thanks!
michael