gnina-torch

🔥 PyTorch implementation of GNINA scoring function for molecular docking

https://github.com/rmeli/gnina-torch

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • ✓
    CITATION.cff file
    Found CITATION.cff file
  • ✓
    codemeta.json file
    Found codemeta.json file
  • ✓
    .zenodo.json file
    Found .zenodo.json file
  • ✓
    DOI references
    Found 12 DOI reference(s) in README
  • ✓
    Academic publication links
    Links to: acs.org, zenodo.org
  • ✓
    Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • â—‹
    Institutional organization owner
  • â—‹
    JOSS paper metadata
  • â—‹
    Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

deep-learning docking drug-discovery gnina pytorch pytorch-ignite scoring-functions
Last synced: 6 months ago · JSON representation ·

Repository

🔥 PyTorch implementation of GNINA scoring function for molecular docking

Basic Info
Statistics
  • Stars: 61
  • Watchers: 3
  • Forks: 6
  • Open Issues: 2
  • Releases: 2
Topics
deep-learning docking drug-discovery gnina pytorch pytorch-ignite scoring-functions
Created over 4 years ago · Last pushed 12 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

gnina-torch

GitHub Actions Build Status codecov

Documentation Status DOI

PyTorch implementation of GNINA scoring function.

[!tip] GNINA version 1.3 changed the deep learning backend from Caffe to PyTorch. Therefore, PyTorch models are now nativaly supported by GNINA. The GNINA README.md explains how to obtain a GNINA-usable model from a PyTorch model. The advantage of having your model available to GNINA is that it can be used in the docking pipeline.

References

``` @article{ McNutt2025, author={McNutt, Andrew T. and Li, Yanjing and Meli, Rocco and Aggarwal, Rishal and Koes, David Ryan}, title={GNINA 1.3: the next increment in molecular docking with deep learning}, journal={Journal of Cheminformatics}, year={2025}, volume={17}, number={1}, pages={28}, issn={1758-2946}, doi={10.1186/s13321-025-00973-x}, }

@software{ gninatorch_2022, author = {Meli, Rocco and McNutt, Andrew}, doi = {10.5281/zenodo.6943066}, month = {7}, title = {{gninatorch}}, url = {https://github.com/RMeli/gnina-torch}, version = {0.0.2}, year = {2022} } ```

If you are using gnina-torch, please consider citing the following references:

Protein-Ligand Scoring with Convolutional Neural Networks, M. Ragoza, J. Hochuli, E. Idrobo, J. Sunseri, and D. R. Koes, J. Chem. Inf. Model. 2017, 57 (4), 942-957. DOI: 10.1021/acs.jcim.6b00740

libmolgrid: Graphics Processing Unit Accelerated Molecular Gridding for Deep Learning Applications J. Sunseri and D. R. Koes, J. Chem. Inf. Model. 2020, 60 (3), 1079-1084. DOI: 10.1021/acs.jcim.9b01145

If you are using the pre-trained default2018 and dense models from GNINA, please consider citing the following reference as well:

Three-Dimensional Convolutional Neural Networks and a Cross-Docked Data Set for Structure-Based Drug Design, P. G. Francoeur, T. Masuda, J. Sunseri, A. Jia, R. B. Iovanisci, I. Snyder, and D. R. Koes, J. Chem. Inf. Model. 2020, 60 (9), 4200-4215. DOI: 10.1021/acs.jcim.0c00411

If you are using the pre-trained default model ensemble from GNINA, please consider citing the following reference as well:

GNINA 1.0: molecular docking with deep learning, A. T. McNutt, P. Francoeur, R. Aggarwal, T. Masuda, R. Meli, M. Ragoza, J. Sunseri, D. R. Koes, J. Cheminform. 2021, 13 (43). DOI: 10.1186/s13321-021-00522-2

Installation

The gninatorch Python package has several dependencies, including:

A full developement environment can be installed using the conda package manager and the provided conda environment file (devtools/conda-envs/gninatorch.yaml):

bash conda env create -f devtools/conda-envs/gninatorch.yaml conda activate gninatorch

Once the conda environment is created and activated, the gninatorch package can be installed using pip as follows:

bash python -m pip install .

Tests

