Abstract
Crystallography is the powerhouse technique for molecular structure determination, with applications in fields ranging from energy storage to drug design. Accurate structure determination, however, relies partly on determining the precise locations and integrated intensities of Bragg peaks in the resulting data. Here, we describe a method for Bragg peak integration that is accomplished using neural networks. The network is based on a U-Net and identifies peaks in three-dimensional reciprocal space through segmentation, allowing prediction of the full 3D peak shape from noisy data that is commonly difficult to process. The procedure for generating appropriate training sets is detailed. Trained networks achieve Dice coefficients of 0.82 and mean IoUs of 0.69. Carrying out integration over entire datasets, it is demonstrated that integrating neural network-predicted peaks results in improved intensity statistics. Furthermore, using a second dataset, the possibility of transfer learning between datasets is shown. Given the ubiquity and growing complexity of crystallography, we anticipate integration by machine learning to play an increasingly important role across the physical sciences. These early results demonstrate the applicability of deep learning techniques for integrating crystallography data and suggest a possible role in the next generation of crystallography experiments.
Keywords: neural networks, volume segmentation, crystallography, neutrons
I. INTRODUCTION
Since its realization in 1913 [1], crystallography has developed into a mature technique that serves as the primary means of molecular structure determination. This has been particularly true for biological samples, with 95% of reported structures in the RCSB Protein Database [2] resulting from X-ray crystallography. Given the importance of understanding structure in the physical sciences, crystallography instrumentation and software must be accessible to non-experts. Thus, it is critical that crystallography analysis software be fast, robust, and able to maximize the useful data obtained from each experimental dataset from current and future instrumentation.
The steps for a typical crystallography experiment, after the crystal has formed, are shown in Figure 1. The crystal is first placed in an incident particle beam, typically X-rays, electrons, or neutrons; the work here will focus on neutron crystallography. Assuming the wavelength of the incident particle is approximately equal to the lattice spacing in the crystal, incident particles will diffract, forming a pattern that contains intensity maxima known as Bragg peaks. These Bragg peaks can be described by their scattering vector In the laboratory frame,
| (1) |
Fig. 1.
A typical crystallography experiment at a macromolecular neutron diffractometer such as MaNDi. A. After a crystal is grown, it is placed in an incident particle beam inside a detector sphere. Neutrons diffract from the sample to for Bragg spots. B. A schematic visualization of crystallography data in reciprocal space. It can be seen that Bragg peaks appear at integer values of h, k, and l. The intensity of these peaks, shown as different colors, is used to determine the structure of the crystallized material. C. 3D profiles of peaks that need to be integrated show that peaks can have very different peak shapes. D. The integrated intensity of peaks is then used to calculate nuclear density maps (blue) which is modeled to determine the structure of the crystallized protein (teal).
where λ is the neutron’s wavelength, are the wave vectors, U and B are matrices describing the scattering instrument and crystal, respectively. By choosing an appropriate orientation matrix (the UB matrix), Bragg peaks occur at integer = (h, k, l). This is illustrated in Figure 1B which schematically shows a diffracted intensity pattern in q space (reciprocal space) scaled to (h, k, l). The integrated intensity of each peak, I, is determined by the atomic configuration in each unit cell. Thus, structural models of molecules are determined by solving the inverse problem; on a basic level, structural refinement programs vary atomic constituents and locations until they best describe the observed intensities. Naturally, then, the success of structure determination relies on accurate intensity determination. While a seemingly simple task, peak integration is challenged by a number of experimental artifacts including imperfect instrument calibration, overlapping peaks, irregular peak shapes, and low signal-to-noise ratios. For traditional X-ray crystallography, software packages exist that largely address these issues [3]–[5]. Software for neutron crystallography1 and the newest generation of X-ray crystallography experiments, however, is still under development. Recently, we implemented a profile fitting (PF) integration scheme that largely avoids those issues for neutron crystallography, improving data quality compared to less sophisticated peak-minus-background counting methods [6]. While PF has extended the capabilities of neutron crystallography, the procedure is computationally demanding. PF requires a series of 1D least squares fits to determine the background level followed by a 2D least squares fit to account for the remaining two directions; in their current implementations, PF runs around 100 × slower than peak-minus-background integration. Beamtime at pulsed neutron sources is both expensive and extremely limited. As a result, one goal of each instrument’s data reduction pipeline must be to provide near real-time reduced data so users can optimally use their allocated beamtime. This work extends PF by using neural networks to demonstrate that neural networks can increase both the speed and accuracy of integration.
With the increasing complexity of crystallography experiments, researchers have started using machine learning techniques. Crystal screening - the laborious act of determining if a crystal formed during a crystallization experiment - can be done by decision-tree boosting or neural networks with over 90% accuracy [7], [8]. As another example, X-ray free-electron lasers often carry out experiments that can produce data at challenging rates while only a small subset of measurements contain usable data. Ke et al. recently showed that a correctly trained convolutional neural network can perform as a data recording veto, providing a pathway to minimize the amount of unnecessarily recorded data [9]. Aside from offering a solution to data management problems, incorporating machine learning into data workflows presents an opportunity to improve data quality. To that effect, we present here a deep learning-based analysis of crystallography’s primary data. Volume segmentation of neural networks is used to predict which voxels in reciprocal space comprise each peak for integration.
II. DATA COLLECTION
Protein crystals were grown as described previously [10], [11]. The crystals were of perdeuterated (H atoms exchanged for deuterium) Tohol β-lactamase that contained mutations that improve crystal quality and do not affect the peak shapes discussed here. Data were collected on the Macromolecular Neutron Diffractometer (MaNDi) beamline [12] at the Spallation Neutron Source at oak Ridge National Laboratory (oak Ridge, TN, USA). Since each crystal orientation only probes a portion of reciprocal space, multiple crystal orientations were recorded. For dataset one, six frames were recorded for 36 hours per frame while for dataset two, five frames were recorded for 36 hours per frame. Neutron data were processed using Mantid [13]. For all integration schemes, wavelength normalization and scaling were done using Lauenorm from the Lauegen package [14]. Merging and intensity statistics were calculated using PHENIX [15]. For all data presented, only peaks with I/σ(I) > 1 are included, effectively imposing that the signal-to-noise ratio for included peaks is greater than one.
III. NETWORK DESIGN AND TRAINING
A. Generating Training Data and Data Augmentation
While strong peaks can easily be identified and segmented, weak peaks are barely above background levels. In order to use strong peaks to generate a training set appropriate for all peaks, strong peaks were fit first using profile fitting (see Introduction). The voxels comprising the peak were taken as voxels with a fit intensity greater than 15% of the maximum fit intensity. These strong peaks and the corresponding masks were then transformed as follows:
Rotation. to simulate different peak orientations, peaks were rotated about the x, y, and z axes by random amounts between −180°and +180°. This was done to half of the peaks. Each peak is rotated only once about these axes, resulting in one output peak per input peak.
Translation. to reproduce the effects of imperfect instrument calibration and peak indexing, peaks were translated by −6 to +6 voxels along the x, y, and z axes. This was done to all peaks and the amount of translation was randomly selected (from a uniform distribution) for each direction.
Added noise. To simulate weak peaks from strong peaks, Poisson noise was added to the simulated peak with an expectation value of, λ randomly chosen between λ = 0 and where Nmax is the highest number of counts a single voxel contains.
This was done for strong peaks, which is defined as peaks having a profile fitted intensity of 200 or more counts. In practice, this resulted in 9,609 peaks total for the first data set and 14,888 peaks for the second data set.
The mixed training set (1+2) was composed of peaks taken from dataset 1 and dataset 2. To form this set, 5,000 peaks from each data set were randomly chosen. As such, each set was equally represented for training.
While the two crystals were of the same protein collected on the same instrument, microscopic differences that occur during crystal growth result in different peak sizes. The distribution of peak volumes, defined as Ntrue × Vvoxel, for each data set is shown in Figure 2. The volume of a voxel for both data sets was the same − 0.003 Å3(1 Å =1 × 10−10 m). It is evident that the spread of peak sizes in dataset two is larger than that of dataset one, with the latter effectively being a subset of former with respect to training peak volumes.
Fig. 2.
Histogram of training peak volumes demonstrate that the peaks from dataset two are larger than peaks from dataset 1.
B. Network Design
Given that peak integration is being attempted via volume segmentation, a network based on a U-Net [16], which has been successful in a variety of segmentation problems, was used as a starting point. In particular, the network used here uses convolutional layers in an encoder-decoder scheme to make voxel-wise predictions. With the exception of the output layer, convolutional layers have a kernel size of 3, a stride of 1, do not use dilation, and have ReLU activations. Maximum pooling is used for downsampling and these layers used with a stride of 2 and kernel size of 2. Upsampling was done using transposed convolution (kernel size of 2, stride of 2), and convolutional layers. The final layer is a convolution layer with sigmoid activation and kernel size of 1. Additionally, Batch Normalization [17] and Dropout [18] are used (dropout rate of 0.5) to accelerate learning and prevent overfitting, respectively. A layer-by-layer description of the network is given in Table I
TABLE I.
LAYER-BY-LAYER NETWORK DESCRIPTION. PARAMETERS FOR EACH OPERATION ARE GIVEN IN SECTION III-B
| Layer | Operation | Output Size |
|---|---|---|
| 1 | Input | 32 × 32 × 32 × 1 |
| 2 | Convolution | 32 × 32 × 32 × 16 |
| 3 | Batch Normalization + Dropout | 32 × 32 × 32 × 16 |
| 4 | Convolution | 32 × 32 × 32 × 16 |
| 5 | Batch Normalization | 32 × 32 × 32 × 16 |
| 6 | Max Pooling | 16 × 16 × 16 × 16 |
| 7 | Convolution | 16 × 16 × 16 × 32 |
| 8 | Batch Normalization + Dropout | 16 × 16 × 16 × 32 |
| 9 | Convolution | 16 × 16 × 16 × 32 |
| 10 | Batch Normalization | 16 × 16 × 16 × 32 |
| 11 | Transposed Convolution | 16 × 16 × 16 × 16 |
| 12 | Concatenate layers 10 and 11 | 16 × 16 × 16 × 48 |
| 13 | Convolution | 16 × 16 × 16 × 16 |
| 14 | Batch Normalization + Dropout | 16 × 16 × 16 × 16 |
| 15 | Convolution | 16 × 16 × 16 × 16 |
| 16 | Batch Normalization + Dropout | 16 × 16 × 16 × 16 |
| 17 | Transposed Convolution | 32 × 32 × 32 × 16 |
| 18 | Concatenate Layers 5 and 17 | 32 × 32 × 32 × 32 |
| 19 | Convolution | 32 × 32 × 32 × 16 |
| 20 | Batch Normalization + Dropout | 32 × 32 × 32 × 16 |
| 21 | Convolution | 32 × 32 × 32 × 16 |
| 22 | Batch Normalization | 32 × 32 × 32 × 16 |
| 23 | Convolution (Output Layer) | 32 × 32 × 32 × 1 |
The network is implemented in Keras [19] using a Ten-sorflow backend [20]. Training was done using an ADAM optimizer [21] (lr = 0.0005, β1=0.9, β2=0.999). The loss function is one minus the Dice coefficient (i.e. the Dice coefficient is being maximized). Training and evaluation were done using an NVIDIA Quadro P4000 GPU.
C. Training Results
To learn peak shapes, peaks are trained against datasets generated from two different crystallographic datasets. Training was done both on either data set (1, 2) or on both sets at the same time (1+2). The results of training are shown in Table II and typical metrics through the course of a training experiment are shown in Figure 3. Peak sets were split groups of 80% for training, 10% for validation, and 10% for testing.
TABLE II.
Training results for networks. Values are shown for TRAINING, VALIDATION, AND TEST DATASETS, RESPECTIVELY.
| Data Set |
Training Set | ||
|---|---|---|---|
| Loss | Dice Coefficient | Mean IoU | |
| 1 | 0.18, 0.18, 0.18 | 0.82, 0.82, 0.82 | 0.69, 0.69, 0.69 |
| 2 | 0.19, 0.19, 0.19 | 0.81, 0.81, 0.81 | 0.68, 0.68, 0.69 |
| 1+2 | 0.19, 0.19, 0.19 | 0.81, 0.81, 0.81 | 0.69, 0.68, 0.68 |
Fig. 3.
Typical loss and metric values during training. Data from training sets are shown in solid lines while the validation data are shown as a dotted line.
During training and prediction, peaks are scaled to have zero mean and unit variance. This allows the network to learn peak shapes in a variety of orientations and signal-to-noise ratios, irrespective of the actual peak intensities. For integration, the predicted voxels can be used as a mask to identify the peak. To determine the mask, we note that given a normalized input set of intensities, the model returns a score (ranging from 0 to 1) for each voxel. This set of scores is thresholded, keeping scores above 0.4. Occasionally, several isolated pixels outside the main peak are predicted to have scores above 0.4. To smooth these out, since a peak must be continuous in reciprocal space, the largest set of 8-connected voxels as determined by blob detection is taken as the peak.
Overall, there is agreement between the training, validation, and testing metric values suggesting that the network is not overtrained. When learning from both datasets (set 1+2), the network achieves the same learning metrics (Table II), demonstrating that the presence of two sets of peaks does not hinder learning.
It is also instructive to visually compare predicted peak masks with input data. Figure 4 shows several peaks from the first crystal (not modified like training data) of varying intensity overlaid with their predicted peak masks. Visually, peak masks outline the actual peaks, even in the case of very weak peaks (Figure 4, top right). Taken with the training metrics, this suggests that the model indeed learns peak locations.
Fig. 4.
2D slices of representative peaks. A strong (top left), weak (top right), and two medium (bottom) peaks and shown with display ranges given in the image. Predicted masks are shown in white. Visually, predicted masks are consistent with peak locations.
IV. INTEGRATION SCHEME
With the peak mask now defined, integration is done as follows: first, an intensity distribution surrounding and including the peak is generated. Noting that peaks occur at integer (h, k, l) values, we can ensure only one peak is present by forming this intensity distribution from (h − η,k − η,l − η) to (h + η,k + η,l + η) and setting η < 1 . For the work here, η = 0.4 was used. This box is cropped to 32 × 32 × 32 and used to get a predicted peak mask. The background level, λBG, is taken as the average intensity of voxels not included in the peak. The intensity of the peak, I, then is found by summing the number of events in the peak and subtracting the background. If the ith voxel has Ni counts and n voxels are predicted to constitute a peak, then:
| (2) |
Assuming Poisson statistics, the variance of the intensity σ2 (I) is the sum of variances of the intensity plus the background:
| (3) |
For comparison with other integration methods, datasets integrated using both profile fitting and spherical integration are also provided. Profile fitting, which is used to generate the masks for training data, is detailed elsewhere [6]. Briefly, it generates a model of each peak by carrying out a least squares fit to the functional form of a peak. Weak peak shapes are then inferred from the nearest strong peak neighbor. Integration is done by integrating the model rather than the data itself. Spherical integration is a simple peak-minus-background integration technique implemented in Mantid [13]. In this scheme, a sphere is drawn around each peak’s predicted location and the number of neutrons inside are summed. The background in the peak is inferred from a thin shell surrounding the sphere and scaled appropriately to match the volume of the sphere.
It should be noted that the peaks being integrated for Section V are the recorded data themselves, which have not been modified like the training peaks.
V. CRYSTALLOGRAPHIC RESULTS
A. A Note on Assessing Crystallography Data Quality
Data sets from protein crystals contain in excess of 100,000 total peaks and it is difficult to determine universally applica-ble metrics to assess data quality. One common approach is to calculate the variation in intensities of symmetrically equivalent peaks. These statistics are known as merging statistics. Peaks can be equivalent either through the symmetry of the crystal or because they are the same peak (in h, k, l space) recorded at different crystal orientations. One possibility is to useR-values, which quantify the spread of intensities amongst equivalent peaks. Here, we will use Rmerge and Rpim [22]:
| (4) |
| (5) |
where Ih, i is the intensity of the ith peak having equivalent (h, k, l) and nh is the number of peaks having equivalent (h, k, l). Rp.i.m. is very similar to Rmerge except that it normalizes for high redundancy in data. Higher R values represent less consistent data. More recently, the CC1/2 metric has become common [23]. To calculate CC1/2, equivalent peaks are split randomly into two datasets and the Pearson’s correlation coefficient between the sets is calculated. Higher CC1/2 values arise from more consistent data.
It is also possible to assess accuracy. Assuming a nearly-ideal crystal (namely, one without twinning), expected intensity distributions can be calculated. When considering resolution normalized intensities, z = I/ < I >, the cumulative distribution function (CDF), N(z) can be derived [24].2.The ideal distribution is shown in Figure 5
Fig. 5.
Cumulative distribution functions (CDFs) for resolution-normalized intensities, z for each integration method. Integration using neural networks offers an improvement regardless of if the network was trained against dataset 1 (NN1), dataset 2 (NN2), or a combination of both (NN1+2). Note that the curve for NN1 and NN1+2 overlap, making the NN1 curve difficult to see.
For the data presented Section V-B, only peaks with a signal-to-noise I/σ(I) > 1 for each integration methods are used for analysis.
B. Crystallography Results
Cumulative distribution functions of resolution-normalized intensities z = I/ < I > are shown in Figure 5 for comparison with theoretically predicted distributions. These distributions make it clear that spherical integration fails to yield the correct intensity statistics, particularly at low z. Profile fitting results in a CDF that much more closely reflects the expected distribution. Using neural network-based integration, however, results in still more consistent CDFs. This is particularly pronounced in dataset 1. In both cases, discrepancies between neural network-based integration and theoretically predicted CDFs begin at low z, indicating that weak peaks are still problematic.
Merging statistics for datasets one and two are presented in Table III and Table IV, respectively. These tables show merging statistics for peaks integration using spherical integration, profile fitting integration (PF), and integration of neural network-predicted peak shapes from networks trained against data from dataset 1 (NN1), dataset 2 (NN2), and both datasets (NN1+2). Spherical integration results in high completeness and multiplicity, a result of the integration technique assigning I/(I) > 1 for many peaks. These peaks, however, are not being accurately integrated. This is evident not only in Figure 5, but also by the low CC1/2. In particular, the outer shell CC1/2 for each data set from spherical integration is effectively zero. For both datasets, profile fitting lowers R factors for the dataset as a whole but has higher R values in the high-resolution shell. This is reflective of the fact that there is a larger spread in intensities for weak peaks, though both the CDF and increased CC1/2 in the outermost shell suggest increased accuracy. Machine learning within datasets (e.g. NN1 predicting peak shapes to integrate dataset 1) results in higher completeness, lower overall R factors, and higher overall CC1/2 values. In the outer shell, neural network-based integration results in higher R values but considerably higher CC1/2. Collectively, these results suggest that neural network-based integration is an improvement over the accuracy of profile fitting.
TABLE III.
MERGING STATISTICS FOR DATASET 1 USING DIFFERENT INTEGRATION SCHEMES.
| Unit Cell Space Group Space Group Resolution Range |
a = 73.3Å, b = 73.3Å, c = 99.9Å, γ = 120° P 3221 6 14.77 – 1.80 Å (1.86 – 1.80 Å) |
||||
|---|---|---|---|---|---|
| Integration Scheme | Spherical | PF | NN1 | NN2 | NN1+2 |
| Number of Unique Reflections | 28,691 (2,728) | 27,063 (2,297) | 27,761 (2,602) | 23,128 (1,644) | 26,280 (2,277) |
| Completeness | 95.46% (78.78%) | 92.47% (79.76%) | 94.95% (90.35%) | 79.10% (57.08%) | 89.88% (79.06%) |
| Multiplicity | 4.64 (4.11) | 3.64 (2.31) | 4.10 (3.11) | 3.30 (1.66) | 3.59 (2.30) |
| Mean I/σ(I) | 9.5 (7.2) | 8.7 (2.3) | 10.0 (3.7) | 9.9 (2.4) | 10.1 (3.2) |
| Rmerge | 0.198 (0.100) | 0.181 (0.284 ) | 0.157 (0.442) | 0.133 (0.404) | 0.138 (0.427) |
| Rp.i.m | 0.100 (0.125) | 0.099 (0.198) | 0.083 (0.261) | 0.071 (0.304) | 0.075 (0.289) |
| CC1/2 | 0.965 (−0.017) | 0.961 (0.155) | 0.982 (0.322) | 0.986 (0.222) | 0.93 (0.238) |
TABLE IV.
MERGING STATISTICS FOR DATASET 2 USING DIFFERENT INTEGRATION SCHEMES.
| Unit Cell Space Group Number of Orientations Resolution Range |
a = 73.3Å, b = 73.3Å, c = 99.9Å, γ = 120° P 3221 5 13.97 – 1.65 Å (1.71 – 1.65 Å) |
||||
|---|---|---|---|---|---|
| Integration Scheme | Spherical | PF | NN1 | NN2 | NN1+2 |
| Number of Unique Reflections | 36,623 (3,491) | 35,672 (3,021) | 37,157 (3,610) | 36,321 (3,406) | 36,465 (3,453) |
| Completeness | 96.91% (94.05%) | 94.39% (81.38%) | 98.32% (97.25%) | 96.11% (91.76%) | 96.49% (93.02%) |
| Multiplicity | 3.57 (2.59) | 3.67 (1.96) | 4.15 (3.13) | 3.82 (2.52) | 3.85 (2.58) |
| Mean I/σ(I) | 8.1 (4.4) | 11.0 (2.1) | 11.1 (3.7) | 11.2 (3.2) | 11.2 (3.3) |
| Rmerge | 0.180 (0.269) | 0.135 (0.247) | 0.118 (0.391) | 0.108 (0.365) | 0.109 (0.371) |
| Rp.i.m | 0.100 (0.187) | 0.073 (0.186) | 0.063 (0.246) | 0.058 (0.249) | 0.059 (0.251) |
| CC1/2 | 0.973(−0.013) | 0.983 (0.378) | 0.990 (0.323) | 0.991 (0.373) | 0.991 (0.308) |
This study also examined the transferability of neural net-works trained against other peak sets. For both cases, integration using networks trained against either dataset produced nearly identical CDFs. Training against a mixture of peaks from each dataset also yielded similar CDFs (Figure 5). With the exception of the completeness of dataset 1 integrated using peak shapes predicted by NN2 (Table III), all three networks performed comparably, demonstrating that transfer learning is possible for peaks that are not too dissimilar.
VI. DISCUSSION
This work demonstrates that the use of neural networks to integrate Bragg peaks can yield more accurate intensities which ultimately increases the ability accuracy of structural models. By posing the problem as an image segmentation problem, it was possible to take advantage of the remarkable progress in deep learning and computer vision over the last few years. In particular, this network relies on convolutional networks [25] using an encoder-decoder architecture similar to a U-Net [16]. Because peak locations are relatively well known in reciprocal space, it can be guaranteed that each input for prediction should contain a peak. As a result, training against negative data was not necessary. This simplification likely resulted in faster learning and allowed the relatively simple network described in Table I to succeed.
While metrics indicate that the network is able to accurately learn peak locations, Figure 5 makes it clear that integration using these networks is still not perfect. As they do for all integration methods, low-intensity peaks continue to pose a problem. Increasing the complexity of the network may allow more accurate weak peak integration. In particular, other segmentation problems have benefited from using dilated convolutions [26], [27]. Dilation is particularly promising since, as a consequence of the instrument design, weak peaks typically occupy less volume in reciprocal space than strong peaks. Dilation may allow appropriate geometric scaling to increase the accuracy of weak peak integration. Another possibility is that the algorithm to generate training data (Section III-A) is not yet optimal. The algorithm effectively introduces a new set of hyperparameters (e.g. the fraction of noise to be added or the percent of peak to include when defining a mask) that must be optimized concurrently with network hyperparameters.
Adding to the complexity of optimizing the learning procedure is the potential for sample-to-sample variability. Here, we examined two different crystals of β-lactamase mutants. These samples are relatively similar, as can be seen from their signal- to-noise levels (Tables III, IV) and their peak volumes (Figure 2). Given that this software is being designed for use at a user facility, it is essential that software be able to analyze data from a wide variety of crystals. Membrane proteins, for instance, are of extreme interest to the crystallography community. These proteins are very difficult to perdeuterate for crystallization and thus have intrinsically higher backgrounds than the datasets presented here. While transfer learning between these two datasets was shown to be possible, it will be interesting to see how well a network can be trained to handle more diverse datasets in the future.
In addition to improving accuracy, one major goal of this work was to determine if using neural networks could be used to provide users with near real-time feedback as their experiment progresses. The average integration time per peak is shown in Table V. While profile fitting improved accuracy, it slows down integration 100×. At that rate, it takes around 13 hours to integrate a whole run (~60,000 peaks), far from real-time feedback that users desire. Integration using neural networks offer a considerable speedup because of the optimizations of neural networks running on GPUs. The current work demonstrates crossover learning and suggests that a completely new network likely does not need to be trained for each experiment. Using a pre-trained network, it is interesting to consider the requirements to provide real-time integrated intensities. Approximating each exposure to have 100,000 peaks that need integration at 10 ms per peak suggests an integration time of around fifteen minutes. Users can receive minute-by-minute feedback then if fifteen instances are run in parallel, which is achievable on a small GPU cluster.
TABLE V.
Average integration time per peak by different integration METHODS.
| Method | Time per Peak (ms) |
|---|---|
| Spherical | 5.04 |
| PF | 780.03 |
| ML | 8.11 |
Integrating via neural networks offers improved accuracy over integration times while considerably decreasing the time required by profile fitting. For both datasets, neural network integration yields higher completeness and CC1/2 in outer shells. These metrics have commonly hindered neutron macromolecular crystallography. Furthermore, integration using neural networks shows a clear increase in accuracy when considering the intensity CDF (Figure 5). We expect that routine application and further development of deep learning-based integration schemes will facilitate higher impact science at both current and planned user facilities.
VII. ACKNOWLEDGMENT
This work used samples grown at Oak Ridge National Laboratory’s Center for Structural and Molecular Biology (CSMB), which is funded by the office of Biological Environment Research in the Department of Energy’s Office of Science. The research at ORNL’s Spallation Neutron Source was sponsored by the Scientific User Facilities Division, Office of Basic Energy Sciences, US Department of Energy. This work was funded by the National institutes of Health grant R01-GM071939.
Footnotes
Particularly for time-of-flight instruments at pulsed neutron sources.
For brevity, we consider only distributions for acentric peaks as they represent about 90% of the peaks in these datasets.
Contributor Information
Brendan Sullivan, Neutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN, USA.
Patricia S. Langan, Neutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN, USA
Rick Archibald, Computer Science and Mathematics Division, Oak Ridge National Laboratory, Oak Ridge, TN, USA.
Leighton Coates, Neutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN, USA.
Venu Gopal Vadavasi, Neutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN, USA.
Vickie Lynch, Neutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN, USA.
REFERENCES
- [1].Bragg WH, Bragg WL et al. , “The structure of the diamond,” Proc. R. Soc. Lond. A, vol. 89, no. 610, pp. 277–291, 1913. [Google Scholar]
- [2].Berman HM, Westbrook J, Feng Z, Gilliland G, Bhat TN, Weissig H, Shindyalov IN, and Bourne PE, “The protein data bank,” Nucleic acids research, vol. 28, no. 1, pp. 235–242, 2000. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [3].Leslie AG, “The integration of macromolecular diffraction data,” Acta Crystallographica Section D: Biological Crystallography, vol. 62, no. 1, pp. 48–57, 2006. [DOI] [PubMed] [Google Scholar]
- [4].Minor W, Cymborowski M, Otwinowski Z, and Chruszcz M, “Hkl-3000: the integration of data reduction and structure solution-from diffraction images to an initial model in minutes,” Acta Crystallograph-ica Section D: Biological Crystallography, vol. 62, no. 8, pp. 859–866, 2006. [DOI] [PubMed] [Google Scholar]
- [5].Kabsch W, “Xds,” Acta Crystallographica Section D: Biological Crystallography, vol. 66, no. 2, pp. 125–132, 2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [6].Sullivan B, Archibald R, Langan PS, Dobbek H, Bommer M, McFeeters RL, Coates L, Wang X, Gallmeier F, and Carpenter JM, “improving the accuracy and resolution of neutron crystallographic data by threedimensional profile fitting of bragg peaks in reciprocal space,” Acta Crystallographica Section D, vol. 74, no. 11, pp. 1085–1095, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [7].Liu R, Freund Y, and Spraggon G, “Image-based crystal detection: a machine-learning approach,” Acta Crystallographica Section D: Biological Crystallography, vol. 64, no. 12, pp. 1187–1195, 2008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [8].Bruno AE, Charbonneau P, Newman J, Snell EH, So DR, Vanhoucke V, Watkins CJ, Williams S, and Wilson J, “Classification of crystallization outcomes using deep convolutional neural networks,” PLOS one, vol. 13, no. 6, p. e0198883, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [9].Ke T-W, Brewster AS, Yu SX, Ushizima D, Yang C, and Sauter NK, “A convolutional neural networkbased screening tool for xray serial crystallography,” Journal of synchrotron radiation, vol. 25, no. 3, pp. 655–670, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [10].Tomanicek SJ, Blakeley MP, Cooper J, Chen Y, Afonine PV, and Coates L, “Neutron diffraction studies of a class a -lactamase toho-1 e166a/r274n/r276n triple mutant,” Journal of Molecular Biology, vol. 396, no. 4, pp. 1070–1080, 2010. [DOI] [PubMed] [Google Scholar]
- [11].Langan PS, Vandavasi VG, Cooper SJ, Weiss KL, Ginell SL, Parks JM, and Coates L, “Substrate binding induces conformational changes in a class a -lactamase that prime it for catalysis,” ACS Catalysis, vol. 8, no. 3, pp. 2428–2437, 2018. [Google Scholar]
- [12].Coates L, Cuneo MJ, Frost MJ, He J, Weiss KL, McFeeters H, Tomanicek SJ, Vandavasi VG, Langan P, and Iverson EB, “The macromolecular neutron diffractometer mandi at the spallation neutron source,” Journal of Applied Crystallography, vol. 48, no. 4, 2015. [Google Scholar]
- [13].Arnold O, Bilheux J-C, Borreguero J, Buts A, Campbell SI, Chapon L, Doucet M, Draper N, Leal RF, and Gigg M, “Mantiddata analysis and visualization package for neutron scattering and sr experiments,” Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, vol. 764, pp. 156–166, 2014. [Google Scholar]
- [14].Campbell J, “Lauegen, an x-windows-based program for the processing of laue diffraction data,” Journal of Applied Crystallography, vol. 28, no. 2, pp. 228–236, 1995. [Google Scholar]
- [15].Adams PD, Afonine PV, Bunkczi G, Chen VB, Davis IW, Echols N, Headd JJ, Hung L-W, Kapral GJ, and Grosse- Kunstleve RW, “Phenix: a comprehensive python-based system for macro-molecular structure solution,” Acta Crystallographica Section D: Biological Crystallography, vol. 66, no. 2, pp. 213–221, 2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [16].Ronneberger O, Fischer P, and Brox T, ‘U-net: Convolutional networks for biomedical image segmentation,” in International Conference on Medical image computing and computer-assisted intervention Springer, Conference Proceedings, pp. 234–241. [Google Scholar]
- [17].Ioffe S and Szegedy C, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” arXiv preprint arXiv:1502.03167, 2015. [Google Scholar]
- [18].Srivastava N, Hinton G, Krizhevsky A, Sutskever I, and Salakhut-dinov R, “Dropout: a simple way to prevent neural networks from over-fitting,” The Journal of Machine Learning Research, vol. 15, no. 1, pp. 1929–1958, 2014. [Google Scholar]
- [19].Chollet F et al. , “Keras,” 2015. [Google Scholar]
- [20].Abadi M, Barham P, Chen J, Chen Z, Davis A, Dean J, Devin M, Ghemawat S, Irving G, and Isard M, “Tensorflow: a system for large-scale machine learning,” in OSDI, vol. 16, Conference Proceedings, pp. 265–283. [Google Scholar]
- [21].Kingma DP and Ba J, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. [Google Scholar]
- [22].Diederichs K and Karplus PA, “Improved r-factors for diffraction data analysis in macromolecular crystallography,” Nature Structural and Molecular Biology, vol. 4, no. 4, p. 269, 1997. [DOI] [PubMed] [Google Scholar]
- [23].Karplus PA and Diederichs K, “Linking crystallographic model and data quality,” Science, vol. 336, no. 6084, pp. 1030–1033, 2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [24].Hahn T, Shmueli U, and Wilson AJC, International tables for crystallography. Reidel Dordrecht, 1983, vol. 1. [Google Scholar]
- [25].Long J, Shelhamer E, and Darrell T, “Fully convolutional networks for semantic segmentation,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2015, pp. 3431–3440. [DOI] [PubMed] [Google Scholar]
- [26].Yu F and Koltun V, “Multi-scale context aggregation by dilated convolutions,” arXiv preprint arXiv:1511.07122, 2015. [Google Scholar]
- [27].Wang P, Chen P, Yuan Y, Liu D, Huang Z, Hou X, and Cottrell G, “Understanding convolution for semantic segmentation,” in 2018 IEEE Winter Conference on Applications of Computer Vision (WACV) IEEE, 2018, pp. 1451–1460. [Google Scholar]





