Ultrafast x-ray and electron scattering of free molecules: A comparative evaluation

Resolving gas phase molecular motions with simultaneous spatial and temporal resolution is rapidly coming within the reach of x-ray Free Electron Lasers (XFELs) and Mega-electron-Volt (MeV) electron beams. These two methods enable scattering experiments that have yielded fascinating new results, and while both are important methods for determining transient molecular structures in photochemical reactions, it is important to understand their relative merits. In the present study, we evaluate the respective scattering cross sections of the two methods and simulate their ability to determine excited state molecular structures in light of currently existing XFEL and MeV source parameters. Using the example of optically excited N-methyl morpholine and simulating the scattering patterns with shot noise, we find that the currently achievable signals are superior with x-ray scattering for equal samples and on a per-shot basis and that x-ray scattering requires fewer detected signal counts for an equal fidelity structure determination. Importantly, within the independent atom model, excellent structure determinations can be achieved for scattering vectors only to about 5 Å−1, leaving larger scattering vector ranges for investigating vibrational motions and wavepackets. Electron scattering has a comparatively higher sensitivity toward hydrogen atoms, which may point to applications where electron scattering is inherently the preferred choice, provided that excellent signals can be achieved at large scattering angles that are currently difficult to access.


INTRODUCTION
The determination of molecular structures using x-ray and electron scattering has found many applications in chemistry and related molecular sciences. [1][2][3] The advent of technologies to create ultrafast pulses, first implemented on electron beams, 4-7 has heralded an age where it is possible to measure molecular systems in transient excited states. [8][9][10][11][12][13][14][15][16][17] More recently, x-ray Free-Electron Lasers (XFELs) and Mega-electron-Volt radio frequency (RF) electron guns have transformed the field, bringing the determination of transient molecular structures into a new era where interatomic distances are measured with sub-Å ngstr€ om spatial resolution and femtosecond time resolution. 10,13,15,[17][18][19][20] This makes it possible to capture time-resolved molecular scattering signals revealing the structures of molecules during chemical reactions even in gas-phase small organic molecules. [21][22][23][24] The high brightness of XFELs and MeV RF guns makes it possible to study the photochemistry in low-density gas phase vapors, where the molecular motions can be isolated without interference of nearby molecules as reaction dynamics proceed. The gas-phase molecular dynamics are important since they provide a direct comparison between experimental measurements 25 with detailed theoretical calculations 26 and provide a crucial source of reference data. 27,28 Important applications of these high-brightness, short pulse duration beams include the determination of molecular structures in excited states [29][30][31] and the observation of ultrafast dynamics of photoexcited chemical reactions. 21,22,25,32 Scattering experiments, i.e., ultrafast x-ray scattering and ultrafast electron diffraction (UED), could, in principle, offer direct access to complete molecular structures. To measure their time evolution, a pump-probe scheme is the most commonly used experimental technique. A pump laser pulse initiates the photochemical reaction, and after a specific delay time, an x-ray or electron probe pulse casts a scattering pattern that maps the transient molecular structure 25,[33][34][35] (Fig. 1). Determining dynamic motions of the molecule requires that the optical laser pump pulse induces a deterministic photochemical dynamics. The time resolution is limited by the duration of the laser and the x-ray or electron pulses and the timing jitter between them. By collaging the individual diffraction patterns in temporal order, one can decode the transient structures and produce a "molecular movie" of the molecular motions. 29 X-ray scattering by a free charged particle follows classical Thomson scattering, which describes the elastic scattering of electromagnetic radiation. X-ray scattering by molecular systems is therefore dominated by their interaction with the electrons in the molecule. [36][37][38] On the other hand, electron scattering follows Rutherford scattering and depends on the electrostatic Coulomb interaction of the traveling electrons with all charged particles in the molecule. Although x-ray scattering and electron scattering are equally applied toward structure determination, various capabilities and advantages arising from their different physical interactions have been discussed previously. 37,39,40 In this article, we aim to explore the relative capabilities of x-ray and electron scattering toward the determination of excited state structures. We first compare the relative scattering cross sections by evaluating the probability for a single molecule to scatter an x-ray or an electron. We use the independent atom model (IAM), which is sufficiently accurate for the present comparison in describing pumpprobe scattering patterns, even though it partially ignores important contributions arising from the changing electron densities, i.e., the density between chemical bonds, upon optical excitation. [41][42][43][44] As a model system, we chose N-methyl morpholine (NMM), where Stankus and Yong et al. 29 measured the coherent structural dynamics upon optical excitation. To mimic the experiments, we simulate gasphase x-ray and electron total scattering patterns containing different magnitudes of shot noise while neglecting other sources of noise that may be specific to individual experiments.
Our comparison is grounded in current technologies. For the x-ray beam, we assume parameters from the Linac Coherent Light Source (LCLS), 21,23,24 while parameters for electron scattering are selected from "table-top" time-resolved electron scattering instruments 8,9,17,45 and for the relativistic UED system at the SLAC National Accelerator Laboratory. 20,22,[46][47][48] Relativistic electron beams, with energies in the MeV range, are particularly useful for pulsed experiments as they minimize broadening of the temporal resolution on account of space-charge interactions between electrons within a pulse. [49][50][51] Relevant beam parameters are listed in Table I. Following tradition in the respective literature, we denote the momentum transfer either as q or s for x-ray and electron scattering, respectively. This makes transparent to which method a formula or figure relates.
We find that although x-ray scattering has a much smaller cross section than electron scattering, the dramatically larger number of photons per pulse makes the probability of scattering an x-ray out of a pulse 300-1000 times larger than that of scattering an electron from a current-technology relativistic electron pulse. Applying the structure determination method introduced by Stankus and Yong et al., 29 we investigate the effects of shot noise and the range of momentum transfer vectors on the accuracy of the structure determination with x-rays and electrons, respectively. It is seen that with current instrumentation, for equal samples and on a per-shot basis, the fidelity for structure determination is superior with x-rays. Importantly, expanding the range of scattering vectors while keeping the same number of scattered particles introduces noise to the detriment of structure determination. Indeed, a sufficient structure determination for gas-phase small organic molecules free of heavy atoms can be achieved already with a range of scattering vectors from 0.5 to 5 Å À1 . The IAM model enables us to isolate contributions from different interatomic distances to the pump-probe scattering patterns. This analysis suggests that both x-ray and electron scattering might be able to determine H atom positions. The more favorable form factors give electron scattering the edge, however, only if very high quality signals can be measured.

