Accurate structure models and absolute configuration determination using dynamical effects in continuous-rotation 3D electron diffraction data

Continuous-rotation 3D electron diffraction methods are increasingly popular for the structure analysis of very small organic molecular crystals and crystalline inorganic materials. Dynamical diffraction effects cause non-linear deviations from kinematical intensities that present issues in structure analysis. Here, a method for structure analysis of continuous-rotation 3D electron diffraction data is presented that takes multiple scattering effects into account. Dynamical and kinematical refinements of 12 compounds—ranging from small organic compounds to metal–organic frameworks to inorganic materials—are compared, for which the new approach yields significantly improved models in terms of accuracy and reliability with up to fourfold reduction of the noise level in difference Fourier maps. The intrinsic sensitivity of dynamical diffraction to the absolute structure is also used to assign the handedness of 58 crystals of 9 different chiral compounds, showing that 3D electron diffraction is a reliable tool for the routine determination of absolute structures.


Diffraction geometry and reflection selection
Diffraction patterns are oriented as seen from the incoming beam, not from behind the detector. The righthanded diffraction geometry is described in such a way that x is the tilt axis and z points towards the incoming wave vector K 0 of the primary beam. Geometry-based data selection was performed similar to the precession geometry 15 . The excitation error S g of a reflection with lattice vector g is the distance between the point g and the Ewald sphere surface at the average goniometer angle α v .
The limiting Ewald spheres of a virtual frame correspond to the goniometer angles α v ±Δα v /2. g max is half the distance between the limiting Ewald spheres through the point g. The geometric relationship between a reflection and the limiting Ewald spheres is defined by an absolute parameter D Sg (in Å −1 ) and a relative parameter R Sg . max = | yz | v = max − | | S = | | max yz = − x is the projection of the lattice vector g onto the plane perpendicular to the goniometer tilt axis. Reflections with Sg < min and Sg > max were excluded from the refinement (Fig. S4) to avoid partial intensities and the multiple inclusion of reflections h that are assigned to more than one virtual frame.
Integrated intensities are calculated for N int orientations for each virtual frame. For each orientation, the structure matrix of the Bloch wave calculation 15 includes reflections with | | < max BW and | BW | < 0.01 Å −1 . Note that BW is thus a parameter relevant for each static orientation, whereas max and min depend on the angular range covered by the virtual frame.

Calculation of R-factors and MR-factors
For the kinematical and dynamical refinement, the residual factors R obs , R all and wR all were calculated by Jana2006 based on the common definitions: The sum runs over all reflections in the case of R all and wR all , and only over observed reflections with I obs > 3σ(I obs ) for the calculation of R obs . The instability factor u was set to 0.01.
In the case of the dynamical refinement, the intensities with symmetry-related indices were not merged. "Merged" R-factors MR were calculated based on final refinements for comparing dynamical and kinematical refinements. Merged

Evaluation of the visibility of hydrogen atoms in kinematical and dynamical refinements
Difference electrostatic potential maps were calculated with a resolution of 0.1 Å based on the final structural model from which the hydrogen atoms were removed. A maximum in the potential map was considered to correspond to a hydrogen atom if it was found within 0.4 Å from the refined or constrained hydrogen position and if the difference potential at the maximum was larger than 2σ[ΔV(r)].

Supplementary Text Statistics on structure determinations by 3D ED methods
Although a few dozens of crystals structures determined with electron diffraction methods are deposited into the Cambridge Structural Database and are marked with the keyword "electron diffraction", the database is currently far from complete and does not contain sufficient details on the data acquisition. We therefore selected a non-canonical list of key papers from 2007 to 2018 on which the success of 3D electron diffraction is based 2,15,20,22,23,30,48,[50][51][52][53][54][55][56][57][58] , and which are likely to be cited as methodological reference: We then analysed all peer-reviewed articles published between January 2009 and December 2020 citing one (or more) of these key papers. Reported structure determinations were included in the statistics if one of the following criteria is satisfied: -a 3D ED data set was recorded AND -unit cell parameters were determined AND -the measured crystal was not a protein crystal AND -a structure was solved or refined against a (combination of) 3D ED data.
Structure determinations passing these criteria were then categorized: Studies that used 3D ED only for the determination of unit cell parameters were not counted. If the structure was solved from 3D ED experiments and refined against XRD or ND experiments (e.g. Rietveld refinement), the structure determination was counted as "structure solution". 250 of the analysed papers reported at least one structure determination based on 3D ED experiments. In total 356 structure determinations are included in the statistics (Fig. S1).

