Molecular dynamics adjacency list construction optimization method, system and supercomputer platform

By optimizing atomic layout through three-dimensional integer grid coordinate mapping and Hilbert sorting, combined with vectorized instructions and cluster neighbor entry data structure, the performance bottleneck in the traditional molecular dynamics adjacency list construction method is solved, and efficient large-scale molecular simulation is achieved.

CN120388629BActive Publication Date: 2025-09-23SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510873488.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-23
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

Traditional molecular dynamics adjacency list construction methods suffer from poor data access locality, load imbalance, severe false sharing and lock contention, low cache hit rate, and poor support for modern vectorized architectures in large-scale simulations, leading to performance bottlenecks.

Method used

Three-dimensional integer grid coordinate mapping and Hilbert sorting are used to optimize the atomic layout. Cluster sorting is used to construct candidate neighbor regions. Vectorized instructions are used to uniformly traverse atomic clusters and build adjacency lists. Memory access is optimized by combining the cluster neighbor entry data structure.

Benefits of technology

It significantly improves the CPU cache hit rate, reduces memory access latency, enables efficient molecular simulation under multi-threaded parallelism, and improves computing performance and throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388629B_ABST
    Figure CN120388629B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of molecular dynamics. To address issues such as decreased cache hit rates during traditional adjacency list construction, a molecular dynamics adjacency list construction optimization method, system, and supercomputer platform are provided. The molecular dynamics adjacency list construction optimization method includes mapping atomic coordinates within each physical space to three-dimensional integer grid coordinates; performing one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms and sorting all atoms; clustering all sorted atoms to obtain a number of atomic clusters and initializing the shared states within them; constructing candidate neighbor regions for each atomic cluster based on the initialized shared states within each atomic cluster; and uniformly traversing the candidate neighbor regions of each atomic cluster according to vectorized instructions, constructing an adjacency list for each atom in each atomic cluster, and writing the list into a global adjacency list, thereby achieving larger-scale and more efficient molecular simulations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of molecular dynamics, and in particular relates to a molecular dynamics adjacency table construction optimization method, system and supercomputer platform. Background Art

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

[0003] In large-scale molecular dynamics simulations, a neighbor list is quickly constructed for each atom at each time step to screen out all possible pairs of neighboring atoms within the cutoff distance, enabling efficient calculation of interatomic interaction forces. As simulation systems rapidly scale to hundreds of millions of atoms and are deployed on modern high-performance computing platforms, such as heterogeneous computing platforms, NUMA (Non Uniform Memory Access) multi-node architectures, and large-scale multi-core / multi-threaded systems, traditional adjacency list construction methods face the following challenges:

[0004] (1) The arrangement of atoms in storage is discontinuous, and the neighbor search process frequently jumps to access memory, which is more obvious when the space is unevenly divided, greatly reducing the L1 / L2 cache hit rate.

[0005] (2) In the parallel version, adjacency list construction usually adopts static partitioning based on atom IDs, which results in excessive thread load in high-density areas and idle threads in low-density areas, resulting in uneven load. The uneven distribution of atoms means that some threads need to process far more atoms than other threads, exacerbating the load imbalance. When multiple threads write to the adjacency table area of ​​adjacent atoms, it may cause false sharing or require locking protection, which seriously restricts the scalability and throughput performance of adjacency list construction.

[0006] (3) The original adjacency list construction process of traditional molecular dynamics simulation software contains a large number of branches and indirect accesses, which makes it difficult to realize the potential of vector instruction sets such as AVX512 and SVE.

[0007] In summary, traditional molecular dynamics adjacency list construction methods have problems such as poor data access locality leading to a decrease in cache hit rate, a lack of effective parallel load balancing during the construction process, severe false sharing and lock contention under multi-threaded parallelism, significant performance fluctuations in non-uniform density areas or highly heterogeneous material systems, and poor support for modern vectorized architectures. Summary of the Invention

[0008] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a molecular dynamics adjacency table construction optimization method, system and supercomputer platform, which have thread-level parallelism, cache friendliness and vectorization capabilities, so as to fully utilize the hardware potential of the supercomputing platform and achieve larger-scale and more efficient molecular simulations.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] A first aspect of the present invention provides a molecular dynamics adjacency list construction optimization method.

[0011] A molecular dynamics adjacency table construction optimization method, comprising:

[0012] Divide the molecular dynamics simulation area into physical space, construct a physical space index, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates;

[0013] Perform one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms, and sort all atoms according to the one-dimensional mapping encoding values;

[0014] Cluster all sorted atoms to obtain several atomic clusters and initialize the shared state within them;

[0015] Based on the initialized shared state within each atomic cluster, a candidate neighbor region of each atomic cluster is constructed;

[0016] According to the vectorized instructions, the candidate neighbor areas of each atomic cluster are uniformly traversed, the adjacency list of each atom in each atomic cluster is constructed and written into the global adjacency table.

[0017] As an implementation method, in the process of traversing the corresponding candidate neighbor region, a data structure of a cluster neighbor entry is constructed for each candidate atom in the candidate neighbor region, which is composed of the mask of the corresponding candidate atom and the current atom cluster.

[0018] As an implementation method, in the data structure of the cluster neighbor entry of a candidate atom, the mask of the atoms of the current atom cluster that meet the neighbor condition with the corresponding candidate atom is set to 1.

[0019] As an implementation method, redundant storage of the current candidate atom in the global adjacency table is removed based on the mask in the data structure of the cluster neighbor entry of a candidate atom.

[0020] As an implementation method, for each atom in each atomic cluster, it is determined one by one whether each atom and the candidate atoms in its corresponding candidate neighbor region meet the neighbor condition. If so, the corresponding candidate atom is added to the adjacency list of the current atom.

[0021] As an implementation method, Hilbert sorting is performed on all atoms at three-dimensional integer grid coordinates.

[0022] As an implementation method, a candidate neighbor region of each atomic cluster is constructed within a preset search radius.

[0023] A second aspect of the present invention provides a molecular dynamics adjacency list construction optimization system.

[0024] A molecular dynamics adjacency table construction optimization system, comprising:

[0025] The coordinate mapping module is used to divide the molecular dynamics simulation area into physical spaces, construct physical space indexes, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates;

[0026] an atom sorting module, which is used to perform one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms and sort all atoms according to the one-dimensional mapping encoding values;

[0027] Atom clustering module, which is used to cluster all sorted atoms, obtain several atomic clusters and initialize the shared state within them;

[0028] A candidate neighbor region construction module is used to construct a candidate neighbor region for each atomic cluster based on the initialized shared state within each atomic cluster;

[0029] The vectorized traversal module is used to uniformly traverse the candidate neighbor areas of each atomic cluster according to the vectorized instructions, build the adjacency list of each atom in each atomic cluster and write it into the global adjacency table.

[0030] A third aspect of the present invention provides a computer program product.

[0031] A computer program product includes a computer program / instruction, which implements the steps in the molecular dynamics adjacency list construction optimization method when executed by a processor.

[0032] A fourth aspect of the present invention provides a supercomputer platform.

[0033] A supercomputer platform includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the molecular dynamics adjacency list construction optimization method described above are implemented.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] (1) The present invention performs one-dimensional mapping encoding on the atoms in each physical space of the molecular dynamics simulation area by three-dimensional integer grid coordinates, and then sorts all atoms according to the one-dimensional mapping code values, so that the continuity of adjacent atoms in the physical space in the memory layout is maximized. The rearranged atomic index is used to generate the access sequence of the atomic properties. In the process of constructing the adjacency list, the access pattern is more sequential and local, which significantly improves the CPU cache hit rate and reduces the memory access latency. At the same time, the sorting facilitates subsequent clustering and parallel partitioning, supporting batch processing and vectorization optimization.

[0036] (2) The present invention clusters all sorted atoms and initializes the shared state within them, thereby constructing the candidate neighbor region of each atomic cluster. The candidate neighbor regions of each atomic cluster are uniformly traversed according to vectorized instructions, and the adjacency list of each atom in each atomic cluster is constructed and written into the global adjacency table. It has thread-level parallelism, cache friendliness and vectorization capabilities, can give full play to the hardware potential of the supercomputing platform, and realize true sharing under multi-threaded parallelism as well as large-scale and high-efficiency molecular simulation.

[0037] (3) In the process of traversing the corresponding candidate neighbor area, the present invention constructs a data structure of a cluster neighbor entry for each candidate atom in the candidate neighbor area. The data structure of the cluster neighbor entry is composed of the mask of the candidate atom and the current atom cluster. In addition, according to the mask in the data structure of the cluster neighbor entry of a candidate atom, the redundant storage of the current candidate atom in the global adjacency table is removed, thereby avoiding the problems of large-scale memory occupation and cache failure, and improving the performance of molecular dynamics simulation calculations on the entire supercomputer platform.

[0038] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0040] Figure 1 This is a flow chart of a molecular dynamics adjacency table construction optimization method according to an embodiment of the present invention;

[0041] Figure 2 The initial distribution of atoms in the three-dimensional space and the distribution of atoms in the three-dimensional space after Hilbert sorting according to an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of multiple i atoms sharing the same j atom according to an embodiment of the present invention;

[0043] Figure 4 is the optimized multi-process speedup ratio of the embodiment of the present invention;

[0044] Figure 5 This is the optimized short-range force calculation process of the embodiment of the present invention;

[0045] Figure 6 Schematic diagram of the structure of a molecular dynamics adjacency table construction optimization system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0047] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0048] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0049] Figure 1 A flow chart of a molecular dynamics adjacency list construction optimization method according to an embodiment of the present invention is provided. The molecular dynamics adjacency list construction optimization method according to an embodiment of the present invention specifically includes the following steps S101 to S105.

[0050] The following combination Figure 1 The specific implementation process of steps S101 to S105 is given in detail.

[0051] S101: Divide the molecular dynamics simulation area into physical spaces, construct physical space indexes, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates.

[0052] In the specific implementation process of step S101, the molecular dynamics simulation area can be evenly divided into grid units according to manually set requirements, and the physical space index is determined based on the even grid units, thereby determining the atomic coordinates in each physical space.

[0053] The atomic coordinates in each physical space are normalized and mapped to the unit cube [0,1)^3 region; the mapping relationship is expressed as: domain->x2lamda(x[i], lamda); domain represents the physical space; x2lamda represents the mapping function; x[i] represents the atomic coordinates in the physical space; lamda represents the setting function parameters in Python; -> represents the mapping symbol.

[0054] The coordinates mapped to the unit cube [0,1)^3 area are further scaled to the discrete grid space ([0,2^n)^3) to obtain integer coordinates, which can be mapped to the three-dimensional integer grid coordinates (xi, yi, zi).

[0055] int xi = (int)(lamda[0] * scale);

[0056] int yi = (int)(lamda[1] * scale);

[0057] int zi = (int)(lamda[2] * scale);

[0058] Among them, int means taking an integer; scale is the grid size of the table; lamda[0], lamda[1] and lamda[2] respectively represent the coordinates corresponding to the unit cube [0,1)^3 area in the three-dimensional X-axis, Y-axis and Z-axis directions.

[0059] S102: Perform one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms, and sort all atoms according to the one-dimensional mapping encoding values, so as to maximize the continuity of adjacent atoms in the physical space in the memory layout.

[0060] In some optional embodiments, Hilbert sorting is performed on all atoms at three-dimensional integer grid coordinates.

[0061] For example, these integer coordinates are converted to one-dimensional Hilber coded values ​​through the Hilbert encoding function:

[0062] uint64_t hilbert_id = hilbert_encode_3d(xi, yi, zi);

[0063] Where uint64_t hilbert_id represents the Hilber encoding value; hilbert_encode_3d represents the Hilbert encoding function; and (xi, yi, zi) represents the three-dimensional integer grid coordinates.

[0064] Then, the atoms are sorted according to their Hilber code values. After sorting, the data structures related to the atoms (such as x, type, mask, etc.) need to be rearranged and the spatial bin divisions need to be reconstructed.

