Equivariant GNN for the prediction of atomic multipoles up to quadrupoles.

Overview
You might also like...
Implementation of Lie Transformer, Equivariant Self-Attention, in Pytorch
Implementation of Lie Transformer, Equivariant Self-Attention, in Pytorch

Lie Transformer - Pytorch (wip) Implementation of Lie Transformer, Equivariant Self-Attention, in Pytorch. Only the SE3 version will be present in thi

Implementation of SE3-Transformers for Equivariant Self-Attention, in Pytorch.

SE3 Transformer - Pytorch Implementation of SE3-Transformers for Equivariant Self-Attention, in Pytorch. May be needed for replicating Alphafold2 resu

Authors implementation of LieTransformer: Equivariant Self-Attention for Lie Groups
Authors implementation of LieTransformer: Equivariant Self-Attention for Lie Groups

LieTransformer This repository contains the implementation of the LieTransformer used for experiments in the paper LieTransformer: Equivariant self-at

Implementation of E(n)-Transformer, which extends the ideas of Welling's E(n)-Equivariant Graph Neural Network to attention

E(n)-Equivariant Transformer (wip) Implementation of E(n)-Equivariant Transformer, which extends the ideas from Welling's E(n)-Equivariant G

EGNN - Implementation of E(n)-Equivariant Graph Neural Networks, in Pytorch
EGNN - Implementation of E(n)-Equivariant Graph Neural Networks, in Pytorch

EGNN - Pytorch Implementation of E(n)-Equivariant Graph Neural Networks, in Pytorch. May be eventually used for Alphafold2 replication. This

Official code of the paper
Official code of the paper "ReDet: A Rotation-equivariant Detector for Aerial Object Detection" (CVPR 2021)

ReDet: A Rotation-equivariant Detector for Aerial Object Detection ReDet: A Rotation-equivariant Detector for Aerial Object Detection (CVPR2021), Jiam

Vector Neurons: A General Framework for SO(3)-Equivariant Networks
Vector Neurons: A General Framework for SO(3)-Equivariant Networks

Vector Neurons: A General Framework for SO(3)-Equivariant Networks Created by Congyue Deng, Or Litany, Yueqi Duan, Adrien Poulenard, Andrea Tagliasacc

LieTransformer: Equivariant Self-Attention for Lie Groups
LieTransformer: Equivariant Self-Attention for Lie Groups

LieTransformer This repository contains the implementation of the LieTransformer used for experiments in the paper LieTransformer: Equivariant Self-At

 You Only Hypothesize Once: Point Cloud Registration with Rotation-equivariant Descriptors
You Only Hypothesize Once: Point Cloud Registration with Rotation-equivariant Descriptors

You Only Hypothesize Once: Point Cloud Registration with Rotation-equivariant Descriptors In this paper, we propose a novel local descriptor-based fra

