Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
ysyecust committed Feb 29, 2024
2 parents c5cc2a2 + 1bec259 commit fabab04
Show file tree
Hide file tree
Showing 15 changed files with 242 additions and 91 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Even better, you can submit a Pull Request with a patch.
## Feature requests

We highly appreciate your contributions, and would like to help you crafting the changes and making contributions to the community.
If you would like to implement a new feature, please **submit a feature requesting issue with a proposal for your work first**.
If you would like to implement a new feature, please **submit a feature requesting issue with a proposal for your work first**.
This help fitting your ideas and work with the development road map well, coordinating our efforts, and avoiding duplication of work.

## Submitting a Pull Request
Expand All @@ -35,7 +35,7 @@ This help fitting your ideas and work with the development road map well, coordi
```

5. On GitHub, create a pull request (PR) from your bug-fix branch targeting `dptech-corp/Uni-Dock`.

6. After your pull request is merged, you can safely delete your branch and sync the changes from the main (upstream) repository:

- Delete the remote branch on GitHub either [through the GitHub web UI](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request) or your local shell as follows:
Expand Down
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
<picture><source media="(prefers-color-scheme: dark)" srcset="./unidock/assets/logo-dark.svg"><source media="(prefers-color-scheme: light)" srcset="./unidock/assets/logo.svg"><img alt="Uni-Dock logo" src="./unidock/assets/logo.svg"></picture>

[![DeepModeling](https://img.shields.io/badge/DeepModeling-Incubating_Project-blue)](https://github.com/deepmodeling)
## Introduction

**Uni-Dock** is a GPU-accelerated molecular docking program developed by DP Technology.
It supports various scoring functions including vina, vinardo, and ad4. Uni-Dock achieves more than 1000-fold speed-up on V100 GPU with high-accuracy compared with the AutoDock Vina running in single CPU core.
It supports various scoring functions including vina, vinardo, and ad4. Uni-Dock achieves more than 2000-fold speed-up on V100 GPU with high-accuracy compared with the AutoDock Vina running in single CPU core.
The [paper](https://pubs.acs.org/doi/10.1021/acs.jctc.2c01145) has been accepted by JCTC (doi: 10.1021/acs.jctc.2c01145).

![Runtime performance of Uni-Dock on different GPUs in three modes](./unidock/assets/gpu_speeds.png)
**Uni-Dock** joins the DeepModeling community, a community devoted of AI for science, as an incubating level project. [Learn more about DeepModeling](https://github.com/deepmodeling/community)

Check this [subfolder](./unidock/) for instructions on installing Uni-Dock.
![Runtime docking performance of Uni-Dock on different GPUs in three modes](./unidock/assets/1.1_docking_box.png)
![Runtime vs performance of Uni-Dock on different GPUs in three modes](./unidock/assets/1.1_vs_bar.png)

**Uni-Dock** joins the DeepModeling community, a community devoted of AI for science, as an incubating level project. To learn more about the DeepModeling community, see the [introduction of community](https://github.com/deepmodeling/community).
## UniDockTools
Please check [`unidock` folder](./unidock/) for installing instructions, source codes, and usage.

**UniDockTools** is a python package developed to handle the inputs and outputs of Uni-Dock.
In the future, UniDockTools will support more input formats and scoring functions. We hope it could be an easy-to-use virtual screening workflow for all users.
**Uni-Dock Tools** is a Python package developed to handle the inputs and outputs of Uni-Dock.
It is committed to support more input formats and scoring functions. We hope it could be an easy-to-use virtual screening workflow for users with diversed backgrounds.

Check this [subfolder](./unidock_tools/) for more details.
Please check [`unidock_tools` folder](./unidock_tools/) for installing instructions, source codes, and usage.

## Changelog

- 2024-02-29: Release [Uni-Dock v1.1](./unidock/README.md#changelog) and [Uni-Dock Tools](./unidock_tools/README.md).
- 2023-08-21: Upload source codes of Uni-Dock.
- 2023-08-14: Add unidock_tools to support SDF format input for vina and vinardo scoring functions.
- 2023-08-14: Add Uni-Dock Tools to support SDF format input for vina and vinardo scoring functions.

## Citation

Expand All @@ -34,18 +34,3 @@ Yu, Y., Cai, C., Wang, J., Bo, Z., Zhu, Z., & Zheng, H. (2023).
Uni-Dock: GPU-Accelerated Docking Enables Ultralarge Virtual Screening.
Journal of Chemical Theory and Computation.
https://doi.org/10.1021/acs.jctc.2c01145

Tang, S., Chen, R., Lin, M., Lin, Q., Zhu, Y., Ding, J., ... & Wu, J. (2022).
Accelerating autodock vina with gpus. Molecules, 27(9), 3041.
DOI 10.3390/molecules27093041

J. Eberhardt, D. Santos-Martins, A. F. Tillack, and S. Forli
AutoDock Vina 1.2.0: New Docking Methods, Expanded Force
Field, and Python Bindings, J. Chem. Inf. Model. (2021)
DOI 10.1021/acs.jcim.1c00203

O. Trott, A. J. Olson,
AutoDock Vina: improving the speed and accuracy of docking
with a new scoring function, efficient optimization and
multithreading, J. Comp. Chem. (2010)
DOI 10.1002/jcc.21334
49 changes: 30 additions & 19 deletions unidock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,11 @@

Uni-Dock is a GPU-accelerated molecular docking program developed by DP Technology.
It supports various scoring functions including vina, vinardo, and ad4.
Uni-Dock achieves more than 1000-fold speed-up on V100 GPU with high-accuracy compared with the AutoDock Vina running in single CPU core.
Uni-Dock achieves more than 2000-fold speed-up on V100 GPU with high-accuracy compared with the AutoDock Vina running in single CPU core.
The [paper](https://pubs.acs.org/doi/10.1021/acs.jctc.2c01145) has been accepted by JCTC (doi: 10.1021/acs.jctc.2c01145).

![Runtime performance of Uni-Dock on different GPUs in three modes](assets/gpu_speeds.png)

## Changelog

- 2023-08-14: Add `unidock_tools` to support SDF format input for vina and vinardo scoring functions.

## License

This project is licensed under the terms of the GNU Lesser General Public License v3.0. See [LICENSE](./LICENSE) for details.

Developed by [DP Technology](https://dp.tech/en), [Hermite®](https://dp.tech/en/product/hermite) is a new-generation drug computing design platform which integrates artificial intelligence, physical modeling and high-performance computing to provide a one-stop computing solution for preclinical drug research and development. It integrates the features of Uni-Dock, along with virtual screening workflow for an efficient drug discovery process.

Uni-Dock is now available on the new-generation drug computing design platform [Hermite®](https://dp.tech/en/product/hermite) for ultralarge virtual screening.

For further cooperations on developing Uni-Dock and trying out Hermite®, please contact us at <[email protected]> .
![Runtime docking performance of Uni-Dock on different GPUs in three modes](assets/1.1_docking_box.png)
![Runtime vs performance of Uni-Dock on different GPUs in three modes](assets/1.1_vs_bar.png)

## Installation

Expand Down Expand Up @@ -57,7 +44,7 @@ The performance is not guaranteed on legacy GPU models. To build Uni-Dock with a
# Otherwise, prepend the building directory to your `PATH` environment variable.
```

