Molecular dynamics adjacency list construction optimization method and system and super computer platform

The atomic layout is optimized through three-dimensional integer grid coordinate mapping and Hilbert sorting, combined with vectorization processing and cluster neighbor entry data structure, and the performance bottleneck in the construction of traditional molecular dynamics adjacency tables is solved, achieving more efficient molecular simulation.

CN120388629AActive Publication Date: 2025-07-29SHANDONG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In large-scale simulation, traditional molecular dynamics adjacency table construction methods have problems such as decreased cache hit rate, unbalanced load, serious competition between pseudo-sharing and locks, and poor vectorization architecture support, resulting in 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 areas, and atomic clusters are uniformly traversed through vectorized instructions to construct an adjacency table, and redundant storage is removed in combination with the cluster neighbor entry data structure.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388629A_ABST
    Figure CN120388629A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of molecular dynamics, and provides a molecular dynamics adjacency list construction optimization method, a molecular dynamics adjacency list construction optimization system and a super computer platform in order to solve the problem that the cache hit rate is reduced when a traditional adjacency list is constructed. The molecular dynamics adjacency list construction optimization method comprises the following steps: mapping atomic coordinates in each physical space to three-dimensional integer grid coordinates; carrying out one-dimensional mapping coding on the three-dimensional integer grid coordinates of all the atoms and sorting all the atoms; clustering all the sequenced atoms to obtain a plurality of atom clusters and initializing sharing states in the atom clusters; constructing a candidate neighbor region of each atomic cluster based on the initialized sharing state in each atomic cluster; and uniformly traversing the candidate neighbor regions of each atomic cluster according to a vectorization instruction, constructing an adjacency list of each atom of each atomic cluster, and writing the adjacency list into a global adjacency list, so that larger-scale and higher-efficiency molecular simulation is realized.
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 particularly relates to an optimized method, system and supercomputer platform for constructing a molecular dynamics adjacency list. Background Art

[0002] The statements in this part only provide background technical information related to the present invention, and do not necessarily constitute prior art.

[0003] In large-scale molecular dynamics simulations, it is necessary to quickly construct the adjacency list of each atom in each time step to screen out all possible neighbor atom pairs within the cut-off distance, so as to efficiently calculate the intermolecular forces. As the scale of the simulation system rapidly expands to the level of hundreds of millions of atoms and is deployed on modern high-performance computing platforms at the same time, such as heterogeneous computing platforms, NUMA (Non-Uniform Memory Access) multi-node architectures, and large-scale multi-core / multi-threaded systems, the traditional adjacency list construction method has the following challenges: (1) The arrangement of atoms in storage is discontinuous, and the neighbor search process frequently jumps to access memory, especially when the space division is uneven, which significantly reduces the L1 / L2 cache hit rate.

[0004] (2) In the parallel version, the adjacency list construction usually adopts static partitioning based on atomic IDs, resulting in overloaded threads in high-density regions and idle threads in low-density regions, thus causing load imbalance problems; the non-uniformity of atomic distribution makes some threads need to process far more atoms than other threads, exacerbating the load imbalance; when multiple threads write to the adjacency list area of adjacent atoms, it may lead to false sharing or require lock protection, severely restricting the scalability and throughput performance of the adjacency list construction.

[0005] (3) There are a large number of branches and indirect accesses in the original adjacency list construction process of traditional molecular dynamics simulation software, making it difficult to fully utilize the potential of vector instruction sets such as AVX512 and SVE.

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

[0007] To solve the technical problems existing in the above background art, the present invention provides an optimized method, system and supercomputer platform for constructing a molecular dynamics adjacency list, which has thread-level parallelism, cache friendliness and vectorization ability, so as to fully utilize the hardware potential of the supercomputing platform and achieve larger-scale and higher-efficiency molecular simulations.

[0008] To achieve the above object, the present invention adopts the following technical solutions: The first aspect of the present invention provides an optimized method for constructing a molecular dynamics adjacency list.

[0009] An optimized method for constructing a molecular dynamics adjacency list, which includes: Physically partition the molecular dynamics simulation region, 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 the sorted atoms to obtain several atom clusters and initialize the shared state therein; Based on the initialized shared state in each atom cluster, construct a candidate neighbor region for each atom cluster; According to the vectorization instruction, uniformly traverse the candidate neighbor regions of each atom cluster, construct the adjacency list of each atom in each atom cluster and write it into the global adjacency list.

