Metadata-Version: 2.1
Name: dsdp
Version: 1.0
Summary: Python Wrapper for DSDP
Keywords: DSDP,molecular docking
Description-Content-Type: text/markdown
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Requires-Dist: tqdm
Requires-Dist: scikit-image

# DSDP: Deep Site and Docking Pose

DSDP is a blind docking strategy accelerated by GPUs, developed by Gao Group. For the site prediction part, several modifications are introduced to PUResNet program. The pose sampling part is similar as AutoDock Vina combined with a number of modifications. 

This package is a python wrapper for DSDP.

## Installation

Please set up the python environment by [Anaconda](https://docs.anaconda.com/anaconda/install/index.html). 

Create a new environment by `DSDP.yaml` :

    conda env create -f DSDP.yml

The `DSDP.yaml` looks like:

```
name: DSDP

channels:
  - pytorch
  - nvidia
  - defaults
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - conda-forge

dependencies:
  - python=3.9.0
  - pip
  - pytorch==2.4.0
  - pytorch-cuda==12.1
  - openbabel=3.1.1
  - pip:
      - dsdp
      - tqdm==4.66.2
      - scikit-image==0.24.0
```

Activate the environment

    conda activate DSDP

Now, DSDP is availabel. To check whether DSDP is successfully installed, you can run the following code:

```
    DSDP test
```

## Dataset

After `DSDP test`, the files in `test_data` are the example inputs.

For each complex you want to predict, you need a directory containing the ligand and protein file. For example:

```
DSDP_dataset
└───name1
    │   name1_protein.pdbqt
    │   name1_ligand.pdbqt
└───name2
    │   name2_protein.pdbqt
    │   name2_ligand.pdbqt
...
```

Input files of DSDP are pdbqt format, which can be generated by AutoDock Tools or OpenBabel.

## Run DSDP 

DSDP is an integrated docking program developed for blind docking, which can also be used for redocking task. We support pdbqt input format in DSDP. You can generate it from pdb file by AutoDock Tools.

### Blind docking

For blind docking task, run:

```
DSDP blind -i ./test_data -o ./blind_results --exhaustiveness 384 --search_depth 40 --top_n 1
```

```
usage: DSDP blind [-h] -i DATASET_PATH -o O [--site_path SITE_PATH] [--exhaustiveness EXHAUSTIVENESS] [--search_depth SEARCH_DEPTH]
                  [--top_n TOP_N]

optional arguments:
  -h, --help            show this help message and exit
  -i DATASET_PATH, --dataset_path DATASET_PATH
                        Path to the dataset file, please put the pdbqt documents of protein and ligand to one folder
  -o O, --output_path O
                        Output path of the results
  --site_path SITE_PATH
                        Path to the predicted sites
  --exhaustiveness EXHAUSTIVENESS
                        Number of sampling threads
  --search_depth SEARCH_DEPTH
                        Number of sampling steps
  --top_n TOP_N         Top N results are exported
```

### Redocking

For redocking task, run:

```
DSDP redock --ligand ./test_data/1a2b/1a2b_ligand.pdbqt --protein ./test_data/1a2b/1a2b_protein.pdbqt --box_min 2.241 20.008 21.314 --box_max 24.744 35.470 38.495 --exhaustiveness 384 --search_depth 40 --top_n 1  --out ./1a2b_redock.pdbqt --log ./1a2b_redock.log
```

Note: the box information (minima and maxima along x y z axis) of redocking needs to be provided by users. The box information of this example is only suitable for 1a2b protein.

```
usage: DSDP redock [-h] --ligand LIGAND --protein PROTEIN --box_min x_min y_min z_min --box_max x_max y_max z_max
                   [--exhaustiveness EXHAUSTIVENESS] [--search_depth SEARCH_DEPTH] [--top_n TOP_N] [--out OUT] [--log LOG]

optional arguments:
  -h, --help            show this help message and exit
  --ligand LIGAND       File name of ligand
  --protein PROTEIN     File name of protein
  --box_min x_min y_min z_min
                        x y z minima of box
  --box_max x_max y_max z_max
                        x y z maxima of box
  --exhaustiveness EXHAUSTIVENESS
                        Number of sampling threads, default 384
  --search_depth SEARCH_DEPTH
                        Number of sampling steps, default 40
  --top_n TOP_N         Top N results are exported, default 10
  --out OUT             Output file name of redocking, default 'OUT.pdbqt'
  --log LOG             Log file name of redocking, default 'OUT.log'
```


