minimize
Energy minimization helpers for molecular mechanics systems.
import mlx_atomistic.minimize
Classes
Section titled “Classes”MinimizationResult
Section titled “MinimizationResult”class MinimizationResult def __init__(positions: mx.array, energy: mx.array, energy_history: mx.array, max_force_history: mx.array, steps: int, converged: bool, method: str = 'steepest_descent', convergence_reason: str = '')Result of a simple force-based energy minimization.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | mx.array | ||
energy | mx.array | ||
energy_history | mx.array | ||
max_force_history | mx.array | ||
steps | int | ||
converged | bool | ||
method | str | 'steepest_descent' | |
convergence_reason | str | '' |
Functions
Section titled “Functions”minimize_energy
Section titled “minimize_energy”def minimize_energy(positions, force_terms: ForceTerm | list[ForceTerm] | tuple[ForceTerm, ...], *, cell: Cell | None = None, max_steps: int = 200, step_size: float = 0.001, force_tolerance: float = 0.001, backtracking: float = 0.5, min_step_size: float = 1e-12, neighbor_manager: NeighborListManager | None = None, method: str = 'steepest_descent') -> MinimizationResultMinimize potential energy with a selectable local optimizer.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | |||
force_terms | ForceTerm | list[ForceTerm] | tuple[ForceTerm, ...] | ||
cell | Cell | None | None | |
max_steps | int | 200 | |
step_size | float | 0.001 | |
force_tolerance | float | 0.001 | |
backtracking | float | 0.5 | |
min_step_size | float | 1e-12 | |
neighbor_manager | NeighborListManager | None | None | |
method | str | 'steepest_descent' |
Returns
MinimizationResult