dft.kpoints
k-point meshes and band-structure diagnostics.
import mlx_atomistic.dft.kpoints
Classes
Section titled “Classes”BandPath
Section titled “BandPath”class BandPath def __init__(points: Sequence[KPoint])Explicit k-point path for non-SCF band diagnostics.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
points | Sequence[KPoint] |
Methods
def line(start: Sequence[float], end: Sequence[float], *, count: int, start_label: str | None = None, end_label: str | None = None) -> BandPathBuild a linear path between two k points.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
start | Sequence[float] | ||
end | Sequence[float] | ||
count | int | ||
start_label | str | None | None | |
end_label | str | None | None |
Returns
BandPath
BandStructureResult
Section titled “BandStructureResult”class BandStructureResult def __init__(kpoints: tuple[KPoint, ...], eigenvalues: mx.array, reused_density: bool)Non-SCF band energies along a path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
kpoints | tuple[KPoint, ...] | ||
eigenvalues | mx.array | ||
reused_density | bool |
Methods
to_dict
Section titled “to_dict”def to_dict() -> dictReturn JSON-safe band data.
Returns
dict
KPoint
Section titled “KPoint”class KPoint def __init__(vector: Sequence[float], *, weight: float = 1.0, label: str | None = None)One reciprocal-space k point in Cartesian reciprocal units.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
vector | Sequence[float] | ||
weight | float | 1.0 | |
label | str | None | None |
Methods
def gamma() -> KPointReturn the Γ point.
Returns
KPoint
to_dict
Section titled “to_dict”def to_dict() -> dictReturn a JSON-safe representation.
Returns
dict
KPointMesh
Section titled “KPointMesh”class KPointMesh def __init__(points: Sequence[KPoint])Weighted k-point mesh.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
points | Sequence[KPoint] |
Methods
def gamma() -> KPointMeshReturn a one-point Γ mesh.
Returns
KPointMesh
to_dict
Section titled “to_dict”def to_dict() -> dictReturn a JSON-safe representation.
Returns
dict
MonkhorstPackGrid
Section titled “MonkhorstPackGrid”class MonkhorstPackGrid(KPointMesh) def __init__(size: Sequence[int])Simple Γ-centered Monkhorst-Pack-style mesh.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
size | Sequence[int] |
Functions
Section titled “Functions”run_band_structure
Section titled “run_band_structure”def run_band_structure(system: DFTSystem, scf_result: SCFResult, band_path: BandPath, *, n_bands: int = 1, xc_functional: ExchangeCorrelationFunctional | None = None) -> BandStructureResultEvaluate non-SCF bands on top of a converged density.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
system | DFTSystem | ||
scf_result | SCFResult | ||
band_path | BandPath | ||
n_bands | int | 1 | |
xc_functional | ExchangeCorrelationFunctional | None | None |
Returns
BandStructureResult