Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/masashitsubaki/molecularGNN_3Dstructure
Graph neural network (GNN) for molecular property prediction (3D structure)
https://github.com/masashitsubaki/molecularGNN_3Dstructure
Last synced: 19 days ago
JSON representation
Graph neural network (GNN) for molecular property prediction (3D structure)
- Host: GitHub
- URL: https://github.com/masashitsubaki/molecularGNN_3Dstructure
- Owner: masashitsubaki
- License: apache-2.0
- Created: 2019-03-11T00:11:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-28T02:05:35.000Z (almost 4 years ago)
- Last Synced: 2024-08-01T17:25:08.948Z (4 months ago)
- Language: Python
- Homepage:
- Size: 15.7 MB
- Stars: 89
- Watchers: 5
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-graph-classification - [Python Reference
README
# Graph neural network (GNN) for molecular property prediction (3D structure)
### _**Important: this repository will not be further developed and maintained because we have shown and believe that graph neural networks or graph convolutional networks are incorrect and useless for modeling molecules (see our paper in [NeurIPS 2020](https://proceedings.neurips.cc/paper/2020/hash/1534b76d325a8f591b52d302e7181331-Abstract.html)). Please consider switching to our new and simple machine learning model called [quantum deep field](https://github.com/masashitsubaki/QuantumDeepField_molecule).**_
This code is a simpler version (different from the original paper) of our GNN model and its implementation for "[Fast and Accurate Molecular Property Prediction: Learning Atomic Interactions and Potentials with Neural Networks (The Journal of Physical Chemistry Letters, 2018)](https://pubs.acs.org/doi/10.1021/acs.jpclett.8b01837)" in PyTorch.
We show an example of the learning curve, which uses a subset of the QM9 dataset (the molecular size is less than 14 atoms), as follows.
This result can be completely reproduced by our code and one command (see "Usage").
## Characteristics of our implementation
- This code is easy-to-use for beginners. The requirement is only PyTorch.
- Preprocessing a dataset and learning a GNN model can be done by only one command, "bash train.sh."
- If you prepare another dataset with the same format as seen in the directory, dataset/QM9/data.txt, you can learn a GNN model with your dataset.## Requirements
- PyTorch (of course numpy and scipy)
## Usage
We provide two major scripts in the main directory as follows.
- "preprocessing.py" creates tensor data from original text data (see dataset/QM9/data.txt).
- "train.py" trains a GNN model using the preprocessed data to predict a molecular property.You can easy to train a GNN model by the following commands.
Clone our repository,
```
git clone https://github.com/masashitsubaki/molecularGNN_3Dstructure.git
```
change directory,
```
cd molecularGNN_3Dstructure/main
```
and run the bash file for training.
```
bash train.sh
```
An image of running on google colaboratory is as follows.
You can also change the model hyperparameters described in train.sh (e.g., the dimensionality, number of hidden layers, and batch size).
Try to learn various GNN models to find your own best model for your dataset!
## Learning a GNN with your dataset
In the dataset directory, we provide a subset of the QM9 dataset (see dataset/QM9/data.txt), which the format is as follows.
If you prepare a dataset with the same format (any molecular property can be used!), you can learn a GNN model with your dataset.
## How to cite
```
@article{tsubaki2018fast,
title={Fast and Accurate Molecular Property Prediction: Learning Atomic Interactions and Potentials with Neural Networks},
author={Tsubaki, Masashi and Mizoguchi, Teruyasu},
journal={The journal of physical chemistry letters},
volume={9},
number={19},
pages={5733--5741},
year={2018},
publisher={ACS Publications}
}
```