  We study state-of-the-art approaches for calculating x-ray Thomson scattering
spectra from density functional theory molecular dynamics (DFT-MD) simulations
based on a modified Chihara formula that expresses the inelastic contribution
in terms of the dielectric function. We compare the electronic dynamic
structure factor computed from the Mermin dielectric function using an ab
initio electron-ion collision frequency to computations using a linear response
time dependent density functional theory (LR-TDDFT) framework for hydrogen and
beryllium and investigate the dispersion of free-free and bound-free
contributions to the scattering signal. A separate treatment of these
contributions in the Mermin dielectric function shows excellent agreement with
LR-TDDFT results for ambient-density beryllium, but breaks down for highly
compressed matter where the bound states become pressure ionized. LR-TDDFT is
used to reanalyze x-ray Thomson scattering experiments on beryllium
demonstrating strong deviations from the plasma conditions inferred with
traditional analytic models at small scattering angles.
