{"id":17306605,"url":"https://github.com/rmeli/gnina-torch","last_synced_at":"2025-10-17T13:00:37.301Z","repository":{"id":38084799,"uuid":"419005477","full_name":"RMeli/gnina-torch","owner":"RMeli","description":"🔥 PyTorch implementation of GNINA scoring function for molecular docking","archived":false,"fork":false,"pushed_at":"2025-03-06T12:42:41.000Z","size":34272,"stargazers_count":61,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T09:24:09.759Z","etag":null,"topics":["deep-learning","docking","drug-discovery","gnina","pytorch","pytorch-ignite","scoring-functions"],"latest_commit_sha":null,"homepage":"https://gnina-torch.rtfd.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RMeli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-19T16:28:50.000Z","updated_at":"2025-03-06T12:42:44.000Z","dependencies_parsed_at":"2024-11-15T07:14:45.706Z","dependency_job_id":null,"html_url":"https://github.com/RMeli/gnina-torch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMeli%2Fgnina-torch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMeli%2Fgnina-torch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMeli%2Fgnina-torch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RMeli%2Fgnina-torch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RMeli","download_url":"https://codeload.github.com/RMeli/gnina-torch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773721,"owners_count":20993639,"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":["deep-learning","docking","drug-discovery","gnina","pytorch","pytorch-ignite","scoring-functions"],"created_at":"2024-10-15T11:58:51.247Z","updated_at":"2025-10-17T13:00:32.256Z","avatar_url":"https://github.com/RMeli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gnina-torch\n\n[//]: # (Badges)\n[![GitHub Actions Build Status](https://github.com/RMeli/gnina-torch/workflows/CI/badge.svg)](https://github.com/RMeli/gnina-torch/actions?query=workflow%3ACI)\n[![codecov](https://codecov.io/gh/RMeli/gnina-torch/branch/main/graph/badge.svg?token=KjVkShwQ1z)](https://codecov.io/gh/RMeli/gnina-torch)\n\n[![Documentation Status](https://readthedocs.org/projects/gnina-torch/badge/?version=latest)](https://gnina-torch.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://zenodo.org/badge/419005477.svg)](https://zenodo.org/badge/latestdoi/419005477)\n\nPyTorch implementation of [GNINA](https://github.com/gnina/gnina) scoring function.\n\n\u003e [!tip]\n\u003e [GNINA version `1.3`](https://github.com/gnina/gnina/releases/tag/v1.3) changed the deep learning backend from Caffe to PyTorch. Therefore, PyTorch models are now nativaly supported by [GNINA](https://github.com/gnina/gnina). The [GNINA `README.md`](https://github.com/gnina/gnina/tree/2eb9c411e10ac891ee179e0161149035fae84c57?tab=readme-ov-file#training) 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.\n\n## References\n\n```\n@article{\n  McNutt2025,\n  author={McNutt, Andrew T.\n          and Li, Yanjing\n          and Meli, Rocco\n          and Aggarwal, Rishal\n          and Koes, David Ryan},\n  title={GNINA 1.3: the next increment in molecular docking with deep learning},\n  journal={Journal of Cheminformatics},\n  year={2025},\n  volume={17},\n  number={1},\n  pages={28},\n  issn={1758-2946},\n  doi={10.1186/s13321-025-00973-x},\n}\n\n@software{\n  gninatorch_2022,\n  author = {Meli, Rocco and McNutt, Andrew},\n  doi = {10.5281/zenodo.6943066},\n  month = {7},\n  title = {{gninatorch}},\n  url = {https://github.com/RMeli/gnina-torch},\n  version = {0.0.2},\n  year = {2022}\n}\n```\n\nIf you are using `gnina-torch`, please consider citing the following references:\n\n\u003e Protein-Ligand Scoring with Convolutional Neural Networks,\n\u003e M. Ragoza, J. Hochuli, E. Idrobo, J. Sunseri, and D. R. Koes, *J. Chem. Inf. Model.* 2017, 57 (4), 942-957.\n\u003e DOI: [10.1021/acs.jcim.6b00740](https://pubs.acs.org/doi/full/10.1021/acs.jcim.6b00740)\n\n\u003e libmolgrid: Graphics Processing Unit Accelerated Molecular Gridding for Deep Learning Applications\n\u003e J. Sunseri and D. R. Koes, *J. Chem. Inf. Model.* 2020, 60 (3), 1079-1084.\n\u003e DOI: [10.1021/acs.jcim.9b01145](https://pubs.acs.org/doi/10.1021/acs.jcim.9b01145)\n\nIf you are using the pre-trained `default2018` and `dense` models from [GNINA](https://github.com/gnina/gnina), please consider citing the following reference as well:\n\n\u003e Three-Dimensional Convolutional Neural Networks and a Cross-Docked Data Set for Structure-Based Drug Design,\n\u003e 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.\n\u003e DOI: [10.1021/acs.jcim.0c00411](https://doi.org/10.1021/acs.jcim.0c0041)\n\nIf you are using the pre-trained `default` model ensemble from [GNINA](https://github.com/gnina/gnina), please consider citing the following reference as well:\n\n\u003e GNINA 1.0: molecular docking with deep learning,\n\u003e A. T. McNutt, P. Francoeur, R. Aggarwal, T. Masuda, R. Meli, M. Ragoza, J. Sunseri, D. R. Koes,\n\u003e *J. Cheminform.* 2021, 13 (43).\n\u003e DOI: [10.1186/s13321-021-00522-2](https://doi.org/10.1186/s13321-021-00522-2)\n\n## Installation\n\nThe `gninatorch` Python package has several dependencies, including:\n\n* [PyTorch](https://pytorch.org/)\n* [PyTorch-Ignite](https://pytorch.org/ignite/)\n* [libmolgrid](https://gnina.github.io/libmolgrid/)\n\nA full developement environment can be installed using the [conda](https://docs.conda.io/en/latest/) package manager and the provided [conda](https://docs.conda.io/en/latest/) environment file (`devtools/conda-envs/gninatorch.yaml`):\n\n```bash\nconda env create -f devtools/conda-envs/gninatorch.yaml\nconda activate gninatorch\n```\n\nOnce the [conda](https://docs.conda.io/en/latest/) environment is created and activated, the `gninatorch` package can be installed using [pip](https://pip.pypa.io/en/stable/) as follows:\n\n```bash\npython -m pip install .\n```\n\n### Tests\n\nIn order to check the installation, unit tests are provided and can be run with [pytest](https://docs.pytest.org/):\n\n```bash\npytest --cov=gninatorch\n```\n\n## Usage\n\nTraining and inference modules try to follow the original [Caffe](https://caffe.berkeleyvision.org/) implementation of [gnina/scripts](https://github.com/gnina/scripts), however not all features are implemented.\n\nThe folder `examples` includes some complete examples for training and inference.\n\nThe folder `gninatorch/weights` contains pre-trained models from [GNINA](https://github.com/gnina/gnina), converted from Caffe to PyTorch.\n\n### Pre-trained GNINA models\n\nPre-trained GNINA models can be loaded as follows:\n\n```python\nfrom gninatorch.gnina import setup_gnina_model\n\nmodel = setup_gnina_model(MODEL)\n```\nwhere `MODEL` corresponds to the `--cnn` argument in [GNINA](https://github.com/gnina/gnina).\n\nA single model will return `log_CNNscore` and `CNNaffinity`, while an ensemble of models will return `log_CNNscore`, `CNNaffinity`, and `CNNvariance`.\n\nInference with pre-trained [GNINA](https://github.com/gnina/gnina) models (`--cnn` argument in [GNINA](https://github.com/gnina/gnina)) is implemented in the `gnina` module:\n\n```bash\npython -m gninatorch.gnina --help\n```\n\n### Training\n\nTraining is implemented in the `training` module:\n\n```bash\npython -m gninatorch.training --help\n```\n\n### Inference\n\nInference is implemented in the `inference` module:\n\n```bash\npython -m gninatorch.inference --help\n```\n\n## Acknowledgments\n\nProject based on the [Computational Molecular Science Python Cookiecutter](https://github.com/molssi/cookiecutter-cms) version 1.6.\n\nThe pre-trained weights of [GNINA](https://github.com/RMeli/gnina-torch) converted to PyTorch were kindly provided by Andrew McNutt (@drewnutt).\n\n---\n\nCopyright (c) 2021-2022, Rocco Meli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmeli%2Fgnina-torch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmeli%2Fgnina-torch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmeli%2Fgnina-torch/lists"}