[0010] As an implementation, during 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 corresponding candidate atom and the mask of the current atom cluster.

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

[0012] As an implementation, according to the mask in the data structure of the cluster neighbor entry of a certain candidate atom, remove the redundant storage of the current candidate atom in the global adjacency list.

[0013] As an implementation, for each atom in each atom cluster, judge one by one whether each atom and the candidate atoms in its corresponding candidate neighbor region satisfy the neighbor condition. If so, add the corresponding candidate atom to the adjacency list of the current atom.

[0014] As an implementation, perform Hilbert sorting on the atoms with all three-dimensional integer grid coordinates.

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

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

[0017] A molecular dynamics adjacency list construction optimization system includes: A coordinate mapping module, which is used to partition the physical space of the molecular dynamics simulation region, construct a physical space index, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates; An atomic 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 value; An atomic clustering module, which is used to cluster all sorted atoms to obtain several atomic clusters and initialize the shared state therein; A candidate neighbor region construction module, which is used to construct a candidate neighbor region of each atomic cluster based on the shared state in each initialized atomic cluster; A vectorized traversal module, which is used to uniformly traverse the candidate neighbor regions of each atomic cluster according to vectorized instructions, construct the adjacency list of each atom in each atomic cluster, and write it into the global adjacency list.

[0018] The third aspect of the present invention provides a computer program product.

[0019] A computer program product includes a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps in the above-mentioned molecular dynamics adjacency list construction optimization method are implemented.

[0020] The fourth aspect of the present invention provides a supercomputer platform.

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

[0022] Compared with the prior art, the beneficial effects of the present invention are: (1) In the present invention, atoms in each physical space of the molecular dynamics simulation region are encoded by one-dimensional mapping with three-dimensional integer grid coordinates, and then all atoms are sorted according to the one-dimensional mapping encoding values, so that the continuity of adjacent atoms in the physical space is maximized in the memory layout. The atom indices rearranged in this way are used to generate the access sequence of atomic attributes. During the construction of the adjacency list, the access pattern is more sequential and local, significantly improving the CPU cache hit rate and reducing the memory access latency. At the same time, sorting facilitates subsequent clustered parallel chunking, supporting batch processing and vectorization optimization.

[0023] (2) In the present invention, all atoms after cluster sorting are clustered and their shared states are initialized, and then the candidate neighbor regions of each atom cluster are constructed. The candidate neighbor regions of each atom cluster are uniformly traversed according to the vectorization instructions, and the adjacency lists of atoms in each atom cluster are constructed and written into the global adjacency list. It has thread-level parallelism, cache friendliness, and vectorization ability, can fully utilize the hardware potential of the supercomputing platform, and realizes true sharing under multi-threaded parallelism and large-scale and high-efficiency molecular simulation.

[0024] (3) During the process of traversing the corresponding candidate neighbor regions, a data structure of a cluster neighbor entry is constructed for each candidate atom in the candidate neighbor regions. The data structure of the cluster neighbor entry is composed of the candidate atom and the mask of the current atom cluster. Moreover, according to the mask in the data structure of the cluster neighbor entry of a certain candidate atom, redundant storage of the current candidate atom in the global adjacency list is removed, avoiding problems of a large amount of memory occupation and cache invalidation, and improving the performance of molecular dynamics simulation calculations on the entire supercomputer platform.

[0025] Advantages of additional aspects of the present invention will be partially given in the following description, partially will become obvious from the following description, or will be understood through the practice of the present invention. Description of the Drawings

[0026] The specification drawings forming a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.

[0027] Figure 1 It is a flowchart of an optimization method for constructing a molecular dynamics adjacency list according to an embodiment of the present invention; Figure 2 It is about the initial distribution of atoms in three-dimensional space and the distribution of atoms in three-dimensional space after Hilbert sorting according to an embodiment of the present invention; Figure 3 It is a schematic diagram of multiple i atoms sharing the same j atom according to an embodiment of the present invention; Figure 4is the optimized multi - process speedup ratio of the embodiment of the present invention; Figure 5 is the optimized short - range force calculation process of the embodiment of the present invention; Figure 6 is a schematic structural diagram of an optimized system for constructing a molecular dynamics adjacency list according to an embodiment of the present invention. Detailed implementation manners

[0028] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0029] It should be noted that the following detailed description is exemplary and is 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 of ordinary skill in the technical field to which the present invention belongs.

[0030] It should be noted that the terms used herein are only for describing specific implementation manners 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 forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0031] Figure 1 A flowchart of an optimized method for constructing a molecular dynamics adjacency list according to an embodiment of the present invention is given. An optimized method for constructing a molecular dynamics adjacency list according to an embodiment of the present invention specifically includes the following steps S101 - S105.

[0032] The following is combined with Figure 1 to detail the specific implementation process of steps S101 - S105.

[0033] S101: Physically divide the molecular dynamics simulation region, construct a physical space index, and map the atomic coordinates in each physical space to three - dimensional integer grid coordinates.

[0034] In the specific implementation process of step S101, the molecular dynamics simulation region can be evenly divided into grid cells according to artificially set requirements, and the physical space index can be determined based on the uniform grid cells, and then the atomic coordinates in each physical space can be determined.

[0035] Normalize the atomic coordinates in each physical space so that they are 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 set function parameter in Python; -> represents the mapping symbol.

[0036] Further scale the coordinates mapped to the unit cube [0,1)^3 region to the discrete lattice space ([0,2^n)^3) to obtain integer coordinates, and then the three-dimensional integer grid coordinates (xi, yi, zi) can be obtained.

[0037] int xi = (int)(lamda[0] * scale); int yi = (int)(lamda[1] * scale); int zi = (int)(lamda[2] * scale); Among them, int means to take the integer; scale represents the grid size; lamda[0], lamda[1], and lamda[2] respectively represent the coordinates corresponding to the unit cube [0,1)^3 region in the X-axis, Y-axis, and Z-axis directions of three dimensions.

[0038] 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 value, so as to maximize the continuity of adjacent atoms in the memory layout in the physical space.

[0039] In some alternative embodiments, Hilbert sorting is performed on the atoms with all three-dimensional integer grid coordinates.

[0040] For example, convert these integer coordinates into one-dimensional Hilber encoding values through the Hilbert encoding function: uint64_t hilbert_id = hilbert_encode_3d(xi, yi, zi); Among them, uint64_t hilbert_id represents the Hilber encoding value; hilbert_encode_3d represents the Hilbert encoding function; (xi, yi, zi) represents the three-dimensional integer grid coordinates.

[0041] Then, sort the atoms according to the Hilber coding values. After the sorting is completed, it is necessary to rearrange the data structures related to the atoms (such as x, type, mask, etc.) and reconstruct the spatial bin division.

[0042] Figure 2 In (a) of Figure 2 , it shows the initial distribution of atoms in three-dimensional space, and the point distribution is disordered and lacks spatial continuity. Such a distribution method will cause the following problems: (1) Cache unfriendly: The positions of adjacent atoms in memory are scattered, which is likely to cause cache misses; (2) Low efficiency in constructing the adjacency list: Accessing long-distance memory locations increases the memory access latency; (3) Unbalanced parallel load: The accessed areas among threads are discontinuous, making it difficult to divide them into local tasks.

[0043] After Hilbert sorting all the atoms with three-dimensional integer grid coordinates, as shown in (b) of Figure 2 , the atoms are still distributed in three-dimensional space, but are re-sorted by the Hilbert curve and connected along the curve. The advantages are as follows: Adjacent atoms are also as close as possible in physical space, and their layout in memory is continuous after sorting; It is more suitable for binning and constructing the adjacency list, improving the locality of data access; Increasing the cache hit rate, reducing false sharing, and improving the parallel construction efficiency; Facilitating clustering and vectorization processing (such as loading the coordinates of multiple atoms at one time).

[0044] Using the Hilbert curve to sort the atoms makes the atoms adjacent in physical space also as continuous as possible in memory layout; The re-arranged atomic indices are used to generate access sequences for atomic attributes such as x coordinates and type types; This makes the access pattern more sequential and local during the construction of the adjacency list, significantly increasing the CPU cache hit rate and reducing the memory access latency; At the same time, it is convenient for subsequent clustering parallel block division, supporting batch processing and vectorization optimization.

