This repository contains the source code and data sets for the graph based molecule generator discussed in the article "Multi-Objective De Novo Drug Design with Conditional Graph Generative Model" (https://arxiv.org/abs/1801.07299).
Briefly speaking, we used conditional graph convolution to structure the generative model. The properties of output molecules can then be controlled using the conditional code.
We have made several updates compared to the previous version:
- The model is now implemented using MXNet. We are also working on the Tensorflow and pytorch version of our model. Please checkout the branches
torch
andtf
if you are interested. - A new graph generative model with molecule level recurrency is added to the repo. See the article for further detail.
- The pre-trained models are now available in
ckpt.tar.gz
(download here), along with the predictive model for GSK-3b and JNK3. - Samples generated by unconditional model are now available in
samples.tar.gz
(download here) - All datasets are now packed in
datasets.tar.gz
(download here) - Large files (
ckpt.tar.gz
,samples.tar.gz
anddatasets.tar.gz
) are now placed in the assets in the release 1.0. - We have provided a tutorial (
examples.ipynb
) to demonstrate the usage of our model
This repo is built using Python 2.7, and utilizes the following packages:
- MXNet == 1.1.0
- RDKit == 2017.03.3
- Numpy == 1.13.3
- Scikit-learn== 0.19.1 (for the predictive model)
To ease the installation process, a docker environment will be added to the repo in future release.
train.py
: main training script.mx_mg
: package for the molecule generative model:data
: packages for data processing workflows:conditionals.py
: callables used to generate the conditional codes for moleculesdata_struct.py
: defines atom types and bond typesdataloaders.py
,datasets.py
andsamplers.py
: data loading logicsutils.py
: utility functions
models
: library for graph generative modelsmodules.py
: define modules (or blocks) such as graph convolutionnetworks.py
: define networks (MolMP, MolRNN and CMolRNN)functions.py
: autograd.Function objects and operations
builders.py
: utilities for building molecules using generative models
rdkit_contrib
: functions used to calculate QED and SAscore (for older version of rdkit)example.ipynb
: tutorial
To train the model, first unpackdatasets.tar.gz
(download here) to the current directory, and call:
./train.py {molmp|molrnn|scaffold|prop|kinase} path/to/output
Where {molmp|molrnn|scaffold|prop|kinase}
are model types, and path/to/output
is the directory where you want to save the model's checkpoint file and log files. The following call:
./train.py {molmp|molrnn|scaffold|prop|kinase} -h
gives help for each model type.
- Docker environment
Please contact me. Email: [email protected] or [email protected]