THEORY AND COMPUTATIONAL METHODS Thomson and Rutherford Scattering
Classical x-ray scattering by a free, charged particle is described by elastic Thomson scattering of electromagnetic radiation. For unpolarized x-ray beams, the intensity of scattering by a single free electron is 36 FIG. 1. A typical pump-probe experimental setup for ultrafast x-ray and electron scattering. An optical pump pulse initiates a photochemical reaction, and time-dependent x-ray or electron scattering patterns are created by the time-delayed interaction with the probe pulse. The scattering signals are recorded as a function of the scattering angle 2h and the azimuthal angle U.
where I 0 and I Th scatt are the incoming and scattered intensities (W/cm 2 ), R is the distance to the detector, dr Th dX ¼ e 4 m 2 c 4 ¼ 7:94 Â 10 À26 cm 2 is the differential Thomson cross section for a free electron, 1þcos 2 ð2hÞ 2 is the polarization factor for an unpolarized incident beam, m e and e are the mass and charge of an electron, and c is the velocity of light. It is worth noting that the polarization factor also applies to linearly polarized x-rays when azimuthally averaging scattering signals from an isotropic ensemble of molecules. The scattering angle 2h, Fig. 1, is related to the magnitude of the momentum transfer vector by q ¼ k À k 0 j j ¼ 2k 0 sin h, where k 0 is the incident wave vector and k 0 j j ¼ 2p k ¼ 2pE hc and k is the scattered wave vector. The total scattering cross section is found by integrating over the Ewald sphere, r Th;tot ¼ 8p 3 drTh dX . For our comparative analysis, we are interested in the number of scattered photons, P scatt;X , for a given number of photons in the incoming x-ray pulse, P 0;X . The photon numbers relate to the intensities by where R r is the repetition rate of the XFEL, h Á is the photon energy (approximated to be equal for the incoming and outgoing beams), and A 0 and A are the areas of the incoming x-ray beam and the unit area on the detector, respectively. To calculate the probability of photons scattered into a resolution element Dq of the scattering vector, integrated over all azimuthal angles, we integrate Eq. (1) over the circular area element between q and q þ Dq in the momentum transfer space (Fig. S1). The probability of photons scattered into a resolution element Dq at the momentum transfer vector q is then given by The scattering signal scales as the area of the resolution element 2pqDq and the cos 2 ð2hÞ dependence on the scattering angle. The 1 2k 2 0 term suggests that higher photon energies give a smaller scattering probability into a momentum transfer resolution element.
Electron diffraction is determined by Rutherford scattering, which arises from the Coulomb interactions between charged particles. Using the first Born approximation, the Mott-Born cross section describes the differential scattering cross section of a relativistic electron by a point charge Z, [49][50][51]64 where Z is the charge of the target particle, m e is the mass of the scattered electron, s ¼ 2k 0 sin h is the magnitude of the scattering vector (named q in x-ray scattering), and b ¼ v = c is the electron velocity in units of the speed of light. In the Mott-Born cross section, I 0 Ru dx refers to the number of scattered electrons into the solid angle dx per unit time. For non-relativistic electrons, 1Àb 2 sin 2 h 1Àb 2 % 1 so that the scattered intensity approaches the expression reported by Mott and Massey, 65 To calculate the probability of electrons scattered into a resolution element Ds, we convert Eq. (3) into a form that gives the electron scattering into the circular area between s and s þ Ds in the momentum transfer space (Fig. S1) to get P scatt;e s; s þ Ds when the incident particle is an electron. The Rutherford scattering cross section, C Ru ¼ 2mee 2 h 2 2 ¼ 1:428 Â 10 À15 cm 2 ÁÅ 4 ; is much larger than the Thomson cross section, but Eqs. (2) and (4) are very similar. The interaction between charged particles causes the 1 s 4 term in the Rutherford scattering, which diverges at s ¼ 0, Data from Ref. 46, with a charge of 6 fC delivered to the sample. According to the SLAC National Accelerator Laboratory website, the facility is now offering repetition rates up to 360 Hz pulse and pulse durations shorter than 150 fs, dependent on the beam charge. 52 In order to shorten the pulse duration of relativistic electron pulses, many important advances have been made, 13 17,45,54,59,60 The synchronization noise in keV-UED-RF has been recently solved. 61 Furthermore, compression of keV electron pulses with terahertz radiation offers new opportunities for femtosecond gas-phase scattering. 62 Compact electron sources capable of providing $300 fs pulses with 10 4 e À /pulse may be suitable for some investigations. 63 Structural Dynamics ARTICLE scitation.org/journal/sdy making it impossible to calculate the total scattering cross section for a single charge.