Data reduction with PETS2
The software PETS2 3 with graphical user interface is available free of charge for academic use from http://pets.fzu.cz and many introductory examples, including cases from this study, are described in detail in the accompanying tutorial examples. The software was originally written for the data reduction of precession-assisted 3D ED data sets. Recent developments in the program include the support for other diffraction geometries, namely static and continuous-rotation 3D ED, and the generation of overlapping virtual frames.
PETS2 requires a list of frames, the goniometer angles α and β, the calibration constant of a pixel size in reciprocal space in units of Å −1 (which is the physical pixel width divided by the product of the detector distance and the electron wavelength λ) and the approximate reflection diameter. Analysis of diffraction patterns assumes the geometry described in the Methods section, i.e., a TIF file in the standard format shows the diffraction pattern as seen from the diffracting crystal and not as seen from behind the detector. After the automatic peak search, the orientation of the goniometer rotation axis is determined automatically. Identified peaks are then processed for the determination of the unit cell and orientation matrix. Symmetry constraints on the unit cell parameters were used where appropriate. If the unit cell volume deviated by more than about 0.5% from reference unit cell volumes based on XRD measurements at similar temperatures, the calibration constant was adapted accordingly. In the subsequent initial integration step, circular masks with a fixed diameter are placed at expected reflection positions on each frame and integrated intensities are determined by summation of the pixel counts corrected for the background determined from the pixels around the integration mask. The orientation of each frame was optimised by comparing the measured frames with simulated diffraction patterns. The orientation matrix was refined again with the optimised geometry parameters.
Two output files in the well-defined CIF format are generated. The hkl file for kinematical refinement is like the common output of other data reduction programs. For example, frame scale factors and Lorentz correction are applied to the overall integrated intensity of each unique reflection h. The hkl file for dynamical refinement includes all relevant geometric parameters describing the diffraction experiment. This includes the orientation matrix, the orientation parameters of the virtual frames and the covered angular range per virtual frame. The second block lists uncorrected, integrated reflection intensities I h with the corresponding uncertainty σ h , reflection indices h and the virtual frame number to which this reflection is assigned. The currently implemented algorithm determines I h as the simple sum of the partial intensities from the frames on which the reflection is expected without any further correction. A Lorentz correction is not needed because of the way the intensities are calculated at the refinement stage. Frame scales are determined at the refinement stage because they cannot be accurately estimated beforehand. Note that one reflection may be assigned to more than one virtual frame and thus may be present in the list more than once.

Parameters of virtual frames
As a final step of the data reduction of static and continuous-rotation 3D ED data with PETS2, the number of experimental frames that form one virtual frame N F and the number of overlapping experimental frames N O that are shared by two subsequent virtual frames define the virtual frames parameters. As described in the main text, parameters must be chosen in such a way that the angular range covered by a virtual frame Δα v is large enough so that the Bloch wave calculations result in complete rocking curves of the assigned reflections. N O should be large enough so that each measured reflection is fully integrated on at least one virtual frame. Using the data sets of α-quartz (Δα = 1.0°) and α-glycine (Δα = 0.3558°), we compared different refinements based on different choices of N F and N O (Table S1 and S2). The refinements show little dependence on the parameters of the virtual frames for a broad range of parameters as long as the above considerations are approximately met, i.e., Δα v may not be too small. Consequently, 3D ED experiments with any typically used Δα step are suitable for dynamical refinement. Note that the measurement of static diffraction patterns, which is typical for ADT 58 without continuous goniometer rotation, requires a small step size Δα to provide sufficiently fine sampling of the reciprocal space. Δα should be roughly the same as the crystal mosaicity or, preferably, smaller. Otherwise, dynamical refinement against non-integrated reflection intensities will result in significantly worse figures of merit.

Dynamical refinement with JANA2006
The output file from PETS2 for dynamical refinement with the geometric parameters and reflection list is imported by JANA2006. Where applicable, several data sets were imported individually without merging symmetrically related reflections to preserve the unique geometric relationship for each measured reflection. For the refinement, intensities of weak and negative observed reflection intensities with I obs < 0.01σ(I obs ) were set to 0 and their uncertainties adapted so that (√ obs ) = 5√ ( obs ). Note that this was also applied for the calculation of MR and MwR-factors. The dynamical refinement, just like the kinematical refinement, requires a starting model. Any representative model from, e.g., other diffraction experiments like X-ray powder diffraction or computational studies like structures optimised by density function theory are suitable starting points. In this study, either the model from the structure solution or from a kinematical refinement was used. If more than one data set is imported, the least-squares refinement uses the reflections from all data sets and benefits from the increased completeness and redundancy. Statistical parameters and descriptors in the well-defined fields in the provided CIF files and in Tables S7, S11, S12, S14, S15, S16, and S17 correspond to this set of reflections. Additionally, JANA2006 provides the R-factors and number of observed/all reflections for each subset of reflections originating from one data set. These parameters are provided in the CIF files as part of the field _refine_special_details.
Refinement cycles are handled by two programs. Dyngo is a standalone program that calculates dynamic intensities for a set of simultaneously excited reflections determined by the diffraction geometry, determines integrated intensities by numerical integration over a range of crystal orientations and calculates derivatives of dynamical intensities with respect to refinement parameters. Recent developments in Dyngo include the support for non-precession geometries including continuous-rotation 3D ED. JANA2006 handles the least-squares refinement, structural parameters, and geometry parameters. In each refinement cycle and for each virtual frame, JANA2006 determines the set of reflections that are assigned to the respective virtual frame and that pass the geometric filters described in the Methods section. This reflection list together with the relevant geometric parameters are used as input for Dyngo and the calculated intensities I calc are returned together with the respective derivatives needed for the leastsquares refinement. The setting of other parameters relevant for the dynamical calculations is discussed and analysed in subsequent sections.
Before the actual refinement, the thickness and frame scales are optimised without refining any structural parameter. Then, these parameters are refined together with the structural parameters for several cycles until convergence is observed. Estimated standard uncertainties and signals in the difference Fourier maps are used to evaluate the completeness and correctness of the refined model. Once the model is complete, the orientation of the virtual frames is optimised. This optimisation is like a refinement cycle during which two orientation parameters per virtual frame are refined. These parameters are not refined together with structural parameters because the number of reflections passing the geometric filters depends on them, leading to instabilities in the refinements. Furthermore, if two orientation parameters per virtual frame were refined, the ratio between observations and parameters would decrease significantly.
In several cases, especially STWP_HPM-1, the refinement was also tested with JANA2020, which is available from the same source as JANA2006 and provided with the same version of Dyngo. The results and refinement output obtained with JANA2020 were identical to those obtained with JANA2006.

