├── LICENSE ├── README.md ├── .gitmodules └── .gitignore /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 AIDD-MSCA. All rights reserved 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AIDD Codebase 2 | 3 | ![PyPI](https://img.shields.io/pypi/v/aidd-codebase) 4 | ![PyPI](https://img.shields.io/pypi/pyversions/aidd-codebase) 5 | ![PyPI](https://img.shields.io/github/license/aidd-msca/aidd-codebase) 6 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1jlyEd1yxhvFCN82YqEFI82q2n0k_y06F?usp=sharing) 7 | 8 | A high-level codebase for deep learning development in drug discovery applications using PyTorch-Lightning. 9 | 10 | ## Dependencies 11 | 12 | The codebase requires the following additional dependencies 13 | - CUDA >= 11.4 14 | - PyTorch >= 1.9 15 | - Pytorch-Lightning >= 1.5 16 | - RDKit 17 | - Optionally supports: tensorboard and/or wandb 18 | 19 | 20 | ## Installation 21 | 22 | The codebase can be installed from PyPI using `pip`, or your package manager of choice, with 23 | 24 | ```bash 25 | $ pip install aidd-codebase 26 | ``` 27 | 28 | ## Usage 29 | 30 | The codebase is designed to be used in a modular fashion. The main components are the `DataModule`, `Model`, and `Trainer` classes. The `DataModule` is responsible for loading and preprocessing data, the `Model` is responsible for defining the model architecture, and the `Trainer` is responsible for training the model. The `Trainer` is a subclass of `pytorch_lightning.Trainer` and can be used as such. The `DataModule` and `Model` classes are designed to be used with the `Trainer` class, but can be used independently if desired. 31 | 32 | ### Starting a new project 33 | ```bash 34 | $ python -m aidd_codebase.start_project name dir_path 35 | ``` 36 | This will create a new project folder with the following structure: 37 | 38 | ``` 39 | name 40 | ├── conf 41 | │ └── config.yaml 42 | ├── src 43 | └── main.py 44 | ``` 45 | 46 | The `conf` folder contains the configuration file for the project. The `src` folder contains the source code for the project. The `main.py` file is the entry point for the project. 47 | 48 | 49 | ## Contributors 50 | 51 | All fellows of the AIDD consortium have contributed to the packaged. 52 | 53 | ## Code of Conduct 54 | 55 | Everyone interacting in the codebase, issue trackers, chat rooms, and mailing lists is expected to follow the [PyPA Code of Conduct](https://www.pypa.io/en/latest/code-of-conduct/). 56 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "aidd_codebase/Properties-to-molecules-Inverse-Mapping"] 2 | path = aidd_codebase/Properties-to-molecules-Inverse-Mapping 3 | url = https://github.com/aidd-msca/Properties-to-molecules-Inverse-Mapping 4 | [submodule "aidd_codebase/MiDi"] 5 | path = aidd_codebase/MiDi 6 | url = https://github.com/aidd-msca/MiDi 7 | [submodule "aidd_codebase/metis"] 8 | path = aidd_codebase/metis 9 | url = https://github.com/aidd-msca/metis 10 | [submodule "aidd_codebase/CalibrationStudy"] 11 | path = aidd_codebase/CalibrationStudy 12 | url = https://github.com/aidd-msca/CalibrationStudy 13 | [submodule "aidd_codebase/reaction-graph-link-prediction"] 14 | path = aidd_codebase/reaction-graph-link-prediction 15 | url = https://github.com/aidd-msca/reaction-graph-link-prediction 16 | [submodule "aidd_codebase/modelsmatter"] 17 | path = aidd_codebase/modelsmatter 18 | url = https://github.com/aidd-msca/modelsmatter 19 | [submodule "aidd_codebase/reagent_emb_vis"] 20 | path = aidd_codebase/reagent_emb_vis 21 | url = https://github.com/aidd-msca/reagent_emb_vis 22 | [submodule "aidd_codebase/hyper-dti"] 23 | path = aidd_codebase/hyper-dti 24 | url = https://github.com/aidd-msca/hyper-dti 25 | [submodule "aidd_codebase/PISA-T"] 26 | path = aidd_codebase/PISA-T 27 | url = https://github.com/aidd-msca/PISA-T 28 | [submodule "aidd_codebase/led3score"] 29 | path = aidd_codebase/led3score 30 | url = https://github.com/aidd-msca/led3score 31 | [submodule "aidd_codebase/augmented-xai"] 32 | path = aidd_codebase/augmented-xai 33 | url = https://github.com/aidd-msca/augmented-xai 34 | [submodule "aidd_codebase/cloome"] 35 | path = aidd_codebase/cloome 36 | url = https://github.com/aidd-msca/cloome 37 | [submodule "aidd_codebase/YieldnotYield"] 38 | path = aidd_codebase/YieldnotYield 39 | url = https://github.com/aidd-msca/YieldnotYield 40 | [submodule "aidd_codebase/reagents"] 41 | path = aidd_codebase/reagents 42 | url = https://github.com/aidd-msca/reagents 43 | [submodule "aidd_codebase/FSL_CP"] 44 | path = aidd_codebase/FSL_CP 45 | url = https://github.com/aidd-msca/FSL_CP 46 | [submodule "aidd_codebase/ET-Tox"] 47 | path = aidd_codebase/ET-Tox 48 | url = https://github.com/aidd-msca/ET-Tox 49 | [submodule "aidd_codebase/FSL_CP_DataPrep"] 50 | path = aidd_codebase/FSL_CP_DataPrep 51 | url = https://github.com/aidd-msca/FSL_CP_DataPrep 52 | [submodule "aidd_codebase/eqgat_diff"] 53 | path = aidd_codebase/eqgat_diff 54 | url = https://github.com/aidd-msca/eqgat_diff 55 | [submodule "aidd_codebase/PILOT"] 56 | path = aidd_codebase/PILOT 57 | url = https://github.com/aidd-msca/PILOT 58 | [submodule "aidd_codebase/AQM"] 59 | path = aidd_codebase/AQM 60 | url = https://github.com/lmedranos/AQM 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | *.mypy_cache 3 | __pycache__/ 4 | *.py[cod] 5 | *$py.class 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | pip-wheel-metadata/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | *.py,cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | db.sqlite3-journal 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | .python-version 87 | 88 | # pipenv 89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 92 | # install all needed dependencies. 93 | #Pipfile.lock 94 | 95 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 96 | __pypackages__/ 97 | 98 | # Celery stuff 99 | celerybeat-schedule 100 | celerybeat.pid 101 | 102 | # SageMath parsed files 103 | *.sage.py 104 | 105 | # Environments 106 | .env 107 | .venv 108 | env/ 109 | venv/ 110 | ENV/ 111 | env.bak/ 112 | venv.bak/ 113 | 114 | # Docker 115 | Dockerfile 116 | .devcontainer 117 | 118 | # Spyder project settings 119 | .spyderproject 120 | .spyproject 121 | 122 | # Rope project settings 123 | .ropeproject 124 | 125 | # mkdocs documentation 126 | /site 127 | 128 | # mypy 129 | .mypy_cache/ 130 | .dmypy.json 131 | dmypy.json 132 | 133 | # Pyre type checker 134 | .pyre/ 135 | 136 | # Visual studio 137 | *.DSstore 138 | *.vscode 139 | *.hydra 140 | 141 | # logs 142 | multirun 143 | outputs 144 | wandb 145 | checkpoints 146 | 147 | # Personal Projects 148 | *data 149 | *runs 150 | *logs 151 | *checkpoints 152 | 153 | # temporary 154 | aidd_codebase/models 155 | legacy/ 156 | .pre-commit-config.yaml 157 | .vscode 158 | --------------------------------------------------------------------------------