CASPT2: fix the VJTU-VJAI (A-E) H0 coupling (factor sqrt(2) too large)
The bug
In sgm.F90 (σ = H0·x) and offdns.F90 (CASPT2 density), the H0 couplings between case A (VJTU) and case E (VJAI+, VJAI−) go through the inactive–virtual Fock elements f_ai (KOD 4 and 5). They were a factor √2 larger than those of H0 = P F P:
| old | new | |
|---|---|---|
| KOD 4 (A & E+) | (1, √2) | (1/√2, 1) |
| KOD 5 (A & E−) | (−√3, √3) | (−√(3/2), √(3/2)) |
SGM and OFFDNS had the same factors, so energies and analytic gradients were consistent with each other, but both were wrong.
The factors go back to the start of the current CASPT2 code. Every archived version checked (MOLCAS 3.1, 4.1, 6.3, 6.4, 7.2, 7.8, 8.0, 8.2) has VAL1 = (1, SQR2) and (-SQR3, SQR3) in sgm.f (© 1994 P.-Å. Malmqvist). OpenMolcas inherited them in its first public commit (2017), so every MOLCAS/OpenMolcas version up to current master is affected.
Validation
-
Independent code (ORCA 6.1.1, FIC-CASPT2): H2O, cc-pVDZ, C1, RHF orbitals, CAS(4,4)-CI, all electrons, exact integrals (OpenMolcas
NoCD, ORCATrafoStep Exact), IPEA 0, no shift. The CASCI energies agree to 1e-9 Eh.E2 (Eh) root 1 (f_ai ≈ 0) root 2 (f_ai ≠ 0) ORCA −0.203847843 −0.256767605 OpenMolcas, this MR −0.203849134 −0.256767554 OpenMolcas, master −0.203849134 −0.256102924 Root 2: this MR agrees with ORCA to 5e-8 Eh; master is 6.6e-4 Eh off. Root 1 is the same in both builds. Its 1.3e-6 Eh difference to ORCA does not depend on this fix and most likely comes from the two codes removing near-linear dependencies differently.
-
Explicit internally contracted brute force (FCI-space vectors for cases A–H, H0 = P_SD F P_SD, IPEA 0; H4 with 1 inactive orbital, H6 with 2):
- Per-case E2 agrees with OpenMolcas for every case except A and E.
- Taking the brute-force A–E block times √2 reproduces master to 3e-10 Eh.
- With this MR OpenMolcas equals P F P to 4e-10 Eh, including MS couplings <I|H|T_J>.
-
Analytic gradients (H4, SA-CASSCF(2,2), SS-CASPT2 root 1, IPEA 0): the change of the analytic gradient matches the change of central finite differences within their precision (H1z +3.0e-7 vs +2.6e-7 Eh/bohr). OFFDNS stays consistent with SGM.
-
New test
additional:954: the ORCA case above. It passes with this MR and fails on master (ΔE 6.6e-4 Eh).
Why other programs did not reveal it
The faulty term acts only through f_ai. For a converged single-state CASSCF reference f_ai = 0 (Brillouin condition), so the energy does not depend on the factor at all. Comparisons with other programs are normally made in exactly this setting.
This includes the comparison with BAGEL and ORZ by Yanai et al., Mol. Phys. 115, 2077 (2017). Their references are all state-specific CASSCF (ground state, lowest triplet, the Δ9D spin states), and PbO MS-CASPT2 was compared only between MOLCAS versions.
Relation to the MOLCAS 8 SP1 fix (Yanai et al. 2017)
This is a different block from the "1221 vs 1212" projection fix of that paper:
- SP1 (MOLCAS 7.8 → 8.0 patch level 15-06-18) changed signs in
sgm.fKOD 2 (A&B−, one- and two-electron) and KOD 7 (B−&E−, two-electron), i.e. the ccoo–cooo and ccoo–ccov couplings. - This MR changes KOD 4 and 5 (A&E±, one-electron, the cooo–ccov coupling through f_ai), which SP1 did not touch.
- The brute force above confirms that the SP1-corrected couplings are right: all case pairs other than A–E agree with P F P.
Assessment of the error in production runs
1. CASPT2 energies are affected only when the CASPT2 Fock operator has f_ai ≠ 0. That is the case for:
- SA-CASSCF orbitals with SS-CASPT2 or MS-CASPT2. Both use the state-specific Fock operator (the default), whose f_ai is non-zero because the state density differs from the averaged one. This is the most common setup for excited states.
- CASCI references (
CIONLY), and roots computed in orbitals optimised for other states. - RMS-CASPT2 and XDW-CASPT2 (state-dependent Fock operators).
They are not affected for:
- converged single-state CASSCF with SS-CASPT2;
- XMS-CASPT2 on SA-CASSCF orbitals. XMS uses the state-averaged Fock operator, which satisfies f_ai = 0 at SA-CASSCF convergence; the XMS energies in the test suite did not change.
Sizes seen in the test suite and the new test:
| system / method | shift per state | effect on excitation energies |
|---|---|---|
| 2-chloropropionitrile, SA(6)-CASSCF + MS-CASPT2 (414/415) | −0.05 … −0.40 mEh | up to 7 meV (0.17 kcal/mol) |
| H2O CAS(4,4)-CI, excited root (954) | −0.66 mEh | 18 meV |
| CIONLY + MS-CASPT2, 3 roots (grayzone:898) | 0.13 mEh | |
| core:caspt2 (MS) | 0.064 mEh | |
| CuCl4²⁻, MS-CASPT2, 3 roots (366/381) | 0.019 mEh | |
| acrolein, SA(2) (standard:074) | 3e-7 Eh |
The shift is different for each state, so it does not cancel in excitation energies or state splittings. It grows with |f_ai|, i.e. with how much a state's density differs from the density the orbitals were optimised for: many-root state averages, states of different character (n→π* vs π→π*, charge transfer, Rydberg), CASCI on SCF orbitals.
For typical SA-CASSCF/MS-CASPT2 studies expect errors of 1e-5 to several 1e-4 Eh per state (largest seen: 6.6e-4 Eh), i.e. up to about 0.02 eV or 0.4 kcal/mol. That is small compared with the intrinsic accuracy of CASPT2 (0.1–0.2 eV) but systematic, and larger than the numerical precision people usually assume. Published conclusions should rarely change; benchmark comparisons at the meV level can be affected.
2. CASPT2 properties (unrelaxed CASPT2 density, PROPerties) are affected for all references, including converged single-state CASSCF. The density contains products of A and E amplitudes with the wrong factor whether or not f_ai vanishes.
- Dipoles: up to 3.5e-3 au (≈0.009 D) in additional:147/148/175/176, 2.7e-4 au in 227.
- Quadrupoles: up to 2.1e-2 au in 366/381.
3. Analytic gradients follow the energy (OFFDNS is fixed consistently, FD-validated).
- SS-CASPT2 on converged single-state CASSCF: unchanged.
- SA-based MS/RMS/XDW gradients: changes of 1e-6 to 1e-5 Eh/bohr in MS gradients (434) and MECI optimisations (436–438), and up to 1.2e-4 Eh/bohr in an RMS-CASPT2 surface-hopping test (815).
- Optimised geometries and trajectories change correspondingly.
Changes
src/caspt2/sgm.F90,src/caspt2/offdns.F90: the A–E factors (4 numbers each).- New test
additional:954. - References of 20 tests: core:caspt2, standard:074, additional:147, 148, 175, 176, 227, 316, 357, 366, 371, 381, 414, 415, 434, 436, 437, 438, 815, grayzone:898.
- Only values that changed by more than 0.1 × tolerance were updated, so the diff shows the effect of the fix alone.
- All other CASPT2 tests in every suite (93 in total, HDF5 build included) are unchanged.
- Not run locally: CheMPS2 (extra:850–855), M7 (926, 929), hdf5:604.
- Documentation updated or not needed.
- Test created or not needed.
- Attribution in source files and
CONTRIBUTORS.mdupdated if necessary.