TECHNOLOGY

MatterSim graph construction: cutoff and periodic cell define the neighborhood

In this article
THE QUICK TAKE

Atomic coordinates do not define the complete model graph without cell, periodicity, and neighborhood configuration.

A coordinate cache can reuse the wrong graph

An atomistic inference service may cache a neighbor graph under an atom-coordinate key. If the periodic cell or boundary flags change, the same visible coordinates can describe different neighboring images. Reusing the old graph then changes the requested physical system before the neural model runs.

The MatterSim workflow exposes an atomistic calculator interface. Preserve the full structure representation rather than treating its positions as the complete input.

Pair and three-body cutoffs have separate roles

The dataloader builder passes pair-neighborhood and three-body cutoff settings into graph construction. These parameters influence which relationships are represented and should match the selected model configuration.

Changing a cutoff to reduce preprocessing work is therefore not automatically an equivalent optimization. Record it as a changed input/model configuration unless equivalence is established for the intended computation. Equal atom counts do not establish equal edge or triplet domains.

The calculator derives graph settings from the model

The calculator implementation connects model arguments to graph preparation and includes positions, atomic numbers, cell, and periodicity in its direct path. A custom graph producer must preserve the same semantics.

Review graph conversion separately from neural execution when comparing implementations. An apparently faster forward path can simply receive a smaller or differently constructed neighborhood. The benchmark methodology helps identify that workload mismatch.

Periodic images require an identity map

Edges involving periodic images need their relation to the original atoms and lattice shifts. A padded graph index is not an independent physical atom identity. Preserve that mapping when exporting per-site results or comparing graph-construction backends.

The tensor-axis guide provides context for working versus source axes. A shape-compatible graph batch can still contain incorrect image relationships or edges connecting different systems.

Verify graph and output equivalence separately

Inspect a small periodic structure, its neighborhood, and the resulting output under the selected graph path. Include a boundary-crossing example rather than testing only atoms far from the cell edge.

Retain model cutoffs, cell, periodic flags, converter revision, and graph path in the result manifest. Correct graph construction supports computational consistency; it does not establish the physical accuracy of every material configuration or a measured speedup for an untested backend.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles