MACEBackend¶
- class jaxrens.backends.mace.MACEBackend(graphdef, state, r_cutoff, num_species, atomic_numbers, supercell_trafo=(2, 2, 2))[source]¶
Bases:
objectMACE-JAX energy backend for jaxrens.
Model weights live on the instance. JIT-compatible supercell neighbor finding. Satisfies EnergyBackend protocol via duck typing.
The graphdef (model structure) is captured in a closure for JIT. The state (model parameters) is stored as arrays.
- Parameters:
- max_neighbors_for(positions, cell)[source]¶
Per-atom max neighbor count for
(positions, cell), geometry only.Used at init time so the NS loop can start with a correctly-sized neighbor bucket and accurate per-walker
max_neighbor_count, without probing the GNN forward pass. vmap-friendly.- Parameters:
positions (Array)
cell (Array)
- Return type:
Array