In order to check the installation, unit tests are provided and can be run with pytest:

bash pytest --cov=gninatorch

Usage

Training and inference modules try to follow the original Caffe implementation of gnina/scripts, however not all features are implemented.

The folder examples includes some complete examples for training and inference.

The folder gninatorch/weights contains pre-trained models from GNINA, converted from Caffe to PyTorch.

Pre-trained GNINA models

Pre-trained GNINA models can be loaded as follows:

```python from gninatorch.gnina import setupgninamodel

model = setupgninamodel(MODEL) `` whereMODELcorresponds to the--cnn` argument in GNINA.

A single model will return log_CNNscore and CNNaffinity, while an ensemble of models will return log_CNNscore, CNNaffinity, and CNNvariance.

Inference with pre-trained GNINA models (--cnn argument in GNINA) is implemented in the gnina module:

bash python -m gninatorch.gnina --help

Training

Training is implemented in the training module:

bash python -m gninatorch.training --help

Inference

Inference is implemented in the inference module:

bash python -m gninatorch.inference --help

Acknowledgments

Project based on the Computational Molecular Science Python Cookiecutter version 1.6.

The pre-trained weights of GNINA converted to PyTorch were kindly provided by Andrew McNutt (@drewnutt).


Copyright (c) 2021-2022, Rocco Meli

Owner

  • Name: Rocco Meli
  • Login: RMeli
  • Kind: user
  • Location: Zurich, Switzerland
  • Company: @eth-cscs

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Meli"
  given-names: "Rocco"
  orcid: "https://orcid.org/0000-0002-2845-3410"
- family-names: "McNutt"
  given-names: "Andrew"
  orcid: "https://orcid.org/0000-0001-6497-6019"
title: "gninatorch"
version: 0.0.1
doi: 10.5281/zenodo.6943066
date-released: 2022-07-29
url: "https://github.com/RMeli/gnina-torch"

GitHub Events

Total
  • Issues event: 2
  • Watch event: 13
  • Delete event: 2
  • Issue comment event: 13
  • Push event: 33
  • Pull request review event: 1
  • Pull request event: 9
  • Fork event: 3
  • Create event: 2
Last Year
  • Issues event: 2
  • Watch event: 13
  • Delete event: 2
  • Issue comment event: 13
  • Push event: 33
  • Pull request review event: 1
  • Pull request event: 9
  • Fork event: 3
  • Create event: 2

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 231
  • Total Committers: 3
  • Avg Commits per committer: 77.0
  • Development Distribution Score (DDS): 0.013
Past Year
  • Commits: 25
  • Committers: 2
  • Avg Commits per committer: 12.5
  • Development Distribution Score (DDS): 0.04
Top Committers
Name Email Commits
Rocco Meli r****i@b****k 228
Andrew McNutt 3****t 2
Kirill Shmilovich k****v@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 20
  • Total pull requests: 36
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 6 days
  • Total issue authors: 10
  • Total pull request authors: 3
  • Average comments per issue: 1.5
  • Average comments per pull request: 1.44
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: about 11 hours
  • Average time to close pull requests: 18 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 5.0
  • Average comments per pull request: 2.75
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • RMeli (11)
  • liuyq123 (1)
  • kjogr12 (1)
  • mattragoza (1)
  • Kerro-junior (1)
  • SanFran-Me (1)
  • MachineGUN001 (1)
  • KirillShmilovich (1)
  • RJ-Li (1)
  • kirillshmilovich-insitro (1)
Pull Request Authors
  • RMeli (36)
  • drewnutt (2)
  • KirillShmilovich (2)
Top Labels
Issue Labels
enhancement (10) problem (7) question (4) bug (2) documentation (2)
Pull Request Labels
enhancement (25) problem (7) CI (6) bug (3) refactoring (2) documentation (2)

Dependencies

.github/workflows/CI.yaml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v1 composite
  • conda-incubator/setup-miniconda v2.1.1 composite
.github/workflows/deploy.yaml actions
  • actions/checkout v3 composite
  • pypa/gh-action-pypi-publish v1.5.0 composite
gninatorch/setup.py pypi
setup.py pypi
  • molgrid *
  • numpy *
  • torch *