WorksPhysics and Astronomy
Estimating Extrapolation Factors in Time-Resolved Crystallography
Abstract
Time-resolved crystallography (TRX) captures macromolecules in action, but a triggered crystal contains a mixture of triggered proteins in an unknown state and untriggered proteins in the reference state. Separating these is necessary to isolate the dynamics of interest and is an underdetermined data-analysis task. For the simplest case, with one triggered state and one reference state, a range of methods exists, but their assumptions, accuracy, and domains of applicability have not been systematically investigated. Here, we deconstruct and review the methods in current use, employing a unified notation. We make their assumptions explicit and benchmark each on a simulated dataset. A key point is that many of these methods do not estimate the fraction of all triggered molecules in the crystal, but instead estimate a latent parameter we call the extrapolation factor, which is related to but distinct from the so-called "occupancy". As our simulations make apparent, current methods do not always yield accurate results, in particular with noisy data and when the fraction of triggered protein is low. Inspired by previous work, we introduce Vacuum Level Matching, a method that grounds the estimate in the physical constraint that electron density is a nonnegative quantity: it cannot fall below a vacuum level. Operating voxel by voxel, Vacuum Level Matching replaces the manual choices of previous methods with a data-driven procedure and reports quality-control metrics that flag data unable to support a confident prediction. On the same simulated data, it outperforms state-of-the-art methods, and on two experimental datasets, rsEGFP2 and a multi-time-point photolyase series, it recovers known structural changes while flagging issues where the data are weak. Finally, we report an implementation of Vacuum Level Matching in the form of a small, reusable Python package.
Introduction
Time-resolved crystallography (TRX) has witnessed a surge of interest in recent years, as advances in X-ray sources and detectors have made it increasingly feasible to move from static structural snapshots to observing biological macromolecules in action. By capturing metastable intermediates, populated on timescales from femtoseconds to seconds, researchers aim to visualize the precise atomic motions required for ligand binding, catalysis, and signal transduction [17, 4].
The power of this approach is exemplified by recent studies. Our own work used TRX to decipher the mechanism of DNA repair by the enzyme photolyase, allowing us to visualize photoexcitation, the subsequent breaking of thymine dimers, and product release [5]. In another case, TRX has been employed in conjunction with electric field stimulation to observe the mechanism of sodium ion conduction through the NaK2K channel [20].
While TRX has largely been pursued by a small number of experts, the field is growing as the various enabling technologies mature. For instance, while much of the research and development over the past decade has been driven by X-ray free-electron laser (XFEL) facilities, synchrotrons – where beamtime is in greater supply – are increasingly developing capable TRX-specific beamlines [26]. Simultaneously, innovations in sample delivery for serial crystallography, in which diffraction from many microcrystals is merged into a single dataset, have lowered sample consumption requirements using both liquid jets and fixed targets, expanding the range of protein systems that can be studied [2, 1]. Finally, the programs and data-analysis pipelines that facilitate TRX have matured into usable software packages [14, 36, 7, 9]. Consequently, there is hope that users who are not TRX experts will routinely use the technique to address new biological questions.
Substantial barriers remain, however. One important challenge involves the analysis of mixtures of structural conformations in TRX data. In a TRX experiment, one typically triggers a dynamical process using a light flash from an optical laser, rapid mixing with a ligand, the application of an external field, or another suitable perturbation. This impulse initiates the reaction or motions of interest that can be followed crystallographically. Unfortunately, with this approach it is almost always impossible to achieve a fully triggered sample, in which all the proteins in the crystal are triggered and remain structurally synchronized during the dynamics of interest. First, triggering usually activates only a small fraction of the proteins in a crystal, leaving many unperturbed molecules in the ground or reference state. Second, since triggered proteins progress through their reaction intermediates stochastically, they may not all adopt the same structural conformation at any given time. Therefore, in general, a triggered crystal in a TRX experiment contains a mixture of protein conformations. Separation of this mixture, so that one can solve the structure of each intermediate that contributes, is a central data-analysis task for any TRX practitioner.
The simplest corresponding model of the crystallographic signal asserts that the observed complex structure factors can be described through a linear combination,
where we have written the structure factors . Complex values are denoted by boldface, and we drop the argument of to lighten the notation.
This linear model rests on several assumptions about the sample that are rarely stated explicitly. First, it assumes that each lattice site is occupied by one conformation, chosen at random according to the conformations’ occupancies in a way that is statistically independent of the neighboring lattice sites. The diffraction observed at the location of the Bragg peaks is then given by the Fourier amplitude of the average unit-cell electron density. The structure factors of the individual conformations add coherently, weighted by their occupancies. If, instead, the lattice sites are correlated such that they are segregated into separate domains or crystals, the diffraction signal will include terms that sum over intensities rather than be proportional to a single coherent sum over their complex structure factors. Second, both the populations and the structure factors are assumed to be fixed at each time point, although every measurement averages over a finite time resolution, set by, e.g., pump–probe jitter and pulse or exposure durations, during which the populations continue to evolve. Finally, if the structure factors are estimated from multiple crystals, for example from a serial crystallography experiment, the above formula assumes that each crystal is prepared identically, with the same populations of each individual conformation. How well these assumptions hold depends less on the data analysis than on the experiment itself, through choices such as crystal size, pump fluence, and time resolution. We examine the effect of occupancy variance across crystals in Appendix § 9. However, under these assumptions, which can be met experimentally, this model provides an effective framework for analyzing time-resolved data that will be adopted throughout this manuscript.
Under this model, the problem at hand is to recover the population amplitudes and the intermediate complex structure factors given a set of amplitudes measured at different time points . Ideally, many time points are measured and the number of distinct observations greatly exceeds the number of intermediates of interest. The matrix whose columns are the then has far more columns than its rank, which equals the number of linearly independent intermediates. In this ideal situation, low-rank methods can be used to infer the underlying structure factors and populations [31]. Unfortunately, in current practice, TRX time points are extremely expensive to obtain, and oversampling in time is rarely possible. When the number of achievable time points is on the same order as or smaller than the number of structural intermediates of interest, a pragmatic approach is to choose time points for which—excepting any remaining untriggered protein—a single intermediate is overwhelmingly populated and the contribution of other intermediates is negligible. Our focus in this paper will be exclusively on this more common data-limited regime.
If this condition is met and at a specific time a single intermediate is overwhelmingly populated, the observed structure factors will approximately be
where is the residual contribution from untriggered protein molecules that remain in the reference state, and corresponds to the signal from the time-evolving population, which is the signal of interest. As we now discuss, isolating this signal is, unfortunately, an underdetermined problem.
Some quantities are known. As stated above, the amplitudes are known directly from the time-resolved measurement. By obtaining a reference structure before the sample is triggered, one can determine the amplitudes and the corresponding phases of . Assuming two states gives , leaving a single population parameter – commonly referred to as the occupancy and denoted simply by . The remaining unknown quantities are thus the occupancy , the phases of , and the complex structure factors .
From Equation (2), it is apparent that with estimates of both and the phases of , it would be possible to solve for . Given an estimate for , the task of estimating an appropriate is commonly referred to as occupancy determination. However, this turns out to be very difficult and is rarely done in practice; we show that most practitioners actually solve a simpler, but still effective, problem that we refer to as extrapolation factor determination. This extrapolation factor determination task is how most TRX experiments currently separate mixtures of states. Because the problem is intrinsically underdetermined, any solution must introduce additional assumptions to determine and the phases of – or outright.
One recent approach sidesteps occupancy estimation altogether. Candidate changes are enumerated along physics-informed reaction coordinates, and each candidate is scored by how well its calculated difference map reproduces the observed one ([11]). This applies only to a confined region, which must be specified in advance together with its reaction coordinates. The more general route, and our focus here, is to estimate the extrapolation factor directly. Methods for extrapolation factor estimation exist, each making pragmatic physical assumptions to resolve the inherent data ambiguities ([25, 6, 33]). However, these assumptions and their domains of applicability have not been extensively assessed to date. As a consequence, users have no basis on which to choose the method that best matches their situation, and little idea of what accuracy to expect.
Motivated by the lack of a comprehensive review and analysis of extrapolation factor determination methods, and interested in using one or more of those methods to solve our own TRX structures, we systematically investigated all methods published to date. Here, we present our findings as well as a new method of our own. We begin with a detailed presentation of the occupancy estimation problem, including the constant-phase approximation that underpins almost all current methods. We then briefly review each method in use today, employing a unified notation and making its assumptions explicit. Furthermore, we benchmark their performance on a simulated dataset and show how our method performs on two diverse, representative TRX datasets.
These results inspired us to develop a new method, which we call Vacuum Level Matching, that grounds the estimation in the physical constraint that electron density cannot fall below the density of vacuum. This method is an evolution of occupancy estimation techniques based on non-negativity that are already in use today ([29]). Vacuum Level Matching operates at the level of individual voxels, replaces the manual fitting choices required by some existing methods with a data-driven cutoff, and self-reports quality-control metrics that allow it to flag cases where the data do not support a confident prediction. We provide Vacuum Level Matching as a small, reusable software package so that it can be applied directly to new datasets. These results should be useful to anyone analyzing TRX data.
Structure factor extrapolation and the role of phases
Above, we established that separating the triggered and reference structure-factor amplitudes is underdetermined. The natural approach would be to subtract some reference signal from the mixed state, leaving behind only the triggered signal of interest. Here, we review this idea in detail.
Extrapolation with full phase information
In the interest of clarity, we begin with the simplest case. Suppose that, in addition to the amplitudes normally measured, we have accurate estimates of the phases and therefore the complex structure factors of both the reference state and the mixed state . The mixed-state structure factor is
which can be rearranged to give the triggered-state structure factor as a linear combination of the reference and the complex difference structure factors ,
Reading this as an extrapolation procedure, one recovers from the reference and the difference by scaling the latter by .
If, through some suitable procedure, we could infer an extrapolation factor such that , then we could compute a complex extrapolated structure factor
as the optimal, lowest-error estimate of . With access to the complete complex information, simply equals .
Equation (3) inherits the assumptions of the general linear model discussed in the introduction and adds one more: it treats the time-evolving intermediate as a single, pure state, although at a general time delay the system may be in a mixture of states. Moreover, TRX experiments are often performed in a serial fashion, so the occupancy may vary across merged crystals, and where this variance is substantial it should be taken into account, as discussed in Appendix § 9.
Extrapolation with reference-state phases only
While in the preceding section we assumed knowledge of the phases of , in practice these cannot be measured. Equation (5) is therefore not directly usable. The pragmatic substitution that underpins almost all current methods is to replace the unknown phases of with the known phases of ,
where is the isomorphous difference of the observed amplitudes, and is the reference-state phase. Under this reference-phase approximation, Equation (5) becomes a relation between amplitudes,
The errors and limitations of this scalar approximation to structure-factor extrapolation have been analyzed in detail by Genick [12].
How good is this approximation, and what is the optimal choice of in this setting? The substitution Equation (6) combines the measured amplitude difference with the reference-state phases. For reflections where the complex difference is small relative to the reference amplitude, , the first-order approximation gives [21, 16]
where is the true phase of (see Appendix § 9 for the derivation with crystal-to-crystal variance). The isomorphous difference therefore contains the true difference at half-scale, plus the complex conjugate term carrying phase . To interpret this decomposition, we make the additional approximation that the conjugate contribution is diffuse across the unit cell and negligible in regions containing the structural changes. This behavior is not guaranteed by the decomposition itself: correlations between the reference and difference phases can leave a structured residual.
Substituting Equation (8) into Equation (7), together with the definition of , yields
The final term is the conjugate contribution discussed above. Under the approximation that this contribution is diffuse and negligible in regions containing the structural changes, restores the coherent difference signal to its full amplitude. We use “optimal” in this sense of recovering the amplitude of the local structural features, rather than necessarily minimizing the total reconstruction error across the unit cell. The latter criterion also penalizes the amplified conjugate contribution and can favor a different extrapolation factor.
The effect of structure factor weighting
In current TRX analysis, it is standard to apply scalar weights to the difference structure factors to mitigate outliers and improve the signal-to-noise ratio in the resulting map [34, 27, 7]. Per reflection, enters as an additional prefactor on , usually depending on measurement error and the absolute values of both and , so Equation (9) becomes
We keep the factor separate from here to distinguish the effect of the reference-phase approximation from that of the weighting scheme, whereas in Equation (12) both are combined. The optimal extrapolation factor is now
This complicates the direct determination of occupancy in two ways. First, the optimal extrapolation factor is now tied to the specific weighting scheme applied. Second, the relationship between and is no longer a simple proportionality, since varies across reciprocal space.
Phase modification
As discussed above, the true structure-factor amplitudes are unknown, and only the differences of the absolute amplitudes are measured. Real-space refinement techniques that impose constraints such as TV denoising (Fadini et al. [9]) necessarily modify both amplitudes and phases. Moreover, real-space operations do not necessarily preserve crystallographic symmetries, possibly introducing nonzero structure factors at symmetry-forbidden reflections in either or . These effects compound the uncertainty in the relationship between estimated structure factors and the true , further obscuring the connection between and .
One remedy is to iteratively project between real-space constraints (such as TV denoising) and the known structure factors and (Fadini et al. [9]). This can improve the amplitude and phase estimate for the difference structure factors, but to an unknown extent. As a result, one effectively obtains with a complex-valued weighting parameter. Although iterative phase refinement may improve phase estimates, its effects on both amplitudes and phases can increase uncertainty in the relationship between and .
Relationship between the extrapolation factor and occupancy
The preceding sections show that the optimal extrapolation factor depends not only on the underlying physical occupancy, but also on the phase accuracy and post-processing applied to the difference map. We therefore recommend treating the extrapolation factor and the physical occupancy as related but distinct quantities, and stating the processing-pipeline specifics alongside any reported extrapolation factor. For this reason, we prefer the term extrapolation factor determination over the more common occupancy determination, since what these methods recover is the extrapolation factor, and only under the idealized conditions of subsection 2.1 does it coincide with the physical occupancy.
In general, then, the extrapolated structure factor can be written as
where acts as a general Fourier weight that captures the applied data modifications, including the term from the reference phase approximation. The term captures the noise and error in the difference map, both from a potential reference-phase approximation and from any other errors due to incorrect structure factors or imperfect phase refinement.
Unlike in Equation (9) and Equation (10), here we factor out of this term and absorb a into the definition of , so that the real-space form in Equation (16) reads more compactly. It is thus crucial to know and report the effect of the difference map calculation pipeline to make a substantive claim about the relationship between and .
Estimating the extrapolation factor
Because occupancy determination is underdetermined, every method for estimating occupancy must introduce additional assumptions to obtain a solution. These assumptions define each method’s domain of applicability and its failure modes. In this section, we survey the methods published to date, presenting each on its own terms before benchmarking them empirically in § 4. Throughout this discussion, we assume that besides complex reference structure factors , one has some estimate of the difference-map phases , so that we can determine the real-space counterparts and as well as similar objects. Although we write these densities as continuous functions of the real-space coordinate , in practice each is sampled on a discrete grid, and we refer to an individual grid sample as a voxel. We make the dependence on explicit only when referring to values at specific points, such as , and leave it implicit otherwise.
We begin with some approaches that have appeared in early TRX studies (subsection 3.1), then turn to the methods most widely used in recent work: PanDDA (subsection 3.2), Difference Map Matching (subsection 3.3) and the Negative Sum Explosion (subsection 3.4). The latter is of particular interest to us, because it rests on a single, transparent physical constraint. In subsection 3.5 we build on it directly, introducing Vacuum Level Matching as our own modification: it keeps the same negative-density principle but resolves the estimate voxel by voxel rather than aggregating over the whole map. In the next section, we test our method as well as the other more recent methods on a simulated dataset. From these simulations, we take one run and use it as an example to illustrate each method. To achieve a realistic simulation, we computed signals based on the cis and trans chromophore structures of rsEGFP2 determined by a previous time-resolved serial femtosecond crystallography (TR-SFX) experiment [10], using a simulated occupancy of with the reference-phase approximation (target extrapolation factor ). Throughout this section, we will show a representative example with medium noise. Further details about the setup of the simulation can be found in subsection 7.1. The model and the change can be seen in Figure 1.

Figure 1. Illustration of modeled change. Here we show rsEGFP2 based on PDB entry 8A6G changing from the trans reference state (green) to the cis triggered state (orange).
Model- and volume-based approaches
Three approaches predate the methods we will benchmark in detail and are included below for completeness. Each has been applied successfully in foundational TRX studies, and each illustrates a distinct way of grounding the extrapolation factor estimate. We do not include them in our quantitative comparison. B-factor matching and distance analysis require a model for the triggered state that is refined at multiple candidate extrapolation factors and so cannot be evaluated on the same purely map-based footing as the other methods, while integrated difference electron density requires manual isolation of an integration volume that does not generalize across our test datasets.
Integrated difference electron density
One approach to estimating the extrapolation factor is to identify a region of density in corresponding to a complete, well-delimited density feature, such as a ligand, in . The theoretical electron count of this species is known from its chemical composition. With the maps placed on an absolute scale, the difference density is then integrated over this region . The extrapolation factor is chosen such that the extrapolated difference density integrates to the full electron count , that is,
so that the extrapolated map contains the complete species. No explicit correction for the reference-state phases is required, since the loss of half the coherent signal (subsection 2.2) is already reflected in the measured integral. Notable applications include the determination of CO photolysis yields in myoglobin [32] and the estimation of photoinitiation levels in photoactive yellow protein [30].
The principal difficulty lies in defining precise volume boundaries. This requires a region free of overlapping signal, which is difficult to identify reliably, especially at low occupancy or high noise. Even when the difference features are large and well defined, the boundaries must, at present, be drawn by hand and rely on human judgment.
B-factor matching
This method exploits the strong correlation between crystallographic B-factors and the extrapolation factor during structural refinement. It assumes that the B-factors, as a measure of local disorder, of atoms that move after the trigger do not differ drastically from those of their neighboring, unchanged atoms. Since both occupancy and B-factors scale the atomic scattering contribution, an error in the assigned occupancy is often absorbed by an artificial shift in the B-factors. To identify the correct extrapolation factor, a model is refined against the data at various extrapolation levels. The optimal extrapolation factor is determined by finding the point where the B-factors of atoms that move after perturbation match those of the surrounding, static protein environment.
This approach was successfully employed by Nango et al. [23] to determine the structural changes in bacteriorhodopsin. In their implementation, they acknowledged that simultaneous refinement of B-factors and extrapolation factors was unstable at their resolution due to parameter coupling. Instead, they refined the coordinates and extrapolation factors of the triggered-state conformers while keeping B-factors constrained. To derive a final consensus extrapolation factor for each time point, they calculated a weighted average based on the grouped residues that exhibited the largest structural displacements.
Distance analysis
The core principle behind distance analysis was first articulated by Genick et al. [13]. An incorrect assumed extrapolation factor during refinement produces structural artifacts in the refined model. When the assumed is too low, extrapolation does not fully remove the reference-state contribution, and the refined atomic positions remain biased toward the reference state. Once the assumed meets or exceeds the true value, the positions are expected to stabilize. This observation was turned into a systematic procedure in Xtrapol8 (De Zitter et al., [7]), where it is referred to as “distance analysis”.
In this workflow, models are refined against extrapolated structure factors generated over a range of assumed extrapolation factors. Changes in interatomic distances relative to the reference model are then fitted with sigmoidal functions of . For each accepted fit, the value of at which the distance change reaches 99 % of its fitted plateau is extracted. These pairwise estimates are aggregated to obtain a consensus estimate. The criterion identifies the regime in which further extrapolation produces little additional structural displacement. Unlike the other methods presented here, distance analysis requires refining the model in both reciprocal and real space at every tested extrapolation factor.
Comparing local and global correlations
PanDDA (Pearce et al., [25]) is a software tool widely used in fragment-based drug discovery, where its purpose is to detect weakly bound ligands in crystallographic datasets. Within this tool, a routine determines the background density component, which is operationally equivalent to . While neither PanDDA nor its routine for determining the background component was designed for time-resolved data, the same routine – informally referred to as the ‘PanDDA method’ – has subsequently been applied in TRX studies (Fadini et al., [10]).
The central idea is to maximize the contrast of an extrapolated map in real space, such that the density difference of a changing region is as large as possible. The routine begins by identifying a local region of interest where changes occur. The entire unit cell is treated as the global region. Then, for a range of , the cross-correlation of the extrapolated map with the reference map is computed for both the local and global regions. This local region of interest can be determined in various ways. A simple option is to threshold the absolute difference map, selecting all voxels whose value exceeds three times the difference-map RMSD (i.e. ).
The behavior of the two cross-correlations, as is varied, is intuitive. At small , is dominated by , and both cross-correlations approach zero. At large , closely resembles , and both global and local cross-correlations are near unity. Because the difference map is ‘most different’ in the local region, the local cross-correlation rises only at larger than the global one (see Figure 2).

