Expand description
OpenMECP - High-Performance Minimum Energy Crossing Point Optimizer
OpenMECP is a Rust implementation of the Harvey et al. algorithm for locating Minimum Energy Crossing Points (MECP) between two potential energy surfaces in quantum chemistry calculations.
§Overview
The MECP is the geometry where two electronic states have the same energy but different wavefunctions. This is crucial for understanding:
- Photochemical reactions
- Spin-forbidden processes
- Intersystem crossing
- Conical intersections
- Non-adiabatic dynamics
§Algorithm
OpenMECP implements the Harvey et al. algorithm (Chem. Phys. Lett. 1994) with modern optimization strategies. The MECP gradient combines two components:
-
f-vector: Drives energy difference to zero
f = (E1 - E2) * x_norm -
g-vector: Minimizes energy perpendicular to gradient difference
g = f1 - (x_norm · f1) * x_norm
Where x_norm = (f1 - f2) / |f1 - f2| is the normalized gradient difference.
§Features
- Multiple Optimizers: BFGS, GDIIS, GEDIIS with automatic switching
- QM Program Support: Gaussian, ORCA, Bagel, XTB, Custom interfaces
- Constraint System: Bond, angle, and fixed atom constraints with Lagrange multipliers
- Advanced Methods: LST interpolation, NEB, PES scans, coordinate driving
- Run Modes: Normal, Read, NoRead, Stable, InterRead modes for various scenarios
- Energy Scanning: 1D and 2D potential energy surface scans
- Restart Capability: Checkpoint system for restarting calculations
- Multi-layer QM/MM: ONIOM support for hybrid calculations
§Quick Start
use omecp::parser::parse_input;
use std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create configuration from file
let input_data = parse_input(Path::new("input.inp"))?;
let config = input_data.config;
// Run MECP optimization
// let result = config.run()?;
// println!("MECP converged at step: {}", result.steps);
Ok(())
}§Supported QM Programs
| Program | Methods | Features |
|---|---|---|
| Gaussian | DFT, TD-DFT, MP2, CASSCF | Full feature support, checkpoints |
| ORCA | DFT, TD-DFT, CASSCF | Energy/gradient files, GBW checkpoints |
| XTB | GFN2-xTB | Fast semi-empirical calculations |
| Bagel | CASSCF, MRCI | Advanced quantum chemistry methods |
| Custom | Any | JSON-configurable interface |
§Optimizers
§BFGS (Broyden-Fletcher-Goldfarb-Shanno)
- Quasi-Newton method with PSB Hessian updates
- Default for first 3 steps
- Good general-purpose optimizer
§GDIIS (Geometry-based Direct Inversion in Iterative Subspace)
- Automatically activates after 3 BFGS steps
- 2-3x faster convergence than BFGS
- Stores last 4 geometries and gradients
- Computes error vectors for optimal step direction
§GEDIIS (Energy-Informed DIIS)
- Enhanced version of GDIIS using energy information
- Set
use_gediis = trueto enable (or"blend"for new GDIIS_blend method) - 2-4x faster convergence than GDIIS for difficult cases
- Better handling of energy-difference minimization
§Modules
config- Configuration structures and parsinggeometry- Core geometry and state data structuresparser- Input file parsingqm_interface- QM program interfacesoptimizer- MECP optimization algorithmsconstraints- Geometric constraint systemio- File I/O utilitieslst- Linear synchronous transit interpolationcheckpoint- Restart functionalityreaction_path- NEB and path optimizationtemplate_generator- Input file templateshelp- Built-in help system
§Input File Format
OpenMECP uses a custom input format with section-based syntax:
*GEOM
C 0.0 0.0 0.0
H 1.0 0.0 0.0
*
*TAIL_a
# Additional keywords for state A
*
*TAIL_b
# Additional keywords for state B
*
program = gaussian
method = B3LYP/6-31G*
nprocs = 4
mem = 4GB
charge = 0
mult_state_a = 1 # or mult_a = 1
mult_state_b = 3 # or mult_b = 3§Examples
See the project repository for complete examples including:
- Basic singlet-triplet MECP
- TD-DFT excited states
- Open-shell singlet calculations
- PES scans with constraints
- LST interpolation
- Coordinate driving
- ONIOM calculations
§References
- Harvey, J. N.; Aschi, M.; Schwarz, H.; Koch, W. Theoret. Chim. Acta 1994, 90, 189-194. DOI: 10.1007/BF01120148
§License
MIT License - see LICENSE file for details
§Version
0.0.1 (Alpha)
Re-exports§
Modules§
- checkpoint
- Restart functionality Checkpoint system for saving and restarting MECP calculations.
- cleanup
- Automated file cleanup for quantum chemistry calculations Automated file cleanup for quantum chemistry calculations.
- config
- Configuration structures and parsing for OpenMECP input files.
- constraints
- Geometric constraint system for molecular optimization.
- gdiis
- GDIIS (Geometry Direct Inversion in Iterative Subspace) implementation GDIIS (Geometry Direct Inversion in Iterative Subspace) implementation.
- gediis
- GEDIIS (Geometry Energy Direct Inversion in Iterative Subspace) implementation GEDIIS (Geometry Energy Direct Inversion in Iterative Subspace) implementation.
- geometry
- Core geometry and state data structures for molecular representations.
- help
- Built-in help system Comprehensive help system for MECP
- hessian_
update - Hessian update methods (BFGS, Bofill, Powell) Hessian update methods for optimization algorithms.
- io
- File I/O utilities for geometry and checkpoint files.
- lst
- Linear synchronous transit interpolation Linear Synchronous Transit (LST) interpolation module.
- naming
- Dynamic file naming based on input file basename Dynamic file naming based on input file basename
- optimizer
- Optimization algorithms for MECP calculations.
- parser
- Input file parsing for OpenMECP configuration.
- pes_
scan - PES scanning functionality PES (Potential Energy Surface) scanning functionality.
- qm_
interface - Quantum chemistry program interfaces for MECP calculations.
- reaction_
path - NEB and path optimization Reaction path optimization and coordinate driving methods.
- settings
- Configuration management system Configuration management for OpenMECP.
- template_
generator - Input file templates
- validation
- Run mode validation and compatibility checking Run mode validation and compatibility checking for OpenMECP.