{"id":13487198,"url":"https://github.com/AstraZeneca/chemicalx","last_synced_at":"2025-03-27T21:32:10.711Z","repository":{"id":37419164,"uuid":"435549806","full_name":"AstraZeneca/chemicalx","owner":"AstraZeneca","description":"A PyTorch and TorchDrug based deep learning library for drug pair scoring. (KDD 2022)","archived":false,"fork":false,"pushed_at":"2023-09-11T08:01:43.000Z","size":21369,"stargazers_count":700,"open_issues_count":7,"forks_count":88,"subscribers_count":22,"default_branch":"main","last_synced_at":"2024-05-02T02:18:30.940Z","etag":null,"topics":["biology","chemistry","deep-chemistry","deep-learning","drug","drug-discovery","drug-interaction","drug-pair","geometric-deep-learning","geometry","graph-neural-network","machine-learning","pharma","polypharmacy","pytorch","smiles","smiles-strings","torch","torchdrug"],"latest_commit_sha":null,"homepage":"https://chemicalx.readthedocs.io","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/AstraZeneca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-12-06T15:32:55.000Z","updated_at":"2024-04-19T14:27:04.000Z","dependencies_parsed_at":"2023-10-20T18:03:54.586Z","dependency_job_id":null,"html_url":"https://github.com/AstraZeneca/chemicalx","commit_stats":{"total_commits":308,"total_committers":14,"mean_commits":22.0,"dds":"0.18506493506493504","last_synced_commit":"9bda81244b426e68dfd0cfbe7fe4103b31e832b3"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstraZeneca%2Fchemicalx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstraZeneca%2Fchemicalx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstraZeneca%2Fchemicalx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AstraZeneca%2Fchemicalx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AstraZeneca","download_url":"https://codeload.github.com/AstraZeneca/chemicalx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245927375,"owners_count":20695224,"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":["biology","chemistry","deep-chemistry","deep-learning","drug","drug-discovery","drug-interaction","drug-pair","geometric-deep-learning","geometry","graph-neural-network","machine-learning","pharma","polypharmacy","pytorch","smiles","smiles-strings","torch","torchdrug"],"created_at":"2024-07-31T18:00:56.486Z","updated_at":"2025-03-27T21:32:10.666Z","avatar_url":"https://github.com/AstraZeneca.png","language":"Python","funding_links":[],"categories":["The Data Science Toolbox","Python","Libraries on Molecule AI","Deep Learning","Ranked by starred repositories","chemistry"],"sub_categories":["Miscellaneous Tools","3D","PyTorch","General-Purpose Machine Learning"],"readme":"[pypi-image]: https://badge.fury.io/py/chemicalx.svg\n[pypi-url]: https://pypi.python.org/pypi/chemicalx\n[size-image]: https://img.shields.io/github/repo-size/AstraZeneca/chemicalx.svg\n[size-url]: https://github.com/AstraZeneca/chemicalx/archive/main.zip\n[build-image]: https://github.com/AstraZeneca/chemicalx/workflows/CI/badge.svg\n[build-url]: https://github.com/AstraZeneca/chemicalx/actions?query=workflow%3ACI\n[docs-image]: https://readthedocs.org/projects/chemicalx/badge/?version=latest\n[docs-url]: https://chemicalx.readthedocs.io/en/latest/?badge=latest\n[coverage-image]: https://codecov.io/gh/AstraZeneca/chemicalx/branch/main/graph/badge.svg\n[coverage-url]: https://codecov.io/github/AstraZeneca/chemicalx?branch=main\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"90%\" src=\"https://github.com/AstraZeneca/chemicalx/blob/main/images/chemicalx_logo.jpg?sanitize=true\" /\u003e\n\u003c/p\u003e\n\n--------------------------------------------------------------------------------\n\n[![PyPI Version][pypi-image]][pypi-url]\n[![Docs Status][docs-image]][docs-url]\n[![Code Coverage][coverage-image]][coverage-url]\n[![Build Status][build-image]][build-url]\n[![DOI](https://img.shields.io/badge/DOI-10.1145/3534678.3539023-blue.svg)](https://bioregistry.io/doi:10.1145/3534678.3539023)\n\n**[Documentation](https://chemicalx.readthedocs.io)** | **[External Resources](https://chemicalx.readthedocs.io/en/latest/notes/resources.html)** | **[Datasets](https://chemicalx.readthedocs.io/en/latest/notes/introduction.html#datasets)** | **[Examples](https://github.com/AstraZeneca/chemicalx/tree/main/examples)** \n\n*ChemicalX* is a deep learning library for drug-drug interaction, polypharmacy side effect, and synergy prediction. The library consists of data loaders and integrated benchmark datasets. It also includes state-of-the-art deep neural network architectures that solve the [drug pair scoring task](https://arxiv.org/pdf/2111.02916v4.pdf). Implemented methods cover traditional SMILES string based techniques and neural message passing based models.\n\n--------------------------------------------------------------------------------\n\n**Citing**\n\n\nIf you find *ChemicalX* and the new datasets useful in your research, please consider adding the following citation:\n\n```bibtex\n@inproceedings{10.1145/3534678.3539023,\n  author = {Rozemberczki, Benedek and Hoyt, Charles Tapley and Gogleva, Anna and Grabowski, Piotr and Karis, Klas and Lamov, Andrej and Nikolov, Andriy and Nilsson, Sebastian and Ughetto, Michael and Wang, Yu and Derr, Tyler and Gyori, Benjamin M.},\n  title = {ChemicalX: A Deep Learning Library for Drug Pair Scoring},\n  year = {2022},\n  isbn = {9781450393850},\n  publisher = {Association for Computing Machinery},\n  address = {New York, NY, USA},\n  url = {https://doi.org/10.1145/3534678.3539023},\n  doi = {10.1145/3534678.3539023},\n  booktitle = {Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},\n  pages = {3819–3828},\n  numpages = {10},\n  keywords = {chemistry, neural networks, deep learning},\n  location = {Washington DC, USA},\n  series = {KDD '22}\n}\n```\n--------------------------------------------------------------------------------\n\n**Drug Pair Scoring Explained**\n\nOur framework solves the [drug pair scoring task](https://arxiv.org/abs/2111.02916) of computational chemistry. In this task a machine learning model has to predict the outcome of administering two drugs together in a biological or chemical context. Deep learning models which solve this task have an architecture with two distinctive parts:\n\n1. A drug encoder layer which takes a pair of drugs as an input (blue and red drugs below).\n2. A head layer which outputs scores in the administration context - polypharmacy in our explanatory figure.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"90%\" src=\"https://github.com/AstraZeneca/chemicalx/blob/main/images/pair_scoring.jpg?sanitize=true\" /\u003e\n\u003c/p\u003e\n\n\n**Getting Started**\n\nThe API of `chemicalx` provides a high-level function for training and evaluating models\nthat's heavily influenced by the [PyKEEN](https://github.com/pykeen/pykeen/)\ntraining and evaluation pipeline:\n\n```python\nfrom chemicalx import pipeline\nfrom chemicalx.models import DeepSynergy\nfrom chemicalx.data import DrugCombDB\n\nmodel = DeepSynergy(context_channels=112, drug_channels=256)\ndataset = DrugCombDB()\n\nresults = pipeline(\n    dataset=dataset,\n    model=model,\n    # Data arguments\n    batch_size=5120,\n    context_features=True,\n    drug_features=True,\n    drug_molecules=False,\n    # Training arguments\n    epochs=100,\n)\n\n# Outputs information about the AUC-ROC, etc. to the console.\nresults.summarize()\n\n# Save the model, losses, evaluation, and other metadata.\nresults.save(\"~/test_results/\")\n```\n\n--------------------------------------------------------------------------------\n\n**Case Study Tutorials**\n\nWe provide in-depth case study like tutorials in the [Documentation](https://chemicalx.readthedocs.io/en/latest/), each covers an aspect of ChemicalX’s functionality.\n\n--------------------------------------------------------------------------------\n\n**Methods Included**\n\nIn detail, the following drug pair scoring models were implemented.\n\n**2018**\n\n* **[DeepDDI](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.deepddi.DeepDDI)** from [Deep Learning Improves Prediction of Drug–Drug and Drug–Food Interactions](https://www.pnas.org/content/115/18/E4304) (PNAS)\n\n* **[DeepSynergy](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.deepsynergy.DeepSynergy)** from [DeepSynergy: Predicting Anti-Cancer Drug Synergy with Deep Learning](https://academic.oup.com/bioinformatics/article/34/9/1538/4747884) (Bioinformatics)\n\n**2019**\n\n* **[MR-GNN](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.mrgnn.MRGNN)** from [MR-GNN: Multi-Resolution and Dual Graph Neural Network for Predicting Structured Entity Interactions](https://arxiv.org/abs/1905.09558) (IJCAI)\n\n* **[MHCADDI](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.mhcaddi.MHCADDI)** from [Drug-Drug Adverse Effect Prediction with Graph Co-Attention](https://arxiv.org/pdf/1905.00534v1.pdf) (ICML)\n\n**2020**\n\n* **[CASTER](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.caster.CASTER)** from [CASTER: Predicting Drug Interactions with Chemical Substructure Representation](https://arxiv.org/abs/1911.06446) (AAAI)\n\n* **[SSI-DDI](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.ssiddi.SSIDDI)** from [SSI–DDI: Substructure–Substructure Interactions for Drug–Drug Interaction Prediction](https://academic.oup.com/bib/article-abstract/22/6/bbab133/6265181) (Briefings in Bioinformatics)\n\n* **[EPGCN-DS](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.epgcnds.EPGCNDS)** from [Structure-Based Drug-Drug Interaction Detection via Expressive Graph Convolutional Networks and Deep Sets](https://ojs.aaai.org/index.php/AAAI/article/view/7236) (AAAI)\n\n* **[DeepDrug](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.deepdrug.DeepDrug)** from [DeepDrug: A General Graph-Based Deep Learning Framework for Drug Relation Prediction](https://europepmc.org/article/ppr/ppr236757) (PMC)\n\n* **[GCN-BMP](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.gcnbmp.GCNBMP)** from [GCN-BMP: Investigating graph representation learning for DDI prediction task](https://www.sciencedirect.com/science/article/pii/S1046202320300608) (Methods)\n\n**2021**\n\n* **[DeepDDS](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.deepdds.DeepDDS)** from [DeepDDS: Deep Graph Neural Network with Attention Mechanism to Predict Synergistic Drug Combinations](https://arxiv.org/abs/2107.02467) (Briefings in Bioinformatics)\n\n* **[MatchMaker](https://chemicalx.readthedocs.io/en/latest/modules/root.html#chemicalx.models.matchmaker.MatchMaker)** from [MatchMaker: A Deep Learning Framework for Drug Synergy Prediction](https://pubmed.ncbi.nlm.nih.gov/34086576/) (ACM TCBB)\n\n--------------------------------------------------------------------------------\n\nHead over to our [documentation](https://chemicalx.readthedocs.io) to find out more about installation, creation of datasets and a full list of implemented methods and available datasets.\nFor a quick start, check out the [examples](https://chemicalx.readthedocs.io) in the `examples/` directory.\n\nIf you notice anything unexpected, please open an [issue](github.com/AstraZeneca/chemicalx/issues). If you are missing a specific method, feel free to open a [feature request](https://github.com/AstraZeneca/chemicalx/issues).\n\n\n--------------------------------------------------------------------------------\n\n**Installation**\n\n**PyTorch 1.10.0**\n\nTo install for PyTorch 1.10.0, simply run\n\n```sh\npip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.10.0+${CUDA}.html\npip install torchdrug\npip install chemicalx\n```\n\nwhere `${CUDA}` should be replaced by either `cpu`, `cu102`, or `cu111` depending on your PyTorch installation.\n\n|             | `cpu` | `cu102` | `cu111` |\n|-------------|-------|---------|---------|\n| **Linux**   | ✅    | ✅      | ✅      |\n| **Windows** | ✅    | ✅      | ✅      |\n| **macOS**   | ✅    |         |         |\n\n\n--------------------------------------------------------------------------------\n\n**Running tests**\n\n```\n$ tox -e py\n```\n--------------------------------------------------------------------------------\n\n**License**\n\n- [Apache 2.0 License](https://github.com/AstraZeneca/chemicalx/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAstraZeneca%2Fchemicalx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAstraZeneca%2Fchemicalx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAstraZeneca%2Fchemicalx/lists"}