Comments
  • Are the quadrupoles you use traceless or not?

    Are the quadrupoles you use traceless or not?

    I have downloaded the data you provided and found that the quadrupoles typically have a none zero trace which is much larger than the elements off diagonal. However, the outer products in your code are traceless, as in eq 17. in your paper. Are the quadrupole prediction results in your paper about traceless quadrupoles, or quadrupoles with trace?

    opened by 20171130 2
  • Training scripts

    Training scripts

    Hi fantastic work and thanks for sharing the model and weights this is really helpful, I was wondering if it would also be possible to share some training scripts as I would love to be able to train my own version of this model to data computed with a different level of theory?

    opened by jthorton 1
  • Is there something wrong with me? Why is the shape equals <unknown>?

    Is there something wrong with me? Why is the shape equals ?

    import h5py data = h5py.File("data.hdf5","r")

    writer = tf.io.TFRecordWriter("./tfrecord_1011")

    #data = np.array(data) dtype = np.float32 onehots_elements = { 'H': np.array([1, 0, 0, 0, 0, 0, 0], dtype=dtype), 'C': np.array([0, 1, 0, 0, 0, 0, 0], dtype=dtype), 'N': np.array([0, 0, 1, 0, 0, 0, 0], dtype=dtype), 'O': np.array([0, 0, 0, 1, 0, 0, 0], dtype=dtype), 'F': np.array([0, 0, 0, 0, 1, 0, 0], dtype=dtype), 'S': np.array([0, 0, 0, 0, 0, 1, 0], dtype=dtype), 'CL': np.array([0, 0, 0, 0, 0, 0, 1], dtype=dtype), 'Cl': np.array([0, 0, 0, 0, 0, 0, 1], dtype=dtype), } count = 0

    for key in data: # Iterates over each Unique Identifier coordinates = data[key]['coordinates'][()] elements = data[key]['elements'][()] monopoles = data[(key)]['monopoles'][()] dipoles = data[(key)]['dipoles'][()] quadrupoles = data[key]['quadrupoles'][()] #print("element,type",elements) elements = np.char.decode(elements,encoding="utf-8") tensor = [onehots_elements[e] for e in elements] graphs = build_graph(coordinates, elements, cutoff=4.0, num_kernels=32) batch = { 'nodes': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(graphs.nodes).numpy()])), 'edges': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(graphs.edges).numpy()])), 'coordinates': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(coordinates).numpy()])), 'n_node': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(graphs.n_node).numpy()])), 'n_edge': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(graphs.n_edge).numpy()])), 'senders': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(graphs.senders).numpy()])), 'receivers': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(graphs.receivers).numpy()])), 'monopoles': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(monopoles).numpy()])), 'dipoles': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(dipoles).numpy()])), 'quadrupoles': tf.train.Feature(bytes_list=tf.train.BytesList(value=[tf.io.serialize_tensor(quadrupoles).numpy()])), }
    example = tf.train.Example(features=tf.train.Features(feature=batch)).SerializeToString() writer.write(example) count+=1 if count==1: break print("go on")

    dtype_record = tf.float32 def load_data(record): batch = tf.io.parse_single_example(record, feature_description)
    nodes = tf.io.parse_tensor(batch['nodes'], out_type=dtype_record) edges = tf.io.parse_tensor(batch['edges'], out_type=dtype_record) coords = tf.io.parse_tensor(batch['coordinates'], out_type=dtype_record) n_node = tf.io.parse_tensor(batch['n_node'], out_type=tf.int32) n_edge = tf.io.parse_tensor(batch['n_edge'], out_type=tf.int32) senders = tf.io.parse_tensor(batch['senders'], out_type=tf.int32) receivers = tf.io.parse_tensor(batch['receivers'], out_type=tf.int32)
    monopoles = tf.io.parse_tensor(batch['monopoles'], out_type=dtype_record) dipoles = tf.io.parse_tensor(batch['dipoles'], out_type=dtype_record) quadrupoles = D_Q(tf.io.parse_tensor(batch['quadrupoles'], out_type=dtype_record)) graph = gn.graphs.GraphsTuple(nodes, edges, globals=None, receivers=receivers, senders=senders, n_node=n_node, n_edge=n_edge) return graph, coords, monopoles, dipoles, quadrupoles

    DATASET_FOLDER = "./tfrecord_1011"

    import json from google.protobuf.json_format import MessageToJson

    dataset = tf.data.TFRecordDataset("./tfrecord_1011") for d in dataset: ex = tf.train.Example() ex.ParseFromString(d.numpy()) m = json.loads(MessageToJson(ex)) print(m['features']['feature'].keys(),m['features']['feature'].values()) dataset = tf.data.TFRecordDataset([DATASET_FOLDER.format(x) for x in np.random.choice(1, 1, replace=False)], num_parallel_reads=2) dataset = dataset
    .repeat()
    .map(load_data, num_parallel_calls=tf.data.AUTOTUNE)
    .prefetch(tf.data.AUTOTUNE)
    .apply(tf.data.experimental.ignore_errors())
    .shuffle(32, reshuffle_each_iteration=True) dataset <ShuffleDataset element_spec=(GraphsTuple(nodes=TensorSpec(shape=, dtype=tf.float32, name=None), edges=TensorSpec(shape=, dtype=tf.float32, name=None), receivers=TensorSpec(shape=, dtype=tf.int32, name=None), senders=TensorSpec(shape=, dtype=tf.int32, name=None), globals=NoneTensorSpec(), n_node=TensorSpec(shape=, dtype=tf.int32, name=None), n_edge=TensorSpec(shape=, dtype=tf.int32, name=None)), TensorSpec(shape=, dtype=tf.float32, name=None), TensorSpec(shape=, dtype=tf.float32, name=None), TensorSpec(shape=, dtype=tf.float32, name=None), TensorSpec(shape=, dtype=tf.float32, name=None))> Is there something wrong with me? Why is the shape equals ?

    opened by Liaokang123456 0
Owner
null
[CIKM 2019] Code and dataset for "Fi-GNN: Modeling Feature Interactions via Graph Neural Networks for CTR Prediction"

FiGNN for CTR prediction The code and data for our paper in CIKM2019: Fi-GNN: Modeling Feature Interactions via Graph Neural Networks for CTR Predicti

Big Data and Multi-modal Computing Group, CRIPAC 75 Dec 30, 2022
This is the codebase for the ICLR 2021 paper Trajectory Prediction using Equivariant Continuous Convolution

Trajectory Prediction using Equivariant Continuous Convolution (ECCO) This is the codebase for the ICLR 2021 paper Trajectory Prediction using Equivar

Spatiotemporal Machine Learning 45 Jul 22, 2022
ATOMIC 2020: On Symbolic and Neural Commonsense Knowledge Graphs

(Comet-) ATOMIC 2020: On Symbolic and Neural Commonsense Knowledge Graphs Paper Jena D. Hwang, Chandra Bhagavatula, Ronan Le Bras, Jeff Da, Keisuke Sa

AI2 152 Dec 27, 2022
Using pretrained GROVER to extract the atomic fingerprints from molecule

Extracting atomic fingerprints from molecules using pretrained Graph Neural Network models (GROVER).

Xuan Vu Nguyen 1 Jan 28, 2022
QA-GNN: Question Answering using Language Models and Knowledge Graphs

QA-GNN: Question Answering using Language Models and Knowledge Graphs This repo provides the source code & data of our paper: QA-GNN: Reasoning with L

Michihiro Yasunaga 434 Jan 4, 2023
Distance Encoding for GNN Design

Distance-encoding for GNN design This repository is the official PyTorch implementation of the DEGNN and DEAGNN framework reported in the paper: Dista

null 172 Nov 8, 2022
A graph neural network (GNN) model to predict protein-protein interactions (PPI) with no sample features

A graph neural network (GNN) model to predict protein-protein interactions (PPI) with no sample features

null 2 Jul 25, 2022
GNN-based Recommendation Benchma

GRecX A Fair Benchmark for GNN-based Recommendation Preliminary Comparison DiffNet-Yelp dataset (featureless) Algo nDCG@5 nDCG@10 nDCG@15 MF 0.158707

null 73 Oct 17, 2022
DIR-GNN - Discovering Invariant Rationales for Graph Neural Networks

DIR-GNN "Discovering Invariant Rationales for Graph Neural Networks" (ICLR 2022)

Ying-Xin (Shirley) Wu 70 Nov 13, 2022