  Widely employed Near-Edge X-Ray Absorption Fine Structure (NEXAFS)
spectroscopy probes a system by excitation of core electrons to unoccupied
states. A variety of different methodologies are available to simulate
corresponding spectra from first-principles. Core-level occupation constraints
within ground-state Density-Functional Theory (DFT) represent a numerically
most efficient means to this end that provides access to large systems,
examples being surface adsorption, proteins, polymers, liquids, and buried,
condensed phase interfaces (e.q. solid-liquid and solid-solid). Here, we
systematically investigate the performance of different realizations of this
approximate approach through the simulation of K-edge NEXAFS-spectra of a set
of carbon and nitrogen-containing organic molecules. Variational collapse to
the ground state and oscillatory convergence are the major complications of
these approximate computational protocols. We present a modified version of the
maximum-overlap method to achieve a self-consistent inclusion of electrons in
virtual states for systems where convergence is hampered due to degeneracies.
Our results demonstrate that reliable spectra allowing for a semi-quantitative
analysis of experimental data are already obtained at the semi-local level of
density functionals and with standard numeric atomic orbital basis sets.
