Home

Awesome

💊 DST: Differentiable Scaffolding Tree for Molecule Optimization

This repository hosts DST (Differentiable Scaffolding Tree for Molecule Optimization) (Tianfan Fu*, Wenhao Gao*, Cao Xiao, Jacob Yasonik, Connor W. Coley, Jimeng Sun), which enables a gradient-based optimization on a chemical graph.

Table Of Contents

<a name="installation"></a>

🚀 1. Installation

To install locally, we recommend to install from pip and conda. Please see conda.yml for the package dependency.

conda create -n dst python=3.7 
conda activate dst
pip install torch 
pip install PyTDC 
conda install -c rdkit rdkit 

Activate conda environment.

conda activate dst

make directory

mkdir -p save_model result 

<a name="data"></a>

📊 2. Data

In our setup, we restrict the number of oracle calls. In realistic discovery settings, the oracle acquisition cost is usually not negligible.

Raw Data

We use ZINC database, which contains around 250K drug-like molecules and can be downloaded download ZINC.

python src/download.py

Oracle

Oracle is a property evaluator and is a function whose input is molecular structure, and output is the property. We consider following oracles:

For all the property scores above, higher is more desirable.

Optimization Task

There are two kinds of optimization tasks: single-objective and multi-objective optimization. Multi-objective optimization contains jnkgsk (JNK3 + GSK3B), qedsajnkgsk (QED + SA + JNK3 + GSK3B).

Generate Vocabulary

In this project, the basic unit is substructure, which can be atoms or single rings. The vocabulary is the set of frequent substructures.

python src/vocabulary.py

data cleaning

We remove the molecules that contains substructure that is not in vocabulary.

python src/clean.py 

Labelling

We use oracle to evaluate molecule's properties to obtain the labels for training graph neural network.

python src/labelling.py

<a name="run"></a>

🤖 3. Run

In our setup, we restrict the number of oracle calls in both training GNN and de novo design.

train graph neural network (GNN)

It corresponds to Section 3.2 in the paper.

python src/train.py $prop $train_oracle
python src/train.py jnkgsk 5000 

de novo molecule design

It corresponds to Section 3.3 and 3.4 in the paper.

python src/denovo.py $prop $denovo_oracle

For example,

python src/denovo.py jnkgsk 5000 

evaluate

python src/evaluate.py $prop  

For example,

python src/evaluate.py jnkgsk 
<!-- ## Example -->

Extension to multi-objective optimization

python src/multiobjective.py 

<a name="contact"></a>

📞 Contact

Please contact futianfan@gmail.com or gaowh19@gmail.com for help or submit an issue.

Cite Us

If you found this package useful, please cite our paper:

@article{fu2020differentiable,
  title={Differentiable Scaffolding Tree for Molecule Optimization},
  author={Tianfan Fu*, Wenhao Gao*, Cao Xiao, Jacob Yasonik, Connor W. Coley, Jimeng Sun},
  journal={International Conference on Learning Representation (ICLR)},
  year={2022}
}