Scattering off atoms and molecules
The electrons in atoms and molecules are not point charges, and their extended shape needs to be taken into account. For x-ray scattering, the elastic atomic form factor, is the Fourier transform of the electron density q r ð Þ of the atom, which can be obtained from electronic structure calculations. Convenient tabulations exist for x-ray form factors for all the atomic elements. 66 Electrons scatter off the total charge density of a target atom, and therefore, the atomic form factor for electrons is the Fourier transform of the atomic potential V r ð Þ; 50,67 Electron form factors can be computed from the Fourier transform of the atomic potentials 49,68-70 or found as approximate analytical expressions. 71,72 It is most convenient to use the Mott-Bethe formula, which relates electron scattering form factors to x-ray atomic scattering factors, 49 where Z nucl is the atomic number of the atom. Equation (7) suggests that outside of the constants and the 1 s 2 dependence of the Rutherford cross section, electron scattering and x-ray scattering have fundamentally the same information content in that both depend on the x-ray form factor. Yet, they are also complementary: while the x-ray form factors decrease with the increasing scattering angle, the electron form factors increase in an inverse manner (Fig. 2). The increasing electron form factors partially compensate for the dramatic loss of electron scattering signals arising from the rapidly decaying 1 s 4 term of Rutherford scattering.
Elastic scattering off molecules follows Eqs. (5) and (6). However, rather than calculating molecular densities or potentials for each molecule, practitioners in the field often invoke the independent atom model (IAM) approximation. The IAM treats the molecular electron density as a sum of spherical atomic densities, each centered at the positions of the nuclei. The molecular form factor f IAM ðqÞ is given by where f a q ð Þ are the atomic form factors for x-ray and electron scattering, respectively. 73 The summation extends over all N at atoms in the molecule with positions r a .
The form factors modify the amplitude of the scattering signal so that formulas (1) and (3) are modulated by the square of the molecular form factor (8). This leads to terms containing only the atomic scattering factors (often called "atomic scattering") and cross terms that depend on the interatomic distances r ab ¼ jr a À r b j (called molecular scattering). Averaging over the random orientations of gas phase molecules following Debye 74

results in
for the rotationally averaged, isotropic total x-ray and electron scattering signals, respectively. Included in Eqs. (9) and (10) are the inelastic scattering terms, S a , which, in both x-ray and electron scattering, are caused by Compton scattering. The inelastic terms coming from Compton corrections are not dependent on the molecular geometry. While the inelastic terms mask the complexity of the inelastic scattering processes, 75 they are conveniently obtained from the tabulated incoherent scattering functions of the elements. 76,77 The IAM neglects completely the formation of chemical bonds, the polarization of atoms in a molecule, and the electronic excitations. Nevertheless, it approximates observed scattering signals reasonably well. To be sure, the fitting of high-quality scattering data requires an accurate description of electron densities. 29,30,78 In particular, the change in electron density distributions must be understood to model the changes in the electronic structure upon optical excitation. 29 Nevertheless, for the comparative evaluation of ultrafast x-ray and electron scattering signals, the IAM model provides a reasonable approximation of the scattering signals.

