The GW method is routinely used to predict charged
valence excitations in molecules and solids. However, the numerical
techniques employed in the most efficient GW algorithms
break down when computing core excitations as measured by X-ray photoelectron
spectroscopy (XPS). We present a full-frequency approach on the real
axis using a localized basis to enable the treatment of core levels
in GW. Our scheme is based on the contour deformation
technique and allows for a precise and efficient calculation of the
self-energy, which has a complicated pole structure for core states.
The accuracy of our method is validated by comparing to a fully analytic GW algorithm. Furthermore, we report the obtained core-level
binding energies and their deviations from experiment for a set of
small molecules and large polycyclic hydrocarbons. The core-level
excitations computed with our GW approach deviate
by less than 0.5 eV from the experimental reference. For comparison,
we also report core-level binding energies calculated by density functional
theory (DFT)-based approaches such as the popular delta self-consistent
field (ΔSCF) method. Our implementation is optimized for massively
parallel execution, enabling the computation of systems up to 100
atoms