Git Product home page Git Product logo

moleculargnn_3dstructure's Introduction

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). Please consider switching to our new and simple machine learning model called quantum deep field.

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)" 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}
}

moleculargnn_3dstructure's People

Contributors

masashitsubaki avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.