Skip to content

dft.spin_gga

Spin-polarized PBE exchange-correlation for periodic DFT.

import mlx_atomistic.dft.spin_gga

class ProductionSpinPBEExchangeCorrelation
def __init__(name: str = 'spin-pbe-pw92-gga')

Collinear spin-PBE with the PW92 uniform-gas baseline.

Parameters

NameTypeDefaultDescription
namestr'spin-pbe-pw92-gga'

Methods

def evaluate(up_density: mx.array, down_density: mx.array, grid: RealSpaceGrid, *, density_floor: float = _FLOAT32_SPIN_DENSITY_FLOOR) -> SpinXCResult

Evaluate spin-PBE energy and both local potentials.

Parameters

NameTypeDefaultDescription
up_densitymx.arraySpin-up electron density on the real-space grid.
down_densitymx.arraySpin-down electron density on the real-space grid.
gridRealSpaceGridPeriodic real-space integration grid.
density_floorfloat_FLOAT32_SPIN_DENSITY_FLOORPositive 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.
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

NameTypeDefaultDescription
namestr
energy_densitymx.array
potentialsmx.array
total_energymx.array

Properties

  • down_potential mx.array — Return the spin-down exchange-correlation potential.
  • up_potential mx.array — Return the spin-up exchange-correlation potential.