[0045] It can be understood that in other embodiments, for the one-dimensional mapping coding method of the three-dimensional integer grid coordinates of all atoms, in addition to the Hilbert coding, methods such as vector quantization or Z-order curve can also be used, which will not be elaborated here.

[0046] S103: Cluster all the sorted atoms to obtain several atom clusters and initialize the shared states therein.

[0047] Specifically, divide all the sorted atoms (for example, after being sorted by the Hilbert curve) into atom clusters (clusters) of a fixed size in sequence. Each cluster usually contains 8 or 16 atoms. Such a division ensures that the atoms within each atom cluster have strong locality in space.​​

[0048] Before constructing the adjacency list for each atomic cluster, necessary information of the atoms within the cluster (such as x coordinate, type, mask, quaternion orientation, etc.) will be uniformly extracted into a local cache array for convenient unified processing.

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

[0050] In the specific implementation process, within the preset search radius range (for example, cutoff or bin), construct the candidate neighbor region for each atomic cluster. Among them, cutoff represents the truncation range; bin represents the preset bin range.

[0051] For each atomic cluster, only delimit an adjacent candidate area with a search radius around its spatial region, and select the atoms that may become neighbors from it. These candidate atom lists are shared at the cluster level instead of being maintained separately for each atom.

[0052] S105: Uniformly traverse the candidate neighbor regions of each atomic cluster according to the vectorization instruction, construct the adjacency list of each atom in each atomic cluster, and write it into the global adjacency list.

[0053] In the specific implementation process of S105, for each atom within each atomic cluster, judge one by one whether each atom and the candidate atoms within its corresponding candidate neighbor region meet the neighbor conditions. If they meet, add the corresponding candidate atoms to the adjacency list of the current atom.

[0054] The neighbor condition here can be: the rsq (i.e., the square of the distance) between the atom and the candidate atoms within its corresponding candidate neighbor region is less than cutoff² (i.e., the square of the truncation distance), or other conditions can be set according to the actual situation, which will not be elaborated here.

[0055] This embodiment avoids repeated calculations and traversals by sharing the candidate set among multiple atoms.

[0056] Since the atoms within the atomic cluster are continuously numbered, the adjacency lists of each atom in each atomic cluster can be directly written into the global adjacency list according to the offset.

[0057] Such as Figure 3As shown, multiple i atoms share the same j atoms (for example, j5, j8, and j9 are accessed by multiple i atoms), which reflects the overlap of neighbor data. This overlapping relationship provides room for optimizing the construction of the batch adjacency list. In the implementation, the i atoms are divided into groups of a fixed size (such as 8), and grouped processing is performed (the first group, the second group, and the third group in the figure). Each group loads the coordinate, type, and quaternion information of multiple i atoms simultaneously during the neighbor search process, and uniformly determines its distance relationship with the candidate j atoms through vectorized instructions.

[0058] Due to the neighbor overlap among multiple i atoms within a group, the coordinate data of the accessed j atoms can be reused multiple times in the cache, thus significantly reducing the cache miss rate. In addition, unified scheduling and batch operations reduce the number of memory accesses and avoid thread competition, which is beneficial to efficiently utilize modern CPU vector execution units such as SIMD / SVE, thereby significantly improving the throughput rate and overall performance of the adjacency list construction.

[0059] In traditional adjacency list construction software (such as LAMMPS), each atom i maintains its own adjacency column firstneigh[i] separately, where each item in the adjacency column firstneigh[i] is the global ID of the neighbor j that has an interaction with it. Although this design is general, there are two key performance issues: (1) Serious data redundancy: If multiple i atoms are adjacent to the same j atom, the j atom will appear repeatedly in multiple lists.

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

[0061] These problems will cause a large amount of memory occupation and cache misses in large-scale systems (such as millions of atoms), severely restricting performance.

[0062] To solve the above problems, in the embodiment of the present invention, during 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 corresponding candidate atom and the mask of the current atom cluster.

[0063] For example, first, the i atoms are divided into several small clusters (clusters), such as a group of 8; For each cluster, only the adjacency relationships of this group of i atoms are processed.

[0064] Data structure of the Cluster Neigh Entry: For each discovered candidate neighbor j, instead of storing it separately for each i, a Cluster Neigh Entry data structure is constructed: struct Cluster Neigh Entry { int j; uint32_t mask; }}.

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

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

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

