MECP Algorithm

OpenMECP implements the MECP optimization algorithm of Harvey et al. (Theor. Chem. Acc. 99, 95–99, 1998) with several modern enhancements.

Problem Statement

Given two electronic states with energies and and gradients and , find the geometry that simultaneously satisfies:

  1. Degeneracy:
  2. Minimum energy: is the lowest-energy point on the crossing seam

Effective Gradient

Harvey et al. construct an effective gradient that encodes both conditions. First, define the normalized gradient difference:

The effective gradient has two orthogonal components:

f-vector — drives the energy gap to zero:

g-vector — minimizes the average energy in the intersection seam:

The total effective gradient is:

Convergence Criteria

All five criteria must be satisfied simultaneously:

CriterionKeywordDefault
Energy difference delta_e5.0 × 10⁻⁵ Ha
RMS atomic displacementrms_dis0.0025 Å
Maximum atomic displacementmax_dis0.004 Å
Maximum gradient componentmax_grad1.323 × 10⁻³ Ha/Å
RMS gradientrms_grad9.45 × 10⁻⁴ Ha/Å

Optimization Strategy

OpenMECP uses a hybrid strategy combining stability and speed:

Step 1–switch_step:  BFGS (builds Hessian curvature information)
Step switch_step+1:  GDIIS / GEDIIS (quadratic-convergence DIIS acceleration)

The default switch_step = 3 provides a 3-step BFGS warm-up before engaging DIIS. See Optimizers for a full description of each algorithm.

Two-State QM Calculation

At each MECP optimization step, OpenMECP:

  1. Writes the QM input files for state A and state B from the current geometry.
  2. Runs the QM program for state A, reads and .
  3. Runs the QM program for state B, reads and .
  4. Evaluates the MECP effective gradient .
  5. Updates the geometry using the selected optimizer.
  6. Checks convergence; writes checkpoint file if requested.

Unit Conventions

QuantityUnit used internally
EnergiesHartree
Coordinates (geometry)Ångström
GradientsHartree/Ångström
Hessian (direct)Hartree/Ångström²
Hessian (inverse)Ångström²/Hartree
Step sizeBohr (max_step_size)