Example input file for the Bloch wave program Dyngo
The input file is a fixed-format ACII text file with the file extension .eldyn. Comments are not allowed in the input file, and are included here for explanatory purposes. Comments begin with "%". Line numbers are given on the left, the longest lines in the input file here extend over two lines.

SI 8 / 69
Format description: • Line 1: Commands set by Jana2006/2020 describing the task to be performed by Dyngo and, optionally, other settings. Main commands (only one allowed): int: calculate intensities and their derivatives scale: optimise frame scale factors orient: find optimal frame orientation thick: find optimal frame thickness thickorient: find optimal frame thickness and frame orientation simulatenously Other importand commands (several allowed): iedt: continuous-rotation 3DED Without 'iedt', geometry of precession-assisted 3DED is assumed. thr N: number of CPU threads to be used by Dyngo (replace N by e.g. 8) twobeam: apply two-beam formalism in the calculation absorption: include absorption (inelastic scattering) through imaginary part of the electron scattering form factors thickmodel: assume the crystal has a certain shape (thickness distribution) available shapes: wedge, cylinder, lens F, ribbon F (replace F by flatness parameter between 0.0 and 1.0) • Line 2: Commands set by user. Same commands as above are available. In case of conflict, the commands of the second line have preference. • Line 10: frame orientation parameters. U, V, W, α V , β V , ½Δα V Dyngo assumes that α V and β V describe the average frame orientation, and that the goniometer moved from α V −½Δα V to α V +½Δα V . The "zone axis" UVW is not used by Dyngo. • Line 11: frame scale; thickness; 2x (unused) placeholder; refinement keys • Line 12: orientation correction angles 49 EDphi and EDtheta (and refinement keys) • Line 13: Reflection list and parameters. h; k; l; I obs ; σ(I obs ); A=Re(F calc ); B=Im(F calc ); usage key; S g The usage key defines if a reflection is used in the least-squares refinement or not.

Number of integration steps for dynamical calculations
The number of integration steps N int is an important parameter that must be chosen before the dynamical refinement. It determines the number of orientations for which the Bloch wave calculations are performed for each virtual frame. It is thus related to the sampling of the calculated rocking curves which are subsequently integrated yielding the integrated calculated intensities of the contributing reflections. N int should be high enough to ensure a good sampling, but also as low as possible to reduce the computational cost. Figure S5 shows the dependence of wR all on N int /Δα v (continous-rotation 3DED) and N int /(2φ) (precession-assisted 3DED). φ is half the opening angle of the precession cone for precession-assisted 3D ED and has a similar geometric meaning as Δα v /2 in the case of continuous-rotation 3D ED. ΔwR all is calculated relative to wR all of the refinement with N int → ∞. The first observation is that a too small N int has a strong impact on wR all . A coarse sampling of the rocking curve obviously results in worse R-factors. The second observation is that convergence is observed for different data sets at different N int normalized by the covered angular range. This depends on the refined thickness, which for the continuous-rotation data sets is 116(9) nm, 44(3) nm and 36(3) nm for abiraterone acetate, α-quartz and natrolite, respectively. A larger refined thickness thus requires more integration steps, which is expected because the increased thickness decreases the rocking curve width and thus requires a finer sampling. The refined thickness of 48(3) nm against the data set of quartz recorded with beam precession (φ = 0.92°) is in good agreement with the non-precession data (Δα v /2 = 1.0°), but convergence requires a much larger N int . This is easily explained by the corresponding set of different orientations adopted by the crystal relative to the primary beam. The expected ratio of N int with and without beam precession is 2πφ/Δα v . This ratio simplifies to the constant π if φ = Δα v /2, which is in good agreement with the observation that the dynamical refinement of quartz against precession-assisted data requires ~3 times more integration steps than the refinement against continuous-rotation data.
For dynamical refinements against static and continuous-rotation 3D ED data, N int may be initially set to 25 steps/°. If the refined thickness is significantly larger than 40 nm, the initial N int should be set to about 30 to 40 steps/°. In the final refinement cycles, N int was increased to at least 50 steps/° as a quality check. If the thickness increased upon increasing N int , the number of integration steps was further increased until convergence was observed.

Resolution limit of dynamical calculations
Another parameter that has a strong impact on the computation times is the resolution limit max BW which is related to the number of reflections contributing to the dynamical calculations. Obviously, max BW must be equal or greater than max ref , which is the resolution limit of reflections used in the refinement, because otherwise I calc is not determined for all reflections in the least-squares refinement. max BW should be equal to the highest resolution reflection which was excited during the experiment. In most cases, it is sufficient to set max BW = max ref . If max ref is lower than the theoretically obtainable resolution of the data set, max BW should be increased (Fig. S6). The latter is expected for example for data sets with a large detector distance so that high-resolution reflections are not measured by the area detector.

Comparison between PETS/Jana2006 and XDS/SHELXL
One of the most popular programs for the data reduction of continuous-rotation 3D ED data is XDS 59 (Xray Detector Software). The most-used refinement software for small-molecule crystal structures is SHELXL 1 . All results presented in the main article are based on data reductions with the software PETS2 (Process Electron diffraction Tilt Series) and refinement with Jana2006. The only exception is the kinematical refinement of albite, for which the published data reduction based on XDS was used for comparison. Different structure determinations were compared for benchmark purposes (Table S3). Previously published kinematical refinements by the respective authors who provided the data sets are also included in Table S3 for the sake of completeness. Although the results for individual data sets differ slightly between the software packages, the comparison shows that the use of PETS2 and Jana2006 does not produce systematically worse results than the use of alternative software.

Comparison of 3D ED measurements with and without precession
Precession-assisted 3D ED is a very successful and powerful method, which is, however, based on the availability of a suitable hardware extension of the TEM for the accurate control of the beam precession. Experimental integrated intensities I obs are obtained from a single frame. On the basis of these independent frames, dynamical integrated intensities I calc can be calculated and compared with I obs . This direct correspondence between experimental frames and dynamical calculations facilitated the development of software packages that take dynamical diffraction theory into account. In the last years, especially the combination of Dyngo with Jana2006 proved to be a versatile tool for accurate structure determination from precession-assisted 3D ED experiments 14,15,35,48 .
There are several advantages of continuous-rotation 3D ED over precession-assisted 3D ED which become apparent by comparing the reciprocal space volumes V* precession and V* continuous sampled by a single frame with precession and with continous-rotation, respectively (Fig. S7). Within the small-angle approximation, the ratio V* precession /V* continuous is π/2 if φ = Δα/2. Consequently, with beam precession a longer exposure time is needed to achieve the same integrated intensity as without precession. Although the larger volume also improves the completeness as more unique reflections are measured, the overall effect on the completeness of a measured data set is negligible. More importantly, the intensity information of a reflection h from two neighbouring frames cannot be combined, because their rocking curves do not have a simple relationship if precession is used. Finally, all reflections for which the exact Bragg condition is not fulfilled during one precession circle are incompletely integrated and must be excluded from the refinement.
These disadvantages do not hold if a static or continuous-rotation geometry is used. Every (partial) reflection on each frame (except for the very first and last frames) contributes to the final integrated intensity, which strongly improves the signal-to-noise ratio and further reduces the necessary electron dose per frame. This is a big advantage of continuous-rotation 3D ED because more appreciable reflection intensities are obtained from a single beam-sensitive crystallite with a weaker electron beam.
As an experimental assessment of the dynamical refinement against continuous-rotation 3D ED data, a measurement protocol was designed to record precession-assisted 3D ED and continuous-rotation 3D ED data sets in a quasi-simultaneous way. This protocol was used to determine the structures of α-quartz and natrolite with the aim to compare the respective dynamical refinements. Precession-assisted and continuous-rotation 3D ED measurements of quartz used the identical exposure time, but in the case of natrolite the exposure time of diffraction patterns recorded with beam precession was increased by 20%.
Very similar R-factors were achieved by dynamical refinements, at the level of ~0.06 for quartz and ~0.08 for natrolite (Tables S4 and S5). The coordinates from the new dynamical refinement against the continuous-rotation 3D ED data sets were visibly closer to X-ray-based reference coordinates than the refinement against precession-assisted 3D ED (Tables S6 and S7). Although with beam precession more observed reflections were used in the refinements, the geometric aspects described above apparently have a larger impact on the accuracy of the refinement.

Frame-based kinematical refinement
The dynamical refinement requires a different data processing than the kinematical refinement, and the refinement itself is also quite different. The two main differences are that in the dynamical refinement the intensities are not symmetry-averaged, and that scale factors of individual OVFs are refined. It is thus legitimate to ask, if the observed improvement from kinematical to dynamical refinement can indeed be attributed to the description of the dynamical effects, or if it is due to the different data processing and refinement strategy.
To answer this question, we have introduced a procedure that we name frame-based kinematical refinement. This refinement is in all aspect equivalent to the dynamical refinement, i.e., it uses the same data processing, same refinement strategy, same number of parameters. The only difference is that the site occupancy factors of all refined atoms are reduced to a small fraction of their full occupancy. In the kinematical limit, such operation has no effect, as it is perfectly correlated with the scale factor(s). In the dynamical refinement, this is, however, not the case. The dynamical effects depend on the thickness and on the strength of the interaction between electrons and the crystal. The reduction of the site occupancy factors within the framework of the Bloch wave formalism is equivalent to the reduction of the interaction strength, while preserving all other parameters the same, thus making the intensities less affected by dynamical effects. At the limit of very low occupancies, the diffraction becomes kinematical.
We have performed detailed calculations on α-quartz, natrolite, abiraterone acetate, and limaspermidine. In both cases, we performed a series of refinements with site occupancy factors between 1.0, corresponding to the normal dynamical refinement, and 0.01, which corresponds to hundred times reduced strength of the dynamical scattering yielding intensities very close to the kinematical limit. Rfactors are plotted as a function of the site occupancy factor in Fig. S8. Table S5 then contains the Rvalues of the dynamical, frame-based kinematical and standard kinematical refinements for more compounds. The table shows that the MwR all values of the frame-based kinematical refinement are similar or slightly higher than the wR all values of the standard kinematical refinement, illustrating clearly that the improvement in the fit between dynamical and kinematical refinement can indeed be attributed to the more correct description of the dynamical effects. Fig. S8 also contains the wR all values of equivalent refinements against the inverted structures. It can be seen that the difference in R-factors reduces as the intensity of the dynamical effects decreases, until they become almost identical in the refinements with site occupancy factor 0.01. This further illustrates the fact that the differences between the refinement of the enantiomorphs can be entirely attributed to the enantiomorph-sensitive dynamical effects. These differences vanish in the kinematical limit.

Al/Si distribution in albite
From the 16 available data sets of albite 19 , 3 data sets (author labels 000, 002 and 014) were selected for the dynamical refinement based on resolution-dependent reflection statistics with an overall completeness of 66%. Kinematical refinements using only these 3 data sets were not as conclusive as the published results based on 16 data sets from 9 different crystals 19 . Therefore, the kinematical refinement of albite with JANA2006 presented in this study was based on the published hkl file generated by data processing with XDS. All 16 possible Al/Si distributions were refined applying isotropic displacement parameters without specific restraints or constraints. Both the dynamical and the kinematical refinements identified the correct Al/Si distribution, which is also confirmed by the cation-oxygen distances as the refinement with the best R-factors. The absolute differences between the R-factors of models with different Al/Si distributions were only marginally larger in the kinematical than in the dynamical refinement, but as the dynamical R-factors are roughly by a factor of 2.3 smaller, the relative difference between the R-factors is more significant in the dynamical refinement ( Fig. S10). Quantitatively, the second-best R-factor is 0.8% higher than the best for dynamical refinement, and 0.5% higher for the kinematical, for the third best the increase is already 2.7% for dynamical vs 1.0% for kinematical refinement. The worst R-factor is 9.5% larger in the dynamical refinement and only 3.5% in the kinematical refinement. Another clear indicator is the range of the displacement parameters of the Al and Si atoms (Fig. S11), which is much narrower for the correct atom type assignment than for all incorrect ones in the dynamical refinement. This difference, although still present, is weaker in the kinematical result. This analysis together with the lower R-factors in general significantly increases the confidence with which the dynamical refinement identified the Al and Si sites.
Absence and presence of guest molecules in mordenite and CAU-36 octane, abbreviated as DABCO (Schoenflies symbol C 3h ), as guest molecule. Both the dynamical and the kinematical refinement reveal all 8 atom sites in the DESP of a refinement without the guest molecule. However, additional maxima in the subsequent DESP of the dynamical refinement including the guest molecule suggest that the molecule position is disordered with two orientations, the second of which is related to the first by a 60° rotation around the 3-fold rotation axis of the DABCO molecule. This signal, while weak and noisy, is clearly visible in the DESP maps (Fig. S9). In the equivalent DESP of the kinematical refinement the second orientation could not be clearly identified (Fig. S9A,B). The second orientation was added with constrained geometry and fixed orientation relative to the initially identified guest molecule. With the dynamical approach the occupancy of the second orientation refines to 0.064(4), in the kinematical refinement to 0.074 (8).
The mordenite crystal (diameter ~250 nm) was measured after calcination with continuous-rotation 3D ED at room temperature 20 . The DESP maps of the dynamical and kinematical refinement were analysed to evaluate the presence of water molecules, which are expected to be absent due to the calcination step. The standard uncertainty of the difference electrostatic potential σ[ΔV(r)] is significantly lower in the case of the dynamical refinement (Tab. S9). Assuming a thermal displacement parameter of 0.15 Å², a disordered oxygen site with an occupancy of 10% is expected to be visible in the DESP map above the 3σ-level. In the DESP from the kinematical refinement, such an oxygen atom cannot be distinguished from spurious noise peaks, because the noise level is higher by a factor of 3.2. Hence, even 25% occupied oxygen atoms could well be hidden in noise (Fig. S9C). Only the dynamical refinement thus suggests that the calcination indeed removed any water molecules from the pores, which was confirmed by infrared spectroscopy.

