Source code for our paper "Molecular Mechanics-Driven Graph Neural Network with Multiplex Graph for Molecular Structures"

Related tags

Deep Learning MXMNet
Overview

Molecular Mechanics-Driven Graph Neural Network with Multiplex Graph for Molecular Structures

Code for the Multiplex Molecular Graph Neural Network (MXMNet) proposed in our paper, which has been accepted by the Machine Learning for Structural Biology Workshop (MLSB 2020) and the Machine Learning for Molecules Workshop (ML4Molecules 2020) at the 34th Conference on Neural Information Processing Systems (NeurIPS 2020).

Overall Architecture

Requirements

CUDA : 10.1 Python : 3.7.10

The other dependencies can be installed with:

pip install -r requirements.txt

How to Run

You can directly download, preprocess the QM9 dataset and train the model with

python main.py

Optional arguments:

  --gpu             GPU number
  --seed            random seed
  --epochs          number of epochs to train
  --lr              initial learning rate
  --wd              weight decay value
  --n_layer         number of hidden layers
  --dim             size of input hidden units
  --batch_size      batch size
  --target          index of target (0~11) for prediction on QM9
  --cutoff          distance cutoff used in the global layer

The default model to be trained is the MXMNet (BS=128, d_g=5) by using '--batch_size=128 --cutoff=5.0'.

Cite

If you find this model and code are useful in your work, please cite our paper:

@inproceedings{zhang2020molecular,
  title     = {Molecular Mechanics-Driven Graph Neural Network with Multiplex Graph for Molecular Structures},
  author    = {Zhang, Shuo and Liu, Yang and Xie, Lei},
  booktitle = {NeurIPS-W},
  year      = {2020}
}
Comments
  • Predicting other values from the QM9 dataset

    Predicting other values from the QM9 dataset

    Hello!

    The QM9 dataset also contains information regarding the atomization energies of molecules. Can we predict those by simply adding to the targets list in main.py?

    Also, can you please explain why you add 5 to the target values in [7,8,9,10]?

    opened by PratyushAvi 6
  • Using torch geometric QM9 dataset with this repository

    Using torch geometric QM9 dataset with this repository

    Hello

    I'm trying to run this code using the torch geometric data source for QM9.

    However, I encounter the following error in the forward function of MXMNet:

    h = torch.index_select(self.embeddings, 0, x.long())
    RuntimeError: Index is supposed to be an empty tensor or a vector
    

    x is a Tensor of shape 556,11 that seem to contain integers.

    opened by ekosman 4
  • QM9 dataset's difference to pytorch-geometric version

    QM9 dataset's difference to pytorch-geometric version

    Dear authors, May I ask what is the difference between your qm9 dataset and pytorch geometric qm9 dataset? It seems that your come is coming from pytorch-geometric but maybe has some revision. Could please let me know the difference? Thank you!

    opened by LingxiaoShawn 3
  • Local cutoff distance

    Local cutoff distance

    Hello!

    Thank you for providing the code.

    I wonder what the default values for the local message passing are. The local cutoff distance is based on the distance between two atoms that share a bond, isn't it? It seems you updated some default parameters that influence the local message passing from 3.6179 to 5 a couple of weeks ago. Isn't now the denominator for the local cutoff distance == global cutoff distance, when using the default value for global cutoff distance of 5?

    Thanks a lot for your help in advance!

    opened by jangerit 2
  • numpy 1.20.0 and python 3.6.9

    numpy 1.20.0 and python 3.6.9

    Hi, I just started to clone the project and start MXMNet architecture in my environment.

    I wonder how you deal with python 3.6.9 and numpy 1.20.0 version conflict.

    The current RDkit version relies on numpy 1.20.0, and numpy 1.20.0 does not support python 3.6.

    https://numpy.org/doc/stable/release/1.20.0-notes.html

    If you need further information, please let me know. I would be happy to update the info.

    I am installing the packages in my virtual environment python=3.6.9 via Miniconda3.

    opened by Joeycho 2
  • Multiple GPUs

    Multiple GPUs

    Hi,

    I'm trying to set up MXMNet to use multiple GPUs. I've changed

    model = MXMNet(config).to(device)
    

    to

    model = MXMNet(config)
    model = nn.DataParallel(model)
    model.to(device)
    

    However, this appears to be insufficient. Is there anything else or something else I need to do to use multiple GPUs?

    Thank you!

    opened by PratyushAvi 1
  • Example to add ESOL dataset

    Example to add ESOL dataset

    You give an interesting code and example, but I don't see how to use it with esol dataset.

    I have seen that you combine pos and atom label in your data.x. but how do you build your edge_index ?

    is it a local bonded index like in classical graphs or for full molecule indexes ?

    Also does the Hs are needed for other target than QM9 ?

    opened by thegodone 1
  • PDBbind

    PDBbind

    Hello, In the paper, pdbind is mentioned in the examples. I am not sure where can I find the benchmark in this repo. It is interesting to see how the non-bonded interactions between the ligand and the protein are treated.

    opened by amrhamedp 1
Owner
shzhang
CS Ph.D. student. Interested in the Representation Learning on Graphs.
shzhang
[CVPR2021] The source code for our paper 《Removing the Background by Adding the Background: Towards Background Robust Self-supervised Video Representation Learning》.

