The codes below are confirmed for normal operation with AWS Deep Learning AMI (Ubuntu 18.04) Version 32.0 under the pytorch_p36 conda environment. Codes are slightly adpated from the following githubs : REINVENT, GENTRL, MOSES. After activating pytorch environment, you have to install rdkit package
conda install -c conda-forge rdkit
- Pre-train
Run train_prior.py - RL-train
Run main.py --scoring-function tanimoto --num-steps 1000
(we also can use --scoring-function activity_model, but we have to train classifier for target activity model in advance)
- Pre-train
Run pretrain.py - RL-train
Run rltrain.py - sampling
Run sampling.py
We use part of this code for the moleclue metrics.