A pretrained model for molecules generation
In this repo, we show how to fine-tune a pre-trained model and build your own model for molecules generation.
For more information, click Here
conda create my_dgl python=3.7
conda activate my_dgl
conda install pytorch torchvision torchaudio cpuonly -c pytorch
conda install -c rdkit rdkit==2018.09.3
conda install -c dglteam dgl
pip install dgllife
import dgllife
import dgl
import torch
import rdkit
print(torch.__version__)
# 1.7.0
print(dgl.__version__)
# 0.6.1
print(rdkit.__version__)
# 2020.09.1
print(dgllife.__version__)
# 0.2.8
More information about installation, please check:
Preprocessing additional data for DGMG model.
python preprocess.py -d EGFR -m ZINC -tf ./EGFR_data/EGFR_train.txt -vf ./EGFR_data/EGFR_val.txt
Training or fine-tuning DGMG model for molecule generation.
The script will save model each 50 epochs!
python fine_tune.py -d EGFR -m ZINC -o canonical -tf ./EGFR_data/EGFR_DGMG_train.txt -vf ./EGFR_data/EGFR_DGMG_val.txt
Generate molecules with pretrained model or fine-tuned model.
Just use a pre-trained model:
python generate_mols.py
python generate_mols.py -m ZINC
Use a fine-tuning model
python generate_mols.py -d EGFR -p ./saved_model/EGFR/50_checkpoint.pth -s ./saved_model/EGFR/settings.txt
@article{,
title={Discovery of Novel Epidermal Growth Factor Receptor (EGFR) Inhibitors Using Computational Approaches},
author={Huo, Donghui;Wang, Shiyu;Kong, Yue;Qin, Zijian;Yan, Aixia},
year={2022},
journal={Journal of Chemical Information and Modeling}
}
DGL-LifeSci: An Open-Source Toolkit for Deep Learning on Graphs in Life Science