Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Optimizers

OpenMECP provides several geometry optimizers. All optimizers work on the MECP effective gradient described in the MECP Algorithm chapter.

BFGS (Initial Steps)

The Broyden–Fletcher–Goldfarb–Shanno quasi-Newton method provides a stable warm-up for the first switch_step iterations (default: 3). It builds up curvature information in the approximate Hessian before DIIS takes over.

When to use BFGS exclusively: Set switch_step = 999 (or any value ≥ max_steps) to run pure BFGS throughout — most stable but slower.

Relevant keywords: hessian, bfgs_rho, max_step_size


GDIIS — Geometry DIIS (Default)

use_gediis = false (default)

The Geometry Direct Inversion in the Iterative Subspace method constructs the next geometry as an optimal linear combination of previous Newton-step corrections:

GDIIS minimizes residual Newton-step forces and delivers robust quadratic convergence. Proven reliable for ~10-step convergence on production systems.

Performance: ~2–3× faster than pure BFGS.


GEDIIS — Energy-Informed DIIS

use_gediis = true, use_hybrid_gediis = false

Extends GDIIS by adding an energy-based diagonal bias to the B-matrix:

where is the energy gap at step . The diagonal term biases interpolation toward geometries with small energy gaps (i.e., close to the crossing seam). The constraint is — GEDIIS only interpolates, never extrapolates.

Best for: systems where the crossing seam needs to be approached from a geometry far from it.


Sequential Hybrid GEDIIS/GDIIS

use_gediis = true, use_hybrid_gediis = true

Implements the 3-phase switching strategy of Li & Frisch (JCTC 2006):

PhaseConditionAlgorithmRationale
1RMS grad > gediis_switch_rmsGDIISRobust convergence from rough starting geometry
2RMS grad ≤ gediis_switch_rmsGEDIISEnergy-guided approach to the crossing seam
3RMS disp < gediis_switch_stepGDIISClean quadratic final convergence

Default thresholds: gediis_switch_rms = 0.005 Ha/Å, gediis_switch_step = 0.001 Å.

Performance: ~2–4× faster than pure GDIIS on most systems.


GDIIS_blend

use_gediis = "blend"

A per-step blend of a GDIIS step and an EDIIS step, governed by a trust radius:

When use_hybrid_gediis = false, no EDIIS component is added (pure GDIIS with trust radius control). When use_hybrid_gediis = true, the blend weight is determined by gediis_blend_mode:

gediis_blend_modeWeight Behavior
fixed0.5 constantEqual GDIIS+EDIIS; may plateau
fixed_sequential (default)0.5 → 0 near convergence50/50 far out, pure GDIIS for final convergence
gradientSmooth sigmoid; EDIIS-heavy far, GDIIS-heavy near
sequential1 or 0 per stepBinary switching based on displacement trend

The trust radius automatically contracts when energy increases and expands when energy decreases, preventing wild steps.

Requirement: A direct Hessian update method (direct_psb, bofill, powell, or bfgs_powell_mix). inverse_bfgs is incompatible.


Optimizer Switching

The switch_step parameter controls when the warm-up BFGS steps hand off to DIIS:

switch_step = 3     # Default: 3 BFGS steps, then DIIS
switch_step = 0     # Pure DIIS from step 1 (fastest, needs good geometry)
switch_step = 10    # 10 BFGS steps, then DIIS (better for difficult cases)
switch_step = 999   # Pure BFGS (most stable, slowest)

The smart_history option retains the most useful geometry history points rather than using a simple FIFO queue, which can accelerate convergence.


Performance Comparison

OptimizerConvergence SpeedStabilityBest Use
BFGSBaselineHighestVery difficult cases
GDIIS~2–3× BFGSHighMost production runs
Sequential Hybrid~2–4× GDIISHighDefault recommended
GEDIISSimilar to hybridMediumCrossing-seam-distant starts
GDIIS_blendAdaptiveMedium–HighSystems with trust radius issues