The simulation of
X-ray absorption spectra requires both scalar
and spin–orbit (SO) relativistic effects to be taken into account,
particularly near L- and M-edges where the SO splitting of core p
and d orbitals dominates. Four-component Dirac–Coulomb Hamiltonian-based
linear damped response time-dependent density functional theory (4c-DR-TDDFT)
calculates spectra directly for a selected frequency region while
including the relativistic effects variationally, making the method
well suited for X-ray applications. In this work, we show that accurate
X-ray absorption spectra near L
2,3
- and M
4,5
-edges of closed-shell transition metal and actinide compounds with
different central atoms, ligands, and oxidation states can be obtained
by means of 4c-DR-TDDFT. While the main absorption lines do not change
noticeably with the basis set and geometry, the exchange–correlation
functional has a strong influence with hybrid functionals performing
the best. The energy shift compared to the experiment is shown to
depend linearly on the amount of Hartee–Fock exchange with
the optimal value being 60% for spectral regions above 1000 eV, providing
relative errors below 0.2% and 2% for edge energies and SO splittings,
respectively. Finally, the methodology calibrated in this work is
used to reproduce the experimental L
2,3
-edge X-ray absorption
spectra of [RuCl
2
(DMSO)
2
(Im)
2
] and
[WCl
4
(PMePh
2
)
2
], and resolve the
broad bands into separated lines, allowing an interpretation based
on ligand field theory and double point groups. These results support
4c-DR-TDDFT as a reliable method for calculating and analyzing X-ray
absorption spectra of chemically interesting systems, advance the
accuracy of state-of-the art relativistic DFT approaches, and provide
a reference for benchmarking more approximate techniques.