Experimental cyclic MACE: first construction

This separate follow-up to the SECCM study implements A, a periodic-equivalent representation, not a new physical model. B, a modified finite-cluster potential, remains undefined and unimplemented. The manuscript, submission packages and its 0.18.x scope are unchanged. No automatic backport is requested. The existing program is tracked by #732, with definition #733, graph/energy #734, derivatives #735, output #736 and scientific qualification #737.

Definition A

Let the input cell have row lattice matrix A, positions x_i and species z_i. Let G = Z/n1 x Z/n2 x Z/n3, N = n1*n2*n3 and H = diag(n)*A. Reuse SECCMFiniteGroup for finite labels and group arithmetic. Do not use build_seccm_topology to truncate or weight MACE neighborhoods. Nodes (i,g) correspond to input atom i and group element g, with coordinate x_i + r_g*A. Each integer representative r_g is congruent to g modulo n. Replicas are exact copies of the complete input cell; independent defect displacements in different replicas are outside this API.

For every directed upstream edge (i,j,s) with |x_j - x_i + s*A| < r_cut, create at every g an edge (i,g) -> (j,h), where h = (g+s) mod n and q = (r_g+s-r_h)/n componentwise. Its Cartesian vector is

d = (x_j + r_h*A) - (x_i + r_g*A) + q*H
  = x_j - x_i + s*A.

Preserve the entire edge multiset, including different shifts between the same atom pair and nonzero-shift self images. Remove only (i,i,0). Winding shifts are essential even for n=(1,1,1). This one-cell periodic graph is not an isolated molecule. The isolated zero-image limit instead disables PBC and retains only s=0; it remains the conventional molecular MACE route.

Species features match initially. At every message-passing layer each lifted node receives the same multiset of displacement/features as its input-cell counterpart. Induction therefore preserves pooled features, tensor products, residual updates and site readouts for any finite number of layers. The cyclic energy, including atomic reference and scale/shift terms, is E_G = N*E_cell. Return E_cell = E_G/N; never divide by atom count or normalize only the learned interaction term. This is exact algebraically, subject to floating-point sums.

There is no minimum replica size for this equivalence, because all winding edges survive. The checkpoint’s actual L layers and cutoff are recorded. The receptive-field upper bound is L*r_cut, not r_cut. A finite halo oracle must reproduce all paths through L layers. This representation has the same periodic defect-image interactions as upstream MACE; it does not isolate defects and has no inherent speed or accuracy advantage. Replicating it costs more.

All distinct physical neighbors at a Wigner-Seitz tie have weight one. An even replica boundary can map different images to the same node but with different winding shifts; both edges remain. Signed representative choices do not create additional atoms. Moving representatives by supercell lattice vectors changes q, leaving all vectors and energy invariant. A unimodular lattice basis change preserves the infinite periodic multigraph. It can change the diagonal replica sublattice, but energy per input cell remains the same for these repeated cells.

Derivatives and initial API

ExperimentalMACECCMEvaluator in vibeqc.mlip.mace_ccm is an opt-in Python adapter. It uses the existing registry, checkpoint loader, digest verification, license gate and upstream network. Initial support is neutral, multiplicity-one, 3D cells, medium-mpa-0, CPU and float64. Other configurations fail explicitly. No conventional MACE dispatch changes, new dependencies or bundled weights are introduced. Registry citations remain batatia_mace_2022 and the model citation.

Coordinates of every replica are constructed inside autograd. Differentiating E_G/N with respect to the input coordinates sums all replica occurrences and gives the input-cell gradient. Returned energies use Hartree and gradients use Hartree/bohr, matching the existing integration. Topology is discrete and rebuilt on each call; force differences must stay within a fixed cutoff topology. Wigner-Seitz crossings do not switch edges in A. Cutoff crossings retain the upstream cutoff behavior, with no additional smoothness claim.

Cell derivatives and stress are deliberately unavailable. A later implementation must differentiate both r_g*A and q*H, together with positions transformed at fixed fractional coordinates. For row coordinates and deformation F, use x -> x*F.T, A -> A*F.T; define the sign and shear convention and compare dE_cell/dstrain before dividing by input-cell volume. Differentiating a frozen Cartesian shift omits a required term. Fixed-Cartesian cell derivatives are a different quantity. No cell optimization, dynamics, QVF method dispatch or production acceptance follows from this first adapter.

Why B needs a separate model definition

Batatia et al. (2022), Sections 2 and 4, Eqs. (2)-(4) and (8)-(13), pool neighbor features A_i = sum_e phi_e and then form tensor products of these features. Inserting ownership weights before pooling gives A_i = sum_e w_e*phi_e. A degree-v product then weights tuples by product_k w_e_k, including repeated neighbors. This is not generally a joint ownership rule for many-center terms. Nor is it equivalent to weighting complete environments or averaging readout energies after nonlinear updates. Keeping one closest image changes the inputs even without explicit weights. Altering normalization by the trained average neighbor count cannot restore the missing directional features or paths.

The SECCM/MSINDO ownership rule therefore supplies geometry, not a justified MACE weighting prescription. B must define its target scalar energy, joint image ownership, switching continuity, extensivity, derivative conventions, and whether its goal is a finite cyclic model or isolated-cluster behavior. If a chosen modification cannot be proved representation-equivalent, pretrained weights have no established transfer validity. A topology-consistent training or explicit requalification program is needed; the dedicated-model plan remains #739-#741, deferred. No training campaign is started. Physical accuracy needs independent reference data, not comparison to the same pretrained network.

Evidence contract and feasibility

Read from the configured library: batatia_mace_2022, DOI 10.52202/068431-0830, Sections 2, 4 and 5, Eqs. (2)-(4), (8)-(13), and Appendix A.5. The construction preserves these operations rather than introducing a new weighting approximation. The upstream 0.3.16 neighbor implementation keeps nonzero-shift self images; modules/models.py, modules/blocks.py and modules/utils.py define message aggregation, total readout and shift derivatives. The local upstream checkout is contextual; each execution records its installed version and checkpoint identity. The foundation-model domain is described by batatia_mace_mp_2024, DOI 10.1063/5.0297006.

Freeze these float64 bounds before assessing results: energy equivalence and invariance 1e-8 eV/input atom; gradient equivalence/covariance 1e-7 eV/angstrom; central force differences 1e-5 eV/angstrom at steps 1e-4 and 3e-5 angstrom. Use symmetric and distorted MgO/diamond, odd/even and unit replicas, multiple images and self images, alternative representatives, atom rewrapping, skew and unimodular lattice representations. Check translation, rotation, permutation, replication normalization and all Cartesian finite differences on the small distorted input cells. An independent integer/vector graph oracle complements the direct upstream calculator comparison. Stress is not claimed or tested.

Record executed source and native runtime, MACE/torch versions, weight checksum, dtype, units, inputs, queue job/host, raw outputs, tolerances and verdict on the issues. Unit tests establish graph logic, not scientific acceptance. Prior periodic MACE or SECCM results provide inputs and context, never adapter proof. No physical-accuracy or paper acceptance is inferred from same-model parity.

A is feasible as a bounded experimental adapter. B remains research, with no guaranteed novelty or predictive benefit. After the first graph/energy/gradient pilot, estimate 2-4 focused days for broader graph and derivative qualification, 1-2 days for stress if pursued, and 1-2 days for output integration and manuals. Allow 1-2 weeks for a defensible B definition; training cost cannot be estimated until targets, dataset and model size are specified.