Predicting experimental redox potentials for aqueous organic molecules using GNNs with transfer learning.
RedEx is a GAT ensemble, pre-trained on computational DFT-calculated redox potentials and fine-tuned on experimental redox potentials curated from the literature.
conda env create -f environment.yml
conda activate redex
pip install -e .Pre-train on the computational RedoxDB dataset:
python scripts/pretrain.py --model gat # single model
python scripts/pretrain.py --all # all five architecturesConfigs are in configs/pretrain_{model}.yaml. Checkpoints are saved to weights/pretrained/.
Fine-tune on experimental data:
python scripts/finetune.py \
--model gat \
--pretrained weights/pretrained/gat_full_pretrain.pth \
--config configs/finetune_gat.yamlPre-trained and fine-tuned weights are included and you can use RedEx to predict redox potentials with the below code.
python scripts/predict.py \
--model-dir weights/finetuned/gat_partial \
--smiles "OC1=CC=CC2=NC3=CC=CC=C3N=C21"Or from a CSV (needs an oxidised_smiles column):
python scripts/predict.py \
--model-dir weights/finetuned/gat_partial \
--csv data/Experimental_redox_potentials.csv \
--output predictions.csvTo be added upon publication.
MIT