Unpaired Generative Molecule-to-Molecule Translation code.
We run all training and experiments on Ubuntu 18.04.5 using one Nvidia GeForce RTX 2080 Ti 11GB GPU, two Intel 13 Xeon Gold 6230 2.10GHZ CPUs and 64GB RAM memory.
- Install conda / minicaonda
- From the main folder run:
i. conda env create -f environment.yml
ii. conda activate UGMMT
All dataset files located in dataset folder.
From the main folder run:
- python train.py 2>error_train.txt
train.py is the main training file, contains most of the hyper-parameter and configuration setting. After training, the checkpoints will be located in the checkpoints folder, training plots will be located in the plots_output folder.
Main setting:
property (line 27) [property selection] -> QED / DRD2.
From the main folder run:
- python test.py 2>error_test.txt
test.py is the main testing file, contains most of the hyper-parameter and configuration setting.
Main setting:
check_testset (line 23) [Main Results: Molecule Optimization] -> True / False.
discover_approved_drugs (ine 38) [Optimized Drug Generation] -> True / False.
property (line 25) [property selection] -> QED / DRD2.
Druing training change gan_loss, kl_loss, swap_cycle_fp, use_fp, use_EETN, conditional and no_pre_train flages (lines 50-56 in train.py) according to:
- No Pre-train -> no_pre_train to True.
- NO EETN -> use_EETN to False.
- NO fp -> use_fp to False.
- Only fp -> conditional to True.
- Swap Cycle fp -> swap_cycle_fp to True.
- Add Adversarial -> gan_loss and kl_loss to True.
For testing, run regularly except for these changes:
- NO EETN -> use_EETN to False (line 50 in test.py).
- NO fp -> use_fp to False (line 49 in test.py).
- Only fp -> conditional to True (line 51 in test.py).