Figure 2. Motivation for the PanDDA method. We show a model molecule with four atoms in the reference state and extrapolated state . Three atoms (teal) stay in place, whereas a localized structural change is represented by the fourth (crimson). The method calculates the global and local cross-correlations (CCs) over a region of interest between and , iterating over many different values of . At the optimal extrapolation factor, the global CC ought to be high but the CC in the local region (dashed line) ought to be low. The method selects as optimal the value of for which the spread between the two CCs is highest.
The maximum of the difference between the global and local cross-correlations was proposed as the estimator of the correct extrapolation factor [25]. An application of this method can be seen in Figure 3.

Figure 3. Showcase example of the ‘PanDDA method’ in action. The top panel shows the global (grey), local (orange) and nonnegative local (green) correlations as a function of , where only voxels with are included. The bottom panel shows the difference between the global correlation and either the local (orange) or the nonnegative local (green) correlation. The results are based on a single simulated dataset with an expected (modeled with and the reference-phase approximation) at an SNR of 15, as described in subsection 7.1.
Adaptation to time-resolved data A complication arises when applying the routine to TRX rather than ligand-binding data. In the ligand-binding setting for which PanDDA was designed, the local difference signal is predominantly positive, since ligand atoms occupy previously empty space. In the TRX setting, by contrast, the difference signal contains strong negative features wherever atoms have vacated their reference-state positions. As a consequence, the local cross-correlation is not merely absent but negative at small , and the trajectory of the local-versusglobal difference is distorted relative to the regime in which the heuristic was originally calibrated. A simple modification is to restrict the cross-correlation to nonnegative voxel values, suppressing the inverted starting point. We refer to this as the nonnegative PanDDA variant.
The PanDDA routine has the appeal of operating directly on cross-correlations between maps that are easy to compute. Two features of the method are worth noting in comparison with the others. The maximum-difference criterion is a heuristic. The original PanDDA paper reports that this criterion correlates with the final occupancy estimate, with a nontrivial variance [25]. This relationship is empirical and it does not follow from an independent physical constraint on the extrapolated map. Its accuracy on data outside the original fragment-screening domain has not been systematically characterized.
Moreover, the result is sensitive to the local region mask. Different filtering choices produce different masks and therefore different local cross-correlations, which can shift the position of the maximum and thus the estimated . What can be said is that the optimal extrapolation factor lies within the range where the global-minus-local difference is appreciably nonzero: when the global and local cross-correlations are similar, this indicates either under-extrapolation (both high) or over-extrapolation (both low). The reported maximum has no quantifiable guarantee of being a better estimate than any other point within that range.
We tested both the standard and nonnegative variants but show only the nonnegative version in § 4. The standard variant, as described, has a tendency to over-extrapolate due to negative correlations in the local region.
Difference Map Matching
The Difference Map Matching approach was first introduced by Coquelle et al. [6], and a revised version is implemented in the software package Xtrapol8 [7]. For each candidate extrapolation factor, the method compares the observed and extrapolated difference maps after processing and normalization. The optimal extrapolation factor is identified as the value that yields the closest agreement between the two maps.
In Xtrapol8, there are two flavors of this technique, which we refer to as the ‘Peak Integration method’ and the ‘CC method’ based on their respective approaches to discovering signal. Both have been applied in several recent TRX studies [15, 5] (Rios-Santacruz et al. 2026).
At the heart of this method lie two quantities: the difference between a given extrapolated structure and the calculated reference state, i.e. , and the experimental ‘’ map, i.e. the observed differences , where represents the linear post-processing applied to each difference density map . The goal of both types of difference map matching is to find the for which best approximates . Both methods quantify the differences between and . To see what differences are found, we rewrite as a function of
where captures the mismatch between the observed and calculated reference maps – the conventional ‘’ map of the reference state. The expression absorbs the differences due to the separate ‘post-processing’ steps. For fixed post-processing weights, grows with the extrapolation, whereas is independent of it; candidate-dependent post-processing can introduce additional variation in both mismatch terms. Both methods rely on these mismatch terms being non-negligible, since it is their -dependent contribution relative to that provides the contrast between candidate extrapolation factors.
Peak Integration Method. This method tests whether the extrapolated difference map reproduces the observed difference signal well by comparing the locations where that signal is most prominent. First, a subset of prominent voxels is selected from the observed difference map by choosing the largest peaks, that is, regions of large absolute values ( by default). Both and are then normalized by their respective RMSD. This step is essential: on an absolute scale, the integrated density at grows linearly even under over-extrapolation, so the raw sum is uninformative. Because over-extrapolation raises the density at all voxels, not only at , the normalized integral falls on either side of the optimum. Next, is integrated over this fixed mask, separately for positive and negative peaks (assigned by the sign of ) and for both combined. The resulting score for each channel () is
All three channels (positive only, negative only, and combined) are displayed, but the optimal is chosen from the combined (positive-plus-negative) absolute sum.
By construction, most density in is concentrated at , whereas the disagreements in difference map processing and the disagreement between the observed and calculated reference maps are distributed across the entire map. This metric looks for the extrapolated difference map with the highest concentration at . In both the over-extrapolation and under-extrapolation regimes, relatively more density is expected to accumulate outside of compared to inside. Because the sign channels are assigned from alone, without reference to , a spurious second maximum can appear, typically at large , where the in-mask density has inverted in character (Figure 4). To exclude it, we check that has the same sign as at the voxels of largest absolute value in , and accept a maximum only if this holds.

Figure 4. Showcase example of ‘Difference Map Matching’ in action. Difference Map Matching applied to the simulated rsEGFP2 dataset (target ). Curves show the normalized difference-map signal as a function of for the Peak Integration (PI) method, evaluated over positive, negative, and combined features, together with the cross-correlation (CC) method. The Peak Integration ratio also rises towards large (under-extrapolation), but this spurious maximum is excluded by requiring that the extrapolated and observed difference maps agree in sign at the largest absolute voxels of (subsection 3.3). For this dataset, the Peak Integration method (all features) gives and the CC method .
Cross-Correlation Method. The second routine compares the extrapolated difference map directly to the observed difference map through their Pearson cross-correlation. The correlation measures how closely the mean-centered spatial patterns of the two maps agree; the role of the mismatch terms is derived in Appendix § 10. Its global scope means it does not separate signal peaks from noise peaks. Noise peaks therefore also contribute to the correlation, so stochastic differences in the solvent or in other regions of little change can bias it even though they carry no structural information.
The Peak Integration method works best when the conventional difference map contains a small number of well-isolated, prominent peaks, because the mismatch terms are then spread over the rest of the map and contrast sharply with the signal at . It struggles when the density is diffuse or when signal and noise peaks have comparable prominence. The CC method aggregates over the full map and is not sensitive to peak-selection choices, but the most important information is contained in the extreme values, which the Peak Integration method captures.
When the two sub-methods disagree, as they do in our example (Figure 4), there is no principled basis for choosing between them, because neither quantifies its confidence. A further practical cost is that each sampled requires, in the present form, separate post-processing for each , which makes fine sampling expensive compared to the other methods surveyed.
We evaluate both the Peak Integration and CC methods in § 4.
Negative Sum Explosion
Next, we discuss a technique first used in Tripathi et al. [33] and further refined in Schmidt [29]. Because, to the best of our knowledge, this technique has not yet been given a name, we refer to it as the ‘Negative Sum Explosion’ method (NSE). The NSE has been used in several recent publications [24, 3, 22]. It rests on a single physical constraint, namely, that any electron density map is expected to be predominantly nonnegative, with only minor negative signal arising from experimental error and Fourier truncation. By contrast, over-extrapolation () yields negative density in regions of the extrapolated map where is negative (compare Figure 5c). Under-extrapolation () means that negative density in the difference map is more than fully compensated by positive density in the reference map, so the level of negative density in stays low and remains so even if is increased slightly (compare Figure 5a). Therefore, one way to estimate the extrapolation factor is to identify the point at which large amounts of negative density start to accumulate in (i.e. Figure 5b).

