The M3GNet graph is represented as G = (V, E, X, [M, u]) where v i ∈ V is atom information for i, e ij ∈ E is the bond information for the bond between atom i and atom j, u is an optional global state, and M is the 3 × 3 lattice matrix in the crystal structure. For atom i there is a neighborhood N i . All bonds emanating from atom i are used in calculating bond interactions of e ij . Each e ij is updated using all distinct combinations of n -2 neighbors in the neighborhood of atom i excluding atom j as: