QM/MM with mechanical embedding
The first v2.2 multiscale prototype combines a quantum region with a classical point-charge environment. It is the smallest useful QM/MM model: the QM region is computed in vacuum, its Mulliken charges are coupled to the MM point charges, and the MM-MM point-charge term is added.
Status. Implemented and exposed on the Rust, Python, WASM and CLI surfaces. This is mechanical embedding, not electrostatic embedding. Link atoms, bonded MM terms and polarizable MM are follow-ups. See the v2.x roadmap.
Feature.
alpha-qmmm(included inalpha-v2).
Why mechanical embedding first
Electrostatic embedding adds the MM point charges to the QM Hamiltonian:
That requires a QM core that accepts an external potential. The current SCF path does not. Mechanical embedding is the honest first step: it keeps the QM calculation unchanged and couples the two subsystems through the converged QM Mulliken charges.
Energy expression
The total energy is
with the point-charge coupling
and the MM-MM term
k_C = 332.06371 kcal·Å/(mol·e²). Positions are Å, charges are elementary charge and energies are kcal/mol.
API
use sci_form::qmmm::{QmMmConfig, QmMmSystem};
use sci_form::compute_qmmm_energy;
let system = QmMmSystem {
qm_elements: vec![8, 1, 1],
qm_positions: vec![
[0.0, 0.0, 0.0],
[0.9572, 0.0, 0.0],
[-0.239987, 0.927297, 0.0],
],
mm_elements: vec![8],
mm_positions: vec![[0.0, 0.0, 5.0]],
mm_charges: vec![-0.5],
};
let result = compute_qmmm_energy(&system, &QmMmConfig::default())?;
println!("{:.3} kcal/mol", result.total_energy_kcal_mol);Backends
| Method | QM region | Charge support |
|---|---|---|
QmMethod::Uhf | UHF/STO-3G | charged and open-shell |
QmMethod::Xtb | GFN2-xTB | neutral closed-shell singlets only |
The xTB backend returns Unsupported for a charged QM region and for any qm_multiplicity != 1, rather than silently computing a singlet energy for a requested doublet/triplet. Use UHF for open-shell QM regions.
Output
| Field | Meaning |
|---|---|
qm_energy_kcal_mol | QM energy |
qm_mm_energy_kcal_mol | QM-MM point-charge coupling |
mm_mm_energy_kcal_mol | MM-MM point-charge coupling |
total_energy_kcal_mol | Sum of the three terms |
qm_charges | Mulliken charges of the QM region |
n_qm, n_mm | Region sizes |
Validation
| Gate | Observable | Result |
|---|---|---|
| Empty MM region | Total energy equals QM energy | < 1e-12 kcal/mol |
| QM-MM Coulomb | Energy vs manual charge sum | < 1e-8 kcal/mol |
| Length mismatch | MM arrays | rejected |
| Coincident point charges | QM-MM or MM-MM distance | rejected (singular Coulomb) |
| Charged xTB | Neutral-only backend | Unsupported |
These are implementation gates. A QM/MM benchmark against ONIOM or an electrostatic-embedding reference is still required.
Bindings
| Surface | Entry point |
|---|---|
| CLI | sci-form qmmm '<QmMmSystem-json>' '<QmMmConfig-json>' |
| WASM | compute_qmmm_energy(system_json, config_json) |
| Python | compute_qmmm_energy(system_json, config_json) |
The JSON payloads are the serialized QmMmSystem and QmMmConfig.
Limitations
- Mechanical embedding only; the MM charges do not polarize the QM density.
- No link atoms, no bonded MM terms and no LJ term. The MM region is a set of point charges.
- No periodic boundaries.
- The QM-MM coupling uses Mulliken charges, which are basis-set dependent.
- The QM and MM subsystems must be supplied explicitly; automatic partitioning is not implemented.
- No gradients or geometry optimization yet.
Next steps
- Add an external point-charge potential to the SCF Hamiltonian (electrostatic embedding).
- Add link atoms and boundary validation.
- Add LJ and bonded MM terms.
- Add the QM/MM gradient and geometry optimization.
- Add PBC for surface and enzyme models.
- Benchmark against ONIOM/ORCA.