Skip to content

Conventional MP2 correlation energy ​

The v2.x wavefunction prototype adds a closed-shell MP2 correlation energy on top of the existing RHF/STO-3G orbitals. It is a conventional four-index MP2, not yet the RI/local variant.

Status. Implemented and exposed on the Rust, Python, WASM and CLI surfaces. The RI approximation, local PNO correlation and a PySCF parity benchmark are pending. See the v2.x roadmap.

Feature. alpha-mp2 (included in alpha-v2).

Theory ​

For closed-shell spatial orbitals,

EMP2=∑ijocc∑abvir[2(ia|jb)−(ib|ja)](ia|jb)ϵi+ϵj−ϵa−ϵb.

The implementation transforms the AO ERIs to the MO basis one index at a time:

(ia|jb)=∑μνλσCμiCνa(μν|λσ)CλjCσb.

The quarter transforms keep the memory at O(N² N_occ N_vir) instead of materialising the full N⁴ MO tensor.

API ​

rust
use sci_form::compute_mp2_energy;

let result = compute_mp2_energy(&[8, 1, 1], &water)?;
println!("HF   = {:.6} Ha", result.hf_energy_hartree);
println!("MP2  = {:.6} Ha", result.correlation_energy_hartree);
println!("Total= {:.6} Ha", result.total_energy_hartree);

Output ​

FieldMeaning
hf_energy_hartreeRHF total energy
correlation_energy_hartreeMP2 correlation energy
correlation_energy_kcal_molCorrelation energy in kcal/mol
total_energy_hartreeHF + MP2
n_basis, n_occupied, n_virtualOrbital dimensions

For water at the test geometry:

text
hf_energy_hartree          = -74.96297768393549
correlation_energy_hartree = -0.03552066349518875
correlation_energy_kcal_mol= -22.28955286823825
total_energy_hartree       = -74.99849834743068
n_basis / n_occupied / n_virtual = 7 / 5 / 2

The Python binding returns the JSON encoding of Mp2Result, like the CLI and WASM. Invalid geometry, an odd/closed-shell-incompatible electron count and a basis with no virtual orbital are ValueError/{error}; an RHF non-convergence remains NotConvergedError/{error}.

Scope ​

CapabilityStatus
Closed-shell conventional MP2implemented
RHF/STO-3G referenceimplemented
RI-MP2 / auxiliary basisnot implemented
SCS/SOS scalingnot implemented
Local PNO correlationnot implemented
Frozen corenot implemented
Open-shell MP2not implemented

Validation ​

GateObservableResult
Water correlationNegative and finitepasses
Energy decompositionTotal = HF + correlation< 1e-12
Invalid geometryLength mismatchrejected

A PySCF MP2 comparison and a basis-convergence study are still required before promotion. The CLI and bindings run neutral, closed-shell systems only; an odd electron count or a basis with no virtual orbital is rejected.

Bindings ​

SurfaceEntry point
CLIsci-form mp2 '<elements>' '<coords>'
WASMcompute_mp2_energy(elements, coords)
Pythoncompute_mp2_energy(elements, coords)

The CLI prints the full JSON result.

Limitations ​

  • Conventional O(N⁵) transform; not suitable for large molecules.
  • STO-3G only.
  • All occupied orbitals are correlated; no frozen core.
  • No RI, SCS/SOS or local correlation.
  • No analytical MP2 gradient or response properties.
  • No RI/local approximation and no analytic gradient.
  • No benchmark against PySCF/ORCA yet.

Next steps ​

  1. Add def2-SVP/TZVP and auxiliary basis sets.
  2. Add RI-MP2 and SCS/SOS scaling.
  3. Add frozen-core handling.
  4. Add local PNO correlation.
  5. Add PySCF parity and basis-convergence gates.
  6. Add an analytic MP2 gradient.

Released under the MIT License.