Usage • Exhibition • Citation • Credits • Licence
This repository contains a PyTorch implementation of MolGAN: An implicit generative model for small molecular graphs (https://arxiv.org/abs/1805.11973).
You can either run MolGAN or MolVAE. Please download and preprocess the dataset before training molGAN.
Just simply run a bash script. You can find such a bash script in the data directory. If you see warnings or even errors, please just don't worry.
If you wish to use the QM9 dataset, you can skip the data downloading and directly proceed to data preprocessing.
bash download_dataset.sh
Just run the python script below. You will need to comment different different code sections in the main function. It is too easy to figure out how to do.
python sparse_molecular_dataset.py
Simply run the following command to train.
python main_gan.py
For your convenience, a VAE version is also implemented.
python main_vae.py
You will need to change some arguments
in args.py
to test the saved model.
It is too easy and I believe you can figure out
how to do it.
If you witness low or even zero validity for generated molecules during training, that is normal. Please just don't worry.
These results are trained with the QM9 dataset.
I use PyTorch 1.5. There is no magic for installing
packages. You can just install all the required
packages if you run into no-such-package
issues :-)
If you have any questions regarding this implementation. Please lodge Github issues. You can also contact Zhenyue Qin (zhenyue.qin@anu.edu.au). I aim to respond emails as soon as I see them :-)
Apart from citing the MolGAN paper, please also consider citing this Github page if you find this implementation assists you :-)
@misc{qin2020molgan_pytorch,
author = {Qin, Zhenyue},
title = {MolGAN Pytorch Implementaion},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/ZhenyueQin/Implementation-MolGAN-PyTorch}}
}
This repository uses the following implementations: