A method for spectral inversion structure based on upper bound confidence interval inverse monte carlo

By introducing an upper bound confidence interval strategy, the inverse Monte Carlo method, combined with reinforcement learning to optimize atom movement, solves the problems of long computation time and insufficient accuracy in traditional methods, and achieves efficient and accurate structure inversion, which is applicable to multi-element systems and dynamic processes.

CN120068653BActive Publication Date: 2026-04-17SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2025-02-28
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional inverse Monte Carlo methods are computationally time-consuming in large-scale atomic systems or complex material systems, rely on constraints, resulting in insufficient accuracy and inadequate global search capabilities, making them difficult to meet the needs of practical applications.

Method used

We employ an inverse Monte Carlo method based on upper bound confidence intervals, combined with reinforcement learning strategies, to intelligently select atomic movement strategies. By dynamically balancing exploration and utilization through the UCB strategy, we optimize the atomic movement process, reduce dependence on experimental parameters, and improve global search capabilities and structure inversion accuracy.

Benefits of technology

It significantly improves the efficiency and accuracy of structure inversion, reduces computational costs, enhances global search capabilities, is applicable to multi-element systems and dynamic evolution processes, and reduces optimization time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068653B_ABST
    Figure CN120068653B_ABST
Patent Text Reader

Abstract

This invention proposes an inverse Monte Carlo method based on upper confidence intervals (UCB) for structure optimization in spectral inversion. This method combines the upper confidence interval strategy from reinforcement learning, intelligently selecting the optimal atom movement strategy during the optimization process to achieve efficient structure inversion modeling. Users can specify experimental spectra as needed, and the program will efficiently infer structural information without relying on an initial structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new materials technology, and more specifically, to a method for spectral inversion structure based on inverse Monte Carlo using an upper confidence interval (UCB). Background Technology

[0002] The development of the Reverse Monte Carlo (RMC) method can be traced back to 1988, first proposed by McGreevy and Pusztai. Its initial purpose was to reconstruct the atomic structure of disordered materials from experimentally obtained scattering data (such as neutron scattering). The core idea of ​​RMC is to optimize atomic positions to make the simulation results as consistent as possible with experimental data. Initially, RMC was mainly applied to the study of liquids, glasses, and amorphous materials. With the deepening of research, constraints (such as chemical bond lengths, coordination numbers, and densities) were gradually introduced to improve the physical plausibility of the models. In the 1990s, RMC was widely used in the study of disordered systems and extended to more complex material systems, such as nanomaterials and crystalline defects. In the 2000s, thanks to the rapid development of computing power, RMC was combined with other techniques (such as molecular dynamics simulations and density functional theory), further improving modeling accuracy. In the past decade, the application scope of the RMC method has continued to expand, combining with high-energy X-ray and synchrotron radiation techniques, extending its simulation capabilities from microscopic atomic structures to time-resolved dynamic structural changes. In the field of nanomaterials, small-angle X-ray scattering (SAXS) data, analyzed using the Relative Motion Conversion (RMC) model, can reveal the shape, size distribution, and local structure of surface atoms in particles. In composite materials and multi-element systems, combined with anomalous X-ray scattering (AXS) data, RMC can analyze the spatial distribution and interactions of elements in multi-element systems, such as the analysis of local defects in perovskite oxide structures. RMC is also used for defect studies in crystalline materials; by inverse modeling X-ray diffraction data, the distribution of non-periodic structures such as dislocations and vacancies can be obtained. Furthermore, in time-resolved X-ray scattering (such as pump-probe experiments), the RMC method is used to analyze the evolution of dynamic structures, such as the transient atomic distribution during liquid-solid phase transitions or chemical reactions. In recent years, with the advancement of computer technology, RMC is gradually being combined with methods such as molecular dynamics and density functional theory to achieve multi-scale modeling from local to long-range scales, and is expected to play a greater role in more complex multi-element material systems, dynamic experimental environments, and machine learning-driven modeling optimization. Restricted Mechanics (RMC) plays a crucial role in current materials science, condensed matter physics, and the study of disordered systems. However, it relies on high-quality initial structures and expert knowledge, requiring reasonable constraints and high-precision experimental data to ensure the physical reliability of the model. Furthermore, RMC demands substantial computational resources and a lengthy optimization process, and may get stuck in local minima or fail to effectively explore the global structure during sampling. For systems with a large number of atoms, moving atoms becomes extremely difficult, easily leading to a decrease in acceptance rate and reduced optimization efficiency, thus affecting computational convergence. The high computational cost and time expenditure hinder efficient modeling of large-scale systems and accurate analysis of dynamic structural evolution.

