BaseBackendSpec

class jaxrens.cli.schema.backend.BaseBackendSpec(*, periodic=False, softcore_repulsion=None, max_neighbors_list=<factory>, max_neighbors_offset=5, max_neighbors_shrink_dwell=0)[source]

Bases: BaseModel

Fields shared by every backend type.

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

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

property backend_type: str

Backward-compatible alias for the type discriminator field.

to_backend_config()[source]

Produce the library BackendConfig dataclass.

Subclasses override _backend_config_extras to inject their specific fields (checkpoint_path, cutoff, etc.). Shared fields (periodic, max_neighbors_list/offset) are handled here. n_atoms is derived from the initial walker positions at resolve time, not stored on the backend spec.

Return type:

BackendConfig

build_backend()[source]

Construct and return the EnergyBackend instance.

Subclasses override to pass their specific constructor kwargs.

Return type:

EnergyBackend