The RPA energy
consists of the Hartree-Fock exact exchange energy EHF and a correlation energy piece EC RPA. rirpa computes Eq. (12.1) non-selfconsistently from a given set of converged input orbitals. The correlation energy
is expressed in terms of RPA excitation energies at full coupling ΩnRPA and within the Tamm-Dancoff approximation ΩnTDARPA. The further discussion is restricted to the one-component (nonrelativistic) treatment, for the sake of convenience. For the derivation of the two-component RPA theory see ref. . The excitation energies are obtained from time-dependent DFT response theory and are eigenvalues of the symplectic eigenvalue problem [157,158]
The super-vectors X0n and Y 0n are defined on the product space Locc ×Lvirt and Locc ×Lvirt, respectively, where Locc and Lvirt denote the one-particle Hilbert spaces spanned by occupied and virtual static KS molecular orbitals (MOs). The super-operator
contains the so-called orbital rotation Hessians,
|(A + B)iajb||= (ϵa - ϵi)δijδab + 2(ia|jb),||(12.5)|
|(A - B)iajb||= (ϵa - ϵi)δijδab.||(12.6)|
In RIRPA the two-electron integrals in Eqs (12.5) are approximated by the resolution-of-the-identity approximation. In conjunction with a frequency integration this leads to an efficient scheme for the calculation of RPA correlation energies 
where the integrand contains Naux × Naux quantities only,
Naux is the number of auxiliary basis functions. The integral is approximated using Clenshaw-Curtiss quadrature.
Calculations with rirpa require
Effective core potentials (ECPs) are not presently compatible with the HF energy at the KS reference as computed in rirpa. The nohxx option must therefore be included for systems where ECPs were used to obtain the reference KS orbitals in order to skip the HF energy calculation and compute solely the correlation energy.
To perform a two-component relativistic RIRPA calculation  on (Kramers-restricted) closed-shell systems taking into account spin-orbit coupling, the two-component version of ridft has to be run before (see Chapter 6.4) using the keywords $soghf and $kramers. The implementation is currently only available in combination with the nohxx option.