[0003] Therefore, existing technologies suffer from several drawbacks: for large-scale atomic systems or complex material systems, traditional RMC methods require numerous Monte Carlo iterations, resulting in long computation times and difficulty in meeting practical application needs. Furthermore, when dealing with multi-element systems or aperiodic structures, traditional RMC methods rely on constraints, the introduction of which may limit the algorithm's flexibility and accuracy, leading to insufficient precision in the results.

[0004] Therefore, developing an exploration process that accelerates atomic movement and optimizing selection strategies has become one of the key challenges in improving the efficiency and accuracy of RMC. In recent years, with the rapid development of machine learning (ML) technology, reinforcement learning (RL) has been proposed as a possible improvement method, providing new ideas for RMC optimization. In RMC, the adjustment of atomic positions can be viewed as a reward-feedback-based decision-making process. The agent evaluates the effectiveness of structural optimization at each step and gradually learns the optimal adjustment strategy. This method not only avoids the inefficient sampling caused by blindly and randomly moving atoms but also improves global search capabilities while satisfying experimental constraints, thereby accelerating convergence. Summary of the Invention

[0005] To address the inefficiency of existing Inverse Monte Carlo (RMC) methods in large-scale atomic systems or complex material systems, this invention proposes an upper-bound confidence interval-based RMC method for structure optimization in spectral inversion. This method combines the upper-bound confidence interval strategy from reinforcement learning to intelligently select the optimal atom movement strategy during the optimization process, achieving efficient structure inversion modeling. The core idea of ​​this method is to treat each possible atom movement as a decision option during RMC optimization and dynamically balance exploration and exploitation using a UCB strategy. The UCB strategy adaptively adjusts the selection probability of atom movements based on the current optimization history, enhancing exploration in the early stages of optimization to avoid getting trapped in local optima, while reinforcing high-reward decisions in the later stages, thereby accelerating optimization convergence and improving structure inversion accuracy. Through the UCB-driven atom movement selection mechanism, this invention reduces dependence on experimental parameters and lowers the computational cost of blind trial and error. Combined with a physics-guided reward function, this method improves global search capability while satisfying experimental scattering spectrum constraints, making the final optimization result more consistent with the physical reality of the structure. This invention is applicable to spectral inversion modeling of multi-element systems, aperiodic materials, nanostructures, and dynamic evolution processes, and has broad application prospects in materials science, catalysis, nanotechnology, and condensed matter physics.

[0006] The present invention adopts the following technical solution and steps:

[0007] Step S1: Use an existing reference crystal structure or a randomly generated crystal / amorphous structure as the initialization structure;

[0008] Step S1.1: If reference structure information is available, select a given composition or an existing combination of compositions as the basic reference, use Materials Project as the database for collecting crystal structures, and use the official structure download tool.

[0009] Step S1.2: Use the Pymatgen software package provided by the Materials Project to convert the extracted crystal structure and save it as a file with the .vasp extension;

[0010] Step S1.3: If no reference structure information is available, call the random generation program to generate a crystal / amorphous structure file and automatically save it as a file with the .vasp extension.

[0011] Step S2: Connect the initialized structure to the diffraction pattern forward calculation program to obtain the structure simulation spectrum;

[0012] Step S2.1: Initialization of diffraction spectrum simulation calculation. Using the initialization structure file (.vasp format) obtained in step S1 as input, call the forward diffraction spectrum calculation program, such as the structure factor calculation method based on the Debye scattering equation or Fourier transform, to calculate its theoretical diffraction spectrum.

[0013] Step S2.2: Determine the appropriate scattering factor based on the type of target diffraction experiment (e.g., X-ray diffraction (XRD), neutron scattering (NS), or electron diffraction (ED)). For XRD, select the atomic X-ray scattering factor; for neutron scattering, select the element-specific neutron scattering length; for electron diffraction, use dynamic scattering theory for correction.

[0014] Step S2.3: Based on the atomic coordinate information r of the initialized structure ij The structure factor S(q) corresponding to the scattering vector q:

[0015]

[0016] Step S2.4: Perform a Fourier transform based on the calculated structure factor to obtain the scattering intensity I(q)=|S(q)| 2 Furthermore, the obtained scattering spectrum was normalized to enable comparability analysis with the experimental target spectrum.

[0017] Step S3: Import the target diffraction pattern into the real-time monitoring program;

[0018] Step S3.1: Import the target diffraction spectrum obtained from the experiment. The data format can include common experimental spectrum data formats such as .chi, .dat, .xy, and .txt. Perform data preprocessing (such as noise removal, baseline correction, peak matching, etc.).

[0019] Step S3.2: Initialization of real-time supervised computation. Initialize the supervised computation module, which is used to evaluate the similarity between the current simulated spectrum and the target spectrum. It can accept various evaluation methods and indicators, such as root mean square error, Pearson correlation coefficient, Chi2 difference, and other similarity evaluation methods.

[0020] Step S3.3: Error feedback is sent to the optimization module. If the similarity score of the current optimized structure does not reach the set threshold, the upper bound confidence interval calculation program is called.

[0021] Step S4: Start the upper bound confidence interval calculation program and perform decision atom shifting;

[0022] S4.1: Initialize UCB weights: In the absence of historical move success rate data, assign uniformly distributed initial weights to all atoms to ensure that all atoms are selected with equal probability during the initialization phase by weighted random selection.

[0023] S4.2: Randomly select candidate atoms: Randomly select an atom as a move candidate based on the current UCB weights. The UCB weights are dynamically adjusted throughout the process based on the historical move success rate, which determines the random selection weights assigned to each atom.

[0024] S4.3: Generate a random movement vector: Generate a random movement vector for the selected atom. The direction of the movement vector is uniformly distributed within a preset spherical shell, and the radial length of the spherical shell is within the range of the minimum and maximum movement lengths selected during initialization.

[0025] S4.4: Check Minimum Distance Constraint: Attempt to move the selected atom and check if the move violates the minimum distance constraint. If a violation is found, regenerate the move vector until the constraint is satisfied;

[0026] S4.5: Determine whether to accept the move based on the Metropolis criterion: Calculate the change in system metrics (such as Chi2 value) before and after the move, and decide whether to accept the move based on the Metropolis criterion. If the move is accepted, update the UCB weights of the corresponding atoms according to the move result.

[0027] Step S5: The real-time monitoring program determines whether the accuracy of the adjusted structural simulation spectrum meets the preset precision.

[0028] Step S5.1: Calculate the degree of agreement between the current simulated spectrum and the target spectrum.

[0029] After the atom movement decision in step S4, the simulated diffraction spectrum is recalculated using the updated structure and compared with the target diffraction spectrum. Based on the comparison structure, a similarity threshold is calculated, which reflects the degree of similarity between the simulated spectrum and the target spectrum. The similarity can be calculated by various methods, such as root mean square error (RMSE), correlation coefficient (e.g., Pearson correlation coefficient), Chi2 value, etc. The specific choice depends on the nature of the problem and the required accuracy.

[0030] The real-time monitoring program will determine whether the conformity has reached the conformity threshold. If the conformity has reached the threshold, it will proceed to step S6 and end the optimization process. If the conformity has not reached the threshold, it will return to step S4 and continue to perform atom movement optimization to further optimize the matching degree between the simulated structure spectrum and the target spectrum.

[0031] Step S6: The program ends and outputs the final adjusted material structure file.

[0032] Step S6.1: Output the final optimized structure. When the compliance reaches the set threshold, terminate the RMC optimization process.

[0033] Step S6.2: Specify the preset save file path and save the final optimized atomic structure to a standardized structure file format, which includes, but is not limited to:

[0034] VASP format (.vasp) is suitable for first-principles calculations.

[0035] The XYZ format (.xyz) is suitable for visualization software such as OVITO.

[0036] CIF format (.cif) is suitable for database storage and diffraction analysis.

[0037] The LAMMPS data format (.data) is suitable for molecular dynamics simulations.

[0038] In addition, the present invention also provides a computer-readable storage medium storing computer program instructions for performing the above-described method, wherein when the instructions are executed on a computer, the steps of the method are implemented.

[0039] And a computer system for performing the above-described method, comprising a processor, a memory, and an input / output device, wherein the memory stores computer program instructions for performing the method, and the processor executes the instructions to implement the method.

[0040] Compared with the prior art, the present invention has the following obvious and prominent substantive features and significant advantages:

[0041] 1. This invention reduces reliance on experiments, decreases the need for large amounts of expensive calculations, while improving the accuracy of structural inversion, avoiding high costs and blind spots, and improving the efficiency of material structure analysis.

[0042] 2. This invention introduces the upper bound confidence interval (UCB) strategy from reinforcement learning, and optimizes the atomic movement process through intelligent decision-making, effectively solving the shortcomings of existing RMC methods (especially in terms of efficiency, flexibility, global search capability and resource consumption), and significantly improving the efficiency and accuracy of structure inversion.

[0043] 3. By dynamically adjusting the radial length of the movement vector according to the atom type and system complexity (e.g., the movement range of surface atoms is larger than that of bulk atoms), SAXS data inversion of gold nanoparticles shows that the surface atom reconstruction accuracy (RDF matching degree) is improved from 85% to 93% by traditional methods, and the optimization time is reduced by 25%.

[0044] 4. The inverse Monte Carlo method based on upper bound confidence interval optimization proposed in this invention has applications not limited to materials science, but can also be extended to other engineering fields, such as drug design, energy materials, nanotechnology, and functional polymer materials, showing broad application prospects. The optimized structure files support output in formats such as VASP, CIF, and LAMMPS, and can be directly used for first-principles calculations, molecular dynamics simulations, or database storage. For example, .vasp format files can be directly imported into VASP software for band structure calculations, and .cif files can be uploaded to the Materials Project database for sharing. The cross-platform compatibility of the optimized structure reduces the entire process time from inversion to performance prediction by 50%.

[0045] 5. The intelligent decision optimization method proposed in this invention retains process information during the structural optimization process, which can further support other scientific research such as machine learning-driven material discovery, inverse design optimization, and intelligent structure prediction, and promote the development of the integration of data-driven and physical modeling. Attached Figure Description

[0046] Figure 1 This is a structural illustration of the initialization structure in the embodiment.

[0047] Figure 2 The simulated spectrum is obtained from the initial structure calculation in the example.

[0048] Figure 3 This is a visualization of the initial structure (left) and the structure atoms selected by UCB during the optimization process in the example (right).

[0049] Figure 4 The figures above show the comparison between the initial structure (top) and the optimized structure (bottom) in the example, relative to the radial distribution function and the structure factor, respectively. Detailed Implementation

[0050] The present invention will now be described in detail using the structural inversion of Al alloys as an example, in conjunction with the accompanying drawings and specific preferred embodiments, but this should not be construed as limiting the scope of protection of the present invention.

[0051] Example 1

[0052] Step S1: Since there is no Al structure to refer to in the database, a random generation program is called to generate a structure file. The structure includes lattice parameters a, b, c, α, β, γ and atomic coordinates that can completely represent the atomic structure of the material.

[0053] Step S2.1: Input the random Al structure file generated in S1;

[0054] Step S2.2: By calling the XRD forward calculation program, the structure file is read, and the correction method is automatically obtained according to the type of target diffraction experiment;

[0055] Step S2.3: Combine the structure provided in S2.1 and the correction method determined in S2.2 to calculate the structure factor;

[0056] Step S2.4: Perform a Fourier transform on the structure factor calculated in S2.3 to obtain the initial state spectral information, perform spectral normalization, and store the data.

[0057] Step S3.1: If this is the first time step S3.1 is executed, the experimental test spectrum data file exp.txt is read, the experimental spectrum is processed using the same normalization method as in S2.4, and the data is stored. If this is not the first time step S3.1 is executed, the experimental spectrum is read directly from the stored data.

[0058] Step S3.2: Call the real-time monitoring program to calculate in real time and record the Chi2 value between the current simulated spectrum and the calculated spectrum;

[0059] Step S3.3: The numerical value is fed back to the error recording module of the main program. In the current example, it is set that the error reduction within 1,000 steps is less than one ten-thousandth. If the convergence requirement cannot be met, the fourth step is executed.

[0060] Step S4.1: Call the upper bound confidence interval calculation program. If this is the first time step S4.1 is started, initialize the UCB weights to uniform distribution weights; otherwise, skip step S4.1.

[0061] Step S4.2: Dynamically adjust the random selection weights assigned to each atom based on the success rate obtained under UCB from historical moves to select A1 atoms;

[0062] Step S4.3: The selected Al atoms perform a random walk;

[0063] Step S4.4: Check whether the structure meets the minimum distance constraint after the movement. If not, move it again.

[0064] Step S4.5: Calculate the change in Chi2 value before and after the move, use the Metropolis criterion to decide whether to accept the move, and further update the UCB weights based on the move results.

[0065] Step S5.1: Calculate the degree of agreement between the current simulated spectrum and the target spectrum, using the same evaluation method as in S3.2;

[0066] Step S5.2: Call the calculation in step S3.2, record the Chi2 value between the current calculated simulation spectrum and the calculated spectrum, and check whether the convergence accuracy has been reached. If it is not satisfied, repeat step S4; if it is satisfied, proceed to S6.

[0067] Step S6.1: Save the atomic structure and disable the database storage function;

[0068] Step S6.2: Output the last frame of atomic structure information in the running directory, with the file extension .data.

Claims

1. A method for spectral inversion structure based on inverse Monte Carlo with upper bound confidence intervals, characterized in that, Includes the following steps: Step S1: Provide an initial material structure, which is obtained through one of the following two methods: Use an existing reference crystal structure; or If there is no existing reference crystal structure, a crystal structure or an amorphous structure is generated randomly. Step S2: Generate a simulated diffraction spectrum of the initialized material structure using a structure factor calculation method, including: S2.1: Select the corresponding scattering factor from the preset scattering factor library according to the target diffraction experiment type; S2.2: Calculate the structure factor based on the atomic coordinate information in the initialized material structure and the selected scattering factor; S2.3: Perform Fourier transform on the structure factor to obtain the scattering intensity, and then normalize it to obtain a simulated diffraction spectrum that is comparable to the target diffraction spectrum obtained by experimental measurement. Step S3: Import the target diffraction spectrum obtained from the experiment and initialize the evaluation module, which is used to calculate the consistency between the simulated diffraction spectrum and the target diffraction spectrum; Step S4: Start the upper bound confidence interval (UCB) calculation program and dynamically adjust the atom movement strategy, including: S4.1: Initialize or update the UCB weight of each atom, the UCB weight is dynamically adjusted based on the historical move success rate; S4.2: Randomly select candidate atoms based on the current UCB weight, and generate a random move vector with a uniformly distributed direction within the spherical shell and a radial length within a preset range; S4.3: Check whether the move violates the minimum distance constraint, if it does, regenerate the move vector; S4.4: Accept or reject the move according to the Metropolis criterion, the criterion is based on the change in Chi2 value before and after the move; S4.5: Update the UCB weight of the corresponding atom according to the move result; Step S5: Determine whether the consistency between the current simulated diffraction pattern and the target diffraction pattern reaches a preset consistency threshold: If the desired result is not achieved, return to step S4; otherwise, output the optimized material structure file and end the optimization process.

2. The method for spectral inversion structure based on inverse Monte Carlo based on upper bound confidence intervals according to claim 1, characterized in that, Step S1 includes: S1.1: If a reference structure exists, extract the crystal structure from the Materials Project database and convert it to a .vasp format file using the Pymatgen tool; S1.2: If there is no reference structure, call the random generation program to generate a crystal / amorphous structure file and save it as a .vasp file.

3. The method for spectral inversion structure based on inverse Monte Carlo based on upper bound confidence intervals according to claim 1, characterized in that, The structural factors The calculation formula is as follows: in, To initialize the atomic coordinate information of the structure, It is the scattering vector; The scattering intensity The calculation formula is: .

4. The method for spectral inversion structure based on inverse Monte Carlo based on upper bound confidence intervals according to claim 1, characterized in that, The evaluation indicators for compliance in step S3 include root mean square error, Pearson correlation coefficient, or Chi2 difference.

5. A computer-readable storage medium having stored thereon computer program instructions for performing the method of any one of claims 1 to 4, wherein when the instructions are executed on a computer, the steps of the method are implemented.

6. A computer system for performing the method of any one of claims 1 to 4, comprising a processor, a memory, and an input / output device, wherein the memory stores computer program instructions for performing the method, and the processor executes the instructions to implement the method.