Home

Awesome

Smiles LSTM

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.

1. Train the prior model

cd SmilesLSTM/prior
python train_prior.py

2. Finetune the prior model

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

3. Policy gradient

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