Library

Library and Material schemas for reusable parameter sets. Mirrors ionworkspipeline.library.

Library schemas.

class ionworks_schema.library.Material(name: str, description: str | None = None, parameter_values: dict[str, Any] | None = None, **kwargs)

Bases: BaseModel

Material configuration.

Holds a named parameter set — the three thermodynamic host-site fields for MSMR-style materials, or any other pybamm-compatible parameter values for the material.

Parameters

namestr

Human-readable material identifier (e.g. "NMC - Verbrugge 2017"). Used as the lookup key in the library.

descriptionstr, optional

Free-text description of the material — typically includes the citation or source the parameter values were taken from.

parameter_valuesdict, optional

Mapping of pybamm parameter names to their values for this material. For MSMR materials typically contains the host-site standard potentials, occupancy fractions, and ideality factors.

Extends: pydantic.main.BaseModel

See also: ionworkspipeline.Material (runtime implementation).

model_config = {'extra': 'allow'}

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

name: str
description: str | None
parameter_values: dict[str, Any]
classmethod from_library(name: str) Material
class ionworks_schema.library.Library

Bases: BaseModel

Material library access.

Exposes the bundled set of reference materials (e.g. graphite, NMC, LFP) via static lookups by name.

Extends: pydantic.main.BaseModel

See also: ionworkspipeline.Library (runtime implementation).

static list_materials() list[str]

Return the names of all bundled materials.

static get_material(name: str) Material

Return the Material registered under name.

Raises

KeyError

If name is not registered in the library.

model_config = {}

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