Yet another SMILES-based CharLSTM for molecule generation.
With fine-tuning and goal-directed generation via policy gradient
Draws from this GitHub repo by BayesLabs
and the
associated Medium post,
this blog post
by Esben Jannik Bjerrum and the ReLeaSE algorihm by Popova et al.
cd SmilesLSTM/prior
python train_prior.py
Finetune the model onto a ChEMBL dump of compounds tested against A2aR
python model/finetune.py \
-p SmilesLSTM/prior/Smiles-LSTM_ChEMBL28_prior.pt \
-f SmilesLSTM/input/ChEMBL_ADORA2a_IC50-Ki.csv.gz \
-op finetuned \
--smiles_col Smiles
Bias the generation in a goal-oriented way using logP as score
python model/reinforcement.py \
-p SmilesLSTM/prior/Smiles-LSTM_ChEMBL28_prior.pt \
-op policy