bfgs_init¶
- torch_sim.optimizers.bfgs.bfgs_init(state, model, *, max_step=0.2, alpha=70.0, cell_filter=None, **filter_kwargs)[source]¶
Create an initial BFGSState.
Initializes the Hessian as Identity matrix * alpha.
- Shape notation:
N = total atoms across all systems (n_atoms) S = number of systems (n_systems) M = max atoms per system (max_atoms) D = 3*M (position DOFs) D_ext = 3*M + 9 (extended DOFs with cell)
- Parameters:
state (SimState) – Input state
model (ModelInterface) – Model
cell_filter (CellFilter | CellFilterFuncs | None) – Filter for cell optimization (None for position-only optimization)
**filter_kwargs (Any) – Additional arguments passed to cell filter initialization
- Returns:
BFGSState or CellBFGSState if cell_filter is provided
- Return type: