A molecular dynamics simulation method and system for high-performance computing platforms

CN122991320APending Publication Date: 2026-10-27SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611433397.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-27

Smart Images

  • Figure CN122991320A_ABST
    Figure CN122991320A_ABST
Patent Text Reader

Abstract

The application provides a molecular dynamics simulation method and system for a high-performance computing platform, and belongs to the technical fields of molecular dynamics simulation and high-performance computing. The method comprises the following steps: reading atomic coordinate and element type information, constructing a local atomic environment density distribution and a SNAP potential function; optimizing the SNAP potential function through fusion calculation and mixed vectorization calculation, performing spectral expansion on the local atomic environment density distribution to obtain spectral expansion coefficients; obtaining an intermediate coupling quantity based on coupling contribution increment reuse, and performing conjugate contraction on the spectral expansion coefficients to obtain a double spectral component; calculating atomic energy and total potential energy of a system according to the double spectral component, and calculating atomic force through chain derivation; and updating the positions and velocities of atoms through the optimized atomic energy and atomic force. Through the fusion process organization and the mixed vectorization strategy, the application significantly improves the calculation efficiency of the SNAP potential, and can realize accelerated calculation of large-scale molecular dynamics simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of molecular dynamics simulation and high-performance computing technology, and particularly relates to a molecular dynamics simulation method and system for high-performance computing platforms. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Molecular dynamics simulations are an important computational tool for studying the evolution of material microstructure, physical properties, and chemical reaction processes. LAMMPS, as one of the most widely used molecular dynamics simulation software programs, supports various interatomic potential function models and can perform simulations of complex material systems in a large-scale parallel computing environment.

[0004] The accuracy and efficiency of interatomic potential functions directly determine the reliability and achievable spatial and temporal scales of molecular dynamics simulations. Traditional empirical potential functions, such as embedded atomic potentials (EAM) and Lennard-Jones potentials, while computationally efficient, suffer from fixed functional forms and limited degrees of freedom, making them inadequate for accurately describing interatomic interactions in complex chemical environments, particularly in systems containing multiple elements or involving bond breaking and formation. In recent years, the rapid development of machine learning-based interatomic potentials (MLIP) has provided an effective solution to this predicament. These methods establish a mapping between the local atomic environment and the system's potential energy using first-principles calculations, reducing computational costs by several orders of magnitude while maintaining near-quantum mechanical accuracy. Among these, spectral neighborhood analysis potential (SNAP) is a typical machine learning potential method. It constructs rotationally invariant bispectral descriptors based on the spectral expansion coefficients of the atomic local density under a four-dimensional spherical harmonic function basis, systematically characterizing the atomic local geometry and chemical environment, thereby achieving high-precision potential energy surface fitting.

[0005] However, the computational efficiency of SNAP potentials in large-scale molecular dynamics simulations has become a bottleneck restricting their widespread application. The computational process of SNAP potentials involves multiple steps, including constructing local neighbor densities, calculating multi-channel spectral expansion coefficients, generating intermediate tensors through Clebsch-Gordan coupling, eigenvalue reduction of dual spectra, and chain derivatives of energy with respect to atomic positions. It includes a large number of complex matrix operations, high-dimensional tensor reduction, and multibody coupling accumulation operations. The computational complexity increases exponentially with the angular momentum truncation parameter.

[0006] The current implementation of the SNAP module in LAMMPS is primarily designed for general-purpose processor architectures, failing to fully consider the hardware characteristics of modern high-performance computing platforms, such as multi-level cache hierarchies, vector processing units, and memory bandwidth. Specifically: in the original computational flow, the energy and force computation stages are fragmented, intermediate results are repeatedly read from and written to main memory, resulting in low cache reuse; in Clebsch-Gordan coupled computation, repeated input combinations between different output channels lead to a large number of redundant multiplication operations; and the irregular access patterns of complex arrays during computation make it difficult to effectively utilize SIMD vector instructions. These problems cause the computational performance of SNAP potentials to fall far below the hardware's peak capability, severely limiting its practical application in systems containing millions of atoms or more. Summary of the Invention

[0007] To overcome the shortcomings of the prior art, this invention provides a molecular dynamics simulation method and system for high-performance computing platforms, aiming to solve the problems of high data access overhead, large computational redundancy, and insufficient utilization of vector computing units in the SNAP potential calculation process of existing molecular dynamics simulations.

[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a molecular dynamics simulation method for high-performance computing platforms; A molecular dynamics simulation method for high-performance computing platforms includes: Read the atomic coordinates and element type information of the simulation system, determine the set of neighboring atoms of each central atom based on the preset cutoff radius, construct the local atomic environment density distribution according to the position and element type of the central atom and neighboring atoms, and perform SNAP potential calculation based on the local atomic environment density distribution; The calculation process of the SNAP potential function is optimized by combining fusion computing and hybrid vectorization computing. The position and velocity of each atom are updated by the optimized atomic energy and atomic force, thereby accelerating the calculation of molecular dynamics simulation of the simulated system. The optimization of the SNAP potential function calculation process through fusion computation and hybrid vectorization computation includes: Coordinate mapping and spectral expansion are performed on the local atomic environment density distribution to obtain the spectral expansion coefficients of each central atom; The intermediate coupling quantity is obtained by reusing the coupling contribution increment, and the intermediate coupling quantity is conjugated with the spectral expansion coefficient of the corresponding angular momentum channel to obtain the bispectral components. The energy of each atom is calculated based on the bispectral components, and the total potential energy of the system is obtained by summing the short-range repulsion energy of each atom and the SNAP atom energy. The derivative of the SNAP atom energy with respect to the bispectral descriptor is transferred to the spectral expansion coefficient space, auxiliary quantities are defined, and the forces on each atom are calculated according to the chain derivative relationship.

[0009] As a further technical solution, the method of obtaining intermediate coupling amount based on coupling contribution incremental reuse specifically includes: A marker is established for each set of input spectral expansion coefficients. The coupling calculation tasks are traversed in the order of the output channels. If the current input combination is marked as uncalculated, complex multiplication is performed and the result is cached before marking. If it is marked as calculated, the cached result is read directly. The obtained product result is weighted and accumulated by CG coefficients and written to the corresponding position of the intermediate coupling quantity.

[0010] As a further technical solution, the step of traversing the coupled computation task in the order of the output channels specifically involves: The coupled calculation tasks of each output channel are traversed sequentially according to the output channel number from smallest to largest. For each input combination of the current output channel, the spectral expansion coefficient product of the input combination is determined by the flag bit to see if it has been calculated by the previous output channel. If it has been calculated, the cached result is directly reused; otherwise, it is calculated and cached.

[0011] As a further technical solution, the hybrid vectorized computation is as follows: based on the computational characteristics of the current computational stage, the atomic neighbor dimension or the central atomic dimension is adaptively selected as the vectorization direction, and parallel vectorized computation is performed using the processor's vector instruction set.

[0012] As a further technical solution, the step of adaptively selecting the atomic neighbor dimension or the center atomic dimension as the vectorization direction based on the computational characteristics of the current computation stage specifically includes: In the calculation stage of spectral expansion coefficients and their derivatives, the atomic neighbor dimension is used as the vectorization direction, and the neighbor index is set as a continuous storage dimension, so that the basis functions, smoothing functions and their derivatives of multiple neighbor atoms can be calculated in parallel through vector instructions. During the computation of intermediate coupling quantities and bispectral components, the central atom dimension is used as the vectorization direction, and the central atom index is set as a continuous storage dimension, so that the same computational components of multiple central atoms are loaded into the vector register for parallel computation.

[0013] As a further technical solution, the spectral expansion coefficients are:

[0014] in, central atom The spectral expansion coefficients are used to characterize the local atomic environment information; For neighboring atomic indexes; central atom With neighboring atoms The distance between them This is the corresponding unit direction vector, used to describe spatial direction information; This is a truncation function used to limit the scope of the local environment and ensure the locality of the descriptor; These are radial basis functions used to encode inter-atomic distance information; It is a spherical harmonic function used to describe the angular distribution characteristics of neighboring atoms.

[0015] As a further technical solution, the total potential energy of the system is obtained by adding the short-range repulsion energy of each atom to the energy of the SNAP atom:

[0016] in, For total potential energy, This represents the short-range repulsion energy of each atom; SNAP atomic energy; The derivative of energy with respect to the bispectral components is transferred to the spectral expansion coefficient space, and an auxiliary quantity is defined, which is calculated from the bispectral derivative, intermediate coupling quantity, and symmetric permutation contribution:

[0017] in, For the auxiliary gradient term, Let be the derivative of energy with respect to the bispectral components. It is a bispectral component. This is an intermediate coupling quantity in bispectral construction, used to describe different angular momentum channels. , and The coupling relationship between them For the symmetric contribution term, it is used to collect the equivalent derivative contributions generated by different arrangement methods in the bispectral triple coupling structure; Calculate the forces acting on atoms based on the chain rule:

[0018]

[0019] in, Represents atomic force; This represents the total potential energy of the system; Indicates the first One bispectral component; This represents the vectorization of atomic positions; This represents the expansion coefficients defined above.

[0020] A second aspect of the present invention provides a molecular dynamics simulation system for high-performance computing platforms.

[0021] A molecular dynamics simulation system for high-performance computing platforms includes: The local environment construction module is configured to: read the atomic coordinates and element type information of the simulation system, determine the set of neighboring atoms of each central atom based on a preset cutoff radius, construct a local atomic environment density distribution based on the position and element type of the central atom and neighboring atoms, and perform SNAP potential calculation based on the local atomic environment density distribution; The SNAP potential calculation acceleration module is configured to: optimize the calculation process of the SNAP potential function through fusion calculation and hybrid vectorization calculation, and update the position and velocity of each atom through the optimized atomic energy and atomic force, thereby accelerating the calculation of molecular dynamics simulation of the simulation system; The optimization of the SNAP potential function calculation process through fusion computation and hybrid vectorization computation includes: Coordinate mapping and spectral expansion are performed on the local atomic environment density distribution to obtain the spectral expansion coefficients of each central atom; The intermediate coupling quantity is obtained by reusing the coupling contribution increment, and the intermediate coupling quantity is conjugated with the spectral expansion coefficient of the corresponding angular momentum channel to obtain the bispectral components. The energy of each atom is calculated based on the bispectral components, and the total potential energy of the system is obtained by summing the short-range repulsion energy of each atom and the SNAP atom energy. The derivative of the SNAP atom energy with respect to the bispectral descriptor is transferred to the spectral expansion coefficient space, auxiliary quantities are defined, and the forces on each atom are calculated according to the chain derivative relationship.

[0022] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a molecular dynamics simulation method for a high-performance computing platform as described in the first aspect of the present invention.

[0023] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in a molecular dynamics simulation method for a high-performance computing platform as described in the first aspect of the present invention.

[0024] The above one or more technical solutions have the following beneficial effects: (1) This invention reorganizes the local environment construction, spectrum expansion, coupling calculation, energy calculation, and force calculation in SNAP potential calculation in a fusion manner, so that intermediate results between adjacent calculation steps can be directly transferred at the register or cache level, avoiding the large amount of repeated storage and loading operations of intermediate data caused by the independent stages in the traditional serial calculation process. This fusion process design effectively reduces the number of off-chip main memory accesses, reduces the data transfer overhead during the calculation process, and makes the calculation performance no longer limited by the memory bandwidth bottleneck, which is especially suitable for large-scale atomic system simulation.

[0025] (2) To address the issue of repeated input combinations between different output channels in the calculation of the intermediate coupling quantity Z, this invention adopts an incremental reuse strategy based on flag bits and result caching. The calculation is performed sequentially according to the output channel number order, and the product of the calculated spectral expansion coefficients is directly reused. This strategy eliminates a large number of redundant complex multiplication operations in the Clebsch-Gordan coupling process from the source, significantly reducing the computational workload while maintaining complete equivalence of the calculation results. This results in a significant reduction in the number of floating-point operations in the Z tensor generation stage, effectively improving computational efficiency.

[0026] (3) Based on the memory access patterns and dependency characteristics of different computation stages, this invention adaptively selects either the atomic neighbor dimension or the central atomic dimension as the vectorization direction, ensuring that each channel of the vector register always maintains an effective load. By loading contiguous neighbor atomic data or central atomic data into the vector register for parallel processing, the utilization rate of vector instruction sets such as SVE is significantly improved, and the idle vector channels caused by non-contiguous memory access are reduced. This hybrid vectorization strategy allows computational performance to scale linearly with the processor vector width, fully leveraging the hardware potential of modern high-performance computing platforms.

[0027] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0028] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0029] Figure 1 This is a flowchart of the method in the first embodiment.

[0030] Figure 2 The flowchart shows the computational fusion of the SNAP potential calculation for the first embodiment.

[0031] Figure 3 The diagram shows an example of the coupling region between different output channels in the first embodiment; where (a) is a schematic diagram of the complete coupling region where the input index combination between adjacent output channels is repeatedly calculated; and (b) is a schematic diagram of the reuse and new calculation region of the input index combination between different output channels after adopting the coupling contribution increment reuse strategy.

[0032] Figure 4 This is a schematic diagram of the vertical vectorization calculation of a single central atom and multiple neighboring atoms U in the first embodiment.

[0033] Figure 5 This is a schematic diagram illustrating the lateral vectorization calculation of the Z components of multiple i atoms in the first embodiment.

[0034] Figure 6 This is a schematic diagram illustrating the cumulative speedup of different optimization methods in the first embodiment. Detailed Implementation

[0035] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0036] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.

[0037] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0038] Example 1 This embodiment discloses a molecular dynamics simulation method for high-performance computing platforms. It constructs a SNAP potential function to describe interatomic interactions, adopts a fusion computing process to organize the various stages of spectrum expansion, coupling contraction, energy and force calculation, and combines coupling contribution increment reuse to eliminate redundant operations and a hybrid vectorization strategy to adapt to the processor instruction set, thereby achieving accelerated computation for large-scale molecular dynamics simulations.

[0039] like Figure 1 As shown, a molecular dynamics simulation method for high-performance computing platforms includes: Step S1: Read the atomic coordinates and element type information of the simulation system, determine the set of neighboring atoms of each central atom based on the preset cutoff radius, construct the local atomic environment density distribution according to the position and element type of the central atom and neighboring atoms, and perform SNAP potential calculation based on the local atomic environment density distribution.

[0040] Specifically, this embodiment uses a carbon atom system as the simulation object, reads the coordinate information of each carbon atom in the system and the size of the simulation box, and determines the relative positions between carbon atoms based on the coordinate information. For any central carbon atom, with the position of the central carbon atom as the center, the other carbon atoms in the system are screened for neighborhoods according to a preset cutoff radius. Carbon atoms whose distance from the central carbon atom is less than the cutoff radius are identified as neighboring atoms, thereby obtaining the set of neighboring atoms corresponding to the central carbon atom. The contribution of each neighboring atom to the local atomic environment is determined based on the relative positions of the central carbon atom and each neighboring carbon atom. The contribution of the neighboring atoms is smoothed by combining the atomic weights corresponding to carbon elements and the cutoff function. The contributions of the central carbon atom and its neighboring atoms are superimposed to construct the atomic environment density distribution characterizing the local spatial structure of the central carbon atom, providing input for the subsequent SNAP potential function spectral expansion and bispectral component calculation.

[0041] Step S2: The calculation process of the SNAP potential function is optimized by combining fusion calculation and hybrid vectorization calculation. The position and velocity of each atom are updated by the optimized atomic energy and atomic force, thereby accelerating the calculation of molecular dynamics simulation of the simulated system. The optimization of the SNAP potential function calculation process through fusion computation and hybrid vectorization computation includes: Step S21: Perform coordinate mapping and spectral expansion on the local atomic environment density distribution to obtain the spectral expansion coefficients of each central atom; For any central atom *i* in the system, its set of neighboring atoms is first determined according to a preset cutoff radius. A local neighbor density is then established based on the position and element type of the central atom and its neighbors. Subsequently, the radial distances of the neighboring atoms are mapped to additional angular coordinates, expanding the original three-dimensional position to a four-dimensional parameter space. Based on the mapped four-dimensional coordinates, a basis function expansion is performed on the local neighbor density, and the contributions of each neighboring atom are summed to obtain the spectral expansion coefficients of the central atom.

[0042] in, central atom The spectral expansion coefficients are used to characterize the local atomic environment information; For neighboring atomic indexes, , Indexed by magnetic quantum number; central atom With neighboring atoms The distance between them This is the corresponding unit direction vector, used to describe spatial direction information; This is a truncation function used to limit the scope of the local environment and ensure the locality of the descriptor; These are radial basis functions used to encode inter-atomic distance information; The spherical harmonic function is used to describe the angular distribution characteristics of neighboring atoms; the spectral expansion coefficients are usually complex numbers, and their real and imaginary parts can be stored separately in the program; the angular momentum truncation parameter is used to adjust the ability to describe the local environment and the computational cost.

[0043] Step S22: Obtain intermediate coupling quantity based on coupling contribution increment multiplexing, and conjugate the intermediate coupling quantity with the spectral expansion coefficient of the corresponding angular momentum channel to obtain bispectral components; To address the problem of redundant data access caused by the independent execution of bispectral descriptor calculation and force calculation in traditional SNAP calculations, this invention proposes a fused calculation process, such as... Figure 2 As shown.

[0044] This method reorganizes the local atomic environment construction, feature descriptor calculation, and energy and force calculation processes in the SNAP computation, enabling related computational steps to share intermediate results and reducing redundant data storage and loading operations. By reducing the generation of unnecessary intermediate variables, critical computational data can be more fully stored in caches or registers, thereby reducing memory access overhead and improving overall computational efficiency.

[0045] In the SNAP potential calculation, the intermediate coupling quantity Z requires CG coupling calculation of the spectral expansion coefficients between different angular momentum channels. For a fixed set of input channels... , This requires sequentially calculating multiple output channels j, each corresponding to a set of coupled calculations, and finally accumulating them to obtain the intermediate coupling quantity Z. In the current implementation, each output channel is calculated independently, and the input spectrum expansion coefficients are re-traversed and multiplication operations are performed each time.

[0046] like Figure 3 As shown in (a), there are a large number of identical input combinations between adjacent output channels. The product of the same set of spectrum expansion coefficients will be calculated repeatedly, resulting in a large number of redundant multiplication operations. At the same time, it increases the number of memory accesses and reduces computational efficiency.

[0047] To address the above problems, this embodiment proposes a Z-calculation method based on coupling contribution incremental reuse, such as... Figure 3 As shown in (b), this method calculates each output channel sequentially according to its output channel number in ascending order. After the calculation of the current output channel is completed, the calculated spectral expansion coefficient product is cached, and a label is created for the corresponding data. When subsequent output channels require the same input combination again, the spectral expansion coefficient product is not recalculated; instead, the cached result is read directly, and only the corresponding CG coefficient weighting and accumulation operations are performed. For newly added input combinations, only the newly added data is calculated, and the remaining parts reuse existing results.

[0048] Specifically, the algorithm first establishes a corresponding flag for each set of input spectral expansion coefficients, with all flags initially set to uncalculated. When a set of spectral expansion coefficients is used in the calculation for the first time, the multiplication operation is performed and the result is saved, while the corresponding flag is set to "calculated". When the subsequent output channel accesses the same input combination again, the cached value is read directly based on the flag, achieving data sharing across output channels and avoiding duplicate calculations.

[0049] like Figure 3 As shown in (b), the first input channel and the second input channel satisfy... Taking this as an example, the calculation and reuse process of input index combinations under different output channels is explained. Among them, and These represent the non-negative indices of the magnetic quantum numbers in the b-direction for the first and second input coefficient blocks, respectively. Since... ,therefore, and The values ​​are all 0, 1, and 2. Each group This corresponds to a set of input elements in the two input coefficient blocks that participate in the coupled calculation.

[0050] For a given output channel j, , With output index The following relationship must be satisfied:

[0051] in, .

[0052] Based on the above relationship, for a given magnetic quantum number output index Satisfying the coupling condition Combination along - The anti-diagonal lines in the two-dimensional index space are distributed such that multiple anti-diagonal lines satisfying certain conditions together form the effective coupling region corresponding to the current output channel j. As the output channel j increases in the order of 0, 2, 4, the effective coupling region gradually expands outward, and the effective coupling region corresponding to the later output channel includes the effective coupling region corresponding to the previous output channel.

[0053] Specifically, when the output channel j=0, the input index combinations that satisfy the coupling condition constitute the blue area in the diagram. The input element product corresponding to this area is calculated and stored for the first time. When the output channel increases to j=2, the effective coupling area further expands based on the area corresponding to j=0. The green area in the diagram represents the newly added input index combinations relative to the previous output channel. For input index combinations that overlap with the area corresponding to j=0, the already calculated and stored input element products are directly reused, and only the input element products corresponding to the newly added area are calculated. When the output channel further increases to j=4, the effective coupling area continues to expand. The orange area in the diagram represents the newly added input index combinations relative to the existing coupling area. Similarly, only the input element products corresponding to the newly added input index combinations are calculated, while the existing calculation results corresponding to the overlapping areas are reused. The shaded areas in the diagram represent index positions that do not require repeated processing due to symmetry.

[0054] Therefore, for a fixed combination of input channels By performing coupled calculations in ascending order of output channel j and identifying overlapping input index combinations between adjacent output channels, the product of input elements corresponding to the same input index combination can be calculated only when it appears for the first time, and the stored calculation results can be directly reused in subsequent output channels, thereby reducing repeated multiplication operations between different output channels and improving the efficiency of coupled calculations. Figure 3 The two j=4 values ​​represent the same channel: the former shows the complete coupled region, while the latter further indicates the multiplexed product from j=0 and j=2, as well as the newly calculated product from j=4.

[0055] Since the only differences between different output channels are the CG coefficients and the accumulation position, while the product of the input spectrum expansion coefficients remains the same, this invention effectively reduces repeated multiplication operations and memory accesses, improves the efficiency of Z tensor calculation, and further enhances the overall calculation performance of SNAP potential, while ensuring that the calculation results are consistent with the original algorithm.

[0056] To address the issue of discontinuous array accesses affecting processor vectorization efficiency during SNAP computation, this method employs a hybrid vectorization approach combining neighbor atom dimensions and central atom dimensions, and reconstructs the corresponding intermediate data layout. During the calculation of U and its derivatives, since there are recursive dependencies between different angular momentum levels, and different neighbor atoms of the same central atom are independent, neighbor atoms are used as the vectorization dimension, and the neighbor indices are set as a contiguous storage dimension. This allows the basis functions, smoothing functions, and derivatives of multiple neighbor atoms to be computed in parallel using SVE instructions, such as... Figure 4 As shown.

[0057] Figure 4 middle, , , and These represent the input coefficient blocks corresponding to angular momentum channels j=0, j=1, j=2, and j=3, respectively. For any angular momentum channel j, its input coefficient block... The elements in the array are indexed by two indices. and It was jointly determined that, and These represent the non-negative indices of the magnetic quantum number of the input coefficient block in the two index directions. As the angular momentum output channel j increases, the corresponding input coefficient block... The number of elements included increases. For each neighboring atom, they can be organized sequentially according to the order of angular momentum output channels j. , , and Input coefficient blocks are processed, and each two-dimensional coefficient block is expanded in one dimension to form a continuously arranged angular momentum channel element. This element is then further vectorized and calculated along the directions of neighboring atoms. Simultaneously, a temporary array is introduced during the matrix recursion process to store intermediate results at adjacent positions, reducing repeated writes to the main array and thus lowering memory access overhead.

[0058] For computational processes involving small computational scales and irregular index access within individual central atoms such as Z, B, and Y, a horizontal vectorization approach across central atoms is adopted, such as... Figure 5 As shown.

[0059] Figure 5 Middle U 1 and U 2 These represent the corresponding angular momentum channels. and The two complex input coefficient blocks are multiplied by their corresponding elements and the CG coefficients are weighted and accumulated to obtain the elements in Z. The horizontal vectorization calculation across the central atoms is achieved by continuously arranging the same intermediate coupling quantity of different central atoms. and These represent the indices of the magnetic quantum number of the first input coefficient block in the a and b directions, respectively. and These represent the indices of the magnetic quantum number of the second input coefficient block in the a and b directions, respectively. Specifically, a central atom dimension is added to the arrays ulisttot, zlist, ylist, and blist, and the central atom index is set as a contiguous storage dimension. This allows the same computational components of multiple central atoms to be loaded into the vectorized register simultaneously and perform the same coupling, multiply-accumulate, and accumulation operations in different SVE channels. By selecting neighboring atoms or the central atom as the vectorization direction according to different computation stages, the utilization rate of the vectorized channels can be improved, and non-contiguous memory accesses and redundant data access operations can be reduced.

[0060] Further, by conjugating the intermediate coupling quantity Z with the spectral expansion coefficients of the corresponding angular momentum channel, a bispectral component is obtained:

[0061] in, It is a bispectral component; , , Index of angular momentum channels; This is the intermediate coupling quantity in the bispectral construction; central atom Complex conjugate of spectral expansion coefficients.

[0062] The bispectral components are used to characterize the local geometry and chemical environment of the central atom and satisfy translation invariance, rotation invariance, and substitution invariance of atoms of the same element.

[0063] The energy of each atom is calculated based on the bispectral components, and the total potential energy of the system is obtained by summing the short-range repulsion energy of each atom and the SNAP atom energy. The derivative of the SNAP atom energy with respect to the bispectral descriptor is transferred to the spectral expansion coefficient space, auxiliary quantities are defined, and the forces on each atom are calculated according to the chain derivative relationship.

[0064] The total potential energy of the system is obtained by adding the short-range repulsion energies of each atom to the SNAP atom energies:

[0065] in, For total potential energy, This represents the short-range repulsion energy of each atom; This refers to the SNAP atomic energy.

[0066] To calculate the atomic force, the derivative of the energy with respect to the bispectral components is first transferred to the spectral expansion coefficient space, and an auxiliary quantity is defined, which can be calculated from the bispectral derivative, intermediate coupling quantity, and symmetry substitution contribution:

[0067] in, For the auxiliary gradient term, Let be the derivative of energy with respect to the bispectral components. It is a bispectral component. This is an intermediate coupling quantity in bispectral construction, used to describe different angular momentum channels. , and The coupling relationship between them The symmetric contribution term is used to collect the equivalent derivative contributions generated by different arrangements in the bispectral triple coupling structure.

[0068] Calculate the forces acting on atoms based on the chain rule:

[0069]

[0070] in, Represents atomic force; This represents the total potential energy of the system; Indicates the first One bispectral component; This represents the vectorization of atomic positions; This represents the expansion coefficients defined above.

[0071] like Figure 6As shown, a system containing 216 carbon atoms was tested under single-core computing conditions. Compared to the original SNAP calculation method, the computational efficiency of the SNAP potential function is significantly improved after adopting the optimization method described in this invention. By sequentially implementing algorithm optimization, vertical vectorization, and horizontal vectorization, the overall computational performance is gradually improved, with the performance improvement brought by horizontal vectorization being more significant. After the above optimization, the computational speed of this carbon atom system is approximately 3.27 times faster than the original SNAP method, indicating that the method described in this invention can effectively reduce the computational overhead of the SNAP potential function and improve the computational efficiency of molecular dynamics simulations.

[0072] Example 2 This embodiment discloses a molecular dynamics simulation system for high-performance computing platforms; A molecular dynamics simulation system for high-performance computing platforms includes: The local environment construction module is configured to: read the atomic coordinates and element type information of the simulation system, determine the set of neighboring atoms of each central atom based on a preset cutoff radius, construct a local atomic environment density distribution based on the position and element type of the central atom and neighboring atoms, and perform SNAP potential calculation based on the local atomic environment density distribution; The SNAP potential calculation acceleration module is configured to: optimize the calculation process of the SNAP potential function through fusion calculation and hybrid vectorization calculation, and update the position and velocity of each atom through the optimized atomic energy and atomic force, thereby accelerating the calculation of molecular dynamics simulation of the simulation system; The optimization of the SNAP potential function calculation process through fusion computation and hybrid vectorization computation includes: Coordinate mapping and spectral expansion are performed on the local atomic environment density distribution to obtain the spectral expansion coefficients of each central atom; The intermediate coupling quantity is obtained by reusing the coupling contribution increment, and the intermediate coupling quantity is conjugated with the spectral expansion coefficient of the corresponding angular momentum channel to obtain the bispectral components. The energy of each atom is calculated based on the bispectral components, and the total potential energy of the system is obtained by summing the short-range repulsion energy of each atom and the SNAP atom energy. The derivative of the SNAP atom energy with respect to the bispectral descriptor is transferred to the spectral expansion coefficient space, auxiliary quantities are defined, and the forces on each atom are calculated according to the chain derivative relationship.

[0073] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.

[0074] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a molecular dynamics simulation method for a high-performance computing platform as described in Embodiment 1.

[0075] Example 4 The purpose of this embodiment is to provide an electronic device.

[0076] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in a molecular dynamics simulation method for a high-performance computing platform as described in Embodiment 1.

[0077] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0078] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0079] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A molecular dynamics simulation method for high-performance computing platforms, characterized in that, include: Read the atomic coordinates and element type information of the simulation system, determine the set of neighboring atoms of each central atom based on the preset cutoff radius, construct the local atomic environment density distribution according to the position and element type of the central atom and neighboring atoms, and construct the SNAP potential function; The calculation process of the SNAP potential function is optimized by combining fusion computing and hybrid vectorization computing. The position and velocity of each atom are updated by the optimized atomic energy and atomic force, thereby accelerating the calculation of molecular dynamics simulation of the simulated system. The optimization of the SNAP potential function calculation process through fusion computation and hybrid vectorization computation includes: Coordinate mapping and spectral expansion are performed on the local atomic environment density distribution to obtain the spectral expansion coefficients of each central atom; The intermediate coupling quantity is obtained by reusing the coupling contribution increment, and the intermediate coupling quantity is conjugated with the spectral expansion coefficient of the corresponding angular momentum channel to obtain the bispectral components. The energy of each atom is calculated based on the bispectral components. The short-range repulsion energy of each atom and the SNAP atom energy are summed to obtain the total potential energy of the system. The derivative of the total potential energy of the system with respect to the bispectral descriptor is transferred to the spectral expansion coefficient space. An auxiliary quantity is defined and the force on each atom is calculated based on the chain rule.

2. The molecular dynamics simulation method for high-performance computing platforms as described in claim 1, characterized in that, The method of obtaining intermediate coupling amount based on coupling contribution increment reuse specifically includes: A marker is established for each set of input spectral expansion coefficients. The coupling calculation tasks are traversed in the order of the output channels. If the current input combination is marked as uncalculated, complex multiplication is performed and the result is cached before marking. If it is marked as calculated, the cached result is read directly. The obtained product result is weighted and accumulated by CG coefficients and written to the corresponding position of the intermediate coupling quantity.

3. The molecular dynamics simulation method for high-performance computing platforms as described in claim 2, characterized in that, The process of traversing the coupled computation tasks in the order of the output channels is as follows: The coupled calculation tasks of each output channel are traversed sequentially according to the output channel number from smallest to largest. For each input combination of the current output channel, the spectral expansion coefficient product of the input combination is determined by the flag bit to see if it has been calculated by the previous output channel. If it has been calculated, the cached result is directly reused; otherwise, it is calculated and cached.

4. The molecular dynamics simulation method for high-performance computing platforms as described in claim 1, characterized in that, The hybrid vectorized computation is as follows: based on the computational characteristics of the current computational stage, the atomic neighbor dimension or the central atomic dimension is adaptively selected as the vectorization direction, and parallel vectorized computation is performed using the processor's vector instruction set.

5. The molecular dynamics simulation method for high-performance computing platforms as described in claim 4, characterized in that, The adaptive selection of either the atomic neighbor dimension or the central atomic dimension as the vectorization direction based on the computational characteristics of the current computation stage specifically includes: In the calculation stage of spectral expansion coefficients and their derivatives, the atomic neighbor dimension is used as the vectorization direction, and the neighbor index is set as a continuous storage dimension, so that the basis functions, smoothing functions and their derivatives of multiple neighbor atoms can be calculated in parallel through vector instructions. During the computation of intermediate coupling quantities and bispectral components, the central atom dimension is used as the vectorization direction, and the central atom index is set as a continuous storage dimension, so that the same computational components of multiple central atoms are loaded into the vector register for parallel computation.

6. The molecular dynamics simulation method for high-performance computing platforms as described in claim 1, characterized in that, The spectral expansion coefficients are: in, central atom The spectral expansion coefficients are used to characterize the local atomic environment information. , Indexed by magnetic quantum number; For neighboring atomic indexes; central atom With neighboring atoms The distance between them This is the corresponding unit direction vector, used to describe spatial direction information; This is a truncation function used to limit the scope of the local environment and ensure the locality of the descriptor; These are radial basis functions used to encode inter-atomic distance information; It is a spherical harmonic function used to describe the angular distribution characteristics of neighboring atoms.

7. The molecular dynamics simulation method for high-performance computing platforms as described in claim 1, characterized in that, The total potential energy of the system is obtained by adding the short-range repulsion energies of each atom to the SNAP atom energies: in, For total potential energy, This represents the short-range repulsion energy of each atom; SNAP atomic energy; The derivative of energy with respect to the bispectral components is transferred to the spectral expansion coefficient space, and an auxiliary quantity is defined, which is calculated from the bispectral derivative, intermediate coupling quantity, and symmetric permutation contribution: in, For the auxiliary gradient term, Let be the derivative of energy with respect to the bispectral components. It is a bispectral component. This is an intermediate coupling quantity in bispectral construction, used to describe different angular momentum channels. , and The coupling relationship between them For the symmetric contribution term, it is used to collect the equivalent derivative contributions generated by different arrangement methods in the bispectral triple coupling structure; Calculate the forces acting on atoms based on the chain rule: in, Represents atomic force; This represents the total energy of the system; Indicates the first One bispectral component; Represents the atomic position vector; This represents the expansion coefficients defined above.

8. A molecular dynamics simulation system for high-performance computing platforms, characterized in that, include: The local environment construction module is configured to: read the atomic coordinates and element type information of the simulation system, determine the set of neighboring atoms of each central atom based on the preset cutoff radius, construct the local atomic environment density distribution according to the position and element type of the central atom and neighboring atoms, and construct the SNAP potential function; The SNAP potential calculation acceleration module is configured to: optimize the calculation process of the SNAP potential function through fusion calculation and hybrid vectorization calculation, and update the position and velocity of each atom through the optimized atomic energy and atomic force, thereby accelerating the calculation of molecular dynamics simulation of the simulation system; The optimization of the SNAP potential function calculation process through fusion computation and hybrid vectorization computation includes: Coordinate mapping and spectral expansion are performed on the local atomic environment density distribution to obtain the spectral expansion coefficients of each central atom; The intermediate coupling quantity is obtained by reusing the coupling contribution increment, and the intermediate coupling quantity is conjugated with the spectral expansion coefficient of the corresponding angular momentum channel to obtain the bispectral components. The energy of each atom is calculated based on the bispectral components. The short-range repulsion energy of each atom and the SNAP atom energy are summed to obtain the total potential energy of the system. The derivative of the total potential energy of the system with respect to the bispectral descriptor is transferred to the spectral expansion coefficient space. An auxiliary quantity is defined and the force on each atom is calculated based on the chain rule.

9. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by a processor, the program implements the steps in a molecular dynamics simulation method for a high-performance computing platform as described in any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the molecular dynamics simulation method for a high-performance computing platform as described in any one of claims 1-7.