We simulate X-ray absorption spectra at elemental K-edges
using
time-dependent density functional theory (TDDFT) in both its conventional
linear-response implementation and its explicitly time-dependent or
“real-time” formulation. Real-time TDDFT simulations
enable broadband spectra calculations without the need to invoke frozen
occupied orbitals (“core/valence separation”), but we
find that these spectra are often contaminated by transitions to the
continuum that originate from lower-energy core and semicore orbitals.
This problem becomes acute in triple-ζ basis sets, although
it is sometimes sidestepped in double-ζ basis sets. Transitions
to the continuum acquire surprisingly large dipole oscillator strengths,
leading to spectra that are difficult to interpret. Meaningful spectra
can be recovered by means of a filtering technique that decomposes
the spectrum into contributions from individual occupied orbitals,
and the same procedure can be used to separate L- and K-edge spectra
arising from different elements within a given molecule. In contrast,
conventional linear-response TDDFT requires core/valence separation
but is free of these artifacts. It is also significantly more efficient
than the real-time approach, even when hundreds of individual states
are needed to reproduce near-edge absorption features and even when
Padé approximants are used to reduce the real-time simulations
to just 2–4 fs of time propagation. Despite the cost, the real-time
approach may be useful to examine the validity of the core/valence
separation approximation.