  X-ray absorption spectroscopy (XAS) is an element-specific materials
characterization technique that is sensitive to structural and electronic
properties. First-principles simulated XAS has been widely used as a powerful
tool to interpret experimental spectra and draw physical insights. Recently,
there has also been growing interest in building computational XAS databases to
enable data analytics and machine learning applications. However, there are
non-trivial differences among commonly used XAS simulation codes, both in
underlying theoretical formalism and in technical implementation. Reliable and
reproducible computational XAS databases require systematic benchmark studies.
In this work, we benchmarked Ti K-edge XAS simulations of ten representative
Ti-O binary compounds, which we refer to as the Ti-O-10 dataset, using three
state-of-the-art codes: xspectra, ocean and exciting. We systematically studied
the convergence behavior with respect to the input parameters and developed a
workflow to automate and standardize the calculations to ensure converged
spectra. Our benchmark comparison shows: (1) the two Bethe-Salpeter equation
(BSE) codes (ocean and exciting) have excellent agreement in the energy range
studied (up to 35 eV above the onset) with an average Spearman's rank
correlation score of 0.998; (2) good agreement is obtained between the
core-hole potential code (xspectra) and BSE codes (ocean and exciting) with an
average Spearman's rank correlation score of 0.990. Our benchmark study
provides important standards for first-principles XAS simulations with broad
impact in data-driven XAS analysis.
