OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Molecule Attention Transformer

Molecule Attention Transformer is a work-in-progress Python and PyTorch implementation of a modified transformer for molecular graph inputs, combining atom features with adjacency and distance information.

Independent OpenViST project profile, based on linked sources.

Molecule Attention Transformer — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want an implementation to experiment with molecular graph inputs in PyTorch or to study transformer behavior on graph-structured data.

Who it is for

  • Researchers prototyping transformer approaches to molecular machine learning.
  • Developers exploring graph-structured inputs with PyTorch.
  • Learners studying transformer limitations and attention mechanisms for molecular data.

Documented uses

  • Create a MAT model with configurable dimensions, depth and attention weights.
  • Provide atom features, a mask, adjacency and distance matrices to obtain a model output tensor.
  • Explore how graph, distance and self-attention contributions interact in a molecular transformer.
Before you choose

Requirements & limits

The repository documents installation through pip and lists an MIT license.

  • The model expects atom features, a mask, adjacency matrices and distance matrices as separate inputs.
  • The documented configuration exposes relative weights for adjacency, distance and ordinary self-attention.
  • The author describes the implementation as work in progress and notes that tuning these weights may be needed for good results.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the library and prepare a MAT example

Set up the documented Python import and shape the model inputs shown in the README.

Before you start

  • Python environment with pip
  • PyTorch
  • Atom features, a mask, an adjacency matrix and a distance matrix

Steps

  1. Install the package with the command below.

    Documented command
    pip install molecule-attention-transformer
  2. Import torch and MAT from molecule_attention_transformer.

  3. Construct a MAT model by specifying input, model and output dimensions, depth, attention weights and a distance kernel.

  4. Prepare atom, mask, adjacency and distance tensors, then pass them to the model as shown in the usage example.

Expected outcome

The documented example produces an output tensor with shape `(2, 1)` from a batch of two molecular inputs.

Guide limitations

  • The repository describes the implementation as work in progress.
  • The example does not document how to prepare real molecular data or evaluate predictions.
  • The README notes that good results may require hyperparameter sweeps over distance, adjacency and self-attention weights.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
lucidrains/molecule-attention-transformer · Official homepage title · retained in its source language