dft.spin_gga
Spin-polarized PBE exchange-correlation for periodic DFT.
import mlx_atomistic.dft.spin_gga
Classes
Section titled “Classes”ProductionSpinPBEExchangeCorrelation
Section titled “ProductionSpinPBEExchangeCorrelation”class ProductionSpinPBEExchangeCorrelation def __init__(name: str = 'spin-pbe-pw92-gga')Collinear spin-PBE with the PW92 uniform-gas baseline.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
name | str | 'spin-pbe-pw92-gga' |
Methods
evaluate
Section titled “evaluate”def evaluate(up_density: mx.array, down_density: mx.array, grid: RealSpaceGrid, *, density_floor: float = _FLOAT32_SPIN_DENSITY_FLOOR) -> SpinXCResultEvaluate spin-PBE energy and both local potentials.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
up_density | mx.array | Spin-up electron density on the real-space grid. | |
down_density | mx.array | Spin-down electron density on the real-space grid. | |
grid | RealSpaceGrid | Periodic real-space integration grid. | |
density_floor | float | _FLOAT32_SPIN_DENSITY_FLOOR | Positive per-channel numerical density floor. The default keeps the float32 GGA derivative finite for a numerically empty minority channel. |
Returns
SpinXCResult— Spin-resolved PBE energy density, total energy, and potentials.
Raises
ValueError— If density shapes or the floor are invalid.
SpinXCResult
Section titled “SpinXCResult”class SpinXCResult def __init__(name: str, energy_density: mx.array, potentials: mx.array, total_energy: mx.array)Spin-resolved exchange-correlation energy and potentials.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
name | str | ||
energy_density | mx.array | ||
potentials | mx.array | ||
total_energy | mx.array |
Properties
down_potentialmx.array— Return the spin-down exchange-correlation potential.up_potentialmx.array— Return the spin-up exchange-correlation potential.