[0065] Figure 2 (a) shows the initial distribution of atoms in three-dimensional space. The point distribution is disordered and lacks spatial continuity. This distribution leads to the following problems:

[0066] (1) Cache-unfriendly: neighboring atoms are scattered in memory, which easily causes cache misses;

[0067] (2) Low efficiency in building adjacency lists: Accessing distant memory locations increases memory access latency;

[0068] (3) Uneven parallel load: The access areas between threads are discontinuous and difficult to divide into local tasks.

[0069] After Hilbert sorting of all atoms with three-dimensional integer grid coordinates, such as Figure 2 As shown in (b), the atoms are still distributed in three-dimensional space, but they are reordered and connected along the Hilbert curve. This approach has the following advantages: adjacent atoms are kept as close together in physical space, resulting in a continuous layout in memory after sorting; it is more suitable for binning and adjacency list construction, improving data access locality; it increases cache hit rates, reduces false sharing, and improves parallel construction efficiency; and it facilitates clustering and vectorization processing (for example, loading the coordinates of multiple atoms at once).

[0070] Atoms are sorted using the Hilbert curve to ensure that adjacent atoms in physical space are as continuous as possible in memory layout. The rearranged atomic indices are used to generate access sequences for atomic attributes such as x-coordinates and type. This makes the access pattern more sequential and localized during adjacency list construction, significantly improving the CPU cache hit rate and reducing memory access latency. Sorting also facilitates subsequent clustering and parallel partitioning, supporting batch processing and vectorized optimization.

[0071] It is understandable that in other embodiments, in addition to Hilbert coding, one-dimensional mapping encoding can be performed on the three-dimensional integer grid coordinates of all atoms by using vector quantization methods or Z-order curve methods, which will not be described in detail here.

[0072] S103: All atoms after clustering are sorted to obtain several atomic clusters and initialize the shared state within them.

[0073] Specifically, all sorted atoms (e.g., after Hilbert curve sorting) are sequentially divided into fixed-size clusters, with each cluster typically containing 8 or 16 atoms. This division ensures that the atoms within each cluster are strongly localized in space.

[0074] Before building the adjacency list for each atomic cluster, the necessary information of the atoms in the cluster (such as x-coordinate, type, mask, quat orientation, etc.) will be uniformly extracted into a local cache array for unified processing.

[0075] S104: Based on the initialized shared state within each atomic cluster, construct a candidate neighbor region for each atomic cluster.

[0076] In a specific implementation, a candidate neighbor region for each atomic cluster is constructed within a preset search radius (e.g., cutoff or bin), where cutoff represents a cutoff range and bin represents a preset bin range.

[0077] For each atom cluster, a search radius of adjacent candidate regions is defined around the spatial region where it is located, from which atoms that may become neighbors are selected. These candidate atom lists are shared at the cluster level, rather than maintained separately for each atom.

[0078] S105: uniformly traverse the candidate neighbor regions of each atomic cluster according to the vectorized instruction, construct an adjacency list of each atom in each atomic cluster, and write the adjacency list into the global adjacency list.

[0079] In the specific implementation process of S105, for each atom in each atomic cluster, it is determined one by one whether each atom and the candidate atoms in its corresponding candidate neighbor area meet the neighbor condition. If so, the corresponding candidate atom is added to the adjacency list of the current atom.

[0080] The neighbor condition here can be: the rsq (i.e., the square of the distance) between the atom and the candidate atoms in its corresponding candidate neighbor region is less than the cutoff² (i.e., the square of the truncation distance). Other conditions can also be set according to actual conditions, which will not be detailed here.

[0081] This embodiment avoids repeated calculation and repeated traversal by sharing the candidate set through multiple atoms.

[0082] Since the atoms in an atomic cluster are numbered consecutively, the adjacency list of each atom in each atomic cluster can be directly written into the global adjacency table according to the offset.

[0083] like Figure 3As shown, multiple i atoms share the same j atom (for example, j5, j8, and j9 are accessed by multiple i atoms), demonstrating the overlap of neighbor data. This overlapping relationship provides optimization space for batch adjacency list construction. In implementation, i atoms are divided into groups of a fixed size (e.g., 8) and processed in groups (the first, second, and third groups in the figure). During the neighbor search, each group simultaneously loads the coordinates, types, and quaternion information of multiple i atoms, and uses vectorized instructions to uniformly determine their distance relationship to the candidate j atom.

[0084] Because multiple i atoms within a group have overlapping neighbors, the coordinate data of j atoms can be reused multiple times in the cache, significantly reducing the cache miss rate. Furthermore, unified scheduling and batch operations reduce memory accesses and avoid inter-thread contention, facilitating efficient utilization of modern CPU vector execution units like SIMD / SVE, significantly improving the throughput and overall performance of adjacency list construction.

[0085] In traditional adjacency list construction software (such as LAMMPS), each atom i maintains its own adjacency list firstneigh[i], where each entry in the adjacency list firstneigh[i] is the global ID of its neighbor j. Although this design is universal, it has two key performance issues:

[0086] (1) Serious data redundancy: If multiple i atoms are adjacent to the same j atom, the j atom will appear repeatedly in multiple lists.

[0087] (2) Lack of aggregation: A piece of j-atom information becomes invalid after being used once in the cache and cannot be reused across multiple i-atoms.

[0088] These problems will cause large amounts of memory usage and cache failures in large-scale systems (such as millions of atoms), seriously restricting performance.

[0089] To solve the above problem, in the embodiment of the present invention, when traversing the corresponding candidate neighbor region, a data structure of a cluster neighbor entry is constructed for each candidate atom in the candidate neighbor region, which is composed of the mask of the corresponding candidate atom and the current atom cluster.

[0090] For example, first divide the i atoms into several small clusters, such as 8 atoms per group;

[0091] For each cluster, only the adjacency relationships of this set of i atoms are processed.

[0092] Cluster Neigh Entry data structure:

[0093] Each time a candidate neighbor j is found, instead of storing it separately for each i, a Cluster Neigh Entry data structure is constructed:

[0094] struct Cluster Neigh Entry {

[0095] int j;

[0096] uint32_t mask;

[0097] }.

[0098] In some specific embodiments, in the data structure of the cluster neighbor entry of a candidate atom, the masks of the atoms of the current atom cluster that satisfy the neighbor condition with the corresponding candidate atom are set to 1.

[0099] If a certain j has an adjacent relationship with the i-th atom in the cluster, the i-th bit of the mask is set to 1.

[0100] If a j5 is also a neighbor of the 0th, 3rd, and 6th i atoms in the cluster, the mask is: mask=0b01001001.

[0101] In some specific embodiments, redundant storage of the current candidate atom in the global adjacency table is removed based on a mask in a data structure of a cluster neighbor entry of a candidate atom.

[0102] Among them, each j The atom is added only once; all j adjacent i Atoms only record their existence via a bit mask.

[0103] Next, the adjacency table constructed by the molecular dynamics adjacency table construction optimization method according to an embodiment of the present invention is applied to the field of short-range force analysis in molecular dynamics.

[0104] For example, the Lennard-Jones (LJ) potential is a commonly used two-body potential function, primarily used to describe the van der Waals force (the balance of attractive and repulsive forces) between atoms or molecules. Its form is relatively simple and is suitable for describing the interactions of noble gas atoms, simple liquids, and other objects.

[0105] (1);

[0106] (2);

[0107] Formula (1) is the LJ potential energy function. For a system with n atoms, the LJ potential function can be expressed as the sum E of the interactions between all atomic pairs, where is the distance between atoms i and j. Formula (2) is the two-body potential function in the form of is the potential energy well depth, which represents the interaction strength between atomic pairs. σ is the effective diameter of the atom.

[0108] Atom i is subject to the force exerted by atom j is the LJ potential energy versus interatomic distance Gradient :

[0109] (3);

[0110] in, represents the interatomic distance vector.

[0111] Calculation yields:

[0112] (4);

[0113] Among them, when <σ: repulsion dominates; when >σ: gravity dominates; when When , the potential energy reaches its minimum value (i.e., equilibrium position).

[0114] (5);

[0115] In actual simulation, in order to reduce the amount of calculation, the above formula (5) usually adds Cut off potential energy, represents the LJ cutoff potential energy.

[0116] like Figure 5 As shown, based on the adjacency table constructed by the molecular dynamics adjacency table construction optimization method according to an embodiment of the present invention, the process of optimizing the short-range force is as follows:

[0117] Step a: Vectorize and load an atomic cluster to obtain the coordinates and types of each atom in the cluster;

[0118] Step b: Initialize the force conditions of each atom in a cluster and store them in temporary variables;

[0119] Step c: Calculate the force on each atom in the cluster based on the positions of its neighboring atoms;

[0120] Step d: Store the calculated force into a copy of the neighboring atom's force to prevent conflicts between multiple threads.

[0121] Step e: Determine whether the force calculation of a certain atom in this cluster is completed;

[0122] Step f: If the force calculation of a certain atom in this cluster is completed, the force calculation result is written into the final calculation result;

[0123] Step g: Determine whether the force calculation of all atoms is completed;

[0124] Step i: If the force calculation for all atoms is completed, the force copy is reduced and then written into the final force result; if the force calculation for some atoms is not completed, then return to step a;

[0125] Step j: force calculation is completed;

[0126] Step k: Release the copy space and update the final force.

[0127] By optimizing the adjacency list data storage through Hilbert curve sorting, the distribution of adjacent atoms in memory is made more continuous, which significantly improves the memory access efficiency. Combined with i-atom aggregation, the data access pattern in the short-range force calculation is optimized, so that multiple i-atoms can load data in batches, reduce the randomness of memory access, improve the cache hit rate and reduce the memory access latency. Using vectorized calculation, the short-range force calculation core is optimized, so that the interactions of multiple atomic pairs can be calculated simultaneously, making full use of the vectorized computing power and improving the computing throughput. In terms of MPI+OpenMP hybrid parallel optimization, the MPI (Information Transfer Interface) inter-process communication overhead is reduced, and the OpenMP (Shared Memory Parallel) thread-level data sharing is used to reduce the data copying and synchronization costs. At the same time, combined with NUMA (Non Uniform Memory Access, non-uniform memory access architecture) affinity optimization, it is ensured that the computing tasks are executed within the same NUMA node, reducing remote memory access and improving memory access locality. Combining the above optimization measures, combined with Table 1 and Figure 4 It can be seen that the computational efficiency, memory access performance and parallel scalability of the existing LAMMPS software on this platform have been significantly improved, enabling large-scale molecular dynamics simulations to run more efficiently.

[0128] Table 1 Test results;

[0129]

[0130] Tau / day is a performance indicator output by the LAMMPS software, which indicates how many units of simulation time (in " " is the unit), which is the core indicator used by LAMMPS software to measure simulation efficiency.

[0131] The abbreviation for tau is , The unit is seconds, which can be derived using the following formula: ;

[0132] in, It is a unit of distance, representing the effective diameter of an atom in meters; It is a unit of mass, usually referring to the mass of a single atom, measured in kilograms; It is a unit of energy, the depth of the potential energy well, which represents the strength of the interaction between atomic pairs, and the unit is joule.

[0133] Figure 6 This is a schematic diagram of a molecular dynamics adjacency table construction optimization system according to an embodiment of the present invention. Figure 6 , the molecular dynamics adjacency table construction optimization system includes the following modules:

[0134] A coordinate mapping module 601 is used to divide the molecular dynamics simulation area into physical spaces, construct physical space indexes, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates;

[0135] an atom sorting module 602 for performing one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms and sorting all atoms according to the one-dimensional mapping encoding values, so as to maximize the continuity of adjacent atoms in the physical space in the memory layout;

[0136] Atom clustering module 603, which is used to cluster all sorted atoms to obtain several atomic clusters and initialize the shared state within them;

[0137] A candidate neighbor region construction module 604 is configured to construct a candidate neighbor region for each atomic cluster based on the initialized shared state within each atomic cluster;

[0138] The vectorized traversal module 605 is used to uniformly traverse the candidate neighbor regions of each atomic cluster according to the vectorized instruction, construct an adjacency list of each atom in each atomic cluster, and write the adjacency list into the global adjacency list.

[0139] It should be noted here that the specific implementation processes of the coordinate mapping module 601, atom sorting module 602, atom clustering module 603, candidate neighbor region construction module 604 and vectorized traversal module 605 in the molecular dynamics adjacency list construction optimization system correspond one-to-one to the various steps in the above-mentioned molecular dynamics adjacency list construction optimization method, and their specific implementation processes are the same and will not be described in detail here.

[0140] In one or more embodiments, a supercomputer platform is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned Figure 1The steps in the molecular dynamics adjacency list construction optimization method are shown.

[0141] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0142] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0144] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A molecular dynamics adjacency table construction optimization method, characterized in that: include: Divide the molecular dynamics simulation area into physical space, construct a physical space index, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates; Perform one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms, and sort all atoms according to the one-dimensional mapping encoding values; Cluster all sorted atoms to obtain several atomic clusters and initialize the shared state within them; Based on the initialized shared state within each atomic cluster, a candidate neighbor region of each atomic cluster is constructed; According to the vectorized instructions, the candidate neighbor areas of each atomic cluster are uniformly traversed, the adjacency list of each atom in each atomic cluster is constructed and written into the global adjacency table.

2. The molecular dynamics adjacency table construction optimization method according to claim 1, characterized in that: In the process of traversing the corresponding candidate neighbor region, a data structure of a cluster neighbor entry is constructed for each candidate atom in the candidate neighbor region, which is composed of the mask of the corresponding candidate atom and the current atom cluster.

3. The molecular dynamics adjacency table construction optimization method according to claim 2, characterized in that: In the data structure of the cluster neighbor entry of a candidate atom, the masks of the atoms of the current atom cluster that satisfy the neighbor condition with the corresponding candidate atom are set to 1.

4. The molecular dynamics adjacency table construction optimization method according to claim 2, wherein: According to the mask in the data structure of the cluster neighbor entry of a candidate atom, the redundant storage of the current candidate atom in the global adjacency table is removed.

5. The molecular dynamics adjacency table construction optimization method according to claim 1, wherein: For each atom in each atomic cluster, it is determined whether each atom and the candidate atoms in its corresponding candidate neighbor area meet the neighbor condition. If so, the corresponding candidate atom is added to the adjacency list of the current atom.

6. The molecular dynamics adjacency table construction optimization method according to claim 1, wherein: Perform Hilbert sorting of all atoms with integer grid coordinates in 3D.

7. The molecular dynamics adjacency table construction optimization method according to claim 1, characterized in that: Within the preset search radius, the candidate neighbor region of each atomic cluster is constructed.

8. A molecular dynamics adjacency table construction optimization system, characterized in that: include: The coordinate mapping module is used to divide the molecular dynamics simulation area into physical spaces, construct physical space indexes, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates; an atom sorting module, which is used to perform one-dimensional mapping encoding on the three-dimensional integer grid coordinates of all atoms and sort all atoms according to the one-dimensional mapping encoding values; Atom clustering module, which is used to cluster all sorted atoms, obtain several atomic clusters and initialize the shared state within them; A candidate neighbor region construction module is used to construct a candidate neighbor region for each atomic cluster based on the initialized shared state within each atomic cluster; The vectorized traversal module is used to uniformly traverse the candidate neighbor areas of each atomic cluster according to the vectorized instructions, build the adjacency list of each atom in each atomic cluster and write it into the global adjacency table.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the molecular dynamics adjacency list construction optimization method according to any one of claims 1 to 7 are implemented.

10. A supercomputer platform comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the molecular dynamics adjacency list construction optimization method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Molecular dynamics simulation acting force analysis method and device and computer equipment

    CN118692576A

  • Method for operating DeePMD-kit model in Shenwei super computer

    CN119536816A