JaxMDBackendSpec

class jaxrens.cli.schema.backend.JaxMDBackendSpec(*, periodic=False, softcore_repulsion=None, max_neighbors_list=<factory>, max_neighbors_offset=5, max_neighbors_shrink_dwell=0, type='jaxmd', potential, tersoff_params=None, tersoff_params_file=None, eam_params_file=None)[source]

Bases: BaseBackendSpec

jax-md classical analytic potentials (Tersoff, EAM).

All-pairs computation — no neighbor list, so max_neighbors_list and max_neighbors_offset from the base spec are ignored. See backends/jaxmd.py for the architectural rationale.

Tersoff needs exactly one of tersoff_params (a built-in set) or tersoff_params_file (a LAMMPS-format file); EAM needs eam_params_file and no Tersoff key. Mixing them is rejected at parse time.

backend:
  type: jaxmd
  potential: tersoff
  tersoff_params: Si
  periodic: true
backend:
  type: jaxmd
  potential: eam
  eam_params_file: potentials/Cu_u3.eam
  periodic: true
Parameters:
model_post_init(_JaxMDBackendSpec__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Parameters:

_JaxMDBackendSpec__context (Any)

Return type:

None

build_backend()[source]

Construct and return the EnergyBackend instance.

Subclasses override to pass their specific constructor kwargs.

Return type:

EnergyBackend

model_config = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].