Observed x-ray and electron scattering signals
From the discussion, it is clear that observed scattering signals depend on both the fundamental scattering cross sections for x-rays and electrons, on the composition and structure of the investigated molecules, and on the range of scattering angles subtended by the   (2) and (9) to express the probability of scattering x-ray photons, i.e., the ratio of scattered to incoming photon numbers per pulse, from N molecules into a range of scattering vectors between q 1 and q 2 ; The number of molecules can be estimated for the given experimental conditions and the geometry of the scattering cell, in particular the path length. The number of incoming x-ray photons is also determined in an experiment so that approximate absolute numbers of scattered photons can be calculated. For electron scattering, the ratio of scattered to incoming electron numbers per pulse from N molecules into a range of scattering vectors between s 1 and s 2 is where again all parameters can be determined from the experimental conditions or calculated for specific molecules. Equations (11) and (12) give the total scattering signals. The measured signals are usually smaller on account of inefficiencies of the detectors used. Even though XFEL and UED experiments use different detectors to capture time-dependent scattering patterns, e.g., the Cornell-SLAC Pixel Array Detector 79 for x-rays or a P43 phosphor screen imaged on a cooled Electron Multiplying Charge Coupled Device 52 for electrons, both can image scattered particles on a per-shot basis with high efficiency and exhibit excellent spatial resolution over a large solid angle. 80,81 The detector technologies develop rapidly, and more detailed information can be found in the literature. 20,[82][83][84][85] Noise in the scattering signals There are many sources of noise in pump-probe diffraction experiments, including, in particular, the intensity fluctuations of the pulse stream of the XFEL and the UED. While many details depend on the experimental implementations, experience shows that many such noise sources can be eliminated or accounted for. This leaves as the ultimate noise of both x-ray and electron scattering experiments the statistical counting noise, which is the only noise considered here.
In a scattering experiment, the number of particles P scatt scattered onto a certain detector area obeys the Poisson distribution. The noise of the measurement, i.e., the standard deviation of the total counts, is the square root of the observed number of scattered particles. Thus, the signal to noise ratio of a scattering experiment can be expressed by In pump-probe experiments, we consider the changes in the scattering signals upon optical excitation, i.e., the fractional difference between the signal with the optical pump laser on, P on q ð Þ , and the laser off, P off q ð Þ ; Assuming that the laser-off signal can be measured with negligible statistical counting noise as is often the case, the noise can be expressed as The SNR is then To simulate the noise, we assume that each photon or electron is scattered off photo-excited molecules with a scattering probability distribution calculated from Eqs. (9) or (10). The simulations assume low intensities so that one photon/electron scattering processes dominate. The scattering vectors are analyzed with a bin size of 0.1 Å À1 for both x-ray and electron scattering. We iterate this scattering process N total times with each scattering process generated randomly, where N total is the total number of scattered photons or electrons. We sum up the particle counts in each bin to obtain the statistical scattering intensity that contains the Poisson-distribution shot noise.

Probability of optical excitation
The exposure of molecules to intense laser radiation can readily induce multi-photon processes in addition to single-photon excitation. It is nearly impossible to prepare a reproducible, well-defined starting state for chemical dynamics if there is a significant portion of multiphoton excitation on account of excessive optical pulse intensity. Consequently, the probability of excitation, c, should be kept quite low, usually less than 0.10. This low probability of excitation increases the demand for high quality signals but is essential to achieve accurate determinations of transient molecular structures.
The fractional difference signal including an excitation probability c is expressed by While the pump-probe signal is reduced by the excitation probability, the shot noise remains the same. Thus, the SNR with excitation c is Because the SNR scales roughly with the square root of the signals, in order to achieve the same SNR even with excitation probability c, the signal needs to be scaled up by a factor of 1=c 2 . In our comparative analysis, we show results for 100% excitation, but we emphasize that for a comparison to experimental data, this factor needs to be taken into account.

Structure determination and method assessment
For our comparative analysis, we adopt the structure determination methodology introduced by Stankus and Yong et al. 29 (see details in the supplementary material). In order to determine the effects of shot noise and the range of the observed momentum transfers for xray and electron scattering on the accuracy of the structure determination, we simulate the signals based on Eqs. (11) and (12) for a specific excited state structure. To include the effect of noise, a synthetic noise is overlaid over the noise-free, theoretical patterns as discussed above.
The accuracy of this structure determination method is limited by the number of unique structures in the pool, with the value of the limit dependent slightly on the weighing of the data points and the functional dependence on the scattering angle. Empirically, we find that the limiting values of the average percent deviations are 0.6% for x-ray and 0.8% for electron scattering. In the data reported below (in particular Fig. 5), we subtract out those limiting values.
This method is limited in extracting the evolving nuclear wavepacket and is used solely to extract excited state structures. It relies on the approximation of the excited state structure by a single classical molecular structure, though it can be extended to the case where the wavepacket bifurcates into multiple channels if an adequate number of geometries from both channels are included in the pool of structures. We will next compare x-ray and electron scattering on their ability to select excited state structures within this framework.

COMPARATIVE EVALUATION OF A MODEL SYSTEM Total scattering signals
While Eqs. (11) and (12) are quite general, the amount of scattering depends on the atomic composition and the structure of the molecule. In our comparative analysis, we investigate a representative heterocyclic organic molecule, N-methyl morpholine, C 5 H 11 NO, where Stankus and Yong et al. have extensively studied the photoinduced dynamics. 29 For the present study, we employed their structure pools to perform our structure determination, and we model the signals based on a hypothetical excited state structure that is taken to be the structure of the ionic ground state. 29 Since our simulations use the IAM model, the change in the electron density upon electronic excitation is neglected, even though it can be an observable effect. 86 Based on Eqs. (11) and (12) for x-rays and electrons, respectively, we evaluate the number of scattered photons or electrons in a scattering experiment. We consider first the hypothetical case where one incoming probe particle (photon or electron) encounters one target molecule (N ¼ 1). The scattering probability is dependent on the area of the beam focus (A 0 ), which we take to be 1 cm 2 , as well as the momentum (k 0 ¼ 2p k ¼ 2pE hc ) of the incoming probe particle. The dependence of this scattering signal on the absolute value of the scattering vector, Fig. 3(a), is evaluated for energies that match experimental implementations, Table I, namely, 39.5 keV for the x-rays and 3.7 MeV and 30 keV for relativistic and non-relativistic electrons, respectively.
Because the Thomson cross section is much smaller than the Rutherford cross section, electrons have a much higher scattering probability than photons for the same number of incident particles in the beam. The total x-ray scattering signal flattens out at larger q because while the elastic scattering continues to drop, the inelastic contribution increases with q. Although the differential cross section for relativistic electrons is about 100Â larger than for non-relativistic electrons, the 1 k 2 0 dependence in formula (12) reduces the scattering probability for relativistic electrons, making it smaller than that of non-relativistic electrons by about an order of magnitude.
The total scattering probability, i.e., the elastic plus inelastic scattering integrated over the observed range of scattering vectors, is also dependent on the molecular composition. Table II reports the total scattering probabilities for the three representative beam parameters and our chosen NMM target molecule.
In actual experiments, the beam parameters obtained with current instrumentation are very different. The LCLS x-ray free electron laser produces ultrashort x-ray pulses containing about 10 12 photons each. 24 The number of electrons in an electron pulse is constrained by space-charge interactions. In the non-relativistic experiment with , and inelastic (dotted line) differential scattering probabilities, integrated over all azimuthal angles for a 1 cm 2 beam area, 1 target NMM molecule, and 1 probe particle (x-ray photon or electron). (b) The total scattered probe particle counts by 1 target molecule for a typical x-ray pulse or electron pulse, for 39.5 keV x-ray photons, 3.7 MeV relativistic electrons, and 30 keV non-relativistic electrons. The probabilities refer to scattering into a resolution element with Dq ¼ 0:1Å À1 .
Structural Dynamics ARTICLE scitation.org/journal/sdy picosecond duration pulses, there were about 2:5 Â 10 3 electrons/ pulse. 8 Shorter duration pulses are limited to fewer electrons per pulse, although recompression techniques may make it possible to sustain larger electron counts. Relativistic electron beams are less affected by space-charge interactions, making femtosecond duration pulses possible while achieving 3:7 Â 10 4 electrons/pulse. 46 Figure 3(b) expresses the scattering probabilities for one target molecule and for those beam parameters. It is seen that even though the Thomson scattering cross section is up to 10 5 times smaller than the relativistic Rutherford scattering, since there are >10 7 times more photons in an x-ray pulse than there are electrons in an electron pulse, the total scattering for an x-ray pulse is 300-1000 times larger than that for a relativistic electron pulse. Thus, with current technology, the x-ray scattering produces a much higher signal on a per-pulse and per-target molecule basis.

