Paper: Predicting three-component reaction outcomes from ~40,000 miniaturized reactant combinations
Preprint: Predicting Three-Component Reaction Outcomes from 40k Miniaturized Reactant Combinations
For code used to collect experimental data, see this repository.
conda env create -f environment.yamlor (if you don't have a suitable GPU):
conda env create -f environment_cpuonly.yamlNotes:
- The
environment.yamlfile is written for a workstation with Nvidia GPU. Useenvironment_cpuonly.yamlinstead to run only on CPU. This will not installCUDAand will install the CPU-only versions ofpytorchanddgl. - Installing the
dgldependency throughcondasometimes creates issues where some packages are "not found" despite existing in the specified channels. Instead, try installingdglseparately withpip:pip install dgl -f https://data.dgl.ai/wheels/repo.html
- On some systems with outdated libraries (such as university clusters)
dglwheels may not work, and you may need to build it from source. See the DGL installation guide for more information. - There is an issue with
pytorchand the2024.1.xversion of themkldependency. If anImportError [...] undefined symbol: iJIT_NotifyEventoccurs, downgrade withconda install mkl=2024.0
We track training runs with WandB.
Before starting any training runs, you need to log into WandB by running
wandb loginthen supply your API key.
The run.py script serves as an entrypoint for training models.
It is configured with a set of command line arguments,
including the path to a configuration file with model hyperparameters.
See config/config_example.yaml for an example configuration file.
To see the full list of command line arguments, run:
python run.py train --helpThe inference.py script serves as an entrypoint for predicting reaction outcome.
It expects a CSV file with three columns: initiator, monomer, terminator.
See config/config_example.yaml for an example configuration file.
Call it like:
python inference.py -i example_reactants.csv -o out.csvor use python inference.py --help for more information.
We use nbstripout to remove output from notebooks before committing to the repository. Install with:
conda install -c conda-forge nbstripout # or pip install nbstripout
nbstripout --install # configures git filters and attributes for this repoWe use pre-commit hooks to ensure standardized code formatting. Install with:
pre-commit install