/graph-neural-networks

Graph Neural Networks for Quantum Chemistry

Primary LanguagePython

Graph Neural Networks for Quantum Chemistry

Implementation and modification of Message Passing Neural Networks as explained in the article proposed by Gilmer et al. [1].

Requirements:

  • python 3.5
  • pytorch=0.1.12
  • networkx=1.11
  • tensorboard
  • tensorboard_logger
  • numpy
  • joblib

Setup

Using conda create command to create a conda environment.

$ module add anaconda3/4.2.0
$ conda create -n python-3.5 python=3.5
$ source activate python-3.5

Installation

$ pip install numpy tensorboard tensorboard_logger joblib
$ conda install -c rdkit rdkit 
$ conda install networkx=1.11
$ conda install pytorch=0.1.12 cuda75 -c soumith
$ git clone https://github.com/ifding/graph-neural-networks.git
$ cd graph-neural-networks

Examples

QM9

Download and convert QM9 data set:

$ python3 download_data.py qm9 -p /scratch3/feid/mpnn-data/

Train and test MPNN (default) and MPNNv2 model with GPU (default) or not:

$ python3 main.py --datasetPath /scratch3/feid/mpnn-data/qm9/dsgdb9nsd/

$ python3 main.py --datasetPath /scratch3/feid/mpnn-data/qm9/dsgdb9nsd/ --no-cuda

$ python3 main.py --datasetPath /scratch3/feid/mpnn-data/qm9/dsgdb9nsd/ --model MPNNv2
    
$ python3 main.py --datasetPath /scratch3/feid/mpnn-data/qm9/dsgdb9nsd/ --no-cuda --model MPNNv2

$ python3 main.py --datasetPath /scratch3/feid/mpnn-data/qm9/dsgdb9nsd/ --model MPNNv3
    
$ python3 main.py --datasetPath /scratch3/feid/mpnn-data/qm9/dsgdb9nsd/ --no-cuda --model MPNNv3

Bibliography