The Dataset Viewer has been disabled on this dataset.

GMD: Benchmarking Compositional Generalisation for Machine Learning Interatomic Potentials

GMD (Generalisation for Molecular Dynamics) is a benchmark that asks whether machine learning interatomic potentials (MLIPs) learn the compositional structure of chemistry, or only interpolate between training molecules. Each of its five tasks trains on one set of molecules and tests on unseen molecules that differ by a single compositional operation (longer chains, fused, duplicated, combined or split functional groups).

Paper: A. M. Nourollah, I. Khalid, S. Leoni, S. Schockaert. Benchmarking Compositional Generalisation for Machine Learning Interatomic Potentials. NeurIPS 2026, Evaluations & Datasets Track. arXiv:2605.08988

Code: generation toolkit Nourollah/GMD-26 · training framework Nourollah/GOAL


Quick start

pip install ase huggingface_hub          # + "ase-db-backends" for LMDB, "zarr>=3" for Zarr
hf download AmirMasoud/GMD gmd.py --repo-type dataset --local-dir .
from gmd import load

data = load("fragment_fusion")           # paper splits, ready to train
data["train"][0].get_forces()            # every item is an ase.Atoms with energy + forces

load downloads only the files that the task needs, in the format you ask for, and caches them in the standard Hugging Face cache. It returns a dict of lists of ase.Atoms:

key content
train training molecules, frames 0–999
val training molecules, frames 1000–1199
test_id training molecules, frames 1400–1599 (in-distribution test)
test_ood unseen test molecules, frames 1400–1599 (out-of-distribution test)

Each Atoms has get_potential_energy() (eV), get_forces() (eV/Å) and atoms.info = {"molecule": "OC10H22", "family": "Alcohols", "frame": 1412}. Most MLIP codes take ase.Atoms directly. To get an extended-XYZ file (for example for MACE), run ase.io.write("train.xyz", data["train"]).


Loading options

from gmd import load

# 1. Paper protocol (default). Any task name from the table below, snake_case or CamelCase.
data = load("fragment_duplication")
data = load("FragmentDuplication")                       # same thing

# 2. Smaller fixed windows, still non-overlapping and paper-aligned
data = load("fragment_duplication", n_train=500, n_val=100, n_test=100)

# 3. Random frames per molecule (disjoint train/val/test), any size, reproducible
data = load("fragment_duplication", seed=42)                           # paper sizes 1000/200/200
data = load("fragment_duplication", seed=42, n_train=1500, n_test=300)

# 4. The whole dataset (all molecules, all frames), shuffled and split by fraction
data = load("all")                                        # 80/10/10, seed 0 → {"train", "val", "test"}
data = load("all", fractions=(0.7, 0.15, 0.15), seed=1)

# 5. Pick the storage format (identical content, different I/O characteristics)
data = load("fragment_fusion", format="lmdb")             # "traj" (default) | "lmdb" | "zarr" | "npz"

Full signature:

load(task, format="traj", *, n_train=1000, n_val=200, n_test=200, seed=None,
     fractions=(0.8, 0.1, 0.1), root=None)
  • seed=None uses the paper protocol: fixed frame windows starting at frame 0 (train), 1000 (val) and 1400 (ID and OOD test). Each window is n_* frames long.
  • seed=<int> samples n_train + n_val + n_test disjoint random frames from each training molecule, and n_test random frames from each OOD molecule.
  • fractions is used only when task="all".
  • root points at a local clone of this repository instead of downloading.

If a molecule has fewer frames than requested for a split, load returns what exists and warns.

To get only the files, call gmd.download(task, format). It returns the local root, laid out as <format>/<Family>/<molecule>.<ext>. To read a single file, call gmd.read(path).


Benchmark tasks

Training and OOD test molecules are disjoint in every task (Table 1 of the paper; augmented variants from Appendix A.3).

task Training molecules OOD test molecules
fragment_chain_extension C2–C6 alkanes C7–C13 alkanes
fragment_fusion C4–C10 alcohols and aldehydes; C7–C11 complex polyols and polycarbonyls C4–C10 carboxylic acids
fragment_duplication C5–C10 carboxylic acids C5–C10 dicarboxylic acids
fragment_combination C2–C9 diamines; C2–C9 dicarboxylic acids C2–C9 amino acids
fragment_fission C5–C10 carboxylic acids (= Duplication training set) C5–C10 alcohols; C5–C10 aldehydes
fragment_chain_extension_augmented C2–C3 & C9–C15 alcohols; C4–C8 carboxylic acids C4–C8 alcohols; C2–C3 & C9–C15 carboxylic acids
fragment_fusion_augmented Fusion training set + C4–C8 amines and amides C4–C10 carboxylic acids
  1. Fragment Chain Extension (length generalisation): extrapolate to longer carbon chains than seen in training.
  2. Fragment Fusion: predict a functional group (–COOH) that composes groups seen separately (–OH, –CHO).
  3. Fragment Duplication: generalise from one occurrence of a functional group to two.
  4. Fragment Combination: generalise from symmetrically functionalised molecules (two –NH₂, or two –COOH) to asymmetric ones (one of each).
  5. Fragment Fission: the inverse of Fusion. Train on carboxylic acids, test on alcohols and aldehydes.

