Giter Site home page Giter Site logo

nmp_qc's Introduction

Neural Message Passing for Quantum Chemistry

Implementation of different models of Neural Networks on graphs as explained in the article proposed by Gilmer et al. [1].

Installation

$ pip install -r requirements.txt
$ python main.py

Installation of rdkit

Running any experiment using QM9 dataset needs installing the rdkit package, which can be done following the instructions available here

Data

The data used in this project can be downloaded here.

Bibliography

Cite

@Article{Gilmer2017,
  author  = {Justin Gilmer and Samuel S. Schoenholz and Patrick F. Riley and Oriol Vinyals and George E. Dahl},
  title   = {Neural Message Passing for Quantum Chemistry},
  journal = {CoRR},
  year    = {2017}
}

Authors

nmp_qc's People

Contributors

anjandutta avatar priba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nmp_qc's Issues

RuntimeError during default execution

Hello, thank you for your implemenation!

I've just tried to run default experiment with

python main.py --no-cuda --epochs 1

and run into the following problem

/opt/conda/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6 return f(*args, **kwds)
Prepare files
Define model
        Statistics
        Create model
Optimizer
Logger
=> no best model found at './checkpoint/qm9/mpnn/model_best.pth'
Check cuda
Traceback (most recent call last):
  File "main.py", line 321, in <module>
    main()
  File "main.py", line 182, in main
    train(train_loader, model, criterion, optimizer, epoch, evaluation, logger)
  File "main.py", line 242, in train
    output = model(g, h, e)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 319, in __call__
    result = self.forward(*input, **kwargs)
  File "/data/grishin/nmp_qc/models/MPNN.py", line 78, in forward
    m = self.m[0].forward(h[t], h_aux, e_aux)
  File "/data/grishin/nmp_qc/MessageFunction.py", line 43, in forward
    return self.m_function(h_v, h_w, e_vw, args)
  File "/data/grishin/nmp_qc/MessageFunction.py", line 175, in m_mpnn
    h_w_rows = h_w[..., None].expand(h_w.size(0), h_v.size(1), h_w.size(1)).contiguous()
RuntimeError: The expanded size of the tensor (25) must match the existing size (73) at non-singleton dimension 1

Am i doing something wrong? Thank you in advance.

boost::mutex::~mutex(): Assertion `!res' failed.

Hi, I am trying to run the program on Ubuntu 16.04 with python 2.7. I have the rdkit package installed and the data downloaded. However, when I tried to run the main program I got the following error:

(venv) siyuan:nmp_qc$ python main.py 
Prepare files
Define model
python: /usr/include/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed.
Aborted (core dumped)

The program crashed here:

nmp_qc/main.py

Lines 101 to 103 in 177db7e

print('Define model')
# Select one graph
g_tuple, l = data_train[0]

What would possibly be the reason for that? Thanks in advance!

Computer Vision?

Why does the project title has Computer Vision in it? The paper that the project implements is on Quantum Chemistry.

'Graph' object has no attribute 'nodes_iter' Error

When I followed the installation that installed rdkit and all other requirements, and downloaded the data, run the "python main.py", I got the error below. Does there something error in the code?

Prepare files
Define model
Traceback (most recent call last):
  File "/home/ay27/repo/nmp_qc/main.py", line 320, in <module>
    main()
  File "/home/ay27/repo/nmp_qc/main.py", line 103, in main
    g_tuple, l = data_train[0]
  File "/home/ay27/repo/nmp_qc/datasets/qm9.py", line 47, in __getitem__
    h = self.vertex_transform(g)
  File "/home/ay27/repo/nmp_qc/datasets/utils.py", line 28, in qm9_nodes
    for n, d in g.nodes_iter(data=True):
AttributeError: 'Graph' object has no attribute 'nodes_iter'

Readout function in mpnn and mpnn_ggcn

In the original paper, the readout function is different between ggcn and the function used in the paper. But I noticed that you implement them as the same function.
Have I missed something?

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.