dft.restart
Dense SCF restart persistence for small DFT systems.
import mlx_atomistic.dft.restart
Classes
Section titled “Classes”DenseSCFRestart
Section titled “DenseSCFRestart”class DenseSCFRestart def __init__(density: np.ndarray, orbitals: np.ndarray, positions: np.ndarray, cell_lengths: np.ndarray, metadata: dict[str, Any])Loaded dense SCF restart data.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
density | np.ndarray | ||
orbitals | np.ndarray | ||
positions | np.ndarray | ||
cell_lengths | np.ndarray | ||
metadata | dict[str, Any] |
Methods
to_dict
Section titled “to_dict”def to_dict() -> dict[str, Any]Return a JSON-safe restart summary without dense fields.
Returns
dict[str, Any]
Functions
Section titled “Functions”load_dense_scf_restart
Section titled “load_dense_scf_restart”def load_dense_scf_restart(path: str | Path) -> DenseSCFRestartLoad a dense SCF restart file.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | Path |
Returns
DenseSCFRestart
save_dense_scf_restart
Section titled “save_dense_scf_restart”def save_dense_scf_restart(path: str | Path, result: SCFResult, *, positions, cell_lengths, metadata: dict[str, Any] | None = None) -> NoneSave density, orbitals, and ion/cell state to compressed NPZ.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | Path | ||
result | SCFResult | ||
positions | |||
cell_lengths | |||
metadata | dict[str, Any] | None | None |
Returns
None