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:
- Degeneracy:
- 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:
| Criterion | Keyword | Default |
|---|---|---|
| Energy difference | delta_e | 5.0 × 10⁻⁵ Ha |
| RMS atomic displacement | rms_dis | 0.0025 Å |
| Maximum atomic displacement | max_dis | 0.004 Å |
| Maximum gradient component | max_grad | 1.323 × 10⁻³ Ha/Å |
| RMS gradient | rms_grad | 9.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:
- Writes the QM input files for state A and state B from the current geometry.
- Runs the QM program for state A, reads and .
- Runs the QM program for state B, reads and .
- Evaluates the MECP effective gradient .
- Updates the geometry using the selected optimizer.
- Checks convergence; writes checkpoint file if requested.
Unit Conventions
| Quantity | Unit used internally |
|---|---|
| Energies | Hartree |
| Coordinates (geometry) | Ångström |
| Gradients | Hartree/Ångström |
| Hessian (direct) | Hartree/Ångström² |
| Hessian (inverse) | Ångström²/Hartree |
| Step size | Bohr (max_step_size) |