Figure 5. Illustration of the principle behind NSE. This figure (inspired by Fig. 8 from Schmidt [29]) shows three schematic additions of a positive reference density (blue) and a negative difference density (red) on the left side of the arrow and the resulting extrapolated density on the right side of the arrow. a) shows an example of under-extrapolation (“too little”), where extrapolated density remains positive. b) shows the correct extrapolation (“just right”), where extrapolated density is close to zero. c) shows an example of over-extrapolation (“too much”), where extrapolated density becomes negative.
Concretely, one computes for a range of values and plots the sum over all negative voxels against . In the under-extrapolation regime ( is large and is small), most voxels satisfy , so remains positive and the negative sum stays approximately flat. In the over-extrapolation regime ( is small and is large), most voxels with negative satisfy and the negative sum grows linearly with slope . One therefore expects two approximately linear regimes separated by a short transition. A linear regression is fitted to each regime, and the extrapolation factor is estimated as their intersection.
Two details are noteworthy:
The zero-frequency term. An important point, not mentioned in the literature on this method, is the correction for the missing zero-frequency term . This “DC component” is the constant, additive density contribution to every voxel in the map. Structure factors are conventionally reported without , so the reconstructed real-space map has a zero mean rather than the vacuum-referenced mean of the true electron density. This artificially lowers by a global constant, displacing the apparent zero-crossing of and causing a systematic underestimation of . Tools exist, however, that estimate given the atomic model ([19]), including both the protein and solvent contributions. Applying them before analysis avoids this offset.
Focus on regions of interest. Some values are negative due to artifacts (noise, systematic error) while others are negative due to real structural changes. The NSE relies on the latter dominating the former. However, by focusing on regions of interest, we can mitigate the influence of artifacts, since structural changes are generally localized in space ([29]).
Figure 6 shows how correcting for these two factors affects our simulated dataset (details described in subsection 7.1). Restricting the sum to voxels with alongside the correction substantially narrows the transition region, and the intersection recovers an estimate close to the ground-truth value.

Figure 6. Showcase example of ‘Negative Sum Explosion’ in action. Negative sum of as a function of the inverted extrapolation factor for a simulated dataset (see subsection 7.1) with ground-truth under three scenarios. Dots are computed values and dashed lines are the under-extrapolation and over-extrapolation fits. The first scenario (green) sums over the entire unit cell of without the correction. The second (red) sums over the entire unit cell with the correction applied. The third (blue) applies the correction and restricts the sum to voxels with . The resulting values are substantially smaller and are plotted on a separate scale (right axis). Linear fits are computed over fixed ranges (some points are not plotted, as they increase monotonically) and , chosen far from any plausible to avoid bias in selecting the transition region. The intersections yield values of 0.12, 0.11 and 0.19 for the three scenarios.
NSE rests on a clear physical assumption, but its reliability depends on a sharp transition between the under-extrapolation and over-extrapolation regimes. This transition can be sharpened by carefully selecting the input voxels of – focusing on a region of interest and discarding small values in – and such selection matters more as difference-map quality degrades.
Vacuum Level Matching
These observations motivated us to develop Vacuum Level Matching, a modification of the NSE approach. The goal remains to identify the point at which negative difference density cancels the reference density. Instead of aggregating over the whole map, we evaluate this cancellation for each voxel individually. This allows us to assess the reliability of each per-voxel estimate and combine only those that satisfy the selection criteria described below.
This method relies on at least a small fraction of the density in the reference state being replaced by vacuum. This is a sound assumption for changes inside a protein, where solvent cannot enter or is held in a fixed position. It does not apply when a ligand binds without displacing any atoms of the reference structure. At the protein surface and beyond, vacated regions are typically refilled by bulk solvent, so the density drops to the solvent level rather than to vacuum. Nevertheless, as long as some changes also occur inside the protein, the method can still identify the optimal extrapolation factor, as we argue in subsubsection 3.5.1.
Local estimates
To discover where over-extrapolation has occurred, one wants to focus on voxels corresponding to positions where atoms were present in the reference state but are no longer present in the triggered state. So, our first goal is to produce per-voxel estimates of extrapolation factors at which the reference density is completely eliminated.
To that end, we start with the general expression for the extrapolated map in Equation (12). Now we express it instead as an addition of real-space densities rather than complex structure factors , yielding
where we model the effect of processing in two parts: a global scalar rescaling factor (primarily from difference-map processing, including the reference-phase correction prefactor) and per-voxel deviations due to noise or error .
What we can see in the expression above is that we can eliminate the contribution of the reference density when . For each voxel individually, this expression becomes a linear expression and can easily be solved. As in the case of NSE, we want to focus on the case where as much reference density as possible is eliminated. So, we require , and now obtain an estimate of the extrapolation factor for each voxel.
Most single estimates are biased. The estimate at a single voxel is reliable only where the reference density dominates both confounding terms, that is, where and . Where this fails, the estimate is systematically biased, towards over-extrapolation for (Figure 7a) and in either direction for noise.

Figure 7. Idealized illustration of under different conditions. Per-voxel estimate plotted against for a simulated dataset based on rsEGFP2 (PDB 8A6G, modeled with ). (a) Corrected , exact difference-map phases. The estimates concentrate at and below the true value, with the orange voxels forming the underestimating tail (effect of ). (b) As (a) but without the correction, displacing the estimates above the true value. (c) Corrected , difference map computed from reference-state phases only. The reference-phase prefactor halves the true and the difference-map noise disperses the estimates across a broad band.
Refilling by bulk solvent is a special case of this bias. A vacated voxel has , whereas a voxel refilled by solvent has , which lowers its estimate by the factor . Crucially, the refilled voxel also has a less negative difference density, since . Because the voxels are ranked by , most negative first (subsubsection 3.5.2), vacated voxels enter the estimate first and dominate the accepted window. Refilled voxels that do enter early can only do so at large , where , and hence their bias, is small. Any partial or imperfect refilling lies between these two limits, so the estimate remains approximately correct even when the solvent model is not exact.
Towards a single estimate and its reliability
Equation (17) enables us to compute the extrapolation factor for which the extrapolated map coincides with the vacuum level – a quantity that varies from voxel to voxel. Our next task is to identify a subset of voxels that provide a consistent estimate of a global extrapolation factor to use. That subset should include a region of the difference map that contains genuine negative signal that exceeds any background noise.
In Figure 7, we plot as a function of for a number of theoretical scenarios, to show how the per-voxel estimate of the extrapolation factor varies as a function of how strongly negative that voxel is in the difference map. Overall, we see that the different estimates form a narrow distribution around a single value for sufficiently negative difference-map voxels. Using reference phases halves the optimal extrapolation factor and introduces noise. A constant error in reference amplitudes increases in relative strength with decreasing . Also, we showed in Equation (17) that a large reference density leads to lower confounding factors.
Therefore, choosing which voxels to include in a set that defines a global extrapolation factor involves an intrinsic bias-variance tradeoff. Including more voxels suppresses the influence of outliers, but Equation (17) shows that including voxels with substantial introduces a systematic bias towards over-extrapolation.
To balance these considerations, we employ the following heuristic procedure. We sort the voxels by , starting with the most negative, and compute a cumulative mean and standard deviation of along this ordering. We set the reference-density cutoff to the bulk-solvent density, which defines the diagonal boundary in the per-voxel estimate plot. Accumulation stops when the running mean plus three running standard deviations first exceeds this boundary,
The final estimate of the extrapolation factor is given by the median of the running mean over the accepted set of voxels. As stated, this procedure is a heuristic, and we have not shown it is optimal under any probabilistic model. As we will show, however, in empirical testing it has proven robust and effective.
Figure 8 shows the method applied to our rsEGFP2 example case, where the running mean returns 0.192 compared to the optimal , a 4 % difference. Implementation details are given in subsection 7.3, and in the following section we will further quantify each method’s accuracy on simulated data.
NSE shares with this approach more than the intuition of eliminating the reference density. In fact, as we show in Appendix § 8, the intersection method of NSE, with some mild assumptions, is a -weighted mean of the per-voxel quantities . NSE therefore rests on the same per-voxel estimates as Vacuum Level Matching, but aggregates them in two ways that ours does not. It averages in the inverse quantity rather than in , and it takes a -weighted mean over whichever voxels are supplied rather than selecting them by the reliability
caption: Showcase example of ‘Vacuum Level Matching’ in action. Same dataset and noise level as used for the showcases of the preceding methods (rsEGFP2, PDB 8A6G, ). Each blue dot is a per-voxel estimate , plotted against in units of (lower axis) and in absolute units (upper axis). Estimates discarded by the difference-map filter are shown as grey dots. The reference density cutoff (grey dashed line) is the line traced by , where is set to the solvent level. Any estimate above that line (red background) comes from a small denominator and is correspondingly less reliable. The blue line is the running cumulative mean and the grey band its running standard deviation, both accumulated from the most negative towards zero. The red dashed line marks the dynamic cutoff, beyond which voxels are excluded from the estimate, and the cumulative mean is shown in grey beyond it. The reported estimate (circled, with a blue vertical line) is the median of the running cumulative mean over the accepted window.
criterion established above.
Comparing -estimation methods on simulated data
To systematically compare the methods we introduced in § 3, we use simulated reference and mixed-state datasets of rsEGFP2 at a range of occupancies and noise levels. Details of the simulation setup are given in subsection 7.1. Figure 9 shows the predicted extrapolation factor as a function of the signal-to-noise ratio SNR for each of the four occupancies tested. The estimates from each method are averaged across ten independent noise samples for each data point, and the mean and standard deviation (shaded area) are shown.

