X-ray diffraction forward simulation and crystal structure inversion method and system for dynamic phase structure detection, computer readable storage medium and computer program product
By constructing a composite detector model and a multi-point matching strategy, combined with statistical sampling and collimation aperture occlusion model, the accuracy and efficiency issues of crystal structure analysis under extreme conditions were solved, achieving high-precision crystal structure inversion and spectrum reconstruction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI INST OF LASER PLASMA CHINA ACAD OF ENG PHYSICS
- Filing Date
- 2026-06-01
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies for crystal structure diagnosis under extreme conditions such as high pressure and strong laser loading have limitations in composite geometry processing capabilities, insufficient accuracy in simulating physical effects under extreme conditions, and low efficiency in multi-faceted synergistic inversion, resulting in limitations in the accuracy and efficiency of crystal structure analysis.
By employing a composite detector model, combined with a multi-point matching strategy and statistical sampling simulation, and through analytical intersection calculation and collimation aperture occlusion model, we can achieve accurate processing of rays and composite surfaces, eliminate projection errors, avoid local optima, and improve the global crystal orientation inversion capability.
It significantly improves the accuracy and efficiency of crystal structure analysis under extreme dynamic conditions, enhances the consistency between simulated speckles and experimental images, and supports high-precision analysis under strong laser loading or shock wave compression conditions.
Smart Images

Figure CN122455191A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computational physics and materials science, and in particular to a method, system, computer-readable storage medium, and computer program product for X-ray diffraction forward simulation and crystal structure inversion for dynamic phase structure detection. Background Technology
[0002] In experiments under extreme conditions such as dynamic high pressure, intense laser-driven matter interaction, and shock wave loading, X-ray diffraction is a core tool for diagnosing the crystal structure, phase transition behavior, and compressibility of materials. To obtain a larger solid angle of detection, modern high-energy X-ray diffraction experiments driven by intense lasers commonly employ composite surface detector structures, such as combining a flat panel detector with a semi-cylindrical detector, to achieve large solid angle coverage (up to...). sphericity) and wide scattering angle range ( This allows for simultaneous detection of multiple X-ray backlights and improves the efficiency of diffraction signal collection during dynamic compression.
[0003] However, existing methods have the following shortcomings in addressing the need for crystal structure diagnosis under extreme conditions such as high pressure and strong laser loading: First, the processing capability for composite geometry is limited. Traditional analysis software (such as GSAS-II, DIOPTAS, CrysTBox, etc.) is mainly developed based on idealized planar or single cylindrical detector models. For detector geometries such as composite surfaces combining cuboids and semi-cylinders, existing projection algorithms are difficult to fully adapt, resulting in deviations in high-angle regions. The geometric models of composite detectors are too simplified and cannot accurately process composite surface detectors that combine at least two geometric regions.
[0004] Second, the accuracy of simulating physical effects under extreme conditions needs to be improved. In high-pressure dynamic experiments, samples often exhibit complex physical effects such as diffraction broadening caused by mosaic spread and vignetting at the edge of the collimation hole. Existing methods are mostly designed for conventional static experiments and cannot simultaneously simulate the real physical effects unique to extreme conditions such as mosaic spread and vignetting at the edge of the collimation hole.
[0005] Third, the efficiency of multi-faceted synergistic inversion faces a bottleneck. For experimentally observed multiple diffraction spots, existing inversion methods face a trade-off between global search capability and computational efficiency when simultaneously matching multiple crystal facet families. They are prone to getting trapped in local optima and lack efficient global crystal orientation inversion capabilities.
[0006] The aforementioned problems severely limit the accuracy and efficiency of crystal structure analysis under high-pressure experimental conditions. Therefore, it is necessary to provide an X-ray diffraction forward simulation and crystal structure inversion method suitable for high-power laser-driven dynamic compression environments to improve the geometric description accuracy of composite detectors, the simulation capability of physical effects under extreme conditions, and the global crystal orientation inversion capability, thereby improving the accuracy and efficiency of crystal structure analysis under high-pressure experimental conditions. Summary of the Invention
[0007] The purpose of this application is to provide a method, system, computer-readable storage medium, and computer program product for X-ray diffraction forward simulation and crystal structure inversion for dynamic phase structure detection, which aims to improve the accuracy and efficiency of crystal structure analysis under high-pressure experimental conditions.
[0008] In a first aspect, this application provides a method for forward simulation of X-ray diffraction and inversion of crystal structure for dynamic phase structure detection. The method includes: establishing a three-dimensional Cartesian coordinate system with the center of the detector plane as the origin; mathematically modeling the surface of the detector as a composite detector model of at least two smoothly combined geometric regions; defining a geometric algorithm for finding the intersection of rays and composite surfaces; wherein at least one geometric region is a surface; inverting crystal orientation based on experimentally measured diffraction data using a multi-point matching strategy; calculating theoretical diffraction vectors based on crystal orientation; simulating ray divergence caused by crystal mosaicism using statistical sampling; establishing a collimating aperture model to calculate ray occlusion and obtain rays passing through the collimating aperture; transmitting rays through the collimating aperture to the composite detector model for two-dimensional unfolding to generate a two-dimensional unfolded image; reading the two-dimensional unfolded image, extracting non-background pixels, and transforming the pixel coordinates from the detector coordinate space to the diffraction angle space using an inverse mapping function to obtain a reconstructed diffraction pattern.
[0009] The X-ray diffraction forward simulation and crystal structure inversion method provided in this application for dynamic phase structure detection achieves analytical intersection calculation between the X-ray and the composite surface by constructing a composite detector model combining at least two geometric regions (at least one of which is a surface). This eliminates the projection error caused by the traditional single geometric model in the detector edge region, significantly improving the accuracy of geometric modeling. A multi-point matching strategy is used to invert crystal orientation, effectively avoiding local optima and quickly and accurately inverting the crystal's spatial attitude. By introducing statistical sampling mosaicism simulation and a physical collimation aperture occlusion model, the broadening of diffraction spots and edge cutting effects in experimental images can be successfully reproduced, significantly improving the consistency between simulated spots and experimental images. Therefore, the method in this application is suitable for extreme dynamic conditions such as strong laser loading or shock wave compression, improving the accuracy and efficiency of crystal structure analysis.
[0010] In conjunction with the first aspect, in an optional embodiment of this application, one geometric region is a planar region and the other is a cylindrical region; wherein, the planar region is a cuboid planar region, which is a rectangular area along the depth and width directions of the detector; the cylindrical region is a semi-cylindrical curved surface region, which is a semi-cylindrical surface area protruding along the depth direction of the detector; the geometric algorithm for finding the intersection of the ray and the composite surface includes: first determining the intersection of the incident ray and the semi-cylindrical curved surface region; if the incident ray and the semi-cylindrical curved surface region do not intersect, then determining the intersection of the incident ray and the cuboid planar region; and using an analytical solution method that combines the parameterized ray equation and the surface equation to calculate the coordinates of the hit point.
[0011] The above technical solution helps to further eliminate the projection error caused by the traditional single geometric model in the detector edge area, significantly improves the simulation accuracy, and can analytically solve the precise position of the physical impact point.
[0012] In conjunction with the first aspect, in an optional implementation of this application, the multi-point matching strategy includes: for multiple diffraction spots observed in the experiment, a multi-point matching search algorithm is adopted, the minimum matching number threshold is set to 1, and the entire orientation space is traversed to find a rotation matrix that can simultaneously satisfy the Bragg diffraction conditions of multiple crystal plane families.
[0013] The above technical solution enables global traversal of the complete orientation space, which helps to further and effectively avoid the problem of local optima, and thus enables the rapid and accurate inversion of the spatial orientation of the crystal from complex experimental spots.
[0014] Optionally, the multi-point matching search algorithm uses the Fibonacci sphere grid algorithm to generate uniformly distributed sampling points on a unit sphere and traverse the entire orientation space for search.
[0015] In conjunction with the first aspect, in an optional embodiment of this application, the step of using statistical sampling to simulate the ray divergence caused by crystal mosaicism includes: generating multiple random micro-rays for each theoretical diffraction vector; wherein the directional distribution of the micro-rays follows a predetermined probability distribution centered on the theoretical direction and with the full width at half maximum (FWHM) of the crystal mosaicism as a parameter; the step of establishing a collimating aperture model to perform ray blocking calculation includes: establishing a channel model, performing a passability test on each micro-ray, and calculating the geometric intersections of the micro-rays with the front and rear end faces of the collimating aperture; removing micro-rays that intersect with the inner wall of the collimating aperture; wherein the geometric parameters of the channel model include the channel radius and the channel thickness.
[0016] In the above technical solution, statistical sampling is used to generate random micro-rays that follow a predetermined probability distribution to simulate the mosaic effect. A solid channel model is established and the blocked rays are eliminated by geometric intersection to simulate the collimation aperture halo. This is beneficial to further improve the consistency between the morphology, size and intensity distribution of the simulated spots and the experimental images.
[0017] In conjunction with the first aspect, in an optional embodiment of this application, the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes: after obtaining the reconstructed diffraction pattern, performing full-spectrum simulation verification; the full-spectrum simulation verification steps include: calculating the atomic scattering factor, calculating the structure factor based on the atomic scattering factor, calculating the relative intensity of each diffraction peak in the reconstructed diffraction pattern based on the structure factor, and generating a continuous intensity-2 Spectrum; continuous intensity -2 The reconstructed diffraction pattern was compared and verified with the molecular dynamics simulation results to determine whether it was reasonable.
[0018] In the above technical solution, forward simulation verification using preset atomic positions can integrate the crystal structure inversion results with the molecular dynamics simulation results for verification, realizing a complete integrated process from crystal structure inversion to spectrum comparison verification for high-power laser-driven experiments.
[0019] In conjunction with the first aspect, in optional embodiments of this application, the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes: 3D visualization of the crystal structure based on crystal orientation; the steps of 3D visualization of the crystal structure include: transforming the atomic coordinates from the crystallographic coordinate system to the laboratory coordinate system according to the rotation matrix of the crystal orientation; plotting the atomic distribution using a 3D scatter plot and plotting the crystal axis indicators in the image to generate a 3D supercell visualization image of the theoretical crystal structure.
[0020] In the above technical solution, the rationality of the structure inversion results can be intuitively verified by comparing crystal structure images under different orientations.
[0021] Optionally, the structure file output from the molecular dynamics simulation can be used to perform 3D visualization of the crystal structure, analyze the atomic coordinates, lattice matrix and boundary conditions in the simulation box, and convert the atomic positions of the MD simulation into 3D visualization images in the laboratory coordinate system.
[0022] In conjunction with the first aspect, in the optional embodiments of this application, the diffraction data includes multiple sets of X-ray diffraction experimental data at different times, and the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes: phase transition detection; the steps of phase transition detection include: inverting each set of X-ray diffraction experimental data to obtain the corresponding crystal orientation, detecting the evolution of the crystal orientation, identifying phase transition events and outputting a phase transition report.
[0023] The above technical solution enables dynamic phase transition monitoring driven by high-intensity laser.
[0024] Secondly, this application provides an X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection. This system is used to execute the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection as provided in any of the first aspects above. The system includes: a geometric modeling module, a crystallography calculation module, a ray tracing module, and a coordinate transformation module. The geometric modeling module is used to establish a composite detector model and to implement a geometric algorithm for finding the intersection of rays and composite surfaces. The crystallography calculation module is used to calculate theoretical diffraction vectors. The ray tracing module is used to perform statistical sampling and ray occlusion calculations. The coordinate transformation module is used to execute the inverse mapping function.
[0025] The X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection described in this application is used to perform the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection provided in any of the first aspects above. Therefore, the system is suitable for extreme dynamic conditions such as strong laser loading or shock wave compression, and can improve the accuracy and efficiency of crystal structure analysis.
[0026] Optionally, the X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection also includes a data comparison module; the data comparison module is used to compare continuous intensity -2 The spectra were compared and verified with the molecular dynamics simulation results; among them, the continuous intensity -2 The spectrum is generated based on the relative intensities of each diffraction peak in the reconstructed diffraction pattern.
[0027] Thirdly, this application provides a computer-readable storage medium for dynamic phase structure detection, the computer-readable storage medium storing a computer program, the computer program being executed by a processor to implement the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection as provided in any of the first aspects above.
[0028] Fourthly, this application provides a computer program product for dynamic phase structure detection, the computer program product including a computer program, which is executed by a processor to implement the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection as provided in any of the first aspects above. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a schematic diagram illustrating the principle of the geometric model for statistical sampling simulation of crystal mosaicism effect and collimation aperture occlusion in this application.
[0031] Figure 2 This is a schematic diagram of the geometric model and coordinate system definition of the composite detector in an embodiment of this application.
[0032] Figure 3 A 3D supercell visualization of a single-crystal diamond crystal structure generated for an embodiment of this application.
[0033] Figure 4 A two-dimensional unfolded diagram generated for an embodiment of this application.
[0034] Figure 5 The reconstructed diffraction pattern generated for the embodiments of this application.
[0035] Figure 6 Strength-2 generated for the embodiments of this application Atlas. Detailed Implementation
[0036] This application provides a method for X-ray diffraction forward simulation and crystal structure inversion for dynamic phase structure detection, the method comprising: A three-dimensional Cartesian coordinate system is established with the center of the detector plane as the origin. The surface of the detector is mathematically modeled as a composite detector model with at least two geometric regions smoothly combined. A geometric algorithm for finding the intersection of a ray and a composite surface is defined; wherein at least one geometric region is a surface. Based on the experimentally measured diffraction data, a multi-point matching strategy was used to invert the crystal orientation; Based on the theoretical calculation of diffraction vectors by crystal orientation, statistical sampling is used to simulate the ray divergence caused by crystal mosaicism, and a collimation aperture model is established to calculate ray blocking and obtain the rays passing through the collimation aperture. The rays passing through the collimation aperture are transmitted to the composite detector model and unfolded in two dimensions to generate a two-dimensional unfolded image. The two-dimensional unfolded image is read, non-background pixels are extracted, and the pixel coordinates are transformed from the detector coordinate space to the diffraction angle space through the inverse mapping function to obtain the reconstructed diffraction pattern.
[0037] The X-ray diffraction forward simulation and crystal structure inversion method provided in this application for dynamic phase structure detection achieves analytical intersection calculation between the X-ray and the composite surface by constructing a composite detector model combining at least two geometric regions (and at least one of the geometric regions is a surface). This eliminates the projection error caused by the traditional single geometric model in the detector edge region and significantly improves the accuracy of geometric modeling. The multi-point matching strategy is used to invert crystal orientation, which can effectively avoid local optima and quickly and accurately invert the crystal spatial attitude. By introducing statistical sampling mosaicism simulation and physical collimation aperture occlusion model, the diffraction spot broadening and edge cutting effect in the experimental image can be successfully reproduced, significantly improving the consistency between the simulated spot and the experimental image.
[0038] Therefore, the method of this application is applicable to extreme dynamic conditions such as strong laser loading or shock wave compression, which can improve the accuracy and efficiency of crystal structure analysis.
[0039] The following provides a detailed description of the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection provided in this application. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection includes the following steps: S1. Establish a three-dimensional Cartesian coordinate system with the center of the detector plane as the origin. Mathematically model the detector surface as a composite detector model with at least two geometric regions smoothly combined. Define a geometric algorithm for finding the intersection of a ray and a composite surface; wherein at least one geometric region is a surface.
[0040] In some optional embodiments of this application, one geometric region is a planar region and the other is a cylindrical region; wherein, the planar region is a cuboid planar region, defined as a rectangular range along the depth and width directions of the detector; the cylindrical region is a semi-cylindrical curved surface region, defined as a semi-cylindrical surface range protruding along the depth direction of the detector, satisfying the cylindrical surface equation.
[0041] Correspondingly, the geometric algorithm for finding the intersection of a ray and a composite surface includes: first, determining the intersection of the incident ray with the semi-cylindrical surface region; if the incident ray does not intersect the semi-cylindrical surface region, then determining the intersection of the incident ray with the cuboid plane region; and finally, using an analytical solution method that combines the parameterized ray equations and surface equations to calculate the coordinates of the impact point. This approach helps to further eliminate projection errors caused by traditional single geometric models in the detector edge region, significantly improving simulation accuracy and enabling analytical solutions to the precise location of the physical impact point.
[0042] Specifically, for each diffraction ray emitted from the sample, the precise location of the physical impact point is analytically solved by simultaneously solving the parameterized ray equation and the surface equation.
[0043] S2, based on experimentally measured diffraction data, uses a multi-point matching strategy to invert crystal orientation.
[0044] In this application, a reverse inference strategy based on experimental data is used to invert the crystal structure.
[0045] In some optional embodiments of this application, the multi-point matching strategy includes: for multiple diffraction spots observed experimentally, employing a multi-point matching search algorithm, setting a minimum matching threshold of 1, traversing the complete orientation space to find a rotation matrix that simultaneously satisfies the Bragg diffraction conditions of multiple crystal plane families, and locking the optimal crystal orientation by minimizing the weighted angular residual. This global search method enables a global traversal of the complete orientation space, which helps to further and effectively avoid local optima problems, thereby enabling the rapid and accurate deduction of the crystal's spatial orientation from complex experimental spots.
[0046] Furthermore, the multi-point matching search algorithm uses the Fibonacci sphere grid algorithm to generate uniformly distributed sampling points on a unit sphere and traverses the complete orientation space for search.
[0047] Specifically, a global blind scan mode is used for crystal orientation inversion. Unlike the traditional tilt optimization mode, the global blind scan mode can naturally handle peaks that cannot be precisely matched—when the diffraction direction of a certain crystal plane family deviates from the experimentally observed peak position, the system records the deviation value instead of directly excluding it. By setting the minimum number of matches to 1, the system performs independent orientation searches for all input experimental peaks and outputs the best matching orientation and its deviation data for each peak. This design allows users to obtain complete deviation distribution data, perform manual comparison and analysis, and select the most suitable crystal orientation as the excitation angle for each diffraction peak after comprehensive consideration from multiple perspectives.
[0048] In some optional embodiments of this application, the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes: 3D visualization of the crystal structure based on crystal orientation. The steps of 3D visualization of the crystal structure include: transforming the atomic coordinates from the crystallographic coordinate system to the laboratory coordinate system according to the rotation matrix of the crystal orientation; plotting the atomic distribution using a 3D scatter plot, distinguishing different atomic types with different colors and sizes; and plotting crystal axis indicators in the image to represent the laboratory coordinate system and crystallographic orientation, generating a 3D supercell visualization image of the theoretical crystal structure. This method allows for intuitive verification of the rationality of the structure inversion results by comparing crystal structure images under different orientations.
[0049] Furthermore, the structure file output from the molecular dynamics (MD) simulation is used to perform 3D visualization of the crystal structure, analyze the atomic coordinates, lattice matrix and boundary conditions in the simulation box, and convert the atomic positions simulated by MD into 3D visualization images in the laboratory coordinate system.
[0050] Specifically, a separate XRD_MD_Processor module is used to read .lmp format files output by molecular dynamics software such as LAMMPS and analyze the atomic coordinates, lattice matrix, and boundary conditions within the simulation chamber. This module can directly convert the actual atomic positions obtained from the MD simulation (which may include real structural features such as lattice distortion, dislocations, and defects) into 3D visualization images. Compared to ideal crystal structures, MD simulation results can more realistically reflect the atomic arrangement characteristics in experimental samples, including lattice distortion, stress distribution, and microscopic defects. The 3D visualization images also support supercell expansion display and are labeled with crystal orientation indicators. By comparing the diffraction patterns from the MD simulation with the experimentally measured diffraction patterns, the physical rationality of the structure inversion results can be verified.
[0051] In some optional embodiments of this application, the diffraction data includes multiple sets of X-ray diffraction experimental data at different times. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes phase transition detection. The steps of phase transition detection include: inverting each set of X-ray diffraction experimental data to obtain the corresponding crystal orientation, detecting the evolution of the crystal orientation, identifying phase transition events, and outputting a phase transition report. The above method can realize high-power laser-driven dynamic phase transition monitoring.
[0052] In some optional embodiments of this application, the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes: crystal phase identification. The steps of crystal phase identification include: performing inversion based on X-ray diffraction experimental data to identify the crystal orientation of the sample under test during dynamic loading; and outputting the crystal orientation identification result.
[0053] S3, based on the theoretical diffraction vector calculated by crystal orientation, uses statistical sampling to simulate the ray divergence caused by crystal mosaicism, and establishes a collimation aperture model to calculate ray blocking, thus obtaining the rays passing through the collimation aperture.
[0054] In this application, statistical sampling mosaicism simulation and physical collimation aperture occlusion model are introduced, the principle of which is as follows: Figure 1 As shown, the real texture features in the experimental images can be reproduced.
[0055] In some optional embodiments of this application, the step of using statistical sampling to simulate the ray divergence caused by crystal mosaicism for the mosaicism effect includes: generating multiple random micro-rays for each theoretical diffraction vector; wherein the directional distribution of the micro-rays follows a predetermined probability distribution centered on the theoretical direction and with the crystal mosaicism half-width as a parameter.
[0056] To address collimation aperture obstruction, the steps for establishing a collimation aperture model to calculate ray obstruction include: establishing a channel model, performing a passability test on each microray, and calculating the geometric intersection points of the microray with the front and rear end faces of the collimation aperture; removing microrays that intersect with the inner wall of the collimation aperture; wherein, the geometric parameters of the channel model include the channel radius and the channel thickness.
[0057] This application uses statistical sampling to generate random micro-rays that follow a predetermined probability distribution to simulate the mosaic effect. A solid channel model is established and the blocked rays are eliminated by geometric intersection to accurately simulate the halo effect of the collimation hole. This is beneficial to further improve the consistency between the morphology, size and intensity distribution of the simulated spots and the experimental images.
[0058] S4, the rays transmitted through the collimating aperture are projected onto the composite detector model for two-dimensional unfolding to generate a two-dimensional unfolded image; the two-dimensional unfolded image is read, non-background pixels are extracted, and the pixel coordinates are transformed from the detector's coordinate space to the diffraction angle space using an inverse mapping function. ), thus obtaining the reconstructed diffraction pattern.
[0059] Specifically, in this application, the three-dimensional impact point on the detector surface is converted into two-dimensional planar coordinates through coordinate expansion to generate a simulated spot distribution; then, an optimized sparsity processing algorithm is used to extract only non-background pixels, and their physical coordinates are calculated through an inverse mapping function (2 , ), and reconstructed the spectrum of the diffraction angle space using the cumulative array technique.
[0060] S5, perform full-spectrum simulation verification.
[0061] In some optional embodiments of this application, the steps of full-spectrum simulation verification include: calculating the atomic scattering factor, and calculating the structure factor based on the atomic scattering factor. Based on structural factors Calculate the relative intensities of each diffraction peak in the reconstructed diffraction pattern to generate a continuous intensity-2. Spectrum; continuous intensity -2 The reconstructed diffraction pattern was compared and verified with the molecular dynamics simulation results to determine whether it was reasonable.
[0062] The above method, using preset atomic positions for forward simulation verification, can integrate the crystal structure inversion results with the molecular dynamics simulation results for verification, realizing a complete integrated process from crystal structure inversion to spectrum comparison verification for high-power laser-driven experiments.
[0063] In some optional embodiments of this application, the system supports two verification modes: (1) forward simulation verification using preset atomic positions; (2) directly accessing the structure file output by molecular dynamics simulation to obtain atomic coordinates containing real structural features such as lattice distortion, dislocations, and defects. While outputting the crystal orientation rotation matrix, the system simultaneously outputs the three-dimensional positions of atoms in the laboratory coordinate system under that orientation. Combined with the initial state data, the evolution trajectory of the crystal structure during dynamic compression can be clearly described, achieving a clear description of the evolution trajectory during compression. By comparing the full-spectrum diffraction pattern with experimental data or molecular dynamics simulation results, automated verification of the crystal structure inversion results is achieved.
[0064] In some optional embodiments of this application, after crystal structure inversion and simulation verification, the crystal structure parameters under high-pressure conditions driven by a strong laser are output, thereby realizing the analysis of dynamic high-pressure X-ray diffraction data driven by a strong laser.
[0065] This application also provides an X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection, which is used to execute the aforementioned X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection.
[0066] The X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection includes: a geometric modeling module, a crystallographic calculation module, a ray tracing module, and a coordinate transformation module.
[0067] The geometric modeling module is used to build the composite detector model and to implement the geometric algorithm for finding the intersection of rays and composite surfaces.
[0068] The crystallography calculation module is used to calculate theoretical diffraction vectors.
[0069] The ray tracing module is used to perform statistical sampling and ray occlusion calculations.
[0070] The coordinate transformation module is used to execute the inverse mapping function, that is, to realize the mapping and reconstruction from the detector plane to the diffraction angle space.
[0071] The X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection provided in this application is used to execute the aforementioned X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection. Therefore, this system is suitable for extreme dynamic conditions such as strong laser loading or shock wave compression, and can improve the accuracy and efficiency of crystal structure analysis.
[0072] In this application, the crystallography calculation module is used to calculate the diffraction parameters and theoretical intensities of each crystal plane family.
[0073] In some optional embodiments of this application, the X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection further includes a memory and a processor; the memory stores an executable program, and the processor executes the executable program.
[0074] Furthermore, in some optional embodiments of this application, the X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection also includes a data comparison module; the data comparison module is used to generate a comparison verification diagram of experimental data and simulation results.
[0075] Specifically, the data comparison module is used to compare continuous intensity -2 The spectra were compared and verified with the molecular dynamics simulation results; among them, the continuous intensity -2 The spectrum is generated based on the relative intensities of each diffraction peak in the reconstructed diffraction pattern. Continuous intensity -2 For instructions on obtaining the atlas, please refer to the aforementioned content; details will not be repeated here.
[0076] This application also provides a computer-readable storage medium for dynamic phase structure detection, the computer-readable storage medium storing a computer program, the computer program being executed by a processor to implement the aforementioned X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection.
[0077] This application also provides a computer program product for dynamic phase structure detection, the computer program product including a computer program, which is executed by a processor to implement the aforementioned X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection.
[0078] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below. Where specific conditions are not specified in the embodiments, conventional conditions or conditions recommended by the manufacturer shall apply. Reagents or instruments whose manufacturers are not specified are all conventional products that can be purchased commercially.
[0079] Example This embodiment provides a method for structural inversion and spectral reconstruction under dynamic compression of single-crystal diamond, applied to the analysis of XRD data obtained from high-pressure impact experiments, with the sample being single-crystal diamond; specifically, it includes the following steps: (1) Geometric modeling Construct a composite detector model, such as Figure 2 As shown. Figure 2 In the diagram, region 1 represents a semi-cylindrical curved surface detector region with a semi-circular cross-section and a radius of curvature of R; region 2 represents a cuboid planar detector region with a depth of R. 3 is the sample position, located in front of the detector; 4 is the incident X-ray; O is the origin of the detector plane center; coordinate system definition: the x-axis points to the outside of the detector (i.e., the opposite direction of the incident ray), the y-axis is along the width direction of the detector, and the z-axis is along the height direction of the detector.
[0080] Based on the actual dimensions of the detector used in the experiment, the geometric parameters were set as follows: semi-cylinder radius R = 42.5 mm, detector height H = 11.5 mm, and cuboid depth... mm, the half-width of the cuboid is w=39mm. A global coordinate system (3D Cartesian coordinate system) is established, with the origin located at the center of the outermost plane of the cuboid. The sample position is set to (-1.8, 0, 0) mm according to the installation distance of the experimental setup. A ray-surface intersection algorithm is implemented in the computer program, with the intersection priority order as follows: semi-cylindrical surface → step surface → sidewall → backplate plane.
[0081] The ray-surface intersection algorithm first determines the intersection of the incident ray with the semi-cylindrical surface region; if the incident ray does not intersect with the semi-cylindrical surface region, it then determines the intersection of the incident ray with the cuboid plane region; and finally, it uses the analytical solution method of simultaneously parametric ray equations and surface equations to calculate the coordinates of the hit point.
[0082] (2) Structural inversion Input the diffraction peaks measured in the experiment ( The data was analyzed using a global blind scan mode for crystal orientation inversion, with a minimum matching quantity of 1 to achieve a global search. This mode employs the Fibonacci sphere lattice algorithm to generate uniformly distributed sampling points on a unit sphere, traversing the complete orientation space for a complete search. For each sampled orientation, the deviation between the theoretical diffraction direction and the experimental observation direction of the target crystal plane family was calculated to identify the crystal orientation that satisfies the excitation conditions.
[0083] The number of sampling points was set to 600,000, corresponding to an angular resolution of approximately 0.05°. The Phi rotational scanning step size was set to 0.01°, and the maximum excitation deviation threshold was set to 0.9.
[0084] (3) Simulation of physical effects Based on the determined crystal orientation, the theoretical diffraction vector is calculated. The Monte Carlo module is enabled, and the half-width at half-maximum (FWHM) of the mosaicking is determined according to the experimentally measured crystal quality. In this embodiment, FWHM = 1.5° is chosen based on the measured angular broadening of the diffraction spots. The number of rays generated in each diffraction direction must meet the statistical convergence requirement; in this embodiment, 5000 rays are used. The directional distribution of the rays follows a predefined Gaussian distribution. The collimating aperture radius is determined based on the balance between spatial resolution and X-ray flux; in this embodiment, r = 0.25 mm, and the thickness t = 0.1 mm is chosen, with the aperture placed close to the back of the sample. Transmission of each microray is tested, and rays intersecting the inner wall of the collimating aperture are removed, simulating the signal attenuation characteristics at the edges of the experimental image.
[0085] (4) Visualization of crystal structure Based on the crystal orientation determined by inversion (rotation matrices R_tilt and Rx), a 3D supercell visualization image of the theoretical crystal structure is generated. First, the `generate_unit_cell_atoms` function is called to obtain the atomic fraction coordinates of the standard unit cell, generating the corresponding atomic arrangement according to the crystal structure type. Then, the atomic coordinates are transformed from the crystallographic coordinate system to the laboratory coordinate system using the rotation matrices: first, R_tilt is applied for crystal axis tilt rotation, and then Rx is applied for Phi rotation. Finally, a supercell of a specified size is generated, and the `scatter3` function is used to draw a 3D scatter plot, with different atomic types distinguished by different colors and sizes. RGB three-color crystal axis indicators are drawn in the corners of the image: red arrows represent the laboratory X-axis, green arrows represent the laboratory Y-axis, and blue arrows represent the laboratory Z-axis. Additionally, dashed arrows are used to draw crystal orientation indicators that follow sample rotation: red dashed arrows represent the
[100] direction, green dashed arrows represent the
[010] direction, and blue dashed arrows represent the
[001] direction, as shown below. Figure 3 As shown, by comparing crystal structure images under different orientations, the rationality of the structure inversion results can be visually verified.
[0086] (5) Map reconstruction A ray passing through a collimating aperture is projected onto the composite detector model to obtain three-dimensional coordinates (x, y, z). Applying the two-dimensional unfolding mapping formula: for cylindrical regions,
[0087] For planar regions,
[0088] Generate a simulated original image in TIF format, such as Figure 4 As shown, Figure 4The application effect of the system in the dual-phase verification mode is shown in three sub-figures: the diffraction development diagram obtained from the experiment (i.e., the "Cake" development diagram, which unfolds the diffraction data on the semi-cylinder and the planar detector into a two-dimensional planar representation).
[0089] Finally, the sparse matrix algorithm is used to read non-zero pixels and their inverse calculations are performed. and Values can be quickly reconstructed using the accumulated array technique. diffraction patterns in space (such as) Figure 5 As shown, (including mosaic broadening and halo effect), it is directly compared with the experimental diffraction development.
[0090] (6) Full spectrum verification and intensity calculation (6.1) Calculation of atomic scattering factor The ability of an atom to scatter X-rays is described by the atomic scattering factor f(s), which is related to the scattering angle. The relationship is approximated using a five-term Gaussian formula (International Tables for Crystallography Vol. C):
[0091] in, is the scattering variable; ai and bi are the element-related fitting coefficients (i=1,2,3,4), and c is the constant term.
[0092] For carbon (C, Z=6), the fitting coefficients are: a=[2.3100,1.0200,1.5886,0.8650], b=[20.8439,10.2075,0.5687,51.6512], c=0.2156.
[0093] (6.2) Calculation of structural factor The diffraction intensity of a crystal structure is determined by the structure factor. The decision is made using the following formula:
[0094] Where N is the number of atoms in the unit cell, fj is the scattering factor of the j-th atom, and (xj, yj, zj) are the fractional coordinates of the atom in the unit cell.
[0095] Modulus square of structural factor The theoretical relative intensities of the diffraction peaks are given.
[0096] (6.3) Lorentz-polarization factor The Lorentz-polarization factor is used to correct for the effects of the polarization state and geometry of the incident X-rays on the diffraction intensity.
[0097] in, It is Prague Cape.
[0098] (6.4) Calculation of full spectrum intensity Considering all the above factors, the theoretical intensity of each diffraction peak is:
[0099] (6.5) Gaussian broadening and full spectrum generation Each discrete peak is convolved using a Gaussian function to generate a continuous full spectrum:
[0100] Where G is a Gaussian function, and its standard deviation is... The relationship with the half-width at half-maximum (FWHM) is as follows:
[0101] Using the lattice constant of single-crystal diamond X-ray wavelength The atomic scattering factor uses the five Gaussian fitting coefficients of carbon, and FWHM is set to 1.5° to match the broadening of the diffraction spots observed in the experiment.
[0102] Continuous intensity generated Atlas (such as) Figure 6 By comparing the atomic structure diagram (shown) with the diffraction pattern output by molecular dynamics simulation, we can verify whether the atomic structure diagram output by the program is reasonable.
[0103] The embodiments described above are some, but not all, of the embodiments of this application. The detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A method for X-ray diffraction forward simulation and crystal structure inversion for dynamic phase structure detection, characterized in that, include: A three-dimensional Cartesian coordinate system is established with the center of the detector plane as the origin. The surface of the detector is mathematically modeled as a composite detector model of at least two geometric regions that are smoothly combined. A geometric algorithm for finding the intersection of a ray and a composite surface is defined. At least one of the geometric regions is a surface. Based on the experimentally measured diffraction data, a multi-point matching strategy was used to invert the crystal orientation; Based on the theoretical diffraction vector calculated by the crystal orientation, statistical sampling is used to simulate the ray divergence caused by the crystal mosaic degree, and a collimation aperture model is established to calculate the ray blocking and obtain the rays passing through the collimation aperture. The rays passing through the collimating aperture are transmitted to the composite detector model and unfolded in two dimensions to generate a two-dimensional unfolded image. The two-dimensional unfolded image is read, non-background pixels are extracted, and the pixel coordinates are transformed from the coordinate space of the detector to the diffraction angle space through an inverse mapping function to obtain a reconstructed diffraction pattern.
2. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection according to claim 1, characterized in that, One of the geometric regions is a planar region, and the other is a cylindrical region; wherein, the planar region is a cuboid planar region, which is a rectangular area along the depth and width directions of the detector; the cylindrical region is a semi-cylindrical curved surface region, which is a semi-cylindrical curved surface area that protrudes along the depth direction of the detector. The geometric algorithm for finding the intersection of a ray and a composite surface includes: First, determine the intersection of the incident ray with the semi-cylindrical curved surface region; if the incident ray does not intersect with the semi-cylindrical curved surface region, then determine the intersection of the incident ray with the cuboid planar region. The coordinates of the hit point are calculated by using an analytical solution method that combines the parametric ray equations and the surface equations.
3. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection according to claim 1, characterized in that, The multi-point matching strategy includes: for multiple diffraction spots observed in the experiment, a multi-point matching search algorithm is adopted, the minimum matching number threshold is set to 1, and the complete orientation space is traversed to find a rotation matrix that can simultaneously satisfy the Bragg diffraction conditions of multiple crystal plane families. Optionally, the multi-point matching search algorithm uses the Fibonacci sphere grid algorithm to generate uniformly distributed sampling points on a unit sphere and traverses the complete orientation space for search.
4. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection according to claim 1, characterized in that, The step of simulating ray divergence caused by crystal mosaicism using statistical sampling includes: For each of the theoretical diffraction vectors, multiple random micro-rays are generated; wherein the directional distribution of the micro-rays follows a predetermined probability distribution centered on the theoretical direction and with the crystal mosaic degree half-width as a parameter; The steps for establishing a collimation aperture model to perform ray blocking calculations include: establishing a channel model, performing a passability test on each microray, and calculating the geometric intersection points of the microray with the front and rear end faces of the collimation aperture; removing microrays that intersect with the inner wall of the collimation aperture; wherein, the geometric parameters of the channel model include the channel radius and the channel thickness.
5. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection according to any one of claims 1 to 4, characterized in that, The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection further includes: after obtaining the reconstructed diffraction pattern, performing full-spectrum simulation verification; The steps of the full-spectrum simulation verification include: calculating the atomic scattering factor, calculating the structure factor based on the atomic scattering factor, calculating the relative intensity of each diffraction peak in the reconstructed diffraction pattern based on the structure factor, and generating a continuous intensity-2. Spectrum; the continuous intensity -2 The reconstructed diffraction pattern was compared and verified with the molecular dynamics simulation results to determine whether the reconstructed diffraction pattern was reasonable.
6. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection according to any one of claims 1 to 4, characterized in that, The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection also includes: 3D visualization of the crystal structure based on the crystal orientation; The steps for 3D visualization of the crystal structure include: transforming the atomic coordinates from the crystallographic coordinate system to the laboratory coordinate system according to the rotation matrix of the crystal orientation; plotting the atomic distribution using a 3D scatter plot and drawing crystal axis indicators in the image to generate a 3D supercell visualization image of the theoretical crystal structure; Optionally, the structure file output from the molecular dynamics simulation is used to perform 3D visualization of the crystal structure, and the atomic coordinates, lattice matrix and boundary conditions in the simulation box are analyzed to convert the atomic positions of the MD simulation into a 3D visualization image in the laboratory coordinate system.
7. The X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection according to any one of claims 1 to 4, characterized in that, The diffraction data includes multiple sets of X-ray diffraction experimental data at different times, and the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection also includes: phase transition detection; The phase transition detection steps include: performing the inversion on each set of X-ray diffraction experimental data to obtain the corresponding crystal orientation, detecting the evolution of the crystal orientation, identifying phase transition events, and outputting a phase transition report.
8. A system for X-ray diffraction forward simulation and crystal structure inversion for dynamic phase structure detection, characterized in that, The X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection is used to perform the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection as described in any one of claims 1 to 7. The X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection includes: A geometric modeling module is used to establish the composite detector model and to implement the geometric algorithm for finding the intersection of the ray and the composite surface. A crystallography calculation module, used to calculate the theoretical diffraction vector; A ray tracing module, which performs the statistical sampling and the ray occlusion calculation; A coordinate transformation module, which is used to execute the inverse mapping function; Optionally, the X-ray diffraction forward simulation and crystal structure inversion system for dynamic phase structure detection further includes a data comparison module; the data comparison module is used to compare continuous intensity -2 The spectra were compared and verified with the molecular dynamics simulation results; among which, the continuous intensity -2 The spectrum is generated based on the relative intensities of each diffraction peak in the reconstructed diffraction pattern.
9. A computer-readable storage medium for detecting dynamic phase structure, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection as described in any one of claims 1 to 7.
10. A computer program product for detecting dynamic phase structure, characterized in that, The computer program product includes a computer program that is executed by a processor to implement the X-ray diffraction forward simulation and crystal structure inversion method for dynamic phase structure detection as described in any one of claims 1 to 7.