Static 3D ED and beam-induced disorder in CAP
Data acquisition in continuous-rotation mode in general yields a better sampling of the rocking curve in comparison to static 3D ED. However, the presented approach is in general applicable to both and the results on the dynamical refinement of the structure model of CAP are considered a proof of principle.
The two crystals of CAP were measured by sampling reciprocal space in 0.1°-steps. During the exposure, the beam and the sample stage (goniometer) are static, like in the first 3D ED data acquisition protocols like ADT 50,58 (Automated Diffraction Tomography) and RED 51 (Rotation Electron Diffraction). Data reduction of data sets with static diffraction patterns follows the same procedure like the data reduction of continuous-rotation 3D ED data. The only difference is that the input files for PETS2 use the keyword "geometry static" instead of "geometry continuous". The generation of virtual frames and the subsequent dynamical refinement are identical for both geometries.
The static 3D ED setup as implemented for the measurement of CAP has the drawback that the measurements take significantly longer (in this case, about 1 hour for an angular range of 100°). As crystals are constantly exposed by the electron beam, the potential for beam damage is significantly increased and in the case of CAP induces an occupancy disorder on the cobalt sites and related displacement disorder, which is discussed in more detail here. In the hypothetical ordered CAP structure with chemical composition CoAl 2 P 4 O 20 H 12 and only fully occupied sites, the oxygens of the CoO 6 octahedron are part of two water molecules and two hydroxyl groups. The measured sample contains more Co so that two Co sites are partially occupied. XRD-based refinements indicate that the occupancy of Co1 is much larger than the occupancy of Co2, which is also confirmed by precession-assisted 3D ED experiments with optimized electron dose 35 . An increased exposure of CAP crystals to an electron beam triggers several correlated structural changes: • Co atoms migrate from Co1 to Co2 site • Hydroxyl groups migrate from O1 to O6 site • Water molecules of O2 site adapt orientation depending on local occupancy of Co1 and Co2 • PO 4 tetrahedra and AlO 6 octahedra tilt by a few degrees Consequently, the coordinates of almost all atoms change as a function of the occupancy of Co1 and Co2, but the change is most pronounced for oxygens coordinating the P atoms. For example, a linear has been observed, where o 1 and o 2 are the occupancies of Co1 and Co2, respectively. This relationship is further confirmed by the presented dynamical refinement and fits better to the trend than the kinematical refinement (Fig.  S16A).
The occupancy of the H atom of the hydroxyl group involving the O6 site, which is only occupied if Co1 is not occupied, is expected to be 1-o 1 = 0.28. The large displacement parameter of O6 and the absence of potential hydrogen bond acceptors suggests that the orientation of the hydroxyl group may be not well defined, and no peak in the vicinity of O6 was identified in the difference potential map (Fig. S16B). The water molecule at the O2 site is expected to be present in three different orientations, corresponding to the three possible environments: a) only Co1 occupied, b) only Co2 occupied and c) both Co sites simultaneously occupied. Consequently, there may be up to 6 different hydrogen sites to describe the three corresponding water molecule orientations. However, the refinement revealed that the H3 site is part of a hydrogen bond with a donor-acceptor distance (O2−O4) of 2.77 Å (O2-H3-O4 angle is 160.4°). As no other potential hydrogen bonds involving O2 could be identified, it is reasonable to assume that there are in total 4 hydrogen sites in the vicinity of O2, of which three try to maximise the distance to the occupied Co site(s).
These considerations are in very good agreement with the observation in Fig. 4D: In the difference Fourier map, the potential at the H3 site is visibly stronger than that of the other hydrogen site (H4), suggesting that the latter is not fully occupied. Assuming that the identified H4 site corresponds to case a), two additional sites H4' and H4'' are expected to be present corresponding to the respective environments of cases b) and c). The expected occupancies are 1−o 1 =0.28 and o 1 +o 2 −1=0.14, respectively. However, only one additional site close to O2 could be identified above 2σ[ΔV(r)], which most likely corresponds to H4' with an occupancy of 0.28 (black arrows in Fig. S16). The (restrained) dynamical refinement including the H4' site improved the wR all from 0.1185 to 0.1177, which is negligible and was therefore not used in the final refinement presented in the main article.