Figure 9. Comparison of extrapolation factor estimates benchmarked using simulated TR-SFX signals. Estimated extrapolation factor as a function of signal-to-noise ratio SNR for four true occupancies. Lines and markers show the mean across ten independent noise samples, and shaded bands show one standard deviation. The dashed grey line marks the optimal , the optimal extrapolation factor under the reference-phase approximation (see § 2).
The difference maps use reference-state phases, and the structure factors are not processed in any other way. The optimal extrapolation factor is therefore half the true occupancy, , a value all methods approximately recover at low noise (SNR 50; see § 2). At very low SNR, none is reliable. Similarly, when occupancy is low, the smaller signal means that, for a given SNR, the difference map is noisier, and again all methods struggle. The methods are therefore best distinguished at moderate noise, where they diverge and the choice between them matters.
The Peak Integration variant of Difference Map Matching has the highest variance, because, as explained in subsection 3.3, it often reports a very high when no good solution is found. The CC method recovers the correct extrapolation factor at high SNR and low occupancy, but over-extrapolates consistently at higher occupancy. For both Difference Map Matching routines this may stem from their dependence on the reference-model mismatch , which varies with occupancy.
The nonnegative PanDDA variant shows a systematic over-extrapolation bias across TRX-like data (the standard version, not shown, even more so). Once its variance has dropped, its estimate stays below and approaches it only gradually as the SNR increases. This systematic offset suggests that the heuristic could be recalibrated to perform more accurately.
Negative Sum Explosion rests on the same physical principle as Vacuum Level Matching, the minimization of negative density in the extrapolated map. At high SNR it reliably recovers the true extrapolation factor. In the noisy regime, however, it shows higher variance, since it sums over the whole map and cannot down-weight the voxels where the per-voxel estimate is least reliable.
Vacuum Level Matching converges to the same high-SNR limit, recovering the true value where NSE does. Its advantage lies in the noisy regime. By resolving the estimate voxel by voxel and filtering adaptively, it keeps its mean closer to the truth with a smaller spread, and this advantage widens as noise increases.
In this simulation test, Vacuum Level Matching recovers the correct extrapolation factor consistently and accurately up to higher noise levels than the other methods tested. Simulations are, however, an imperfect proxy for experiment, so we next turn to two real-data test cases.
Vacuum Level Matching on experimental data
Evaluating extrapolation-factor methods on real data is fundamentally different from evaluating them on simulations. No ground truth is available, and any reliable measure of accuracy would itself constitute a method. The assumptions inherent to any given method ought to match the experimental reality. In the case of NSE and Vacuum Level Matching, this means that the largest changes result in a structure where some electron density moves and leaves behind a region free of any electron density.
First, we turn to the rsEGFP2 dataset of Fadini et al. [10], which was already the basis for our simulation study in the previous section. As Vacuum Level Matching performed best, it is the only method that we consider in this part. Following that case study, in subsection 5.2, the multi-time-point photolyase data of Christou et al. [5] let us test whether estimates remain coherent across preprocessing pipelines and whether the built-in quality metrics correctly separate data that support a confident prediction from those that do not.
Single-time-point application: rsEGFP2
rsEGFP2 is a reversibly switchable fluorescent protein whose chromophore undergoes a cis–trans isomerization on illumination. The structural transition is localized to the chromophore and a few neighboring residues. The dataset of Fadini et al. [10] captures this transition at low triggered-state occupancy and was used to construct the simulated benchmark of § 4.
We first scale the reference and mixed-state structure factors to the model and calculate the respective mean densities (or zero-frequency terms) [19]. Using the reference model phases, we are able to calculate the reference density with a simple Fourier transform. Then, we calculate difference maps between the two, using the reference structure phases and applying iterative TV denoising (IT-TV). This allows us to obtain the difference density with more refined amplitudes and phases. For more details, we refer to subsection 7.2.
We show the resulting extrapolation factor estimates in Figure 10. As expected, there is a narrow-distribution regime for the most negative . The cutoff condition is able to identify this regime and picks the extrapolation factor within the stable regime as predicted. Compared with the simulated showcase of Figure 8, the narrow-distribution regime has a higher variance. While the difference is visually apparent, to quantify such differences, we consider the relative spread as the most informative measure. At over 30 %, it is comparatively large, which reflects the high level of noise inherent to this dataset. For the same reason, the cutoff condition is already activated at more negative . Therefore, the accepted window spans a shorter range than in the simulated example. The reported , as we argued above, does not necessarily correspond to the actual occupancy, but ought to lead to the best estimate of the extrapolated density.

Figure 10. Vacuum Level Matching on experimental data. The difference map is calculated from the rsEGFP2 dataset of Fadini et al. [10] after applying iterative TV denoising. Per-voxel estimates are accumulated from the most negative towards zero (lower axis in units of , upper axis in absolute units). The cumulative mean is drawn in blue, with the shaded band indicating the region. Beyond the red dashed line, where the cutoff condition is first met, the cumulative mean is shown in grey. The red shaded region marks , where the small denominator amplifies noise in the per-voxel estimate.
For a real measurement, the practical test of an extrapolation-factor estimate is whether the resulting map resolves the structural transition the experiment was designed to capture. Fig-
Figure 11 shows the extrapolated electron density at the chromophore site, computed with the reported in Figure 10. The map follows the cis-chromophore model rather than the trans reference state, confirming that the reported removes the reference contribution without notably over-extrapolating.

Figure 11. Example of extrapolated electron density. The rsEGFP2 chromophore is shown with the extrapolated density calculated with the optimal given by Figure 10. The trans (reference-state) chromophore model is shown in green, and the cis (triggered-state) chromophore model from the published structure is in orange. The extrapolated map (mesh) is contoured around the chromophore region at .
Photolyase: multi-time-point consistency across preprocessing
Photolyase is a flavoenzyme that repairs UV-induced cyclobutane pyrimidine dimer (CPD) lesions. Christou et al. [5] presented ten time points spanning picoseconds to hundreds of microseconds. Within the first few nanoseconds, the cyclobutane ring is cleaved one bond at a time, passing through a single-bond intermediate at around 1 ns and reaching a fully cleaved state within a few nanoseconds. On the microsecond timescale, the cleaved thymines flip out of the binding pocket to complete product release.
We use these data as a retrospective test of our method. We show four time points, 1 ns, 3 ns, 30 ns and 1 s, each processed with two different difference-map pipelines. The first pipeline uses the -weighted difference maps, computed using structure-factor weighting, as published by Christou et al. [5]. The other pipeline is what we consider the current state of the art, iterative TV denoising (IT-TV), which adjusts the map in real space and iteratively aligns these changes with measured structure factors, leading to improved phase estimates.
Figure 12 shows the per-voxel distributions and cumulative statistics at these four time points under the two pipelines, and Figure 13 shows the corresponding extrapolated maps. We discuss the two together, since the estimate returned for a given time point is only meaningful in light of the map it produces.

Figure 12. Vacuum Level Matching applied to a range of difference maps. Using photolyase data of Christou et al. [5], we show four time points with two difference-map processing pipelines. The top row shows -weighted difference maps as published by Christou et al. [5], and the bottom row shows iterative TV-denoised difference maps as described in subsection 7.2. Each panel displays per-voxel estimates (blue dots), the running cumulative mean (solid blue line), the running standard deviation (grey band), the dynamic cutoff (red dashed line), and either a numerical prediction or a warning flag.

