This package contains a minimalistic python API for high throughput docking by using VinaGPU via a Docker image.
- Can be used to dock on multiple GPUs, multiple workers per GPU.
- CPU workers using AutoDock Vina python API can be run in parallel to the GPU workers
- Nvidia driver version>=515.43.04
- Working nvidia-docker GPU runtime.
- Python3.8+ conda environment with Rdkit installed
git clone https://github.com/andriusbern/vinaGPU && cd vinaGPU
pip install -e .
pip install meeko docker scipy dimorphite-dl vina
sudo docker pull andriusbern/vina-gpu:latest
The docker image contains:
- Cuda 11.7
- Vina-GPU (compiled with boost 1.77.0, cuda 11.7, proper OpenCL dependencies)
- Protein preprocessing tools:
import time
from vinagpu import parallel_dock
target_pdb_path = 'examples/P21918.pdb'
output_subfolder = 'test_docking'
with open('examples/valid_smiles.txt', 'r') as f:
smiles = f.read().splitlines()
t0 = time.time()
parallel_dock(target_pdb_path=target_pdb_path,
smiles=smiles,
output_subfolder=output_subfolder,
num_cpu_workers=8, exhaustiveness=8, threads_per_cpu_worker=8, # CPU worker parameters
gpu_ids=[0,1,2,3], workers_per_gpu=2, search_depth=5) # GPU Worker parameters
t1 = time.time()
print(f'Docked ligands per second: {len(smiles) / (t1 - t0)}'
print(f'Total time: {t1 - t0}')
import os
from vinagpu import VinaGPU
# Docking example on P21918 (DRD5 - D(1B) dopamine receptor)
target_pdb_path = os.path.join('examples', 'P21918.pdb')
active_site = (2.753, 0.994, -7.633) # Active site coordinates of P21918
output_subfolder = 'P21918_test' # results stored at: "./P21918_test"
smiles = [
'NC[C@@H](NC(=O)c1ccc(F)cc1)C1CCCC1',
'CCc1cccc(C(C)(C)NCCc2ccc(OC)c(OC)c2)c1',
'CCN1CCCC1CNS(=O)(=O)c1ccc(F)cc1',
'O=C(Cn1cccc1)Nc1ccc(Cl)cc1Cl']
vina_docker = VinaGPU()
scores = vina_docker.dock(
target_pdb_path=target_pdb_path,
smiles=smiles,
output_subfolder=output_subfolder,
active_site_coords=active_site,
verbose=True)