Pump-probe signals
We use the IAM to calculate the scattering signals and counting noise for the excitation of NMM with ground state and excited electronic state structures as reported by Stankus and Yong et al. 29 The simulations cover the range of scattering vectors from 0.5Å À1 up to 20 A À1 . We assume 100% excitation but emphasize that to get meaningful results, much smaller excitation probabilities should be used. We calculate the noise for the cases of 1 million and 30 million total scattered photons or electrons, while noting that based on the results of Fig. 3 and Table II, it takes very different data acquisition times to achieve those signals. Figures 4(a) and 4(b) show the fractional difference in scattering signals for x-ray and electron scattering, respectively, with noise as given by Eq. (15). It is obvious that larger signals reduce the noise as expected.
For x-ray scattering, we find that the shot noise approaches a constant magnitude for q larger than about 5 Å À1 , which is traced to the rise of the inelastic scattering signal. While for 1M detected photons, the noise is significant, the noise in the 30M simulation is nearly imperceptible. In the actual experiment of Stankus and Yong et al., 29 about 5000 shots were acquired for each delay time point. With each shot yielding about 50 000 counts, this implies that 2.5 Â 10 8 counts were detected. In that experiment, the excitation was kept to 5.7%. Scaling the total counts down by the excitation probability would imply that the noise in the experiment was approximately equivalent to the 1M count simulation. The noise in the reported experiment is consistent with our calculation. We note that to acquire the 5000 shots takes less than a minute.
For relativistic electron scattering, Fig. 4(b), the noise increases dramatically with s to the point where it obscures the information carried by the scattering signals. This is, of course, the result of the rapidly decaying 1 s 4 dependence in electron scattering. Up to about 5 Å À1 , this decay is countered by the increasing form factors, Fig. 2, but for larger scattering vectors, the rapid decay prevails. For the 1M simulation, the noise overshadows the scattering signals beyond 8 Å À1 . Even in the 30M simulation, the scattering signals are compromised for s larger than 10 Å À1 . These results seem broadly in line with the published experimental results, 22 but we note that to achieve the same noise level and assuming an equal optical excitation, about 10 5 times more shots are needed for MeV-UED compared to x-ray scattering (Table II). FIG. 4. The fractional difference scattering signals calculated for (a) x-ray and (b) electron total scattering for the optical excitation of NMM, solid lines, assuming 100% excitation. The noise is simulated for 10 6 (purple) and 3 Â 10 7 (pink) scattered photons or electrons, respectively. In order to investigate how noise and the range of momentum transfers affect the accuracy of structure determination, we take the simulated noisy difference patterns as the input for the structure analysis method. The phase space covered by the pool of possible molecular structures has been discussed in Ref. 29. Since these patterns were generated using a specific excited state structure, the structure obtained from the analysis can be directly evaluated for its accuracy, with smaller average percent deviations as defined in equation (S1), implying a higher accuracy of the structure.
We determine structures for scattering ranges from 0.5 Å À1 to q max or s max and vary the maximum values from 5 to 20 Å À1 . For each range of scattering vectors, the structure determination is repeated for 10-50 simulations to minimize errors from the randomness of the scattering process simulations, resulting in scatter plots of the average percent deviations vs the number of scattered probe particles. This distribution is fitted with an exponential form, f x ð Þ ¼ ae bx þ ce dx ; and the limiting values are subtracted, resulting in a dependence of the average percent deviation on the number of scattered probe particles for each scattering range (Fig. 5). The limiting values of the two methods are subtracted as discussed above. Figure 5 shows that for both x-ray and electron scattering, a larger number of detected signal counts always result in a more accurate structure determination, regardless of the range of scattering vectors. Surprisingly, to reach the same fidelity of structure determination, electron scattering requires some 3 times higher signal counts than x-ray scattering (see details in the supplementary material, Table S4). The most likely explanation is that the signal counts in electron scattering are very tightly concentrated at small scattering angles (Fig. 3). This results in very low noise for small s but high noise at larger s (Fig. 4). The structure determination requires a good signal at large scattering vectors but that is where the noise in electron scattering becomes large. This unevenness in the noise results in the need for a higher total count to get a structure determination of similar quality as in x-ray scattering. Thus, it is the rapid 1/s 4 dependence of the Rutherford scattering that ultimately leads to larger required total signal counts.
It is a widely held belief that larger ranges of scattering vectors always give a better structure determination and that ranges as low as 5 Å À1 would not carry sufficient information content. Figure 5 dispels both those beliefs. As is apparent, even the smallest scattering ranges can result in high fidelity structure determinations. 87 This is because the determination of the structure depends on both the scattering range and the noise. For the smallest scattering angles, the noise is very small in both x-ray and electron scattering. The benefit of the small noise outweighs the drawback for the limited range of scattering vectors so that an accurate structure determination is possible for small organic molecules without heavy atoms. This insight is fully consistent with the determination of excellent excited state structures performed in Ref. 29 with a q range only up to 4.5 Å À1 .
Interestingly, increasing the range of scattering vectors can have a detrimental effect on the structure determination: to reach the same fidelity structure with a larger range requires more signal counts than with the lower range of scattering vectors. In part, this is because the same signal counts get spread over a larger range of scattering angles, thereby diluting the signal at small scattering angles. The white dashed lines overlaid in Fig. 5 illustrate the increase in total counts necessary to counter that dilution. For example, if there are 1 million probe particles when q max or s max equals 5 Å À1 , it requires 1.62 million photons or 1.02 million electrons to compensate the dilution effect when q max or s max increases to 20 Å À1 for x-ray and electron scattering, respectively, and to have the same 1 million counts in the range up to 5 Å À1 .
As is seen, especially in electron scattering where the dilution is small, the average percent deviation increases beyond that dilution effect. This is likely due to the addition of noise in high scattering ranges that override some of the information contained within the lower scattering range and thus contaminate the accuracy of structure determination. Therefore, even though increasing the range of momentum transfers can increase the structural information FIG. 5. The accuracy of the structure determination, calculated as the average percent deviations as defined in Eq. (S1), as a function of the number of scattered probe particles (N photons and N electrons ) and the momentum transfer q or s for x-ray scattering (a) and electron scattering (b), respectively. All data are calculated for a range of scattering vectors starting at 0.5 Å À1 and reaching to s max and q max as given on the abscissa. See text for details. Bluer colors imply a higher accuracy structure determination. The white dashed lines show the total counts of scattered probe particles necessary to counter the dilution by increasing the range of scattering vectors for x-ray and electron scattering.
contained in the scattering pattern, the addition of noisy data at the high end worsens the overall performance of the structure determination. To fully take advantage of the high scattering ranges, it is important to obtain sufficient signals to achieve low noise at high scattering angles. This is particularly challenging for electron scattering.
It is then clear that the 1 s 4 dependence of the electron scattering signal has an adverse effect on the fidelity of structure determination because of the uneven distribution of noise. Small ranges of scattering vectors are suitable for the purpose of determining excited state molecular structures, and in that range, x-rays have an advantage even when comparing equal total signals. This compounds the advantage of current XFEL technology in producing scattering patterns with high signal counts.

