# 7.13.3 Calculations of Core-Level States with ROKS

The restricted open-shell Kohn-Sham (ROKS) approach is a highly accurate method for estimating core-excitation energies of closed-shell molecules,333 as described in Section 7.7. Here, we briefly recapitulate the key aspects and refer the reader to Ref. 333 for details ROKS with the SCAN functional is found to reproduce 40 experimental core excitation energies (from the 1s orbital, i.e., K-edge) of second period elements (C, N, O, and F) to an RMS error of 0.2 eV and a maximum absolute error of 0.5 eV. The $\omega$B97X-V functional provides similar (if a little worse) accuracy as well. Similar behavior is observed for the L${}_{2,3}$ edges of third-period elements Si, P, S and Cl. Other widely used functionals like PBE fare somewhat worse, but still predict much lower error than TDDFT with corresponding functionals.

That said, the ROKS approach is state-specific in that it can only predict a single state at a time and needs to be told which state to target (via the $reorder_mo section, as shown in example 7.8). This makes it less black-box than TDDFT as the final orbital needs to be identified a priori, perhaps via a pilot TDDFT job if no other information is available. (For core-level excitations, the intial orbital is usually intuitively obvious.) ROKS can also be used for two-site doubly core-ionized states, or other systems with one broken electron pair in total. The accuracy of ROKS stems from three factors: choice of density functional (SCAN or $\omega$B97X-V), excited state orbital optimization (only available via SGM for core excitations, as described in Section 4.5.12) and a sufficiently flexible basis set. The last is key, as the split-core functions (as provided by basis sets like cc-pCV$n$Z) are needed instead of standard basis sets like cc-pV$n$Z that only have split valence functions. Indeed, a basis of triple-zeta quality like cc-pCVTZ is necessary to fully account for the core-hole relaxation and smaller basis sets lead to systematic overestimation of excitation energies. However, the highly local nature of the core-hole ensures that a large basis is only needed for the target atom of the ROKS calculation, and a smaller basis (of double-zeta quality, like cc-pVDZ) is adequate for all other atoms. An example of this mixed basis strategy is given below in example 7.13.3. Details about using mixed basis sets in general can be found in Section 8.5. The number of cycles needed for ROKS calculations can also be considerably reduced by decoupling the cole-hole relaxation from the rest of the orbital optimization. This entails a restricted open-shell $\Delta$SCF calculation of the core-ionized state first, and use of those orbitals as guess for ROKS. Example 7.8 is a representative case for how such calculations should proceed. The conjunction of high accuracy and low computational cost (due to cheapness of the SCAN meta-GGA and the mixed basis strategy) makes ROKS a very attractive approach for computing core spectra of large, closed-shell systems (where more expensive wave function theories are unaffordable). Users are requested to cite Ref. 333 when using ROKS for core excitations. Example 7.124 RO-$\Delta$SCF core-ionization at C for CO, using SGM. The mixed basis strategy is used as the core-hole is local to C. $molecule
0 1
C 0.0000   0.0000   0.0000
O 0.0000   0.0000   1.1282
$end$rem
method scan
basis  gen
basis2 aug-cc-pVDZ
symmetry false
$end$basis
C
aug-cc-pCVTZ
****
O
aug-cc-pVDZ
****
$end @@@@@@@@@@@@$molecule
1 2
C 0.0000   0.0000   0.0000
O 0.0000   0.0000   1.1282
$end$rem
method scan
basis  gen
unrestricted false
symmetry false
scf_algorithm sgm
$end$reorder_mo
1 3 4 5 6 7 2
1 3 4 5 6 7 2
$end$basis
C
aug-cc-pCVTZ
****
O
aug-cc-pVDZ
****
\$end