XANES simulation. Simulations of X-ray absorption have been performed using the plane-wave pseudopotential DFT method available within the code CASTEP, with the generalized-gradient approximation taken for the XC functional, in the form of Perdew-Burke-Ernzerhof, reparametrized for solids (PBEsol). . All ground-state simulations were converged with respect to the basis set and cutoff energy for all explored materials, resulting in the use of 750 eV cutoff energy and a 9x9x9 integration grid. Self-consistent calculations were performed to a total energy convergence value of 10 -7 eV. Spectra have been generated via the inclusion of a core-hole potential on the ground-state electronic structure, as implemented in the code.