Sensitivity toward hydrogen atoms
It is widely known that neutron scattering is the method of choice for measuring hydrogen atoms and that both electron scattering and x-ray scattering are challenged in this regard. That said, it is interesting to compare the relative ability of electron and x-ray scattering for determining the positions of hydrogen atoms in molecules. Inspection of Fig. 2 suggests that beyond 5 Å À1 , the x-ray scattering cross section for hydrogen atoms becomes very small. Yet, we saw that molecular structures are well determined by scattering experiments going to 5 Å À1 so that it may appear possible to measure hydrogen in x-ray experiments. At the same time, the electron scattering form factor for hydrogen atoms is small at low s, where electron scattering is strong, but rapidly approaches its terminal value of 1 beyond 5 Å À1 . This leads one to expect a sensitivity of electron scattering to hydrogen atoms, but it would be at higher scattering angles that are challenging as discussed above.
The different shapes of the atomic form factors lead to slightly different molecular scattering signals, as it is already seen in Fig. 4. We can use the IAM simulations to trace the differences in the scattering signals to different groups of component atoms (Fig. 6). Starting with the carbon, nitrogen and oxygen atoms, Fig. 6(c), the two scattering experiments give the same peaks and valleys in the signals. However, the modulations are larger at higher scattering vectors for electron scattering than for x-ray scattering. This is because the fractional difference signals, calculated using Eq. (14), have P off in the denominator. For electron scattering, this is a steeply declining function, while for x-ray scattering, it levels off (Fig. 3). Thus, we see that the difference between the curves for these atoms arises from the scaling employed to analyze the data.
The effect of different hydrogen form factors becomes apparent in Figs. 6(a), the H-H terms, and Fig. 6(b), the H-X (X ¼ O, N, C) terms. Since there are 11 H atoms in NMM, the absolute contribution of the terms containing H atoms (H-H, H-O, H-N, and H-C) below about 5 Å À1 is substantial and, in fact, comparable in magnitude to the skeleton interatomic distances. Since that range is sufficient for structure determination, this suggests that both experiments could be able to determine the positions of hydrogen atoms.
Figures 6(a) and 6(b) also show that the modulations in the electron scattering signal persist to high scattering ranges, while in x-ray scattering, they quickly decay, beyond what one would expect from the scaling by the P off term. This is the direct result of the decaying x-ray form factor (Fig. 2). Consequently, electron scattering should be the method of choice for detecting hydrogen atoms, provided that signals can be measured to high s with low noise.
To further explore the possibility of measuring hydrogen atom locations, we simulated the NMM molecule in the excited state with two orientations of the methyl group while keeping all other atom positions fixed. Both conformers have a hydrogen atom in the plane of symmetry, but the dihedral angle H-C-N-O of one conformer is cis, while the other is trans. The difference in the scattering patterns between those two is small, with amplitudes of 0.5% and 1% for x-ray and electron scattering, respectively, compared to about 10% for the difference between ground and excited state structures (see Fig. 7).
It is apparent that the effect of the methyl rotation is significantly more dramatic in electron scattering, Fig. 7(b), than in x-ray scattering, Fig. 7(a): the modulation depth is higher, and the modulations extend to much larger scattering vectors. This inherently offers the opportunity to measure hydrogen atom locations very accurately with electron scattering. As Fig. 7 also shows, about 30M detected photons should allow x-ray scattering to determine the orientation of the methyl group. Electron scattering does likewise, but to really take advantage of the extended modulations, much higher electron signals would need to be accumulated.

