Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
format README.md by remark
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Oct 30, 2019
1 parent ef6e63e commit 6980f48
Showing 1 changed file with 24 additions and 31 deletions.
55 changes: 24 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
**Deep Learning for ranking protein-protein conformations**

[![Build Status](https://secure.travis-ci.org/DeepRank/deeprank.svg?branch=master)](https://travis-ci.org/DeepRank/deeprank)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9252e59633cf46a7ada0c3c614c175ea)](https://www.codacy.com/app/NicoRenaud/deeprank?utm_source=github.com&utm_medium=referral&utm_content=DeepRank/deeprank&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9252e59633cf46a7ada0c3c614c175ea)](https://www.codacy.com/app/NicoRenaud/deeprank?utm_source=github.com&utm_medium=referral&utm_content=DeepRank/deeprank&utm_campaign=Badge_Grade)
[![Documentation Status](https://readthedocs.org/projects/deeprank/badge/?version=latest)](http://deeprank.readthedocs.io/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/DeepRank/deeprank/badge.svg?branch=master)](https://coveralls.io/github/DeepRank/deeprank?branch=master)

The documentation of the module can be found on readthedocs :
http://deeprank.readthedocs.io/en/latest/
<http://deeprank.readthedocs.io/en/latest/>

![alt-text](./pics/deeprank.png)

## 1 . Installation

Minimal information to install the module

* clone the repository `git clone https://github.com/DeepRank/deeprank.git`
* go there `cd deeprank`
* install the module `pip install -e ./`
* install freesasa `https://github.com/freesasa/freesasa-python`
* go int the test dir `cd test`
* run the test suite `pytest`

- clone the repository `git clone https://github.com/DeepRank/deeprank.git`
- go there `cd deeprank`
- install the module `pip install -e ./`
- install freesasa `https://github.com/freesasa/freesasa-python`
- go int the test dir `cd test`
- run the test suite `pytest`

## 2 . Tutorial

We give here the tutorial like introduction to the DeepRank machinery. More informatoin can be found in the documentation http://deeprank.readthedocs.io/en/latest/. We quickly illsutrate here the two main steps of Deeprank :
* the generation of the data
* running deep leaning experiments.
We give here the tutorial like introduction to the DeepRank machinery. More informatoin can be found in the documentation <http://deeprank.readthedocs.io/en/latest/>. We quickly illsutrate here the two main steps of Deeprank :

- the generation of the data
- running deep leaning experiments.

### A . Generate the data set (using MPI)

Expand Down Expand Up @@ -79,40 +79,35 @@ grid_info = {

This script can be exectuted using for example 4 MPI processes with the command:

```
NP=4
mpiexec -n $NP python generate.py
```

NP=4
mpiexec -n $NP python generate.py

In the first part of the script we define the path where to find the PDBs of the decoys and natives that we want to have in the dataset. All the .pdb files present in *pdb_source* will be used in the dataset. We need to specify where to find the native conformations to be able to compute RMSD and the dockQ score. For each pdb file detected in *pdb_source*, the code will try to find a native conformation in *pdb_native*.
In the first part of the script we define the path where to find the PDBs of the decoys and natives that we want to have in the dataset. All the .pdb files present in _pdb_source_ will be used in the dataset. We need to specify where to find the native conformations to be able to compute RMSD and the dockQ score. For each pdb file detected in _pdb_source_, the code will try to find a native conformation in _pdb_native_.

We then initialize the `DataGenerator` object. This object (defined in `deeprank/generate/DataGenerator.py`) needs a few input parameters:

* pdb_source : where to find the pdb to include in the dataset
* pdb_native : where to find the corresponding native conformations
* compute_targets : list of modules used to compute the targets
* compute_features : list of modules used to compute the features
* hdf5 : Name of the HDF5 file to store the data set
- pdb_source : where to find the pdb to include in the dataset
- pdb_native : where to find the corresponding native conformations
- compute_targets : list of modules used to compute the targets
- compute_features : list of modules used to compute the features
- hdf5 : Name of the HDF5 file to store the data set

We then create the data base with the command `database.create_database()`. This function autmatically create an HDF5 files where each pdb has its own group. In each group we can find the pdb of the complex and its native form, the calculated features and the calculated targets. We can now mapped the features to a grid. This is done via the command `database.map_features()`. As you can see this method requires a dictionary as input. The dictionary contains the instruction to map the data.

* number_of_points: the number of points in each direction
* resolution : the resolution in Angs
* atomic_densities : {'atom_name' : vvdw_radius} the atomic densities required
- number_of_points: the number of points in each direction
- resolution : the resolution in Angs
- atomic_densities : {'atom_name' : vvdw_radius} the atomic densities required

The atomic densities are mapped following the [protein-ligand paper](https://arxiv.org/abs/1612.02751). The other features are mapped to the grid points using a Gaussian function (other modes are possible but somehow hard coded)

#### Visualization of the mapped features

To explore the HDf5 file and vizualize the features you can use the dedicated browser https://github.com/DeepRank/DeepXplorer. This tool saloows to dig through the hdf5 file and to directly generate the files required to vizualie the features in VMD or PyMol. An iPython comsole is also embedded to analyze the feature values, plot them etc ....

To explore the HDf5 file and vizualize the features you can use the dedicated browser <https://github.com/DeepRank/DeepXplorer>. This tool saloows to dig through the hdf5 file and to directly generate the files required to vizualie the features in VMD or PyMol. An iPython comsole is also embedded to analyze the feature values, plot them etc ....

### B . Deep Learning

The HDF5 files generated above can be used as input for deep learning experiments. You can take a look at the file `test/test_learn.py` for some examples. We give here a quick overview of the process.


```python
from deeprank.learn import *
from deeprank.learn.model3d import cnn as cnn3d
Expand Down Expand Up @@ -146,8 +141,6 @@ model.optimizer = optim.SGD(model.net.parameters(),
model.train(nepoch = 50,divide_trainset=0.8, train_batch_size = 5,num_workers=0)
```



In the first part of the script we create a Torch database from the HDF5 file. We can specify one or several HDF5 files and even select some conformations using the `dict_filter` argument. Other options of `DataSet` can be used to specify the features/targets the normalization, etc ...

We then create a `NeuralNet` instance that takes the dataset as input argument. Several options are available to specify the task to do, the GPU use, etc ... We then have simply to train the model. Simple !

0 comments on commit 6980f48

Please sign in to comment.