  Explicit embedding methods combined with the complex polarization propagator
(CPP) enable modeling of spectroscopy for increasingly complex systems with a
high density of states. We present the first derivation and implementation of
the CPP in four- and exact two-component (X2C) polarizable embedding (PE)
frameworks. We denote the developed methods PE-4c-CPP and PE-X2C-CPP,
respectively. We illustrate the methods by estimating the solvent effect on
UV-vis and X-ray atomic absorption (XAS) spectra of [Rh(H2O)6]3+ and
[Ir(H2O)6]3+ immersed in aqueous solution. We moreover estimate solvent effects
on UV-vis spectra of a platinum complex that can be photo-chemically activated
(in water) to kill cancer cells. Our results clearly show that inclusion of the
environment is required: UV-vis and (to a lesser degree) XAS spectra can become
qualitatively different from vacuum calculations. Comparison of PE-4c-CPP and
PE-X2C-CPP methods shows that X2C essentially reproduces the solvent effect
obtained with the 4c methods.