Survey on C-H distances in 3D ED-based structure determinations
Using the program ConQuest of the Cambridge Structural Data Center, the Cambridge Structural Database CSD 60 was searched for all close distances between C and H atoms limited to structures that were labelled with the keyword "electron diffraction". The database is far from complete and there are many more published structures (Fig. S1) than deposited structures. However, this quick survey clearly shows that in the 50 deposited structures fulfilling the search criteria there are two dominating distances (Fig. S11): The first around 0.95 Å corresponding to the default distance constraints used in many XRD refinement software packages for different temperatures, orbital hybridisation and chemical environments. The other region is just below 1.1 Å corresponding to the default C-H distances derived from ND-based structure determinations 26 .

Computational cost for dynamical refinement cycles
The computational cost for dynamical refinements is much higher than for kinematical refinements. It is approximately proportional to the number of parameters and the cube of the primitive unit cell volume V P . An overview of representative refinement cycle times is given in Table S5.

Absolute structure determination and assumed diffraction pattern orientation
For non-centrosymmetric structures, the absolute structure is determined initially by repeating the dynamical refinement starting with the inverted model and comparing the refinement figures of merit of the two final models as described in the Methods section.
As pointed out in several sections before, PETS assumes that the TIF files show diffraction patterns as seen from the crystal. If this convention is not followed or raw diffraction patterns are flipped, the signs of hkl indices are not correct and the absolute structure determination will identify the wrong enantiomorph. A rotation of diffraction patterns during any processing and data conversion step has no effect on the final structure determination.
A pattern flip or rotation can only be detected if the goniometer rotation direction and calibrated orientation of the rotation axis relative to the detector axes are known. A careful check at the data reduction stage then reveals an unexpected orientation of the goniometer rotation axis.
For the preparation of this manuscript, the initial absolute structure determination by dynamical refinement of α,β-dehydrocurvularin and epicorazine A was opposite to the expected one. The data sets of these two compounds stem from the same study and microscope 44 . A careful analysis of all file processing steps and a helpful discussion with the involved authors led to the finding, that the raw diffraction patterns written by the Timepix hybrid pixel detector (Amsterdam Scientific Instruments) by default were written not as seen from the crystal, but as seen from behind the detector. As the TEM setup with the used detector was only temporary, the "flip" was not noticed before our reinvestigation of the data.
Absolute structure determination of quartz, natrolite and CAU-36 The              Comparison of 4612 calculated integrated intensities using the diffraction geometry of the first 59 OVFs of the measurement described in Table S15. A thickness of 1000 Å was used for the calculations. The structure models of (+)-limaspermidine and (−)-limaspermidine used for the calculation of the intensities are related by exact inversion. Calculated intensities within the kinematical approximation are thus identical for (+)-limaspermidine and (−)-limaspermidine.

Supplementary Tables
Tab. S1. Dependence of refinement on virtual frame parameters of α-quartz. Refinements of α-quartz with different choices of virtual frame parameters. All coordinates, anisotropic displacement parameters of non-hydrogen atoms and isotropic displacement parameters of hydrogen atoms were freely refined without any constraints or restraints, except for symmetry constraints on the silicon site. Meaning of used symbols is the same like in other sections except for RMSD, which here refers to the root-mean square deviation of the atom positions from XRD-based reference positions 62 . Lines marked with an asterisk (*) indicate that the refinement converged with at least one non-positive definite ADP tensor.

Tab. S3. Comparison of XDS/SHELXL and PETS/Jana2006.
Kinematical refinements based on the data sets used in this study. P and X in the label refer to the data reduction with PETS2 and XDS, respectively. J and S refer to the refinement with Jana2006 and SHELXL, respectively. P+J* indicates the kinematical refinement used in the main article. Compl. is the completeness, N par is the number of refinement parameters. The data reduction of data set #1 (Fig. S11F) of abiraterone acetate failed so that only 4 out of 5 data sets were used for the respective refinements. Anisotropic displacement parameters (ADPs) in abiraterone acetate and MBBF4 were not refined with Jana2006. Using restraints on the displacement parameters in abiraterone acetate, a refinement with ADPs was performed with SHELXL. For the sake of completeness, the parameters extracted from the previously published kinematical refinements were included in the Tab. S4. Duration of dynamical refinement cycles. The elapsed real time t is given for a single dynamical refinement cycle in minutes. t R is the elapsed real time of a single cycle of dynamical calculations without refining any parameters. The latter thus represents the time to only determine I calc and R-factors. Refinements were performed on a computer with octa-core CPU (Intel Core i9-9900K) and 32 GB main memory. Compound

