The model integrates GAN with reinforcement learning. These two models are trained separately but are used jointly to generate novel targeted chemical libraries.
The model and data of this project are partially referenced by Drug-Discovery-using-GANs. I mainly modified the relevant code details and added new visualization functions
The repository is organised as follows:
_model
contains:
hyperparams.json
Data input path and related parameter settings.disdata.py``gendata.py``model.py``TargetLSTM.py``text_CNN.py
Implementation of GAN modelrollout_policy.py
Implementation of RLmol_metrics.py
Implementation of the evaluation module
environment.yml
Environment configuration file
run.py
Script for running the main program
Visualization Module:
SMIpro1.py
File merging and normalization of generated molecules
SMIpro2.py
Check whether visualization is possible
SMIshow.py
2D visualization and 3D structure file generation
cd DrugGAN
conda env create -f environment.yml
conda activate py36
Before you start the training, you can specify the TRAIN_FILE
and OBJECTIVE
in hyperparams.json
yourself.
This allows you to upload your own data and specify the potential molecular properties of the molecules you wish to generate.
cd DrugGAN
python run.py
cd DrugGAN
python SMIpro1.py
python SMIpro2.py
python SMIshow.py