dft.runtime_state
Runtime-owned DFT state accounting and serialization adapters.
import mlx_atomistic.dft.runtime_state
Functions
Section titled “Functions”fixed_density_state_metrics
Section titled “fixed_density_state_metrics”def fixed_density_state_metrics(*, result: Any, basis: Any) -> dict[str, int]Return logical runtime-owned bytes for one fixed-density eigenstate.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
result | Any | Periodic eigensolver result. | |
basis | Any | Basis owning the result coefficients. |
Returns
dict[str, int]— Logical coefficient payload and full-grid byte counts.
serialize_fixed_density_state
Section titled “serialize_fixed_density_state”def serialize_fixed_density_state(state: Mapping[str, Any]) -> dict[str, bytes]Serialize one runtime-owned fixed-density state without report coupling.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
state | Mapping[str, Any] | Mapping containing result, basis, density, and effective potential. |
Returns
dict[str, bytes]— Relative payload names mapped to deterministic bytes.
serialize_periodic_scf_state
Section titled “serialize_periodic_scf_state”def serialize_periodic_scf_state(result: Any) -> dict[str, bytes]Serialize a periodic SCF result through the runtime-owned state adapter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
result | Any | Periodic SCF result to serialize. |
Returns
dict[str, bytes]— Relative payload names mapped to deterministic bytes.