dft.stress
Finite-difference stress diagnostics for orthorhombic DFT cells.
import mlx_atomistic.dft.stress
Classes
Section titled “Classes”StressResult
Section titled “StressResult”class StressResult def __init__(stress: mx.array, pressure: float, displacement: float, samples: tuple[dict, ...])Diagonal orthorhombic stress estimate.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
stress | mx.array | ||
pressure | float | ||
displacement | float | ||
samples | tuple[dict, ...] |
Methods
to_dict
Section titled “to_dict”def to_dict() -> dictReturn a JSON-safe stress summary.
Returns
dict
Functions
Section titled “Functions”finite_difference_stress
Section titled “finite_difference_stress”def finite_difference_stress(system: DFTSystem, *, config: SCFConfig | None = None, xc_functional: ExchangeCorrelationFunctional | None = None, displacement: float = 0.001) -> StressResultEstimate diagonal stress by finite-differencing orthorhombic cell lengths.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
system | DFTSystem | ||
config | SCFConfig | None | None | |
xc_functional | ExchangeCorrelationFunctional | None | None | |
displacement | float | 0.001 |
Returns
StressResult