Tab. S7. Albite.
Relevant parameters of the measurement, data reduction and refinement results of albite. 16 data sets were obtained from 9 individual crystals. Only 3 were selected for the dynamical refinement, whereas the kinematical refinement is based on the published HKL file 19 . The data sets used for the dynamical refinement are labelled "00", "02" and "14" by the data set authors. Reference atomic distances for the calculation of RMSD were taken from reference 65  Tab. S9. Mordenite. Relevant parameters of the measurement, data reduction and refinement results of mordenite. The data reduction and refinement are based on a measurement used in a previous publication, which is described as "Data set 2" in Table 1 in reference 20 . The structure model reported therein has the CCDC code 1875577. As an independent XRD-based reference structure was not available, a reference structure was determined by geometrical optimisation using force-field calculations as implemented in GULP 67 with typical Buckingham potentials tested for a range of zeolites 68

Tab. S10. STW_HPM-1 (T = 100 K).
Relevant parameters of the measurement, data reduction and refinement results of the chiral zeolite STW_HPM-1. For the calculation of RMSD only Si-O distances were considered. As a reference the refined structure from the single crystal XRD measurement was used (Tab. S18), CCDC code 2237211. Atom colour codes: silicon: blue; oxygen: red; carbon: brown; fluorine: light blue; hydrogen: pink.
Hydrogen positions shown only with the pink-coloured sticks indicating the bond between the carbon and hydrogen atoms. Tab. S11. CAP. Relevant parameters of the measurement, data reduction and refinement results of CAP. Two crystals were measured with a simplified, static experimental setup. The beam and goniometer were not moving during the exposure of the diffraction patterns. After each frame, the goniometer was tilted by 0.10°. This setup is similar to the original ADT (automated diffraction tomography) data acquisition with finer tilt steps, but without operating in scanning TEM mode. XRD-based reference atomic distances for the calculation of RMSD were taken from 35 , CCDC code 1864822. Atom colour codes: cobalt: blue polyhedra; aluminium: blue-grey octahedra; phosphorus: pink tetrahedra; oxygen: red; hydrogen: light pink. Tab. S12. CAU-36.

Measurement of CAP
Relevant parameters of the measurement, data reduction and refinement results of CAU-36. XRD-based reference atomic distances for the calculation of RMSD were determined using only intermolecular distances involving C and N atoms using the program MOGUL (Molecular geometry library) 69 . A reference structure model based on an independent single crystal XRD measurement was not available, but the model from a previously reported kinematical refinement against 3D ED data has the CCDC code 1865991. Atom colour codes: cobalt: blue; nickel: grey; phosphorus: purple; oxygen: red; carbon: brown; nitrogen: light blue; hydrogen: pink.

Measurement of CAU-36
Microscope JEOL JEM-2100-Lab6 Detector ( Tab. S13. α-glycine. Relevant parameters of the measurement, data reduction and refinement results of α-glycine. The data reduction and refinement are based on a measurement used in previous publication, which is described as "Data set 7" in Table S2

Tab. S15. (+)-limaspermidine.
Relevant parameters of the measurement, data reduction and refinement results of (+)-limaspermidine. The data reduction and refinement are based on a subset of measurements used in a publication from 2018 22 . Reference atomic distances for the calculation of RMSD were taken from reference 71 , CCDC code 1049103. Note that the reference structure was measured at room temperature, whereas the data sets used in this study were measured at T = 100 K. Atom colour codes: carbon: brown; nitrogen: light blue; oxygen: red; hydrogen: pink. Tab. S19. Absolute structure of SWT_HPM-1 by dynamical refinement. Relevant parameters of the measurement, data reduction and refinement results of the chiral zeolite STW_HPM-1 collected at room temperature, used for the absolute structure determination blind test. The structure was refined without modelling the OSDA molecule. Tab. S20. Absolute structure determinations. All data sets were recorded at low temperature between 80 K and 100 K. Refinement statistics are based on refinements against single data sets from individual crystals. Enantiomorph #1 corresponds to the correct absolute structure, enantiomorph #2 to the wrong absolute structure. z-score and p are the certainty and probability, respectively, that the absolute structure was correctly assigned. R Sg in all cases set to 0.6, D Sg set to 0.0015 Å −1 . Tab. S23. Determination of the absolute structure of FPTA (triclinic compound with Z' = 2). Refinement was performed against a combination of 9 data sets. Constrained displacement parameters and distance restraints were applied for the two molecules in the asymmetric unit. Refinement statistics are reported for individual data sets and the combination of the 9 data sets.  Tab. S24. Robustness of the determination of the absolute structure of (+)-limaspermidine. Refinement was performed against two data sets of the same crystal for the cases with N OVF > 59, in the other cases only the first data set was used. N OVF is the number of overlapping virtual frames used in the refinements, always starting with the first frame of the first data set.