Skip to content

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 in alpha-v2).

Why mechanical embedding first ​

Electrostatic embedding adds the MM point charges to the QM Hamiltonian:

HQM/MM=HQM+∑m∑iqm|ri−Rm|+∑m∑AqmZA|RA−Rm|.

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

EQM/MM=EQM+EQM−MM+EMM−MM,

with the point-charge coupling

EQM−MM=kC∑i∈QM∑m∈MMqiqmrim,

and the MM-MM term

EMM−MM=kC∑m<nqmqnrmn.

k_C = 332.06371 kcal·Å/(mol·e²). Positions are Å, charges are elementary charge and energies are kcal/mol.

API ​

rust
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 ​

MethodQM regionCharge support
QmMethod::UhfUHF/STO-3Gcharged and open-shell
QmMethod::XtbGFN2-xTBneutral 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 ​

FieldMeaning
qm_energy_kcal_molQM energy
qm_mm_energy_kcal_molQM-MM point-charge coupling
mm_mm_energy_kcal_molMM-MM point-charge coupling
total_energy_kcal_molSum of the three terms
qm_chargesMulliken charges of the QM region
n_qm, n_mmRegion sizes

Validation ​

GateObservableResult
Empty MM regionTotal energy equals QM energy< 1e-12 kcal/mol
QM-MM CoulombEnergy vs manual charge sum< 1e-8 kcal/mol
Length mismatchMM arraysrejected
Coincident point chargesQM-MM or MM-MM distancerejected (singular Coulomb)
Charged xTBNeutral-only backendUnsupported

These are implementation gates. A QM/MM benchmark against ONIOM or an electrostatic-embedding reference is still required.

Bindings ​

SurfaceEntry point
CLIsci-form qmmm '<QmMmSystem-json>' '<QmMmConfig-json>'
WASMcompute_qmmm_energy(system_json, config_json)
Pythoncompute_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 ​

  1. Add an external point-charge potential to the SCF Hamiltonian (electrostatic embedding).
  2. Add link atoms and boundary validation.
  3. Add LJ and bonded MM terms.
  4. Add the QM/MM gradient and geometry optimization.
  5. Add PBC for surface and enzyme models.
  6. Benchmark against ONIOM/ORCA.

Released under the MIT License.