TBE The source code for our paper "Removing the Background by Adding the Background: Towards Background Robust Self-supervised Video Representation Le

Jinpeng Wang 150 Dec 28, 2022
code for our paper "Source Data-absent Unsupervised Domain Adaptation through Hypothesis Transfer and Labeling Transfer"

SHOT++ Code for our TPAMI submission "Source Data-absent Unsupervised Domain Adaptation through Hypothesis Transfer and Labeling Transfer" that is ext

null 75 Dec 16, 2022
This is the source code for our ICLR2021 paper: Adaptive Universal Generalized PageRank Graph Neural Network.

GPRGNN This is the source code for our ICLR2021 paper: Adaptive Universal Generalized PageRank Graph Neural Network. Hidden state feature extraction i

Jianhao 92 Jan 3, 2023
The dataset and source code for our paper: "Did You Ask a Good Question? A Cross-Domain Question IntentionClassification Benchmark for Text-to-SQL"

TriageSQL The dataset and source code for our paper: "Did You Ask a Good Question? A Cross-Domain Question Intention Classification Benchmark for Text

Yusen Zhang 22 Nov 9, 2022
Source Code for our paper: Understand me, if you refer to Aspect Knowledge: Knowledge-aware Gated Recurrent Memory Network

KaGRMN-DSG_ABSA This repository contains the PyTorch source Code for our paper: Understand me, if you refer to Aspect Knowledge: Knowledge-aware Gated

XingBowen 4 May 20, 2022
Source code of our BMVC 2021 paper: AniFormer: Data-driven 3D Animation with Transformer

AniFormer This is the PyTorch implementation of our BMVC 2021 paper AniFormer: Data-driven 3D Animation with Transformer. Haoyu Chen, Hao Tang, Nicu S

null 7 Oct 22, 2021
Code for our NeurIPS 2021 paper 'Exploiting the Intrinsic Neighborhood Structure for Source-free Domain Adaptation'

Exploiting the Intrinsic Neighborhood Structure for Source-free Domain Adaptation (NeurIPS 2021) Code for our NeurIPS 2021 paper 'Exploiting the Intri

Shiqi Yang 53 Dec 25, 2022
Source code for our paper "Improving Empathetic Response Generation by Recognizing Emotion Cause in Conversations"

Source code for our paper "Improving Empathetic Response Generation by Recognizing Emotion Cause in Conversations" this repository is maintained by bo

Yuhan Liu 24 Nov 29, 2022
Source code for our paper "Empathetic Response Generation with State Management"

Source code for our paper "Empathetic Response Generation with State Management" this repository is maintained by both Jun Gao and Yuhan Liu Model Ove

Yuhan Liu 3 Oct 8, 2022
Source code for our paper "Learning to Break Deep Perceptual Hashing: The Use Case NeuralHash"

Learning to Break Deep Perceptual Hashing: The Use Case NeuralHash Abstract: Apple recently revealed its deep perceptual hashing system NeuralHash to

ml-research@TUDarmstadt 11 Dec 3, 2022
[AAAI2021] The source code for our paper 《Enhancing Unsupervised Video Representation Learning by Decoupling the Scene and the Motion》.

DSM The source code for paper Enhancing Unsupervised Video Representation Learning by Decoupling the Scene and the Motion Project Website; Datasets li

Jinpeng Wang 114 Oct 16, 2022
Source code of our TTH paper: Targeted Trojan-Horse Attacks on Language-based Image Retrieval.

Targeted Trojan-Horse Attacks on Language-based Image Retrieval Source code of our TTH paper: Targeted Trojan-Horse Attacks on Language-based Image Re

fine 7 Aug 23, 2022
Convolutional neural network web app trained to track our infant’s sleep schedule using our Google Nest camera.

Machine Learning Sleep Schedule Tracker What is it? Convolutional neural network web app trained to track our infant’s sleep schedule using our Google

g-parki 7 Jul 15, 2022
This repository contains the source code of our work on designing efficient CNNs for computer vision

Efficient networks for Computer Vision This repo contains source code of our work on designing efficient networks for different computer vision tasks:

Sachin Mehta 386 Nov 26, 2022
Empirical Study of Transformers for Source Code & A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Code

Transformers for variable misuse, function naming and code completion tasks The official PyTorch implementation of: Empirical Study of Transformers fo

Bayesian Methods Research Group 56 Nov 15, 2022
This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Gautam Singh 66 Dec 26, 2022
Code for our method RePRI for Few-Shot Segmentation. Paper at http://arxiv.org/abs/2012.06166

Region Proportion Regularized Inference (RePRI) for Few-Shot Segmentation In this repo, we provide the code for our paper : "Few-Shot Segmentation Wit

Malik Boudiaf 138 Dec 12, 2022
Code for our ICASSP 2021 paper: SA-Net: Shuffle Attention for Deep Convolutional Neural Networks

SA-Net: Shuffle Attention for Deep Convolutional Neural Networks (paper) By Qing-Long Zhang and Yu-Bin Yang [State Key Laboratory for Novel Software T

Qing-Long Zhang 199 Jan 8, 2023
Code for our CVPR 2021 paper "MetaCam+DSCE"

Joint Noise-Tolerant Learning and Meta Camera Shift Adaptation for Unsupervised Person Re-Identification (CVPR'21) Introduction Code for our CVPR 2021

FlyingRoastDuck 59 Oct 31, 2022