CONCLUSIONS
A comparative analysis of x-ray and electron scattering shows that while both methods measure the molecular form factors and thus have comparable information content, their inverse dependence on the form factors coupled with the different scaling of the Thomson and Rutherford scattering cross sections on the scattering vector gives rise to complementary measurements of molecular structures. On an absolute scale, the Thomson scattering is much weaker than the Rutherford scattering. However, with current technology, there are more than 10 7 times as many photons in an x-ray pulse than there are electrons in an electron pulse. Consequently, the probability for a molecule to scatter a photon from an x-ray pulse is about 400 times larger than the probability to scatter a relativistic electron. Since these considerations are on a per-pulse basis, it is clear that to reach comparable quality signals, many more shots need to be acquired with electron scattering than with x-ray scattering. This provides a guideline for the design of experiments and to plan data acquisition times. We note that traditional electron diffraction experiments measuring ground state molecular structures [88][89][90] use electron beam currents of about 2 lA, which is about 6 orders of magnitudes more than current-technology pulsed electron beam currents. Not surprisingly, very high quality data to large scattering vectors can be acquired with those continuous electron beams.
We investigated the effect of shot noise and the range of momentum transfer vectors on the accuracy of excited state structure determination. Surprisingly, we find that with 10 6 detected scattered particles, even a limited range of scattering vectors, up to 5 Å À1 , can give excellent fidelity structures in both scattering experiments. Extending the range of scattering vectors while keeping the number of scattered particles constant does not improve the accuracy of the structure determination but burdens the analysis with noisy data. This is particularly so for electron scattering, where the signal rapidly decreases with s and the noise rapidly increases. The unevenness of the noise leads to a reduced accuracy of structure determination, with the consequence that MeV UED needs more than 3 times the signal count compared to x-ray scattering to reach the same structure fidelity. Combined with the higher x-ray signal per pulse, this implies that to reach equal quality structures, about 1200 times as many shots are required for an electron scattering experiment.
With sufficient quality datasets, both electron and x-ray scattering should be able to determine the position of hydrogen atoms. Because of the more favorable atomic form factor, electron scattering could, in principle, be superior to x-ray scattering for hydrogen atom detection but only if sufficiently low noise can be achieved.
Looking forward, the state-of-the art of both ultrafast pulsed XFEL and MeV electron sources is rapidly evolving. With the upgrade to LCLS-II, it will be possible to deliver x-rays with 1000 times higher brightness, albeit initially only with limited photon energies. Our result that low noise is more important than larger q ranges should make it an attractive proposition to measure excited state structures with LCLS-II.
Likewise, higher repetition rate MeV electron sources are on the horizon. While with current technology one has to resort to very long data acquisition times, the future MHz repetition rates would pack

ARTICLE
scitation.org/journal/sdy many more pulses into a given time span. This would greatly broaden the impact electron scattering can have on the measurement of excited state structures and dynamics. The discovery that 5 Å À1 is sufficient for accurate structure determination for gas-phase small organic molecules has the enticing implication that the range of larger scattering vectors can be used to probe phenomena outside of the present model. Simulations by Kirrander and Weber have shown that wavepackets created on excited state surfaces are mirrored in scattering patterns as intricately detailed modulations. 91 These modulations are most visible between 7 Å À1 and 20 Å À1 . Thus, one can envision that the low q range would be more suitable to give the primary time-dependent molecular structure, while the higher q range would better image the shape of the traveling wavepacket. This separation will be most interesting to explore in future experiments with higher-brightness x-ray and electron sources.

SUPPLEMENTARY MATERIAL
See the supplementary material for the nuclear structures, partial integrated scattering probabilities, details and convergence of structure determination method, and comparative structure determinations.

CODE AVAILABILITY
The code that supports the findings of this study is available from the corresponding author upon reasonable request.

DATA AVAILABILITY
The data that support the findings of this study are available within the article and its supplementary material.