[0068] In some specific embodiments, according to the mask in the data structure of the cluster neighbor entry of a certain candidate atom, redundant storage of the current candidate atom in the global adjacency list is removed.

[0069] Among them, each j atom will only be added once; all j adjacent i atoms only record their existence through a bit mask.

[0070] Next, the adjacency list constructed by using the optimized method for constructing the molecular dynamics adjacency list according to the embodiments of the present invention is applied to the field of short-range force analysis in molecular dynamics.

[0071] For example, the Lennard-Jones (LJ) potential is a commonly used two-body potential function, mainly 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, etc.

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

[0073] The force exerted on atom i by atom j is the gradient of the LJ potential energy with respect to the atomic spacing : : (3); wherein, represents the atomic spacing vector.

[0074] It is calculated that: (4); wherein, when <σ: repulsive force dominates; when >σ: attractive force dominates; when the potential energy reaches its minimum value (i.e., the equilibrium position).

[0075] (5); In actual simulations, in order to reduce the computational amount in the above formula (5), the potential energy is usually truncated at a certain distance denotes the LJ truncated potential energy.

[0076] Figure 5 As shown, for the adjacency list constructed by the optimized method for constructing the molecular dynamics adjacency list according to the embodiments of the present invention, the process of optimizing the short-range force is as follows: Step a: Vectorize and load an atomic cluster, and obtain the coordinates and types of each atom in an atomic cluster; Step b: Initialize the force conditions of each atom in a cluster and store them in a temporary variable; Step c: Calculate the force on it according to the positions of the neighboring atoms of each atom in the cluster; Step d: Store the calculated force condition in a copy of the force on the neighboring atom to prevent conflicts in multi-threaded writing; Step e: Determine whether the force calculation for a certain atom in this cluster is completed; Step f: If the force calculation for a certain atom in this cluster is completed, write the force calculation result into the final calculation result; Step g: Determine whether the force calculations for all atoms are completed; Step i: If the force calculations for all atoms are completed, then reduce the force copy and write it into the final force result; if there are atoms whose force calculations are not completed, return to step a; Step j: The force calculation ends; Step k: Release the space of the copy and update the final force.

[0077] Optimizing the adjacency list data storage through Hilbert curve sorting makes the distribution of adjacent atoms more continuous in memory, significantly improving the memory access efficiency. Combining the aggregation of i atoms optimizes the data access pattern in short-range force calculation, enabling multiple i atoms to load data in batches, reducing the randomness of memory access, increasing the cache hit rate, and reducing the memory access latency. By using vectorized computing, the core of short-range force calculation is optimized, allowing the interactions of multiple atom pairs to be calculated simultaneously, making full use of the vectorized computing ability to improve the computing throughput. In terms of MPI+OpenMP hybrid parallel optimization, the communication overhead between MPI (Message Passing Interface) processes is reduced, and through OpenMP (Shared Memory Parallel) thread-level data sharing, the data replication and synchronization costs are lowered. At the same time, combined with NUMA (Non Uniform Memory Access) affinity optimization, it is ensured that the computing tasks are executed within the same NUMA node, reducing remote memory access and improving the memory access locality. Combining the above optimization measures, together with Table 1 and Figure 4 , it can be seen that the computing 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.

[0078] Table 1 Test results;

[0079] Among them, tau / day is a performance metric in the output of the LAMMPS software, indicating: within 1 day (86,400 seconds) of wall clock time, how many units of simulation time can the simulation program advance (in the unit of " "), which is the core metric for the LAMMPS software to measure simulation efficiency.

[0080] The abbreviation of tau is , The unit of is seconds and can be derived using the following formula: Among them, is a distance unit representing the effective diameter of an atom, with the unit of meters; is a mass unit, usually referring to the mass of a single atom, with the unit of kilograms; is an energy unit, the depth of the potential energy well, representing the interaction strength between atom pairs, with the unit of joules.