code foramt
To format codes if changes are made:

```shell
cd ./build/
Expand Down Expand Up @@ -195,9 +182,33 @@ python run_dock.py
If you want to use search mode presets, specify the parameter `search_mode` in `config.json` and delete `nt` and `ns` in `config.json`.
## Bug Report
## Contributing
We warmly welcome contributions from the open source community. Your bug reports, feature requests, and pull requests helps Uni-Dock improve.
Please submit bug reports and feature requests to the Github [issue tracker](https://github.com/dptech-corp/Uni-Dock/issues/new/choose).
Please report bugs to [Issues](https://github.com/dptech-corp/Uni-Dock/issues) page.
If you would like to improve the codes, please refer to the [contributing guide](../.github/CONTRIBUTING.md) for details.
## Changelog
Major changes are documented. For the detailed changes, please refer to the commit history.
### v1.1
- Optimize 1:1 ligand docking.
- Optimize Monte-Carlo simulation speed.
- Generate compute kernels for various ligands sizes.
## License
This project is licensed under the terms of the GNU Lesser General Public License v3.0. See [LICENSE](./LICENSE) for details.
Developed by [DP Technology](https://dp.tech/en), [Hermite®](https://dp.tech/en/product/hermite) is a new-generation drug computing design platform which integrates artificial intelligence, physical modeling and high-performance computing to provide a one-stop computing solution for preclinical drug research and development. It integrates the features of Uni-Dock, along with virtual screening workflow for an efficient drug discovery process.
Uni-Dock is now available on the new-generation drug computing design platform [Hermite®](https://dp.tech/en/product/hermite) for ultralarge virtual screening.
For further cooperations on developing Uni-Dock and trying out Hermite®, please contact us at <[email protected]> .
## Ackowledgement
Expand Down
Binary file added unidock/assets/1.1_docking_box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unidock/assets/1.1_vs_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions unidock/src/cuda/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ void check(T result, char const *const func, const char *const file, int const l
MAX_M_DATA_MI *MAX_M_DATA_MJ *MAX_M_DATA_MK *MAX_NUM_OF_EVERY_M_DATA_ELEMENT

// kernel2 macros
#define MAX_NUM_OF_LIG_TORSION 36
#define MAX_NUM_OF_LIG_TORSION 48
#define MAX_NUM_OF_FLEX_TORSION 1
#define MAX_NUM_OF_RIGID 24
#define MAX_NUM_OF_ATOMS 120
#define MAX_NUM_OF_ATOMS 150
#define SIZE_OF_MOLEC_STRUC \
((3 + 4 + MAX_NUM_OF_LIG_TORSION + MAX_NUM_OF_FLEX_TORSION + 1) * sizeof(float))
#define SIZE_OF_CHANGE_STRUC \
Expand Down Expand Up @@ -204,10 +204,10 @@ static constexpr size_t MAX_THREAD_ = 41700000 ; // modified for vina1.2, to cal
static constexpr size_t MAX_LIGAND_NUM_ = 10250;
};
struct ExtraLargeConfig {
static constexpr size_t MAX_NUM_OF_LIG_TORSION_ = 36;
static constexpr size_t MAX_NUM_OF_LIG_TORSION_ = 48;
static constexpr size_t MAX_NUM_OF_FLEX_TORSION_ = 1;
static constexpr size_t MAX_NUM_OF_RIGID_ = 24;
static constexpr size_t MAX_NUM_OF_ATOMS_ = 120;
static constexpr size_t MAX_NUM_OF_RIGID_ = 48;
static constexpr size_t MAX_NUM_OF_ATOMS_ = 150;
static constexpr size_t SIZE_OF_MOLEC_STRUC_ =
((3 + 4 + MAX_NUM_OF_LIG_TORSION_ + MAX_NUM_OF_FLEX_TORSION_ + 1) * sizeof(float));
static constexpr size_t SIZE_OF_CHANGE_STRUC_ =
Expand Down Expand Up @@ -545,4 +545,4 @@ struct pot_cuda_t_{
float ptmp[Config::MAX_NUM_OF_RIGID_][3];
float p[Config::MAX_NUM_OF_RIGID_][3];
float o[Config::MAX_NUM_OF_RIGID_][3];
} ;
} ;
121 changes: 121 additions & 0 deletions unidock_tools/MCDOCK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Multi-Conformation Docking

## Introduction
Traditional molecular docking methods typically involve positioning the ligand molecule within the binding pocket of the target protein and then sampling its rotations, translations, and torsions of rotatable bonds to identify the optimal binding pose.
However, due to computational resource constraints and the vast search space resulting from 3D continuity, these methods often assess only a subset of possible conformational combinations.
Consequently, this can lead to suboptimal docking results in some protein-ligand complex systems.

***Multi-Conformation Docking (mcdock)*** addresses this limitation by advancing the conformational search process into the molecule preparation phase, thereby artificially ensuring a more comprehensive coverage of the search space in an attempt to enhance the reliability of molecular docking.
It consists of three steps: optional ***Conformation Generation***, ***Rigid Docking***, and ***Local Refinement***.

***Advantages of MultiConfDock***

1. **Comprehensive Conformation Generation**: `confgen` can rapidly generate a diverse array of low-energy conformations, ensuring that the search space encompasses as many ligand conformations as possible, increasing the likelihood of identifying suitable binding poses.

2. **Efficient Rigid Docking**: The method is capable of swiftly evaluating a vast number of ligand conformations for their relative positions and orientations within the protein's binding pocket, ensuring a thorough coverage of the search space for each ligand conformation.

3. **Refined Local Refinement**: MultiConfDock allows for minor local movements of the ligand to fine-tune the docking pose, ensuring that each binding pose is at a locally optimized structure.

This workflow is not only efficient but also powerful in predicting the optimal protein-ligand binding complexes.

## Description
***Conformation Generation***: This is the optional zeroth step in the MultiConfDock process. In this phase, MultiConfDock generates multiple conformations of the ligand. This is achieved using a conformation generation algorithm known as ConfGen. ConfGen employs `CDPKit` that can efficiently generate a large number of ligand conformations. This step is optional, and if the user already has the conformations of the ligand, he can skip this step.

***Rigid Docking***: The first step in the process is RigidDock. In this phase, MultiConfDock performs a rigid docking of each ligand conformation against the target protein. This means that the ligand and the protein are treated as rigid bodies, and only their relative positions and orientations change. This step is computationally efficient and allows MultiConfDock to quickly evaluate a large number of ligand conformations.

***Local Refinement***: After the RigidDock phase, MultiConfDock proceeds to the LocalRefine step. In this phase, the top scoring conformations from the RigidDock step are selected, and a local refinement is performed. This involves allowing small, local movements of the ligand and the protein to fine-tune the docking pose. This step is more computationally intensive, but it is applied only to a subset of the initial conformations, making the process efficient.

By combining these steps, MultiConfDock can efficiently identify the optimal protein-ligand binding complexes. This makes it a powerful tool for researchers in the field of drug design.

## Installation

### 1. Install from Source

To use mcdock, you need to install the following dependencies:

- [Uni-Dock Tools Dependencies](./README.md#dependency)
- [CDPKit](https://github.com/molinfo-vienna/CDPKit) or [OpenBabel](https://github.com/openbabel/openbabel)

Once you have installed the dependencies, install Uni-Dock Tools by

`pip install .`

Then, you can run mcdock by the following command:

`unidocktools mcdock <arguments>...`

### 2. Use by Docker
We also provide docker image to run MultiConfDock

1. **Pull from DockerHub**: You can pull the docker image from docker hub using the following command:

```shellscript
docker pull dptechnology/unidock_tools
```
3. **Run mcdock by docker image**:
```shellscript
docker run --gpus 0 -it -v $(pwd):/workspace dptechnology:unidock_tools cd /workspace && unidocktools mcdock <arguments>...
```
## Usage
Once you have MultiConfDock installed, you can use it to perform multi-conformation ligand docking. Here's a basic example of how to use MultiConfDock:
unidocktools mcdock -r <pro.pdb> -l <lig1.sdf,lig2.sdf> -sd savedir -cx <center_x> -cy <center_y> -cz <center_z> --gen_conf
## Parameters
MultiConfDock is controlled via several command-line parameters.
```shell
mcdock --help
```
Here's a brief overview:

### Required Arguments

- `-r, --receptor`: Path to the receptor file in PDBQT format.
- `-l, --ligands`: Path to the ligand file in SDF format. For multiple files, separate them by commas.
- `-i, --ligand_index`: A text file containing the path of ligand files in sdf format.

### ConfGen Arguments
- `-g, --gen_conf`: Whether to generate conformers for the ligands (default: False).
- `-n, --max_num_confs_per_ligand`: Maximum number of conformers to generate for each ligand (default: 1000).
- `-m, --min_rmsd`: Minimum RMSD for output conformer selection (default: 0.5000, must be >= 0, 0 disables RMSD checking).

### Docking Box Parameters

- `-cx, --center_x`: X-coordinate of the docking box center.
- `-cy, --center_y`: Y-coordinate of the docking box center.
- `-cz, --center_z`: Z-coordinate of the docking box center.
- `-sx, --size_x`: Width of the docking box in the X direction (default: 22.5).
- `-sy, --size_y`: Width of the docking box in the Y direction (default: 22.5).
- `-sz, --size_z`: Width of the docking box in the Z direction (default: 22.5).

### Directory

- `-wd, --workdir`: Working directory (default: 'MultiConfDock').
- `-sd, --savedir`: Save directory (default: 'MultiConfDock-Result').
- `-bs, --batch_size`: Batch size for mcdock (default: 20).

### Rigid Docking Parameters

- `-sf_rd, --scoring_function_rigid_docking`: Scoring function used in rigid docking (default: 'vina').
- `-ex_rd, --exhaustiveness_rigid_docking`: exhaustiveness used in rigid docking (default: 128).
- `-ms_rd, --max_step_rigid_docking`: maxstep used in rigid docking (default: 20)
- `-nm_rd, --num_modes_rigid_docking`: Number of modes used in rigid docking (default: 3).
- `-rs_rd, --refine_step_rigid_docking`: Refine step used in rigid docking (default: 3).
- `-topn_rd, --topn_rigid_docking`: Top N results used in rigid docking (default: 100).

### Local Refine Parameters

- `-sf_lr, --scoring_function_local_refine`: Scoring function used in local refine (default: 'vina').
- `-ex_lr, --exhaustiveness_local_refine`: exhaustiveness used in local refine (default: 32)
- `-ms_lr, --max_step_local_refine`: maxstep used in local refine (default: 40)
- `-nm_lr, --num_modes_local_refine`: Number of modes used in local refine (default: 1).
- `-rs_lr, --refine_step_local_refine`: Refine step used in local refine (default: 5).
- `-topn_lr, --topn_local_refine`: Top N results used in local refine (default: 1).

These parameters allow you to control the behavior of MultiConfDock and customize it to suit your specific needs.
Loading

0 comments on commit fabab04

Please sign in to comment.