All details on the theory and results are published in [153]. The RI-RPA energy is a function of the MO coefficients C and the Lagrange multipliers ϵ and depends parametrically (i) on the interacting Hamiltonian Ĥ, (ii) on the AO basis functions and the auxiliary basis functions. All parameters may be gathered in a supervector X and thus

| (12.9) |

C and ϵ in turn depend parametrically on X, the exchange-correlation matrix V^{XC}, and the
overlap matrix S through the KS equations and the orbital orthonormality constraint. First-order
properties may be defined in a rigorous and general fashion as total derivatives of the
energy with respect to a “perturbation” parameter ξ. However, the RI-RPA energy
is not directly differentiated in our method. Instead, we define the RI-RPA energy
Lagrangian

L^{RIRPA}(,,^{Δ},|X,V^{XC},S) | |||

= E^{RIRPA}(,|X) + ∑
_{σ}. | (12.10) |

_{stat} | = _{σ}^{T}F_{σ}_{σ} -_{σ} = 0, | (12.11) |

_{stat} | = _{σ}^{T}S_{σ} - 1 = 0. | (12.12) |

| (12.13) |

and

| (12.14) |

It turns out from eqs (12.13) and (12.14) that the determination of ^{Δ} and requires the
solution of a single Coupled-Perturbed KS equation. Complete expressions for ^{Δ} and are
given in [153]. At the stationary point “stat = ( = C, = ϵ,^{Δ} = D^{Δ}, = W)”, first-order
RI-RPA properties are thus efficiently obtained from

= + | |||

+ . | (12.15) |

= + + | |||

+ + -. | (12.16) |

This result illustrates the key advantage of the Lagrangian method: Total RI-RPA energy derivatives featuring a complicated implicit dependence on the parameter X through the variables C and ϵ are replaced by partial derivatives of the RI-RPA Lagrangian, whose computation is straightforward once the stationary point of the Lagrangian has been fully determined.

Geometry optimizations and first order molecular property calculations can be executed by adding the keyword rpagrad to the $rirpa section in the control file. RPA gradients also require

- an auxiliary basis defined in the data group $jbas for the computation of the Coulomb integrals for the Hartree-Fock energy
- an auxiliary basis defined in the data group $cbas for the ERI’s in the correlation treatment.
- zero frozen core orbitals; RIRPA gradients are not compatible with the frozen core approximation at this time.

The following gradient-specific options may be further added to the $rirpa section in the control file

- drimp2 - computes gradients in the DRIMP2 limit.
- niapblocks ⟨integer⟩ - Manual setting of the integral block size in subroutine rirhs.f; for developers.

In order to run a geometry optimization, jobex must be invoked with the level set to rirpa, and the -ri option (E.g. jobex -ri -level rirpa).

In order to run a numerical frequency calculation, NumForce must be invoked with the level set to rirpa, e.g., NumForce -d 0.02 -central -ri -level rirpa.