[0081] Figure 6 is a schematic diagram of the optimized system structure for constructing a molecular dynamics adjacency list. According to Figure 6 , the optimized system for constructing a molecular dynamics adjacency list specifically includes the following modules: A coordinate mapping module 601, which is used to divide the physical space of the molecular dynamics simulation region, construct a physical space index, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates; An atomic sorting module 602, 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 value, so as to maximize the continuity of adjacent atoms in the memory layout in the physical space; An atomic clustering module 603, which is used to cluster all sorted atoms to obtain a number of atomic clusters and initialize the shared state therein; A candidate neighbor region construction module 604, which is used to construct the candidate neighbor region of each atomic cluster based on the shared state initialized in each atomic cluster; A vectorized traversal module 605, which is used to uniformly traverse the candidate neighbor regions of each atomic cluster according to vectorized instructions, construct the adjacency list of each atom in each atomic cluster and write it into the global adjacency list.

[0082] It should be noted here that the specific implementation processes in the coordinate mapping module 601, atomic sorting module 602, atomic 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 by one to the respective steps in the above-mentioned molecular dynamics adjacency list construction optimization method, and their specific implementation processes are the same, so they will not be elaborated here.

[0083] In one or more embodiments, a supercomputer platform is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the molecular dynamics adjacency list construction optimization method as described above Figure 1 shown.

[0084] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program code.

[0085] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows 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 the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0086] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0087] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An optimized method for constructing a molecular dynamics adjacency list, characterized in that, including: Physically partition the molecular dynamics simulation region, 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 the sorted atoms to obtain several atom clusters and initialize the shared states therein; Based on the initialized shared states within each atom cluster, construct the candidate neighbor regions for each atom cluster; According to the vectorized instructions, uniformly traverse the candidate neighbor regions of each atom cluster, construct the adjacency lists of the atoms in each atom cluster, and write them into the global adjacency list.

2. The optimized method for constructing a molecular dynamics adjacency list according to claim 1, wherein During the process of traversing the corresponding candidate neighbor regions, construct a data structure for a cluster neighbor entry for each candidate atom in the candidate neighbor region, which consists of the corresponding candidate atom and the mask of the current atom cluster.

3. The optimized method for constructing a molecular dynamics adjacency list according to claim 2, wherein In the data structure of the cluster neighbor entry of a certain candidate atom, set the mask of the atoms in the current atom cluster that satisfy the neighbor condition with the corresponding candidate atom to 1.

4. The optimized method for constructing a molecular dynamics adjacency list according to claim 2, characterized in that According to the mask in the data structure of the cluster neighbor entry of a certain candidate atom, remove the redundant storage of the current candidate atom in the global adjacency list.

5. The optimized method for constructing a molecular dynamics adjacency list according to claim 1, characterized in that For each atom within each atom cluster, individually determine whether each atom and the candidate atoms in its corresponding candidate neighbor region satisfy the neighbor condition. If so, add the corresponding candidate atoms to the adjacency list of the current atom.

6. The optimized method for constructing a molecular dynamics adjacency list according to claim 1, characterized in that Perform Hilbert sorting on the atoms with all three-dimensional integer grid coordinates.

7. The optimized method for constructing a molecular dynamics adjacency list according to claim 1, wherein Within the preset search radius range, construct the candidate neighbor regions for each atom cluster.

8. An optimized system for constructing a molecular dynamics adjacency list, characterized in that, including: A coordinate mapping module, which is used to physically partition the molecular dynamics simulation region, construct a physical space index, and map the atomic coordinates in each physical space to three-dimensional integer grid coordinates; An atomic 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; An atomic clustering module, which is used to cluster all the sorted atoms to obtain several atom clusters and initialize the shared states therein; A candidate neighbor region construction module, which is used to construct the candidate neighbor regions for each atom cluster based on the initialized shared states within each atom cluster; A vectorized traversal module, which is used to uniformly traverse the candidate neighbor regions of each atom cluster according to the vectorized instructions, construct the adjacency lists of the atoms in each atom cluster, and write them into the global adjacency list.

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 in the optimized method for constructing a molecular dynamics adjacency list as described in any one of claims 1-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, characterized in that, When the processor executes the program, the steps in the optimized method for constructing a molecular dynamics adjacency list as described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Optimization mapping method of N-body problem short-range action computation on GPU (graphic processing unit) structure

    CN102955686A

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

    CN118692576A

  • Molecular dynamics simulation parallel computing method of TIP4P water model

    CN118862602A

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

    CN119536816A

  • System and method for molecular reconstruction from molecular probability distributions

    US20220198286A1