Skip to content

SMILES-based CharLSTM with finetuning and goal-directed generation via policy gradient

Notifications You must be signed in to change notification settings

gmattedi/Smiles-LSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

SMILES-based CharLSTM with finetuning and goal-directed generation via policy gradient

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published