## 2 Methods
### X-ray Scattering  
We now review briefly the theory of X-ray scattering. To a good approximation, X-ray photons scatter in a two-photon process via the squared field vector potential, \(A^{2}\), taken in the first order of perturbation theory (see e.g., Refs. [64; 65]). The resulting double-differential scattering cross-section is given by [66; 67],  
\[\frac{d^{2}S}{d\Omega d\omega_{k_{1}}}= \int_{0}^{\infty}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!  
where \(\mathbf{r}_{j}\) is the position of electron \(j\), and \(\mathbf{q}=\mathbf{k}_{0}-\mathbf{k}_{1}\) the momentum transfer vector with \(\mathbf{k}_{0}\) and \(\mathbf{k}_{1}\) the incoming and outgoing wavevectors for the X-rays. Matrix elements of the operator \(\hat{L}\) correspond to elastic and inelastic scattering [68]. Assuming that the time-scale for nuclear motion is significantly slower than for electrons, and that electronic states are well separated, one arrives at the so-called elastic approximation [67; 69],  
\[\mathcal{W}(t,\delta)\propto\sum_{i}\int|\chi_{i}(\mathbf{R},t)|^{2}\left|L_{ ii}\right|^{2}\ d\mathbf{R}, \tag{10}\]  
in which we have used the Born-Huang ansatz for the wavepacket \(\left|\Psi(\mathbf{R},t)\right\rangle=\sum_{i}\chi_{i}(\mathbf{R},t)|i( \mathbf{r};\mathbf{R})\rangle\), with \(\chi_{i}(\mathbf{R},t)\) the nuclear wavepacket on each electronic state \(|i(\mathbf{r};\mathbf{R})\rangle\), and the elastic X-ray scattering matrix elements \(L_{ii}=\langle i(\mathbf{r};\mathbf{R})|\hat{L}|i(\mathbf{r};\mathbf{R}) \rangle_{\mathbf{r}}\)[70; 71; 72]. The elastic scattering can be simplified further if we adopt the independent atom model (IAM), whereby we ignore the specifics of each electronic state and instead assume that the bulk of the scattering corresponds to a coherent sum of the scattering from the individual constituent atoms. In this approximation, \(L_{ii}\approx f_{\text{IAM}}\), irrespective of electronic state \(i\). The \(f_{\text{IAM}}\) is given by,  
\[f_{\text{IAM}}(\mathbf{q})=\sum_{\alpha=1}^{N_{\text{at}}}f_{\alpha}^{0}(q)e^ {i\mathbf{R}_{\alpha}\mathbf{q}}, \tag{11}\]  
where \(f_{\alpha}^{0}(q)\) are the tabulated atomic form factors [73], \(\mathbf{R}_{\alpha}\) the atomic positions, and \(q{=}|\mathbf{q}|\) the amplitude of the momentum transfer, which is a function of the scattering angle \(\theta\) via \(q=2|\mathbf{k}_{0}|\sin\theta/2\). Finally, \(\left|L_{ii}\right|^{2}\approx\left|f_{\text{IAM}}\right|^{2}\) becomes,  
\[\left|f_{\text{IAM}}(\mathbf{q})\right|^{2}=\sum_{\alpha=1}^{N_{\text{at}}} \left|f_{\alpha}^{0}(q)\right|^{2}+\sum_{\alpha\
eq\beta}^{N_{\text{at}}}f_{ \alpha}^{0}(q)f_{\beta}^{0}(q)e^{i\mathbf{R}_{\alpha}\mathbf{q}}, \tag{12}\]  
with \(\mathbf{R}_{\alpha\beta}=\mathbf{R}_{\alpha}-\mathbf{R}_{\beta}\) the vector between each pair of atoms. The first sum on the right is the atomic term, which forms a constant background, and the second sum is the molecular term, which contains all structural interference relating to molecular geometry. Equation (12), when rotationally averaged, becomes the standard IAM formula shown in Equation (15). It is perhaps worthwhile to point out that elastic electron scattering results in an expression almost identical to Equation (12), with the main difference being that the form factors for electron scattering must account for the additional scattering from the nuclei [2; 74; 75].