{"id":13958611,"url":"https://github.com/DeepRank/deeprank","last_synced_at":"2025-07-21T00:31:30.393Z","repository":{"id":25137016,"uuid":"103272485","full_name":"DeepRank/deeprank","owner":"DeepRank","description":"This repository has been integrated in https://github.com/DeepRank/deeprank2","archived":true,"fork":false,"pushed_at":"2023-11-28T19:28:50.000Z","size":110563,"stargazers_count":145,"open_issues_count":74,"forks_count":25,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-27T15:55:33.958Z","etag":null,"topics":["3d-cnn","docking","protein-protein-interaction","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeepRank.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-12T13:13:44.000Z","updated_at":"2025-05-27T05:57:22.000Z","dependencies_parsed_at":"2023-11-28T20:41:23.754Z","dependency_job_id":null,"html_url":"https://github.com/DeepRank/deeprank","commit_stats":{"total_commits":1022,"total_committers":16,"mean_commits":63.875,"dds":0.5489236790606653,"last_synced_commit":"6bc8d7e4893fc06f952d6e2b1edfc4e1c19bc671"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/DeepRank/deeprank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepRank%2Fdeeprank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepRank%2Fdeeprank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepRank%2Fdeeprank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepRank%2Fdeeprank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepRank","download_url":"https://codeload.github.com/DeepRank/deeprank/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepRank%2Fdeeprank/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266221269,"owners_count":23894966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-cnn","docking","protein-protein-interaction","pytorch"],"created_at":"2024-08-08T13:01:46.387Z","updated_at":"2025-07-21T00:31:25.383Z","avatar_url":"https://github.com/DeepRank.png","language":"Python","readme":"# :warning: Archiving Note\n\nThis repository is no longer being maintained and has been archived for historical purposes. \n\nWe have now developed [DeepRank2](https://github.com/DeepRank/deeprank2), an improved and unified version of DeepRank, [DeepRank-GNN](https://github.com/DeepRank/Deeprank-GNN), and [DeepRank-Mut](https://github.com/DeepRank/DeepRank-Mut).\n\n:sparkles: DeepRank2 allows for transformation and storage of 3D representations of both protein-protein interfaces (PPIs) and protein single-residue variants (SRVs) into either graphs or volumetric grids containing structural and physico-chemical information. These can be used for training neural networks for a variety of patterns of interest, using either our pre-implemented training pipeline for graph neural networks (GNNs) or convolutional neural networks (CNNs) or external pipelines.\n\n- :wrench: **Pull Requests** at [github.com/DeepRank/deeprank2/pulls](https://github.com/DeepRank/deeprank2/pulls)\n- :bug: **Bugs**: Reports of bugs can be filed agains our new repo [github.com/DeepRank/deeprank2/issues](https://github.com/DeepRank/deeprank2/issues)\n- :star: **Feature Requests**: Add your request or discuss the project w/ the community at [github.com/DeepRank/deeprank2/issues](https://github.com/DeepRank/deeprank2/issues)\n\nWe look forward to seeing you in our new space - [DeepRank2](https://github.com/DeepRank/deeprank2)!\n\n# DeepRank\n[![PyPI](https://img.shields.io/pypi/v/deeprank)](https://pypi.org/project/deeprank/)\n[![Documentation Status](https://readthedocs.org/projects/deeprank/badge/?version=latest)](http://deeprank.readthedocs.io/?badge=latest)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3735042.svg)](https://doi.org/10.5281/zenodo.3735042)\n![Build](https://github.com/DeepRank/deeprank/workflows/Build/badge.svg)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4254dd4798bf4cfa9f8f6fe0079de144)](https://www.codacy.com/gh/DeepRank/deeprank/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=DeepRank/deeprank\u0026amp;utm_campaign=Badge_Grade)\n[![Coverage Status](https://coveralls.io/repos/github/DeepRank/deeprank/badge.svg?branch=master)](https://coveralls.io/github/DeepRank/deeprank?branch=master)\n\n\n### Contents\n\n- [Overview](#overview)\n- [Installation](#installation)\n- [Quick Tutorial](#Tutorial)\n- [Documentation](https://deeprank.readthedocs.io/)\n- [License](./LICENSE)\n- [Issues \u0026 Contributing](#Issues-and-Contributing)\n\n## Overview\n![alt-text](./pics/deeprank.png)\n\nDeepRank is a general, configurable deep learning framework for data mining protein-protein interactions (PPIs) using 3D convolutional neural networks (CNNs).\n\nDeepRank contains useful APIs for pre-processing PPIs data, computing features and targets, as well as training and testing CNN models.\n\n#### Features:\n\n- Predefined atom-level and residue-level PPI feature types\n   - *e.g. atomic density, vdw energy, residue contacts, PSSM, etc.*\n- Predefined target types\n   - *e.g. binary class, CAPRI categories, DockQ, RMSD, FNAT, etc.*\n- Flexible definition of both new features and targets\n- 3D grid feature mapping\n- Efficient data storage in HDF5 format\n- Support both classification and regression (based on PyTorch)\n\n## Installation\n\nDeepRank requires a Python version 3.7 or 3.8 on Linux and MacOS.\nMake sure that mpi4py is installed in your environment before installing deeprank: `conda install mpi4py`\n\n#### Stable Release\n\nDeepRank is available in stable releases on [PyPI](https://pypi.org/project/deeprank/):\n-  Install the module `pip install deeprank`\n\n#### Development Version\n\nYou can also install the under development source code from the branch `development`\n\n- Clone the repository `git clone --branch development https://github.com/DeepRank/deeprank.git`\n- Go there             `cd deeprank`\n- Install the package  `pip install -e ./`\n\nTo check if installation is successful, you can run a test\n- Go into the test directory `cd test`\n- Run the test suite         `pytest`\n\n\n## Tutorial\n\nWe give here the tutorial like introduction to the DeepRank machinery. More informatoin can be found in the documentation \u003chttp://deeprank.readthedocs.io/en/latest/\u003e.  We quickly illsutrate here the two main steps of Deeprank:\n\n-   the generation of the data\n-   running deep leaning experiments.\n\n### A . Generate the data set (using MPI)\n\nThe generation of the data require only require PDBs files of decoys and their native and the PSSM if needed. All the features/targets and mapped features onto grid points will be auomatically calculated and store in a HDF5 file.\n\n```python\nfrom deeprank.generate import *\nfrom mpi4py import MPI\n\ncomm = MPI.COMM_WORLD\n\n# let's put this sample script in the test folder, so the working path will be deeprank/test/\n# name of the hdf5 to generate\nh5file = './hdf5/1ak4.hdf5'\n\n# for each hdf5 file where to find the pdbs\npdb_source = ['./1AK4/decoys/']\n\n\n# where to find the native conformations\n# pdb_native is only used to calculate i-RMSD, dockQ and so on.\n# The native pdb files will not be saved in the hdf5 file\npdb_native = ['./1AK4/native/']\n\n\n# where to find the pssm\npssm_source = './1AK4/pssm_new/'\n\n\n# initialize the database\ndatabase = DataGenerator(\n    chain1='C', chain2='D',\n    pdb_source=pdb_source,\n    pdb_native=pdb_native,\n    pssm_source=pssm_source,\n    data_augmentation=0,\n    compute_targets=[\n        'deeprank.targets.dockQ',\n        'deeprank.targets.binary_class'],\n    compute_features=[\n        'deeprank.features.AtomicFeature',\n        'deeprank.features.FullPSSM',\n        'deeprank.features.PSSM_IC',\n        'deeprank.features.BSA',\n        'deeprank.features.ResidueDensity'],\n    hdf5=h5file,\n    mpi_comm=comm)\n\n\n# create the database\n# compute features/targets for all complexes\ndatabase.create_database(prog_bar=True)\n\n\n# define the 3D grid\n grid_info = {\n   'number_of_points': [30,30,30],\n   'resolution': [1.,1.,1.],\n   'atomic_densities': {'C': 1.7, 'N': 1.55, 'O': 1.52, 'S': 1.8},\n }\n\n# Map the features\ndatabase.map_features(grid_info,try_sparse=True, time=False, prog_bar=True)\n\n```\n\nThis script can be exectuted using for example 4 MPI processes with the command:\n\n```\n    NP=4\n    mpiexec -n $NP python generate.py\n```\n\nIn  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_.\n\nWe then initialize the `DataGenerator` object. This object (defined in `deeprank/generate/DataGenerator.py`) needs a few input parameters:\n\n-   pdb_source: where to find the pdb to include in the dataset\n-   pdb_native: where to find the corresponding native conformations\n-   compute_targets: list of modules used to compute the targets\n-   compute_features: list of modules used to compute the features\n-   hdf5: Name of the HDF5 file to store the data set\n\nWe 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.\n\n-   number_of_points: the number of points in each direction\n-   resolution: the resolution in Angs\n-   atomic_densities: {'atom_name': vvdw_radius} the atomic densities required\n\nThe 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)\n\n#### Visualization of the mapped features\n\nTo explore the HDf5 file and vizualize the features you can use the dedicated browser \u003chttps://github.com/DeepRank/DeepXplorer\u003e. 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 ....\n\n### B . Deep Learning\n\nThe 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.\n\n```python\nfrom deeprank.learn import *\nfrom deeprank.learn.model3d import cnn_reg\nimport torch.optim as optim\nimport numpy as np\n\n# input database\ndatabase = '1ak4.hdf5'\n\n# output directory\nout = './my_DL_test/'\n\n# declare the dataset instance\ndata_set = DataSet(database,\n            chain1='C',\n            chain2='D',\n            grid_info={\n                'number_of_points': (10, 10, 10),\n                'resolution': (3, 3, 3)},\n            select_feature={\n                'AtomicDensities': {'C': 1.7, 'N': 1.55, 'O': 1.52, 'S': 1.8},\n                'Features': ['coulomb', 'vdwaals', 'charge', 'PSSM_*']},\n            select_target='DOCKQ',\n            normalize_features = True, normalize_targets=True,\n            pair_chain_feature=np.add,\n            dict_filter={'DOCKQ':'\u003c1'})\n\n\n# create the network\nmodel = NeuralNet(data_set,cnn_reg,model_type='3d',task='reg',\n                  cuda=False,plot=True,outdir=out)\n\n# change the optimizer (optional)\nmodel.optimizer = optim.SGD(model.net.parameters(),\n                            lr=0.001,\n                            momentum=0.9,\n                            weight_decay=0.005)\n\n# start the training\nmodel.train(nepoch = 50,divide_trainset=0.8, train_batch_size = 5,num_workers=0)\n```\n\nIn 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 ...\n\nWe 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 !\n\n## Issues and Contributing\n\nIf you have questions or find a bug, please report the issue in the [Github issue channel](https://github.com/DeepRank/deeprank/issues).\n\nIf you want to change or further develop DeepRank code, please check the [Developer Guideline](./developer_guideline.md) to see how to conduct further development.\n","funding_links":[],"categories":["药物-靶标 药物-药物 化合物-蛋白质 相互作用"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeepRank%2Fdeeprank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDeepRank%2Fdeeprank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeepRank%2Fdeeprank/lists"}