Figure 13. Extrapolated electron density maps. Here, we show the main change with extrapolated densities using as estimated in Figure 12. Top row: maps from the -weighted difference map of Christou et al. [5]. Bottom row: maps from the iterative TV-denoised difference map. Both maps are contoured at RMSD = 2. The reference model (yellow) and the published extrapolated model (red) are displayed as well.
At 3 ns, 30 ns and 1 µs, the difference-map signal shows a similar rearrangement. Consequently, under both pipelines Vacuum Level Matching finds a stable running mean (Figure 12). For these three time points, we observe a wide range of difference-map voxels that share a similar . Compared with the rsEGFP2 dataset of subsection 5.1, where the signal-dominated region was shorter, the photolyase maps stay narrow over a much wider span of . This increases the confidence that we have identified a credible extrapolation factor.
The absolute values differ between -weighted and IT-TV at every time point, and the two pipelines disagree by different amounts at different time points. Yet the corresponding maps in Figure 13 all resolve the same cleavage-region structure. Differences between time points may be physical, reflecting pump-laser power or the actual occupancy of the state. But the discrepancy between -weighted and IT-TV at a single time point arises from the same underlying data and the same structural state, so it can only be processing-induced. Processing alone can therefore scramble the relationship between physical occupancy and extrapolation factor. This is consistent with the analysis of § 2 and reinforces the recommendation that any reported be accompanied by the pipeline that produced it.
Our automated safeguards raise a warning at the 1 ns time point. They detect that only a small number of estimates were included before the cutoff rule was activated. Thus, there are too few data points to proceed in an automated manner.
Here, this happens because the difference map is weaker overall, and its most negative voxels do not sit at the two main cleavage sites as they do at later time points. Instead, they form a collection of small shifts distributed around that region. The per-voxel estimates are correspondingly widely spread, so under default settings the warning conditions trigger for both pipelines, though with different severity, because the pipelines suppress noise differently. For IT-TV, a warning is raised because the accepted window is short, spanning less than 20 % of the negative- range. For the -weighted map, very few data points fall within a sufficiently small standard deviation, and no estimate is reported at all. In both cases, the method signals that it cannot itself guarantee a sound estimate and that visual inspection is required.
In this case, inspection of the plot still yields a usable value. The running cumulative mean is approximately flat over a substantial portion of the most negative voxels, so a defensible estimate can be read off with the caveat noted. We chose for the -weighted map and 0.067 for IT-TV, around which the mean hovers down to roughly 4.2 . Both produce sensible extrapolated maps (Figure 13), with the IT-TV maps resolving the cleavage-region density in somewhat greater detail, consistent with the real-space sharpening that the IT-TV procedure applies.
We obtained estimates for all four time points under two distinct preprocessing pipelines, and the resulting extrapolated maps resolve the structural changes that previously required manual intervention. Taken together, the photolyase results show that Vacuum Level Matching produces internally consistent estimates within a pipeline and across structurally similar time points, that the absolute values depend on the preprocessing pipeline in the manner anticipated by § 2, and that, depending on data quality, the method either reports automatically or correctly defers to human review.
Conclusion
TRX is rapidly maturing, yet the accurate separation of mixed structural states remains a major bottleneck. Tools such as Xtrapol8 now handle all steps from measured structure factors to a first refined model, putting TRX analysis within reach of non-specialists. This makes it all the more important that each step, including extrapolation-factor estimation, is reliable and transparent about its assumptions. We argued, and demonstrated on an experimental example, that extrapolation-factor estimates cannot simply be equated with occupancies, because difference-map processing affects them in ways that are not generally invertible. In the photolyase data, the same physical state under two processing pipelines yields different extrapolation factors, both of which produce interpretable results. We surveyed the methods in current use, and the negative-density assumption of Tripathi et al. [33] inspired us to introduce Vacuum Level Matching. This is a method for extrapolation-factor estimation that is both more transparent and more accurate than existing approaches, as we show in § 4.
A central design goal was transparency. The method not only produces an estimate but also communicates how dependable that estimate is, surfacing the per-voxel evidence and flagging cases where the data do not support a confident prediction. Its output falls into three diagnostic states. When no warning fires, the estimate is reported as confident. When a warning fires, the estimate is flagged for manual evaluation. As the photolyase results show, a defensible value can often still be read off the per-voxel plot in this case. When no estimate satisfies the selection criteria, the method returns an error rather than a number. These states are built around several failure modes identified and characterized in this work (subsubsection 3.5.2). Untested data regimes may reveal further modes. The conservative diagnostic criteria are intended to flag unanticipated failures or prevent an estimate from being returned, reducing the risk of reporting an unreliable estimate as confident.
Several limitations bind the method’s scope. Vacuum Level Matching rests on the two-state approximation. It estimates a single extrapolation factor for the dominant negative-density signal in a map; it does not determine how many distinct structural changes contribute to that signal. The estimate therefore describes the dominant state and may not apply to all changed regions. When several changes can be isolated spatially, local masks allow each region to be analyzed separately. When the contributing states overlap spatially, dedicated multi-state separation is required beyond what a single-map method can provide. The method also requires substantial negative difference density associated with the displacement of existing density. Its applicability to ligand binding is therefore limited to cases where the ligand displaces existing density rather than only occupying empty space.
Both experimental datasets, and the simulation derived from one of them, involve small, spatially localized changes: a chromophore isomerization in rsEGFP2 and bond cleavage in photolyase. These test cases do not probe a large conformational rearrangement, a membrane protein, or a system in which the difference signal is delocalized across the unit cell. A next step would be to investigate how this method handles large-scale changes and to deploy it on a broader set of time-resolved data.
Another next step is to refine the heuristics that locate the narrow-distribution regime of and determine from it (subsubsection 3.5.2). Although effective in our tests, these heuristics lack a formal statistical basis. One route is to estimate the noise level of the difference map, which would give the expected distribution of per-voxel estimates for genuinely vacated voxels. This would allow a more principled classification of plausible vacuum-state values and indicate how much of the variance in the narrow-distribution regime is explained by noise alone. Similarly, the matched baseline could be made local. At present, the method only requires that at least some voxels are vacated to vacuum, and voxels refilled by solvent are effectively outweighed (subsubsection 3.5.1). Matching each voxel against its expected local background instead – vacuum inside the protein, the solvent level at its surface – would let solvent-refilled voxels contribute to the estimate rather than merely being tolerated, increasing the number of informative voxels.
Beyond the method itself, we would advise against using the difference map to determine occupancy directly, particularly when the effect of processing on the occupancy–extrapolation-factor relationship cannot be quantified. We instead recommend first using the extrapolation factor to obtain a best estimate of . The structure factors calculated from a model refined against that estimate can then be substituted for in Equation (3). With a single unknown left, one can estimate the occupancy that best explains the measured amplitudes, , with and held fixed.
Methods
Simulation of rsEGFP2
Generation of structure factors. To benchmark the methods of § 3 against a known ground truth, we generated simulated reference and mixed-state datasets of rsEGFP2 with a chromophore undergoing trans-to-cis isomerization on illumination. As a basis, we used PDB entry 8A6G, which contains both the trans and cis states at partial occupancies. The reference state is modeled as the trans state at full occupancy and the mixed state as the cis state at the specified occupancy and the trans state at , with all atoms outside the chromophore held at their reference positions. Complex structure factors for both states were computed with the gemmi package [37], including a bulk-solvent contribution, at a resolution of 1.6 Å.
Simulating noise. We model two sources of error in the structure-factor amplitudes, following the combination of a counting term and a term proportional to the intensity commonly used in error models for scaling, motivated by the error model used in ref. [8] (see Appendix A3). First, serial data are dominated by multiplicative errors, such as partiality, shot-to-shot variation in pulse intensity and crystal size, and imperfect scaling, which perturb each intensity in proportion to its magnitude (Kirian et al., 2010; White et al., 2013). Propagated to amplitudes, these give a noise term proportional to . Second, photon counts follow a Poisson distribution, so . Propagating this uncertainty via gives an approximately constant noise level on the amplitudes that is most consequential for the weakest reflections. We represent this constant term by the average amplitude over the outermost, highest-resolution reflection ring , defined as all within 0.1 Å of the resolution cutoff of 1.6 Å. To the structure factors of each model, we apply noise as follows:
where and are random numbers drawn from a Gaussian distribution with zero mean and unit standard deviation. We refer to this scaling parameter as SNR. Because the additive term is fixed at the average amplitude of the highest-resolution ring, SNR is an upper bound on the signal-to-noise ratio for all but the weakest reflections.
Configuration of extrapolation factor estimation methods. We apply Difference Map Matching via Xtrapol8 using the fextr and fofo options, which apply no structure-factor reweighting, and throughout evaluate Difference Map Matching at 15 values of between 0.01 and 0.9. We report both the Peak Integration version – combining positive and negative peaks – and the CC version. For the Peak Integration method, we report the maximum for which and agree in sign at the largest absolute voxels of (subsection 3.3), which excludes the spurious high scores of under-extrapolated maps at large . The CC method needs no such check, since a sign inversion directly lowers the Pearson correlation.
We use the NSE variant with the difference map filtered at and the offset included, as discussed in subsection 3.4. To fit the under-extrapolation regime, we calculate with at five equidistant points between 1 and 2; to fit the over-extrapolation regime, we use five equidistant points between 100 and 200. The fits shown in Figure 6 are also based on these calculations.
For PanDDA, we use the nonnegative formulation from subsection 3.2. Vacuum Level Matching is performed as specified in subsection 3.5.
Simulation design. For the benchmark of § 4, we evaluated every method on a common grid of occupancies () and noise levels (SNR ). Each (occupancy, noise) combination was repeated over ten independent noise samples, and all methods were applied to the identical difference map for each sample, so that the spread in the results reflects the methods rather than the data. The showcase dataset, displayed throughout § 3, uses , giving an optimal , and SNR = 15.
Experimental data processing
Determining the constant component. Because the zero-frequency term cannot in general be measured, the reconstructed maps lack a constant offset (see subsection 3.4). We restore this offset following Lang et al. [19]. The absolute density of the reference map is the sum of a protein contribution and a bulk-solvent contribution. First, the structure factors of a model map are calculated using gemmi. Then, protein and solvent regions are identified with a mask. We estimate the bulk-solvent density by a bounded one-dimensional search. For each candidate , we add a flat density over the solvent mask to the model map. We scale the resulting model to the experimental data and compute the mean absolute amplitude difference, restricted to reflections coarser than 4 Å, where the bulk solvent dominates. The chosen is the one that minimizes this difference. The protein contribution is the volume-weighted mean density of the model map over the protein region, and the solvent contribution is the bulk-solvent level over the solvent mask.
Difference Maps. In § 5, we reuse the -weighted difference maps reported by Christou et al. [5], calculated using Xtrapol8 with . The second method that we use is iterative TV denoising (Fadini et al. [9]) (meteor version 0.5.0, available at https://github.com/rs-station/meteor).
Full extrapolation pipeline. Starting from the experimentally determined structure factors and together with a reference model, we first scale and to the model. A difference map is then computed following either the -weighted or the iterative TV denoising approach, and the constant component is determined for the reference structure. We next estimate the optimal extrapolation factor (§ 3). Finally, we extrapolate following Equation (5), restated here for convenience,
Vacuum Level Matching implementation details
Sampling rate. Real-space difference maps were sampled on a grid with a sampling factor of five, that is, the Nyquist–Shannon minimum, to provide adequate spatial resolution for the per-voxel analysis. Finer sampling does not add information. It samples the same map more densely and thereby increases the number of points entering the running statistics. Finer sampling is therefore useful when the cumulative mean is unstable, and the sampling can be reduced when the statistics are unaffected.
Filtering the difference map. We restrict the analysis to voxels that are themselves strongly negative, , and connected into a volume of at least Å. This removes isolated negative outliers that are likely to be noise rather than genuine structural signal. The threshold is deliberately permissive. When the map contains extensive negative signal, a more restrictive may be preferable.
Reference-density cutoff. The main text (subsubsection 3.5.2) halts the accumulation using the diagonal . We set , the bulk-solvent level, determined during preprocessing while estimating . This choice is motivated on two grounds. First, as noted in subsubsection 3.5.2, a small amplifies noise in the numerator of , and marks the density below which this amplification dominates. Second, a voxel with at or below is indistinguishable from bulk solvent, so a negative there is as plausibly attributable to a solvent fluctuation as to a genuine change in ordered protein density. Such voxels carry no reliable structural information regardless of their denominator.
Warning criteria. Three checks lower the confidence in an automatic estimate. In each case, the data violate an assumption underlying the method. The first raises a warning when the accepted window spans less than 20 % of the negative- range, indicating that the narrow-distribution regime covers too small a range for a reliable estimate. The second raises a warning when the running mean is unstable across the window, defined as the minimum running mean (excluding the first few voxels) falling below two thirds of its maximum. The third raises a warning when the running standard deviation is large relative to the reported estimate. When any condition is met, the estimate should not be trusted without inspection.
Connection between Vacuum Level Matching and NSE
This appendix shows that, under two mild assumptions, the Negative Sum Explosion is equivalent to a weighted average of the per-voxel zero-crossings that define Vacuum Level Matching. The NSE estimate is the intersection of two regression lines, one fitted in the under-extrapolation regime (small ) and one in the over-extrapolation regime (large ). At each , the negative sum collects every voxel for which . To write each regression line as a linear equation, we first establish which voxels contribute in each regime.
We consider only voxels that can physically cross zero. Voxels with are excluded, since reference density below vacuum is unphysical; such voxels arise mainly from the missing constant offset and are almost entirely removed once is restored (subsection 3.4). Voxels with are excluded as well: given , their extrapolated density could only become negative for , that is, by subtracting the difference rather than adding it. As in the main text, we further restrict the analysis to sufficiently negative difference density, giving the voxel set
Setting includes all negative-difference voxels, whereas (in the main text, ) excludes voxels whose small would delay their zero-crossing to very large .
The first assumption concerns the under-extrapolation regime. For sufficiently small , every voxel satisfies , so stays positive and the negative sum is flat at zero. Its regression line is therefore zero, and the intersection of the two lines lies at the root of the over-extrapolation line.
The second assumption concerns the over-extrapolation regime. For sufficiently large , the difference term dominates the reference in every voxel of , so all of them have crossed zero. The negative sum then runs over the fixed set , independent of , and is linear in ,
so the regression recovers this line exactly. We find its root by dividing the intercept by the slope,
Having found the global estimate, we turn our attention to the per-voxel estimates. The same construction, applied to a single voxel, gives an estimate at each point,
Taking the average over all per-voxel crossing points, weighted by , we obtain
This is the same expression as the global estimate of . In this scenario, NSE is therefore a weighted average of the per-voxel zero-crossings that Vacuum Level Matching makes explicit, with each voxel weighted by . If either assumption is violated, for example if the low- regime is not flat at zero or some voxels in have not yet crossed zero within the fitting range, the equivalence is only approximate and the two estimates differ slightly.
Because NSE accesses this average through a linear regression rather than directly, the choice of fitting range is arbitrary, whereas Vacuum Level Matching exposes the per-voxel distribution and the influence of each choice. The weighting itself, as a function of difference density, is not very different once the analysis is restricted to strongly negative voxels. The difference-map noise enters Equation (17) as an additive term, , whose magnitude is set by and is independent of the true at the voxel. Under the reciprocal map , an additive perturbation on becomes a perturbation of magnitude on , whose size depends on the value of at the voxel. Aggregating in therefore preserves a uniform additive noise scale across voxels, whereas aggregating in , as NSE does implicitly, does not.
Occupancy variance in serial crystallography
In a serial femtosecond crystallography (SFX) experiment, the assumption of a uniform, constant occupancy is almost always violated. In reality, the occupancy changes from crystal to crystal due to a variety of experimental factors, among them the size of the individual crystal, its position within the liquid jet, its alignment relative to the focused optical laser beam, and the orientation of the crystal lattice relative to the laser polarization.
Because SFX data processing merges diffraction patterns from thousands of individual crystals, the analysis ultimately obtains an average intensity. To understand the implications, we examine how the variance in occupancy across the ensemble affects the final structure-factor amplitudes.
To make the dependence on directly visible, we introduce , the pure complex structural difference between the triggered state (state 1) and the reference state (state 0). In the main text, we primarily talk about the observed difference electron density . Yet, given that our goal is to understand the role of , we make it explicit in the following derivations. If we consider a single crystal (or a single “shot”) with a specific occupancy , the measured intensity is
Because the dataset is an aggregate, we calculate the expected value (the average measurement) across the ensemble. Using the statistical identity , where is the mean occupancy and is its variance, the average intensity becomes
Here is the spread in occupancy across crystals and is unrelated to the difference-map and running-estimate standard deviations used in the main text.
To obtain the observed mixed-state amplitude , we take the square root of the average intensity. Writing and for the phases of and , respectively, gives
For reflections where the occupancy-weighted structural differences are small relative to the reference amplitude, we expand consistently through second order in the structural difference. Using , we obtain
Subtracting the reference amplitude and combining the quadratic terms yields
Thus, occupancy variance contributes an additional positive term to the difference amplitude at second order. Even without occupancy variance, a second-order correction remains when the structural difference has a component perpendicular to the reference structure factor in the complex plane.
Setting and retaining only the first-order term recovers the single-occupancy approximation used in subsection 2.2:
Assigning the reference phase and using
reproduces the first-order decomposition in Equation (8), with .
Decomposition of the Difference Map Matching score
We derive the decomposition in Equation (14) and its consequence for the CC method. We consider positive extrapolation factors and represent post-processing by and .
Substituting the extrapolated map into the processed difference map and adding and subtracting the observed difference term gives
where is the mismatch between the two processing steps and is the reference-model mismatch.
Pearson correlation is invariant to positive rescaling. Thus, for a fixed set of voxels on which both maps have nonzero variance,
Note that if , the score is independent of ; if both mismatch terms vanish, it is unity for every candidate.
Consequently, a CC maximum reflects the pattern introduced by the mismatch terms, rather than a minimum of their absolute magnitude alone.
Funding
We acknowledge Deutsches Elektronen-Synchrotron (DESY), a member of the Helmholtz Association, and DASHH, Data Science in Hamburg - Helmholtz Graduate School for the Structure of Matter, for financial support. Parts of this research were funded by and carried out at the Hamburg University of Technology. This work was further supported by the Cluster of Excellence ‘CUI: Advanced Imaging of Matter’ of the Deutsche Forschungsgemeinschaft (DFG) – EXC 2056 – project ID 390715994.
Conflicts of interest: There are no conflicts of interest.
Data availability: The code and the data needed to recreate the plots can be found at https://github.com/cvazz/xtr-estimator/ and are available under the Apache 2 license.
References
- [1]Banari, A., Samanta, A. K., Munke, A., Laugks, T., Bajt, S., Grünewald, K., Marlovits, T. C., Küpper, J., Maia, F. R., Chapman, H. N., Oberthür, D. & Seuring, C. (2025). Nature Methods, 22(7), 1420–1435.
- [2]Barends, T. R. M., Stauch, B., Cherezov, V. & Schlichting, I. (2022). Nature Reviews Methods Primers, 2(1), 59.
- [3]Baxter, J. M., Hutchison, C. D. M., Fadini, A., Maghlaoui, K., Cordon-Preciado, V., Morgan, R. M. L., Aghte, M., Horrell, S., Tellkamp, F., Mehrabi, P., Pfeifer, Y., Müller-Werkmeister, H. M., von Stetten, D., Pearson, A. R. & van Thor, J. J. (2024). Journal of the American Chemical Society, 146(24), 16394–16403.
- [4]Bränden, G. & Neutze, R. (2021). Science, 373(6558), eaba0954.
- [5]Christou, N.-E., Apostolopoulou, V., Melo, D. V. M., Ruppert, M., Fadini, A., Henkel, A., Sprenger, J., Oberthuer, D., Günther, S., Pateras, A., Rahmani Mashhour, A., Yefanov, O. M., Galchenkova, M., Reinke, P. Y. A., Kremling, V., Scheer, T. E. S., Lange, E. R., Middendorf, P., Schubert, R., De Zitter, E., Lumbao-Conradson, K., Herrmann, J., Rahighi, S., Kunavar, A., Beale, E. V., Beale, J. H., Cirelli, C., Johnson, P. J. M., Dworakowski, F., Ozerov, D., Bertrand, Q., Wranik, M., Bacellar, C., Bajt, S., Wakatsuki, S., Sellberg, J. A., Huse, N., Turk, D., Chapman, H. N. & Lane, T. J. (2023). Science, 382(6674), 1015–1020.
- [6]Coquelle, N., Sliwa, M., Woodhouse, J., Schirò, G., Adam, V., Aquila, A., Barends, T. R. M., Boutet, S., Byrdin, M., Carabias, S., De La Mora, E., Doak, R. B., Feliks, M., Fieschi, F., Foucar, L., Guillon, V., Hilpert, M., Hunter, M. S., Jakobs, S., Koglin, J. E., Kovacsova, G., Lane, T. J., Lévy, B., Liang, M., Nass, K., Ridard, J., Robinson, J. S., Roome, C. M., Ruckebusch, C., Seaberg, M., Thepaut, M., Cammarata, M., Demachy, J., Field, M., Shoeman, R. L., Bourgeois, D., Colletier, J.-P., Schlichting, I. & Weik, M. (2018). Nature Chemistry, 10(1), 31–37.
- [7]De Zitter, E., Coquelle, N., Oeser, P., Barends, T. R. M. & Colletier, J.-P. (2022). Communications Biology, 5(1), 640.
- [8]Evans, P. (2006). Acta Crystallographica Section D: Biological Crystallography, 62(1), 72–82.
- [9]Fadini, A., Apostolopoulou, V., Lane, T. J. & van Thor, J. J. (2025). Communications Biology, 8(1), 1649.
- [10]Fadini, A., Hutchison, C. D. D., Morozov, D., Chang, J., Maghlaoui, K., Perrett, S., Luo, F. Kho, J. C., Romei, M. G., Morgan, R. M. L., Orr, C. M., Cordon-Preciado, V., Fujiwara, T., Nuemket, N., Tosha, T., Tanaka, R., Owada, S., Tono, K., Iwata, S., Boxer, S. G., Groenhof, G., Nango, E. & van Thor, J. J. (2023). Journal of the American Chemical Society, 145(29), 15796–15808.
- [11]Fong, M. I., Hosokawa, Y., Essen, L. O. & Maestre-Reyna, M. (2026). FEBS Open Bio, n/a(n/a).
- [12]Genick, U. K. (2007). Acta Crystallographica Section D: Biological Crystallography, 63(10), 1029–1041.
- [13]Genick, U. K., Borgstahl, G. E. O., Ng, K., Ren, Z., Pradervand, C., Burke, P. M., Šrajer, V., Teng, T.-Y., Schildkamp, W., McRee, D. E., Moffat, K. & Getzoff, E. D. (1997). Science, 275(5305), 1471–1475.
- [14]Grosse-Kunstleve, R. W., Sauter, N. K., Moriarty, N. W. & Adams, P. D. (2002). Journal of Applied Crystallography, 35(1), 126–136.
- [15]Hadjidemetriou, K., Coquelle, N., Barends, T. R. M., De Zitter, E., Schlichting, I., Colletier, J.-P. & Weik, M. (2022). Acta Crystallographica Section D: Structural Biology, 78(9), 1131–1142.
- [16]Henderson, R. & Moffat, J. K. (1971). Acta Crystallographica Section B: Structural Crystallography and Crystal Chemistry, 27(7), 1414–1420.
- [17]Khusainov, G., Standfuss, J. & Weinert, T. (2024). Structural Dynamics, 11(2), 020901.
- [19]Lang, P. T., Holton, J. M., Fraser, J. S. & Alber, T. (2014). Proceedings of the National Academy of Sciences, 111(1), 237–242.
- [20]Lee, B., White, K. I., Socolich, M., Klureza, M. A., Henning, R., Srajer, V., Ranganathan, R. & Hekstra, D. R. (2025). Cell, 188(1), 77–88.
- [21]Luzzati, V. (1952). Acta Crystallographica, 5(6), 802–810.
- [22]Maestre-Reyna, M., Hosokawa, Y., Wang, P.-H., Saft, M., Caramello, N., Engilberge, S., Franz-Badur, S., Gusti Ngurah Putu, E. P., Nakamura, M., Wu, W.-J., Wu, H.-Y., Lee, C.-C., Huang, W.-C., Huang, K.-F., Chang, Y.-K., Yang, C.-H., Fong, M.-I., Lin, W.-T., Yang, K.-C., Ban, Y., Imura, T., Kazuoka, A., Tanida, E., Owada, S., Joti, Y., Tanaka, R., Tanaka, T., Kang, J., Luo, F., Tono, K., Kiontke, S., Korff, L., Umena, Y., Tosha, T., Bessho, Y., Nango, E., Iwata, S., Royant, A., Tsai, M.-D., Yamamoto, J. & Essen, L.-O. (2025). Science Advances, 11(20), eadu7247.
- [23]Nango, E., Royant, A., Kubo, M., Nakane, T., Wickstrand, C., Kimura, T., Tanaka, T., Tono, K., Song, C., Tanaka, R., Arima, T., Yamashita, A., Kobayashi, J., Hosaka, T., Mizohata, E., Nogly, P., Sugahara, M., Nam, D., Nomura, T., Shimamura, T., Im, D., Fujiwara, T., Yamanaka, Y., Jeon, B., Nishizawa, T., Oda, K., Fukuda, M., Andersson, R., Båth, P., Dods, R., Davidsson, J., Matsuoka, S., Kawatake, S., Murata, M., Nureki, O., Owada, S., Kameshima, T., Hatsui, T., Joti, Y., Schertler, G., Yabashi, M., Bondar, A.-N., Standfuss, J., Neutze, R. & Iwata, S. (2016). Science, 354(6319), 1552–1557.
- [24]Pandey, S., Bean, R., Sato, T., Poudyal, I., Bielecki, J., Cruz Villarreal, J., Yefanov, O., Mariani, V., White, T. A., Kupitz, C., Hunter, M., Abdellatif, M. H., Bajt, S., Bondar, V., Echelmeier, A., Doppler, D., Emons, M., Frank, M., Fromme, R., Gevorkov, Y., Giovannetti, G., Jiang, M., Kim, D., Kim, Y., Kirkwood, H., Klimovskaia, A., Knoska, J., Koua, F. H. M., Letrun, R., Lisova, S., Maia, L., Mazalova, V., Meza, D., Michelat, T., Oumnazd, A., Palmer, G., Ramilli, M., Schubert, R., Schwander, P., Silenzi, A., Sztuk-Dambietz, J., Tolstikova, A., Chapman, H. N., Ros, A., Barty, A., Fromme, P., Mancuso, A. P. & Schmidt, M. (2020). Nature Methods, 17(1), 73–78.
- [25]Pearce, N. M., Kroj er, T., Bradley, A. R., Collins, P., Nowak, R. P., Talon, R., Marsden, B. D., Kelm, S., Shi, J., Deane, C. M. & Von Delft, F. (2017). Nature Communications, 8(1), 15123.
- [26]Pearson, A. R. & Mehrabi, P. (2020). Current Opinion in Structural Biology, 65, 168–174.
- [27]Ren, Z., Perman, B., Šrajer, V., Teng, T.-Y., Pradervand, C., Bourgeois, D., Schotte, F., Ursby, T., Kort, R., Wulff, M. & Moffat, K. (2001). Biochemistry, 40(46), 13788–13801.
- [29]Schmidt, M. (2023). Structural Dynamics, 10(4), 044303.
- [30]Schmidt, M., Pahl, R., Srajer, V., Anderson, S., Ren, Z., Ihe e, H., Rajagopal, S. & Moffat, K. (2004). Proceedings of the National Academy of Sciences, 101(14), 4799–4804.
- [31]Schmidt, M., Rajagopal, S., Ren, Z. & Moffat, K. (2003). Biophysical Journal, 84(3), 2112–2129.
- [32]Šrajer, V., Teng, T.-y., Ursby, T., Pradervand, C., Ren, Z., Adachi, S.-i., Schildkamp, W., Bourgeois, D., Wulff, M. & Moffat, K. (1996). Science, 274(5293), 1726–1729.
- [33]Tripathi, S., Šrajer, V., Purwar, N., Henning, R. & Schmidt, M. (2012). Biophysical Journal, 102(2), 325–332.
- [34]Ursby, T. & Bourgeois, D. (1997). Acta Crystallographica Section A, 53(5), 564–575.
- [36]White, T. A., Kirian, R. A., Martin, A. V., Aquila, A., Nass, K., Barty, A. & Chapman, H. N. (2012). Journal of Applied Crystallography, 45(2), 335–341.
- [37]Wojdyr, M. (2022). Journal of Open Source Software, 7(73), 4200.