Calculating XES can be thought of as obtaining de-excitation states from core hole states[15], which TDDFT can be applied to. To avoid variational collapse, constraint techniques such as the maximum overlap method (MOM)[16] should be used in the SCF process to obtain the core hole state.

In the following example we show how to calculate the O1s valence-to-core X-ray emission spectroscopy (VtC-XES) of an acetone molecule. The geometry has been optimized at the MP2/cc-pVTZ level of theory. The VtC-XES calculation has two steps. In the first step, a DFT single-point SCF calculation is done for the neutral molecule at the B66LYP[15]/cc-pCVTZ level of theory. Then a linear response TDDFT excited state calculation is done using the cationic acetone core hole state as reference. In order to obtain the cationic core hole state, the MOs from the previous step are read and the occupation number of the O1s orbital is kept as 1. During the SCF process, the MOM is invoked to keep the core hole from being filled by a valence electron. Finally the emission energies and oscillator strengths are collected as the absolute values of the de-excitation energies and their corresponding oscillator strengths.

**Example.** TDDFT simulation of the O1s VtC-XES of acetone.

Q-Chem input and comments (after “!”. Comments outside of the $rem section should be removed in order to run the qchem calculation.):

```
$comment
First step: DFT single-point SCF calculation of the neutral molecule
$end
$molecule
0 1
C -0.0000422045 -0.6079199236 1.2809538055
C -0.0008270459 0.1902987870 0.0000000000
H -0.8765433712 -1.2547006096 1.3174932407
H 0.0003999363 0.0620870142 2.1343545774
H 0.8765445283 -1.2546450089 1.3165500086
C -0.0000422045 -0.6079199236 -1.2809538055
H -0.8765433712 -1.2547006096 -1.3174932407
H 0.8765445283 -1.2546450089 -1.3165500086
H 0.0003999363 0.0620870142 -2.1343545774
O 0.0001159200 1.4076831952 0.0000000000
$end
$rem
jobtype sp
exchange gen ! use the B66LYP functional, see the $xc_functional section.
correlation none
basis cc-pCVTZ
$end
$xc_functional
X Becke 0.26
X S 0.08
C VWN 0.19
C LYP 0.81
K 0.66
$end
@@@
$comment
Second step: de-excitation TDDFT calculation of the cationic O1s core hole state; geometry unchanged.
$end
$molecule
1 2 ! change the charge and multiplicity
C -0.0000422045 -0.6079199236 1.2809538055
C -0.0008270459 0.1902987870 0.0000000000
H -0.8765433712 -1.2547006096 1.3174932407
H 0.0003999363 0.0620870142 2.1343545774
H 0.8765445283 -1.2546450089 1.3165500086
C -0.0000422045 -0.6079199236 -1.2809538055
H -0.8765433712 -1.2547006096 -1.3174932407
H 0.8765445283 -1.2546450089 -1.3165500086
H 0.0003999363 0.0620870142 -2.1343545774
O 0.0001159200 1.4076831952 0.0000000000
$end
$rem
jobtype sp
exchange gen
correlation none
basis cc-pCVTZ
scf_guess read ! read the MOs from the previous step
mom_start 1 ! invoke MOM
cis_n_roots 10 ! calculate 10 excited states in the TDDFT calculation
cis_triplets false ! no triplets
$end
$xc_functional
X Becke 0.26
X S 0.08
C VWN 0.19
C LYP 0.81
K 0.66
$end
$occupied ! specify the orbital occupation
1:16 ! alpha orbitals no. 1-16 are occupied
2:16 ! beta orbitals no. 2-16 are occupied; beta orbital no. 1 is empty (the core hole)
$end
```

The simulated VtC-XES signal is shown in the following figure: