Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Nov 4;57(Pt 6):1984-1995.
doi: 10.1107/S1600576724009506. eCollection 2024 Dec 1.

AnACor2.0: a GPU-accelerated open-source software package for analytical absorption corrections in X-ray crystallography

Affiliations

AnACor2.0: a GPU-accelerated open-source software package for analytical absorption corrections in X-ray crystallography

Yishun Lu et al. J Appl Crystallogr. .

Abstract

Analytical absorption corrections are employed in scaling diffraction data for highly absorbing samples, such as those used in long-wavelength crystallography, where empirical corrections pose a challenge. AnACor2.0 is an accelerated software package developed to calculate analytical absorption corrections. It accomplishes this by ray-tracing the paths of diffracted X-rays through a voxelized 3D model of the sample. Due to the computationally intensive nature of ray-tracing, the calculation of analytical absorption corrections for a given sample can be time consuming. Three experimental datasets (insulin at λ = 3.10 Å, thermolysin at λ = 3.53 Å and thaumatin at λ = 4.13 Å) were processed to investigate the effectiveness of the accelerated methods in AnACor2.0. These methods demonstrated a maximum reduction in execution time of up to 175× compared with previous methods. As a result, the absorption factor calculation for the insulin dataset can now be completed in less than 10 s. These acceleration methods combine sampling, which evaluates subsets of crystal voxels, with modifications to standard ray-tracing. The bisection method is used to find path lengths, reducing the complexity from O(n) to O(log2 n). The gridding method involves calculating a regular grid of diffraction paths and using interpolation to find an absorption correction for a specific reflection. Additionally, optimized and specifically designed CUDA implementations for NVIDIA GPUs are utilized to enhance performance. Evaluation of these methods using simulated and real datasets demonstrates that systematic sampling of the 3D model provides consistently accurate results with minimal variance across different sampling ratios. The mean difference of absorption factors from the full calculation (without sampling) is at most 2%. Additionally, the anomalous peak heights of sulfur atoms in the Fourier map show a mean difference of only 1% compared with the full calculation. This research refines and accelerates the process of analytical absorption corrections, introducing innovative sampling and computational techniques that significantly enhance efficiency while maintaining accurate results.

Keywords: CUDA acceleration; absorption correction; long-wavelength crystallography; ray-tracing; software.

PubMed Disclaimer

Figures

Figure 1
Figure 1
Schematic diagram of ray-tracing traversal algorithm with a ray traversing from bottom left to top right.
Figure 2
Figure 2
A ray-tracing path marked in white for a tomographic reconstruction slice of thermolysin (black, vacuum; red, crystal; yellow, loop; blue, mother liquor). Two subplots in the green dashed regions demonstrate the zigzag patterns where all the pixels on the ray-tracing path are marked in white. The diffracted path contains a large region of vacuum/air.
Figure 3
Figure 3
Histograms of absorption factors for different systematic sampling ratios (orange) of a random reflection of thaumatin, compared with that of no-sampling (blue). The overlapping areas of the no-sampling and sampled histograms are shown in dark orange. When the ratio rises to 0.5%, the P values of the KS test (Massey, 1951 ▸) become greater than 0.95, failing to reject the null hypothesis, and the two histograms mostly overlap.
Figure 4
Figure 4
Illustration of gridding interpolation algorithm. There are N absorption grids, the same number as the crystal voxels with a shape of (360, 180). Each grid point is an angular-dependent exponent of the absorption factor.
Figure 5
Figure 5
Mean absorption factor differences (%) between sampling and no-sampling (a) and between acceleration methods and no-sampling (b) for test crystal datasets across various sampling ratios. The sampling methods in (b) are all systematic. The error bars represent one standard deviation.
Figure 6
Figure 6
Mean anomalous peak height differences (%) of sulfur atoms between sampling and no-sampling (a) and between acceleration methods and no-sampling (b) for test crystal datasets across various sampling ratios. The error bars represent the maximum and minimum differences.
Figure 7
Figure 7
Average time spent on processing sampling methods for 10 runs. They are all determined on the same node with an Intel Xeon Platinum 8268 CPU with 48 cores.
Figure 8
Figure 8
Top: computational time taken by different acceleration methods across sampling ratios. Bottom: computational time taken by acceleration methods with a systematic sampling ratio of 0.5% to process increasing numbers of reflections. The black dotted line indicates the number of reflections in each experimental dataset, with computational times presented in the legend.
Figure 9
Figure 9
Computational time taken by different NVIDIA computational accelerator cards.

References

    1. Albrecht, G. (1939). Rev. Sci. Instrum.10, 221–222.
    1. Amanatides, J. & Woo, A. (1987). EG1987 Proceedings (Technical Papers). Eindhoven: Eurographics Association.
    1. Angel, R. J. (2004). J. Appl. Cryst.37, 486–492.
    1. Beilsten-Edmands, J., Winter, G., Gildea, R., Parkhurst, J., Waterman, D. & Evans, G. (2020). Acta Cryst. D76, 385–399. - PMC - PubMed
    1. Bruker (2016). SADABS. Bruker AXS Inc., Madison, Wisconsin, USA.