The exact molecule list of each task is in gmd.TASKS.


Formats

The same data is stored once per format. Pick the one that fits your pipeline; there is nothing to convert.

format path what it is good for
traj traj/<Family>/<mol>.traj ASE trajectory ASE, MACE, NequIP, quick inspection
lmdb lmdb/<Family>/<mol>.aselmdb ASE-db on LMDB (the FairChem .aselmdb layout, as in OMol25/OMat24) FairChem AseDBDataset, GOAL aselmdb, random access in data loaders
zarr zarr/<Family>/<mol>.zarr Zarr v3 group of dense arrays array/tensor pipelines, slicing frames without object overhead
npz npz/<Family>/<mol>.npz NumPy archive, MD17-style keys z, pos, energy, forces, frame (labels only, no momenta or cell) plain NumPy/PyTorch with no extra dependencies, PyTorch Geometric

Using the files directly:

import ase.db, numpy as np, zarr
from ase.io import read

frames = read("traj/Alcohols/OC10H22.traj", "1400:1600")

db = ase.db.connect("lmdb/Alcohols/OC10H22.aselmdb", readonly=True)   # pip install ase-db-backends
test = [row.toatoms() for row in db.select("frame>=1400,frame<1600")]

g = zarr.open_group("zarr/Alcohols/OC10H22.zarr", mode="r")
g["positions"].shape                      # (n_frames, n_atoms, 3)

d = np.load("npz/Alcohols/OC10H22.npz")    # d["z"], d["pos"], d["energy"], d["forces"], d["frame"]

Zarr arrays per molecule:

array shape unit
numbers (N,) atomic number
frame (T,) snapshot index in the original trajectory
positions (T, N, 3) Å
forces (T, N, 3) eV/Å
energy (T,) eV, total energy
momenta (T, N, 3) ASE units (from the sampling MD)
initial_charges (T, N) as stored by the generation pipeline
cell, pbc (T, 3, 3), (T, 3) Å; simulation box from the sampling MD

The .traj and .aselmdb files hold the same fields per frame, with molecule, family and frame in atoms.info (or as key-value pairs in the database). Labels are single-molecule, non-periodic DFT; the cell is the padded box the sampling MD used.


Dataset

  • 140 molecules in 12 families (below), built on substituted linear alkyl chains of H, C, N and O.
  • 281,984 labelled configurations. Each trajectory has 2,011 snapshots (2,048 for the C2–C13 alkanes).
  • Labels: ORCA, PBE/def2-TZVP + D3BJ (!EnGrad PBE D3BJ def2-TZVP RI TightSCF). Total energy in eV, forces in eV/Å. Every snapshot converged, and none were excluded.
  • Sampling: RDKit conformer from SMILES, then FlashMD (pet-omatpes checkpoint) in vacuum at 300 K with a Langevin thermostat (100 fs relaxation time). The run is 2×10⁵ steps with a 16 fs step, and a snapshot is recorded every 100 steps. This gives off-equilibrium, high-diversity configurations.
  • Alkanes longer than C13 (up to C30) are included for length-generalisation studies beyond the paper's range.
Family Molecules
Alkanes C2–C30
Alcohols C2–C15
Aldehydes C2–C15
CarboxylicAcids C2–C15
DiCarboxylicAcids C2–C16
Amines C4–C8
DiAmines C2–C11
Amides C4–C8
AminoAcids C2–C10
Polyols 11 complex polyols (Fragment Fusion training set)
KetoAldehydes 8 complex polycarbonyls (Fragment Fusion training set)
CycloComplexes 6 molecules, not used by any task

Atomic reference energies

Energies of the isolated atoms, computed at the same level of theory as the labels (eV):

element H C N O
E₀ (eV) −13.595298 −1028.481145 −1483.895483 −2041.117735

They are also in gmd.ATOM_REFS (keyed by atomic number). Use them as per-element baselines (for example MACE E0s) or to get atomisation energies:

from gmd import ATOM_REFS
e_atomisation = atoms.get_potential_energy() - sum(ATOM_REFS[z] for z in atoms.numbers)

Repository layout

gmd.py                   loader (load / download / read / TASKS / ATOM_REFS)
traj/ lmdb/ zarr/ npz/  the dataset, one file (or Zarr group) per molecule, in each format
scripts/build_formats.py regenerates lmdb/, zarr/ and npz/ from traj/ and checks they read back identically
trained_models/<Task>/<model>/   weights of the models evaluated in the paper

trained_models/ is large (~140 GB). Avoid a plain snapshot_download of the whole repository; use load, download, or allow_patterns.


Citation

@inproceedings{nourollah2026gmd,
  title         = {Benchmarking Compositional Generalisation for Machine Learning Interatomic Potentials},
  author        = {Nourollah, Amir Masoud and Khalid, Irtaza and Leoni, Stefano and Schockaert, Steven},
  booktitle     = {Advances in Neural Information Processing Systems (NeurIPS), Evaluations and Datasets Track},
  year          = {2026},
  eprint        = {2605.08988},
  archivePrefix = {arXiv},
  url           = {https://arxiv.org/abs/2605.08988}
}

Licence

Released under the Creative Commons Attribution 4.0 International (CC BY 4.0) licence.

Downloads last month
765

Paper for AmirMasoud/GMD