All Projects → pfnet-research → graph-nvp

pfnet-research / graph-nvp

Licence: MIT license
GraphNVP: An Invertible Flow Model for Generating Molecular Graphs

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to graph-nvp

chainer-graph-cnn
Chainer implementation of 'Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering' (https://arxiv.org/abs/1606.09375)
Stars: ✭ 67 (-2.9%)
Mutual labels:  chainer, graph-convolutional-networks
Chainer Chemistry
Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry
Stars: ✭ 462 (+569.57%)
Mutual labels:  chainer, chemistry
chemistry-opencmis
Mirror of Apache Chemistry OpenCMIS
Stars: ✭ 47 (-31.88%)
Mutual labels:  chemistry
chainer-ADDA
Adversarial Discriminative Domain Adaptation in Chainer
Stars: ✭ 24 (-65.22%)
Mutual labels:  chainer
kGCN
A graph-based deep learning framework for life science
Stars: ✭ 91 (+31.88%)
Mutual labels:  graph-convolutional-networks
3DCSGNet
CSGNet for voxel based input
Stars: ✭ 34 (-50.72%)
Mutual labels:  generative-model
efficient softmax
BlackOut and Adaptive Softmax for language models by Chainer
Stars: ✭ 12 (-82.61%)
Mutual labels:  chainer
NeuralDater
ACL 2018: Dating Documents using Graph Convolution Networks
Stars: ✭ 60 (-13.04%)
Mutual labels:  graph-convolutional-networks
Literatures-on-GNN-Acceleration
A reading list for deep graph learning acceleration.
Stars: ✭ 50 (-27.54%)
Mutual labels:  graph-convolutional-networks
shoe-design-using-generative-adversarial-networks
No description or website provided.
Stars: ✭ 18 (-73.91%)
Mutual labels:  generative-model
SciCompforChemists
Scientific Computing for Chemists text for teaching basic computing skills to chemistry students using Python, Jupyter notebooks, and the SciPy stack. This text makes use of a variety of packages including NumPy, SciPy, matplotlib, pandas, seaborn, NMRglue, SymPy, scikit-image, and scikit-learn.
Stars: ✭ 65 (-5.8%)
Mutual labels:  chemistry
kaggle-champs-scalar-coupling
19th place solution in "Predicting Molecular Properties"
Stars: ✭ 26 (-62.32%)
Mutual labels:  chainer
molassembler
Chemoinformatics toolkit with support for inorganic molecules
Stars: ✭ 18 (-73.91%)
Mutual labels:  chemistry
bioicons
A library of free open source icons for science illustrations in biology and chemistry
Stars: ✭ 665 (+863.77%)
Mutual labels:  chemistry
gans-in-action
"GAN 인 액션"(한빛미디어, 2020)의 코드 저장소입니다.
Stars: ✭ 29 (-57.97%)
Mutual labels:  generative-model
vae-torch
Variational autoencoder for anomaly detection (in PyTorch).
Stars: ✭ 38 (-44.93%)
Mutual labels:  generative-model
qp2
Quantum Package : a programming environment for wave function methods
Stars: ✭ 37 (-46.38%)
Mutual labels:  chemistry
lda2vec
Mixing Dirichlet Topic Models and Word Embeddings to Make lda2vec from this paper https://arxiv.org/abs/1605.02019
Stars: ✭ 27 (-60.87%)
Mutual labels:  chainer
char-VAE
Inspired by the neural style algorithm in the computer vision field, we propose a high-level language model with the aim of adapting the linguistic style.
Stars: ✭ 18 (-73.91%)
Mutual labels:  generative-model
mendeleev
A python package for accessing various properties of elements, ions and isotopes in the periodic table of elements.
Stars: ✭ 107 (+55.07%)
Mutual labels:  chemistry

GraphNVP: An Invertible Flow Model for Generating Molecular Graphs

The paper is available on arXiv, https://arxiv.org/abs/1905.11600.

Citation

If you find our work useful in your research, please consider citing:

@article{kaushalya2019graphnvp,
  title={GraphNVP: An Invertible Flow Model for Generating Molecular Graphs},
  author={Kaushalya, Madhawa and Katushiko,  Ishiguro and Kosuke, Nakago and Motoki, Abe},
  journal={arXiv preprint arXiv:1905.11600},
  year={2019}
}

Dependencies

  1. Python 3.6+
  2. Chainer<=5.2.0 (Note: code may not work with chainer>=6.0.0)
  3. cupy<=5.2.0 (Note: please install the same version with chainer)
  4. chainer-chemistry==0.5.0
  5. rdkit (release 2017.09.3.0) [Check chainer-chemistry for more information]
  6. CUDA-Aware MPI (Only for running on multiple GPUS using ChainerMN. Check ChainerMN installation guide for more information.)

Example instllation

conda install -c rdkit rdkit==2017.09.3.0
pip install -r requirements.txt
# please modify XX into your system's CUDA version
# pip install cupy-cudaXX==5.2.0
pip install cupy-cuda100==5.2.0
# When you want to use ChainerMN (Multi-GPU training)
pip install mpi4py

Tested datasets

  • QM 9
  • Zinc 250k

Pre-trained models

Pre-trained model files are uploaded. Please download and place them to models directory.

How to run code

Dataset preparation

cd data
# Download and preprocess QM9 dataset
python download_data.py --data_name=qm9
# Download and preprocess ZINC-250k dataset
python download_data.py --data_name=zinc250k

We use the same train / validation split used by Kusner et al. (Grammar VAE)

Training

  • QM9
python train_model.py -f qm9_relgcn_kekulized_ggnp.npz -b 256 -x 200 --gpu 0 --num_node_masks 9 --num_channel_masks 9 \
  --num_node_coupling 36 --num_channel_coupling 27 --num_atom_types 4 --apply_batch_norm True --node_mask_size 15 \
  --debug True --additive_transformations --save_dir=results/qm9 --learn_dist yes
  • Zinc250k
python train_model.py -f zinc250k_relgcn_kekulized_ggnp.npz --data_name=zinc250k --num_atoms=38 -b 128 -x 200 --gpu 0 \
  --num_node_masks 38 --num_channel_masks 38 --num_node_coupling 38 --num_channel_coupling 38 --num_atom_types 9 \
  --apply_batch_norm True --node_mask_size 15 --debug True --additive_transformations \
  --save_dir=results/zinc250k --learn_dist yes

For multi-GPU training please check scripts/train_qm9_chainermn.sh and scripts/train_zinc250k_chainermn.sh.

Evaluation (Generating molecules with a trained model)

A pre-trained model along with hyperparameters is available. Please refer "Pre-trained models" section.

  • QM9

Executing the bash script generate.sh will generate molecules.

python generate.py -snapshot graph-nvp-final.npz \
--gpu -1 \
--data_name qm9 \
--data_dir data \
--hyperparams-path graphnvp-params.json \
--batch-size 1000 \
--model_dir models/qm9 \
--temperature 0.8 \
--delta 0.05 \
--n_experiments 1
  • Zinc250k
python generate.py -snapshot graph-nvp-final-new.npz \
--gpu -1 \
--data_name zinc250k \
--data_dir data \
--hyperparams-path graph-nvp-new-params.json \
--batch-size 1000 \
--model_dir models/zinc-250k \
--temperature 0.75 \
--delta 0.05 \
--n_experiments 1 \
--molecule_file zinc250k_relgcn_kekulized_ggnp.npz

Property optimization

  • QM9 example
python optimize_property.py -snapshot graph-nvp-final.npz \
 --hyperparams_path graphnvp-params.json \
 --batch_size 1000 \
 --model_dir models/qm9 \
 --data_dir data \
 --molecule_file qm9_relgcn_kekulized_ggnp.npz \
 --temperature 1.0 \
 --delta 0.5 \
 --img_format png \
 --property_name qed \
 --property_model qed_model.pkl 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].