torch_sim.optimizers.bfgs¶
BFGS (Broyden-Fletcher-Goldfarb-Shanno) optimizer implementation.
This module provides a batched BFGS optimizer that maintains the full Hessian matrix for each system. This is suitable for systems with a small to moderate number of atoms, where the $O(N^2)$ memory cost is acceptable.
The implementation handles batches of systems with different numbers of atoms by padding vectors to the maximum number of atoms in the batch. The Hessian matrices are similarly padded to shape (n_systems, 3*max_atoms, 3*max_atoms).
Note: When cell_filter is active, forces are transformed using the deformation gradient to work in the same scaled coordinate space as ASE’s UnitCellFilter/FrechetCellFilter. The prev_forces and prev_positions are stored in the scaled/fractional space to match ASE’s behavior.
Functions
Classes
bool(x) -> bool |