GDIIS/GEDIIS — Geometry-Space DIIS for Optimization

OpenQuantum implements GDIIS (Gradient DIIS) and GEDIIS (Geometry-Dependent DIIS) for accelerating geometry optimization convergence. These methods extrapolate from previous geometry/gradient points to find a better step, analogous to how SCF-DIIS extrapolates from previous Fock matrices.

Comparison with SCF-DIIS

PropertySCF-DIISGDIIS/GEDIIS
SpaceFock matricesGeometry coordinates
Error vector commutatorNegative gradient
WeightingError-normEnergy-weighted (GEDIIS)
Subspace size6–102–6
ConvergenceQuadraticSuperlinear

How GDIIS Works

Setup: At each optimization cycle, store the current geometry , gradient , and energy in a subspace of size (default ).

Error vectors: The negative gradient serves as the error vector:

At a minimum, the gradient should be zero, so the gradient measures how far we are from the solution.

DIIS matrix construction: Build the overlap matrix of error vectors:

Constrained optimization: Find coefficients that minimize the error norm subject to :

Extrapolated step: The DIIS-extrapolated geometry is:

How GEDIIS Works

GEDIIS extends GDIIS by weighting the DIIS matrix by energy differences, preferring steps that lower the energy. Three matrix types are tried in order:

1. RFO-DIIS (most robust)

Uses the quadratic step overlap as the DIIS matrix:

where is the RFO step from point . This requires computing the RFO step at each stored point, but produces the most reliable extrapolation.

2. EnDIS (Energy-DIIS)

Uses energy-difference weighting:

This matrix is positive-definite when all steps lower the energy, ensuring a well-defined extrapolation.

3. GDIIS (fallback)

Standard gradient-overlap matrix as described above.

Algorithm Flow

For each optimization cycle n:
  1. Evaluate energy E_n and gradient g_n at current geometry q_n
  2. Store (q_n, g_n, E_n) in DIIS subspace
  3. If subspace size >= min_subspace (default 2):
     a. Try RFO-DIIS: build A_ij = s_i · s_j, solve for c_i
     b. If RFO-DIIS fails, try EnDIS
     c. If EnDIS fails, fall back to GDIIS
  4. Validate coefficients:
     - Largest |c_i| must exceed threshold (default 0.1)
     - Sum of negative coefficients must not exceed -1.0
  5. Compute extrapolated geometry: q_DIIS = Σ_i c_i q_i
  6. Use q_DIIS as the next geometry (or blend with TRM step)

Step Quality Checks

Cosine check: The angle between the extrapolated gradient and the last error vector should be small (cosine close to 1.0):

If , the DIIS step is rejected and TRM is used instead.

Step ratio check: The ratio should be reasonable. Extreme values indicate the extrapolation is unreliable.

Transition-State (TS) Mode

For TS optimization (TransitionState true), GEDIIS applies special weighting:

  • The reaction coordinate gradient component is scaled by ts_reaction_coord_weight
  • Minimum subspace size is 4 (vs 2 for minima)
  • The extrapolation prefers steps that maintain the correct curvature direction

Usage

Enable with Diis true in the OPT section:

OPT
  Diis     true
  DiisSize 4
  ...
END

Most effective for:

  • Difficult optimizations near flat regions of the PES
  • Multi-step convergences where the optimizer oscillates between geometries
  • Large molecules where each SCF evaluation is expensive

GEDIIS typically reduces the number of optimization cycles by 20–40% compared to standard TRM for well-behaved systems.