Method and apparatus for determining inter-particle interactions based on matrix
By using a tower disk model to divide the virtual subspace and select particle pairs in the supercomputer, the problems of large computational load and heavy data transmission load in the existing technology are solved, and more efficient particle interaction calculation is achieved, thus improving the overall efficiency of the supercomputer.
Patent Information
- Application Number
- CN202310943839.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-07-28
AI Technical Summary
Existing technologies suffer from high computational complexity, low efficiency, and excessive data transmission load when calculating inter-particle interactions, especially the motion of microscopic particles, resulting in low supercomputing efficiency.
The tower disk model is used instead of the hemispherical model. The physical space is divided into virtual subspaces, and pairs of virtual subspaces that meet the preset conditions are selected to construct the target tower disk model. Only particle pairs with a distance smaller than the preset cutoff radius are calculated, which improves computational efficiency and reduces data transmission.
By reducing redundant computations and data transmission, the computational efficiency and transmission rate of the supercomputer are significantly improved, enhancing its ability to compute Hamiltonian matrices.
Smart Images

Figure CN117095759B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of simulation computing, and in particular to a method and apparatus for determining inter-particle interactions based on matrices. Background Technology
[0002] In many simulation methods, accurately calculating the interactions between particles is essential. Newton's second law applies to macroscopic objects, but it does not apply to the motion of microscopic particles such as molecules, atoms, and electrons. The motion of these microscopic particles has a quantized characteristic (i.e., changes in physical quantities are discontinuous, but rather occur in jumps or leaps in a very small unit). Therefore, quantum chemistry simulations are commonly used to describe the formation and breaking of chemical bonds, predict the properties of transition metal complexes, calculate reaction barriers, and study reaction mechanisms—that is, to use the laws and methods of quantum mechanics to study chemical problems.
[0003] For this type of particle interaction, the computational complexity is positively correlated with the number of particles; the more particles, the greater the computational complexity and the lower the computational efficiency. To improve efficiency, traditional supercomputers currently mainly employ parallel computing methods to accelerate computation. Parallel computing divides the object to be computed into several parts, and then places each part into a computing unit. Each computing unit is responsible for the computation of its own object and also handles some inter-unit computations. The advantage of this method is that it allows several computing units to compute simultaneously, reducing the amount of computation handled by each unit and shortening the computation time, effectively improving computational efficiency. However, the disadvantages are the input and output loads: before computation, particle information needs to be transferred to different computing units, and after computation, the computation results need to be transferred from different computing units back to the computing unit where the corresponding particle resides.
[0004] When calculating the Hamiltonian matrix, a parallel approach is used to distribute the computational task to different computational units to improve the computational speed. However, before each calculation, the updated particle coordinate information needs to be migrated to different computational units. After the calculation, the calculation results need to be transmitted. As a result, data is transmitted between computational units. Due to the huge number of particles, the input and output load greatly increases the data transmission time. Summary of the Invention
[0005] In view of this, in order to solve the above-mentioned technical problems or some of the technical problems, the present invention provides a method and apparatus for determining inter-particle interactions based on a matrix.
[0006] In a first aspect, embodiments of the present invention provide a method for determining inter-particle interactions based on a matrix, comprising:
[0007] Obtain the multiple computing units currently participating in the calculation, and divide the physical space corresponding to the computing units to obtain the tower tray model corresponding to the computing units;
[0008] From the multiple virtual subspaces of each tower tray model, select virtual subspace pairs that meet the preset conditions, and construct the target tower tray model based on the virtual subspace pairs;
[0009] The particles to be calculated are transferred to the target tray model to determine the target particle pairs participating in the calculation of the Hamiltonian;
[0010] Based on the target tower model and the target particle pair, the interaction between the target particle pair is calculated.
[0011] Furthermore, the method also includes:
[0012] The physical space of each computing unit is divided into multiple virtual subspaces, resulting in multiple virtual subspaces corresponding to each computing unit;
[0013] Using the physical space of each computing unit as the central grid point, and with a preset cutoff radius as the radius, select virtual subspaces within the preset cutoff radius in the x, y, and z axes of each computing unit.
[0014] Multiple tower disk models are constructed by using the virtual subspaces within the preset cutoff radius in the x and y axes as disk models in the tower disk model and the virtual subspace within the preset cutoff radius in the z axis as tower models in the tower disk model.
[0015] Furthermore, the method also includes:
[0016] The tower model is defined as including a disk model and a tower model, wherein the disk model includes multiple virtual subspaces and the tower model includes multiple virtual subspaces;
[0017] Pair each virtual subspace in the disk model with each virtual subspace in the tower model to obtain the distance between each virtual subspace in the disk model and each virtual subspace in the tower model.
[0018] A virtual subspace pair is constructed using two virtual subspaces with a distance smaller than the preset cutoff radius, and the target tower model is constructed using the virtual subspace pair.
[0019] Furthermore, the method also includes:
[0020] Mark the first three-dimensional coordinates corresponding to each virtual subspace in the target tower model;
[0021] Obtain the second three-dimensional coordinates of the particle to be calculated in space;
[0022] The particles whose first three-dimensional coordinates are the same as those in the second three-dimensional coordinates are moved to the corresponding virtual subspace to obtain the target particle pairs that participate in the calculation of the Hamiltonian.
[0023] Furthermore, the method also includes:
[0024] Calculate the zero-order Hamiltonian matrix based on the target particle pairs in the target tower model;
[0025] Based on the current coordinates of the particle in the zero-order Hamiltonian matrix, the particle is relocated to the corresponding virtual subspace, and the charge-related second-order Hamiltonian matrix is calculated.
[0026] The second-order Hamiltonian matrix is iterated multiple times until convergence is achieved to obtain the target Hamiltonian matrix.
[0027] The interaction between the target particle pairs is calculated using the target Hamiltonian matrix.
[0028] Furthermore, the method also includes:
[0029] Based on the particle structure of the target Hamiltonian matrix, calculate the force information of each particle;
[0030] The interactions between particles are calculated based on the force information and velocity of each particle.
[0031] Furthermore, the method also includes:
[0032] The position of the particles in space is updated based on the interaction between the target particle pairs.
[0033] Secondly, embodiments of the present invention provide an apparatus for determining inter-particle interactions based on a matrix, comprising:
[0034] The construction module is used to obtain multiple computing units currently participating in the calculation, and to divide the physical space corresponding to the computing units to obtain the tower disk model corresponding to the computing units;
[0035] The filtering module is used to filter out pairs of virtual subspaces that meet preset conditions from multiple virtual subspaces of each tray model, and to construct a target tray model based on the pairs of virtual subspaces.
[0036] The migration module is used to migrate the particles to be calculated to the target tray model and determine the target particle pairs participating in the calculation of the Hamiltonian.
[0037] The calculation module is used to calculate the interaction between the target particle pairs based on the target tower model and the target particle pairs.
[0038] Thirdly, embodiments of the present invention provide an electronic device, including: a processor and a memory, wherein the processor is configured to execute a program stored in the memory for determining inter-particle interactions based on a matrix, so as to implement the method for determining inter-particle interactions based on a matrix as described in the first aspect above.
[0039] Fourthly, embodiments of the present invention provide a storage medium, comprising: the storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the matrix-based method for determining inter-particle interactions described in the first aspect above.
[0040] The matrix-based particle interaction determination scheme provided in this invention obtains multiple computing units currently participating in the computation and divides the physical space corresponding to each computing unit to obtain a tower model corresponding to that computing unit. From multiple virtual subspaces of each tower model, pairs of virtual subspaces that meet preset conditions are selected, and a target tower model is constructed based on these pairs. The particles to be computed are migrated to the target tower model to determine the target particle pairs participating in the Hamiltonian computation. Based on the target tower model and the target particle pairs, the interactions between the target particle pairs are calculated. Compared to existing methods that involve all particles in the computation, which significantly increases data transmission time due to input and output loads, this scheme reduces computational load and improves computational efficiency by filtering out a large number of redundant particle pairs. It also reduces data transmission load, lowers the load, and increases the transmission rate, thereby greatly improving supercomputing efficiency. Attached Figure Description
[0041] Figure 1 A hemispherical model for calculating the Hamiltonian matrix using existing supercomputing;
[0042] Figure 2 This is a schematic diagram illustrating a computing unit divided into several virtual spaces, as provided in an embodiment of the present invention.
[0043] Figure 3 A schematic diagram of a tower tray model composed of virtual subspaces provided in an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of a virtual subspace in a tower and a virtual subspace in a disk provided for an embodiment of the present invention;
[0045] Figure 5 A flowchart illustrating a method for determining inter-particle interactions based on a matrix, provided in an embodiment of the present invention;
[0046] Figure 6 A flowchart illustrating another method for determining inter-particle interactions based on a matrix, provided in an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of a device for determining inter-particle interactions based on a matrix, provided in an embodiment of the present invention;
[0048] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0051] First, we will introduce supercomputers and the hemispherical model commonly used in supercomputers for calculating Hamiltonian matrices.
[0052] High-performance supercomputing simulation of large systems is an important method to promote the development of various fields. However, the current low computing power of supercomputers is the limiting factor for long-term simulation of large systems. Therefore, how to improve the computing speed and shorten the computing time of large system simulation has become the focus of attention.
[0053] Density functional tight binding (DFTB) is a semi-empirical quantum chemical method that calculates the wavefunction of a system by solving an approximate Schrödinger equation, thereby obtaining the total energy of a multi-atom system and the forces acting on each atom. Because calculating the number of degrees of freedom is difficult, the Born-Oppenheimer (BO) approximation is used, where the motion of the atomic nucleus differs from that of the electrons, allowing for separate calculations of the nuclear and electron wavefunctions for simulation. The simulation consists of three steps: calculating the DFTB electronic structure based on the given atomic positions; calculating the forces acting on each atom based on the converged electronic structure; and updating the atomic positions based on the forces and velocities.
[0054] In the first step of calculating the electronic structure, it is necessary to calculate the electronic structure information—the density matrix, which is divided into three parts: constructing the zero-order Hamiltonian matrix, calculating the charge-related second-order Hamiltonian matrix based on the initial density matrix, and solving for the new Hamiltonian matrix based on the second-order Hamiltonian matrix. Then, the second and third parts are iterated multiple times until convergence.
[0055] The calculation of the Hamiltonian matrix describes a neighborhood problem, calculating the relationship between any two microscopic particles. Specifically, for a system with N atoms, the distance between each atom and the remaining N-1 atoms is first calculated. If the distances are within a certain range, the atom participates in the Hamiltonian matrix calculation; otherwise, it is excluded. Therefore, the computational complexity here is... As the value of N increases, the computational load will show a positive correlation.
[0056] As can be seen from the above calculation process of the Hamiltonian matrix, the computational complexity of this type of calculation is positively correlated with the number of particles in the computational system. For example, for a system with 10,000 particles, it requires the calculation of 50 million particle pairs. Current supercomputers use parallel computing units to improve computational speed. Considering the data transmission problem between different computing units, the traditional supercomputer commonly uses a hemispherical model to calculate the Hamiltonian matrix.
[0057] Figure 1 The existing supercomputing model for calculating the Hamiltonian matrix uses a hemispherical model that divides the entire physical space into several hemispheres, with the radius of each hemisphere being the cutoff radius R. cut Each hemisphere is composed of several computational units. Particles in the system are assigned to different computational units based on their coordinates. The Hamiltonian between the particles in the central computational unit (cube) of each hemisphere and the particles in all other computational units (hemispheres) within that hemisphere is calculated, yielding the Hamiltonian matrix for that state. After each iteration, the particle coordinates change, the particles are reassigned, and the process is repeated. The advantage of this model is its ability to efficiently traverse all neighboring particles of any given particle. The disadvantage is that each computational unit acts as the center of a hemisphere, and the results calculated by each computational unit within a hemisphere need to be transmitted to its central computational unit (cube), resulting in a lot of redundant data transmission and making the model inefficient in calculating the Hamiltonian matrix.
[0058] While traditional supercomputers can traverse all particle pairs using a hemispherical model, improving computation speed, they suffer from excessive data redundancy, leading to increased transmission time and overall low supercomputing efficiency.
[0059] This invention designs a method for efficiently calculating the Hamiltonian matrix in DFTB, which can improve computational efficiency, effectively reduce invalid data transmission, and enhance the efficiency of supercomputing.
[0060] This application employs a parallel computing approach, replacing the hemispherical model with a tower-like model to achieve more efficient computation of the Hamiltonian matrix in the DFTB. During the parallel computation of this model, the entire physical space is divided into equal regions based on the actual number of computational units, and each region is further divided into several virtual subspaces.
[0061] Specifically, such as Figure 2 This is a schematic diagram illustrating a computing unit divided into several virtual spaces, as provided in an embodiment of the present invention. These virtual subspaces are combined to form several tower-like structures, such as... Figure 3 This is a schematic diagram of a tower-platter model composed of virtual subspaces, provided by an embodiment of the present invention. Each tower contains several virtual subspaces, and each platter contains several virtual subspaces. The virtual subspaces in the tower and the virtual subspaces in the platter are paired up, as follows: Figure 4 This invention provides a schematic diagram of virtual subspaces in a tower and virtual subspaces in a disk. The distance between each pair of tower-disk spaces is calculated. Pairs of tower-disk spaces with distances less than the truncation radius are counted, while those with distances greater than the truncation radius are removed. When calculating the Hamiltonian matrix, only the calculations of particles within tower-disk pairs with distances less than the truncation radius are considered, ignoring the calculations of particles within tower-disk pairs with distances greater than the truncation radius. This eliminates a large number of redundant particle pair calculations, reducing computational load and improving computational efficiency. It also reduces transmission load and increases transmission rate, achieving the overall goal of improving supercomputing efficiency.
[0062] The present application will be described in detail below through specific embodiments:
[0063] Figure 5 A flowchart illustrating a method for determining inter-particle interactions based on a matrix, as provided in this application embodiment, is shown below. Figure 5 As shown, the method specifically includes:
[0064] Step S51: Obtain multiple computing units currently participating in the calculation, and divide the physical space corresponding to the computing unit to obtain the tower tray model corresponding to the computing unit.
[0065] In this embodiment, firstly, based on the multiple computing units participating in the computation, the entire physical space is divided into equal regions according to the actual number of computing units. Then, each region is divided into several virtual subspaces, such as... Figure 2 As shown.
[0066] In this embodiment of the application, these virtual subspaces are combined to form several tower disk models, such as Figure 3 As shown, each tower contains several virtual subspaces, and each disk contains several virtual subspaces.
[0067] Step S52: Select virtual subspace pairs that meet preset conditions from multiple virtual subspaces of each tower tray model, and construct the target tower tray model based on the virtual subspace pairs.
[0068] The virtual subspace in the command tower is paired with the virtual subspace in the disk, such as... Figure 4 As shown, the distance between each pair of disk spaces is calculated, and virtual subspaces that meet preset conditions are retained. These preset conditions can be whether the distance is less than a preset cutoff radius. Specifically, disk space pairs with distances less than the preset cutoff radius are counted, while those with distances greater than the preset cutoff radius are removed, resulting in the target disk model. When calculating the Hamiltonian matrix, only the calculation of particles within disk virtual subspace pairs with distances less than the preset cutoff radius is considered; the calculation of particles within disk virtual subspace pairs with distances greater than the cutoff radius is ignored. This eliminates a large number of redundant particle pair calculations, reducing computational load and improving computational efficiency, while also reducing transmission load and increasing transmission rate, achieving the overall goal of improving supercomputing efficiency.
[0069] Step S53: Transfer the particles to be calculated to the target tower model and determine the target particle pairs participating in the calculation of the Hamiltonian.
[0070] Based on the above process, the virtual subspace pairs that need to be calculated are obtained, and then the particles in the system are migrated according to their three-dimensional coordinates in space.
[0071] Specifically, the intersection of the x, y, and z axes can be used as the coordinates (0, 0, 0). Three-dimensional coordinates can be marked for each virtual subspace. Each particle in the system is mapped to a virtual subspace according to its own three-dimensional coordinates. The particles are then moved to the corresponding virtual subspace to determine the target particle pairs participating in the calculation of the Hamiltonian.
[0072] Step S54: Based on the target tower model and the target particle pair, calculate the interaction between the target particle pairs.
[0073] In this embodiment, by combining the statistically obtained virtual subspace pairs with a distance less than a preset cutoff radius with the particle migration results in the virtual subspace, the target particle pairs participating in the calculation of the Hamiltonian can be obtained, and the Hamiltonian matrix in this round can be calculated based on them. After iterative convergence of the Hamiltonian matrix, the force situation of each atom is calculated based on the converged particle structure.
[0074] Compared to the hemispherical model, the disk model requires fewer particle pairs to be computed per disk, has a shorter computation time, and transmits less data. This reduces redundant data transmission, improves transmission efficiency, and thus effectively enhances the efficiency of the supercomputing.
[0075] The matrix-based method for determining inter-particle interactions provided in this application involves obtaining multiple computing units currently participating in the computation and dividing the physical space corresponding to each computing unit to obtain a tower model corresponding to that computing unit. From multiple virtual subspaces of each tower model, pairs of virtual subspaces that meet preset conditions are selected, and a target tower model is constructed based on these pairs. The particles to be computed are migrated to the target tower model to determine the target particle pairs participating in the Hamiltonian computation. Based on the target tower model and the target particle pairs, the interactions between the target particle pairs are calculated. Compared to existing methods that involve all particles in the computation, which significantly increases data transmission time due to input and output loads, this method, by filtering out a large number of redundant particle pairs, reduces the computational load, improves computational efficiency, reduces data transmission volume, lowers the load, and increases the transmission rate, thereby greatly improving supercomputing efficiency.
[0076] Figure 6 A flowchart illustrating another method for determining inter-particle interactions based on a matrix, as provided in this application embodiment, is shown below. Figure 6 As shown, the method specifically includes:
[0077] Step S601: Divide the physical space of each computing unit into multiple virtual subspaces to obtain multiple virtual subspaces corresponding to each computing unit.
[0078] In this embodiment, a tower-like model is used instead of a hemispherical model. First, the entire physical space is divided into equal regions based on the actual number of computing units. Then, each region is divided into several virtual subspaces, such as... Figure 2 As shown, the large cube represents a computational unit, and the small cube represents a virtual subspace.
[0079] For example, suppose there are a total of M×N×L computational units involved in the computation. For each computational unit, there are further m×m×l virtual subspaces, so there are a total of (M×m)×(N×n)×(L×l) virtual subspaces.
[0080] Step S602: Using the physical space of each computing unit as the central grid point, and with a preset cutoff radius as the radius, select virtual subspaces within the preset cutoff radius in the x, y, and z axes of each computing unit.
[0081] Step S603: Use the virtual subspaces within the preset cutoff radius in the x and y axis directions as the disk models in the tower disk model, and use the virtual subspace within the preset cutoff radius in the z axis direction as the tower models in the tower disk model to construct multiple tower disk models.
[0082] Step S604: Determine that the tower model includes a disk model and a tower model, and pair each virtual subspace in the disk model with each virtual subspace in the tower model to obtain the distance between each virtual subspace in the disk model and each virtual subspace in the tower model.
[0083] Step S605: Construct a virtual subspace pair using two virtual subspaces with a distance smaller than the preset cutoff radius, and construct the target tower model using the virtual subspace pair.
[0084] The following provides a unified explanation of S602 to S605:
[0085] In this embodiment of the application, several tower disk models are constructed based on the physical space in which the aforementioned multiple virtual subspaces are located, such as... Figure 3 As shown. In the process of building the tower, the space within each computational unit is first used as the central grid point, and a preset cutoff radius is used as the radius. Virtual subspaces within the preset cutoff radius are selected in the x, y, and z axes of that computational unit. The virtual subspaces in the x and y axes are used as the disk, and the virtual subspace in the z axis is used as the tower. Figure 4 As shown, they are named "upper tower" and "lower tower" respectively, based on their location in the z-direction and -z-direction of the computing unit. Figure 4 The middle arrow represents the distance between the virtual subspace in the tower and the virtual subspace in the disk. The hollow small square represents the central virtual subspace. The dark gray small square represents the virtual subspace above and below the tower. The light gray small square represents the virtual subspace on the disk.
[0086] A tower disk model is constructed using virtual subspaces surrounding the center of a computing unit within a cutoff radius. For the central virtual subspace, its distances to the virtual subspaces above, below, and on the disk are all within the cutoff radius. However, for the virtual subspaces above or below the tower, their distances to the virtual subspaces on the disk may not be within the cutoff radius. Therefore, it is necessary to determine the distances between these pairs of virtual subspaces, filter out pairs of virtual subspaces with distances greater than the preset cutoff radius, and only record pairs of virtual subspaces with distances less than the preset cutoff radius to obtain the target tower disk model.
[0087] Step S606: Mark the first three-dimensional coordinates corresponding to each virtual subspace in the target tower model.
[0088] Based on the above process, the virtual subspace pairs that need to be calculated are obtained, and then the particles in the system are migrated according to their three-dimensional coordinates in space.
[0089] Specifically, the first three-dimensional coordinates can be marked for each virtual subspace using the intersection of the x, y, and z axes as coordinates (0, 0, 0).
[0090] Step S607: Obtain the second three-dimensional coordinates of the particle to be calculated in space.
[0091] Obtain the second three-dimensional coordinates of each particle in the system to be calculated.
[0092] Step S608: Move the particles to be calculated that have the same first three-dimensional coordinates and second three-dimensional coordinates to the corresponding virtual subspace to obtain the target particle pairs participating in the calculation of the Hamiltonian.
[0093] In a system where the first and second three-dimensional coordinates are the same, each particle is mapped to a virtual subspace according to its own three-dimensional coordinates, and the particle is migrated to the corresponding virtual subspace. By combining the statistically obtained pairs of virtual subspaces with a distance less than a preset cutoff radius with the migration results of the particles in the virtual subspaces, the target particle pairs participating in the calculation of the Hamiltonian can be obtained.
[0094] Step S609: Calculate the zero-order Hamiltonian matrix based on the target particle pairs in the target tower model.
[0095] Step S610: Based on the current coordinates of the particle in the zero-order Hamiltonian matrix, relocate the particle to the corresponding virtual subspace and calculate the charge-related second-order Hamiltonian matrix.
[0096] Step S611: Iterate the second-order Hamiltonian matrix multiple times until it converges to obtain the target Hamiltonian matrix.
[0097] The following provides a unified explanation of S609 to S611:
[0098] The zero-order Hamiltonian matrix in this round can be calculated based on the target particle pair involved in the calculation of the Hamiltonian. After this round of iteration, the particle coordinates change, and the current coordinates of the particles are then migrated to the corresponding virtual subspace. The same steps are used to calculate the charge-related second-order Hamiltonian matrix. The second-order Hamiltonian matrix is iterated multiple times until convergence, at which point the iteration ends and the target Hamiltonian matrix is obtained.
[0099] S612. Based on the particle structure of the target Hamiltonian matrix, calculate the force information of each particle.
[0100] S613. Calculate the interactions between particles based on the force information and velocity of each particle.
[0101] S614. Update the position of the particles in space based on the interaction between the target particle pairs.
[0102] The following provides a unified explanation of S612 to S614:
[0103] DFTB electronic structure calculations are performed based on given atomic positions. The force situation of each atom is calculated based on the particle structure (electronic structure) of the convergent target Hamiltonian matrix. The position of the atom in space is updated according to the force information and velocity of the atom.
[0104] Compared to the hemispherical model, the disk model requires fewer particle pairs to be computed per disk, has a shorter computation time, and transmits less data. This reduces redundant data transmission, improves transmission efficiency, and thus effectively enhances the efficiency of the supercomputing.
[0105] The method for determining inter-particle interactions based on matrices provided in this application involves obtaining multiple computing units currently participating in the computation and dividing the physical space corresponding to each computing unit to obtain a tower disk model corresponding to that computing unit. From multiple virtual subspaces of each tower disk model, pairs of virtual subspaces that meet preset conditions are selected, and a target tower disk model is constructed based on these pairs. The particles to be computed are migrated to the target tower disk model to determine the target particle pairs participating in the computation of the Hamiltonian. Based on the target tower disk model and the target particle pairs, the interactions between the target particle pairs are calculated. This method, by adding virtual subspace design to construct tower disk models, facilitates the selection of effective virtual subspaces for computation of the Hamiltonian matrix, reduces the computational load of each model, reduces redundant data transmission, effectively reduces data transmission time, and improves the efficiency of supercomputing in computation of the Hamiltonian matrix.
[0106] Figure 7 A schematic diagram of a device for determining inter-particle interactions based on a matrix, provided in this application embodiment, specifically includes:
[0107] The construction module 701 is used to acquire multiple computing units currently participating in the computation and to divide the physical space corresponding to the computing units to obtain the tower disk model corresponding to the computing units. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0108] The filtering module 702 is used to obtain multiple computing units currently participating in the calculation, and to divide the physical space corresponding to the computing units to obtain the tower disk model corresponding to the computing units. For detailed explanations, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0109] The migration module 703 is used to migrate the particles to be calculated to the target tower model and determine the target particle pairs participating in the calculation of the Hamiltonian. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0110] The calculation module 704 is used to calculate the interaction between the target particle pairs based on the target tower model and the target particle pairs. For detailed explanation, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0111] The matrix-based device for determining inter-particle interactions provided in this embodiment can be as follows: Figure 7 The matrix-based device shown can perform actions such as... Figure 5-6 This involves all the steps of a matrix-based method for determining inter-particle interactions, thereby achieving... Figure 5-6 The technical effects of the matrix-based method for determining inter-particle interactions are shown below. Please refer to [link / reference] for details. Figure 5-6 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0112] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 The illustrated electronic device 800 includes at least one processor 801, a memory 802, at least one network interface 804, and other user interfaces 803. The various components in the electronic device 800 are coupled together via a bus system 805. It is understood that the bus system 805 is used to implement communication between these components. In addition to a data bus, the bus system 805 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 8 The general labeled all buses as Bus System 805.
[0113] The user interface 803 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0114] It is understood that the memory 802 in this embodiment can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 802 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0115] In some implementations, memory 802 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 8021 and application programs 8022.
[0116] The operating system 8021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 8022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this application embodiment can be included in the application program 8022.
[0117] In this embodiment, by calling a program or instruction stored in memory 802, specifically a program or instruction stored in application program 8022, processor 801 executes the method steps provided in each method embodiment, including, for example:
[0118] Multiple computing units currently participating in the calculation are obtained, and the physical space corresponding to the computing units is divided to obtain the tower disk model corresponding to the computing units; virtual subspace pairs that meet preset conditions are selected from multiple virtual subspaces of each tower disk model, and a target tower disk model is constructed based on the virtual subspace pairs; the particles to be calculated are migrated to the target tower disk model to determine the target particle pairs participating in the calculation of Hamiltonian; based on the target tower disk model and the target particle pairs, the interaction between the target particle pairs is calculated.
[0119] Furthermore, the physical space of each computing unit is divided into multiple virtual subspaces, resulting in multiple virtual subspaces corresponding to each computing unit. Taking the physical space of each computing unit as the central grid point, and using a preset cutoff radius as the radius, virtual subspaces within the preset cutoff radius in the x, y, and z axes of each computing unit are selected. The virtual subspaces within the preset cutoff radius in the x and y axes are used as the disk model in the tower disk model, and the virtual subspaces within the preset cutoff radius in the z axis are used as the tower model in the tower disk model, thus constructing multiple tower disk models.
[0120] Furthermore, the tower model is determined to include a disk model and a tower model, wherein the disk model includes multiple virtual subspaces and the tower model includes multiple virtual subspaces; each virtual subspace in the disk model and each virtual subspace in the tower model are paired to obtain the distance between each virtual subspace in the disk model and each virtual subspace in the tower model; virtual subspace pairs are constructed using two virtual subspaces whose distance is less than the preset cutoff radius, and the target tower model is constructed using the virtual subspace pairs.
[0121] Furthermore, the first three-dimensional coordinates corresponding to each virtual subspace in the target tower model are marked; the second three-dimensional coordinates of the particle to be calculated in space are obtained; the particles to be calculated whose first three-dimensional coordinates are the same as those of the second three-dimensional coordinates are migrated to the corresponding virtual subspace to obtain the target particle pairs participating in the calculation of the Hamiltonian.
[0122] Furthermore, based on the target particle pairs in the target tower model, a zero-order Hamiltonian matrix is calculated; based on the current coordinates of the particles in the zero-order Hamiltonian matrix, the particles are relocated to the corresponding virtual subspace, and a charge-related second-order Hamiltonian matrix is calculated; the second-order Hamiltonian matrix is iterated multiple times until convergence is achieved to obtain the target Hamiltonian matrix; the interaction between the target particle pairs is calculated using the target Hamiltonian matrix.
[0123] Furthermore, based on the particle structure of the target Hamiltonian matrix, the force information of each particle is calculated; based on the force information and velocity of each particle, the interaction between particles is calculated.
[0124] Furthermore, the positions of the particles in space are updated based on the interactions between the target particle pairs.
[0125] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 801. Processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in processor 801. The processor 801 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 802. Processor 801 reads the information in memory 802 and, in conjunction with its hardware, completes the steps of the above method.
[0126] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0127] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0128] The electronic device provided in this embodiment may be as follows: Figure 8 The electronic device shown can perform the following: Figure 5-6 This involves all the steps of a matrix-based method for determining inter-particle interactions, thereby achieving... Figure 5-6 The technical effects of the matrix-based method for determining inter-particle interactions are shown below. Please refer to [link / reference] for details. Figure 5-6 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0129] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.
[0130] When one or more programs in the storage medium can be executed by one or more processors to implement the matrix-based method for determining inter-particle interactions that is executed on the electronic device side.
[0131] The processor is configured to execute a program stored in memory that determines inter-particle interactions based on a matrix, to implement the following steps of a method for determining inter-particle interactions based on a matrix, executed on the electronic device side:
[0132] Multiple computing units currently participating in the calculation are obtained, and the physical space corresponding to the computing units is divided to obtain the tower disk model corresponding to the computing units; virtual subspace pairs that meet preset conditions are selected from multiple virtual subspaces of each tower disk model, and a target tower disk model is constructed based on the virtual subspace pairs; the particles to be calculated are migrated to the target tower disk model to determine the target particle pairs participating in the calculation of Hamiltonian; based on the target tower disk model and the target particle pairs, the interaction between the target particle pairs is calculated.
[0133] Furthermore, the physical space of each computing unit is divided into multiple virtual subspaces, resulting in multiple virtual subspaces corresponding to each computing unit. Taking the physical space of each computing unit as the central grid point, and using a preset cutoff radius as the radius, virtual subspaces within the preset cutoff radius in the x, y, and z axes of each computing unit are selected. The virtual subspaces within the preset cutoff radius in the x and y axes are used as the disk model in the tower disk model, and the virtual subspaces within the preset cutoff radius in the z axis are used as the tower model in the tower disk model, thus constructing multiple tower disk models.
[0134] Furthermore, the tower model is determined to include a disk model and a tower model, wherein the disk model includes multiple virtual subspaces and the tower model includes multiple virtual subspaces; each virtual subspace in the disk model and each virtual subspace in the tower model are paired to obtain the distance between each virtual subspace in the disk model and each virtual subspace in the tower model; virtual subspace pairs are constructed using two virtual subspaces whose distance is less than the preset cutoff radius, and the target tower model is constructed using the virtual subspace pairs.
[0135] Furthermore, the first three-dimensional coordinates corresponding to each virtual subspace in the target tower model are marked; the second three-dimensional coordinates of the particle to be calculated in space are obtained; the particles to be calculated whose first three-dimensional coordinates are the same as those of the second three-dimensional coordinates are migrated to the corresponding virtual subspace to obtain the target particle pairs participating in the calculation of the Hamiltonian.
[0136] Furthermore, based on the target particle pairs in the target tower model, a zero-order Hamiltonian matrix is calculated; based on the current coordinates of the particles in the zero-order Hamiltonian matrix, the particles are relocated to the corresponding virtual subspace, and a charge-related second-order Hamiltonian matrix is calculated; the second-order Hamiltonian matrix is iterated multiple times until convergence is achieved to obtain the target Hamiltonian matrix; the interaction between the target particle pairs is calculated using the target Hamiltonian matrix.
[0137] Furthermore, based on the particle structure of the target Hamiltonian matrix, the force information of each particle is calculated; based on the force information and velocity of each particle, the interaction between particles is calculated.
[0138] Furthermore, the positions of the particles in space are updated based on the interactions between the target particle pairs.
[0139] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0140] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0141] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining inter-particle interactions based on a matrix, characterized in that, include: Obtain the multiple computing units currently participating in the calculation, and divide the physical space corresponding to the computing units to obtain the tower tray model corresponding to the computing units; From the multiple virtual subspaces of each tower tray model, select virtual subspace pairs that meet the preset conditions, and construct the target tower tray model based on the virtual subspace pairs; The particles to be calculated are transferred to the target tray model to determine the target particle pairs participating in the calculation of the Hamiltonian; Based on the target tower model and the target particle pair, the interaction between the target particle pair is calculated; The step of dividing the physical space corresponding to the computing unit to obtain multiple tower models corresponding to the computing unit includes: dividing the physical space of each computing unit into multiple virtual subspaces to obtain multiple virtual subspaces corresponding to each computing unit; using the physical space of each computing unit as the central grid point, and with a preset cutoff radius as the radius, selecting the virtual subspaces of each computing unit... , , Virtual subspaces within a preset cutoff radius in the three axes; , The virtual subspace within the preset cutoff radius along the axial direction is used as the disk model in the tower disk model. The virtual subspace within the preset cutoff radius along the axial direction is used as the tower model in the tower model, resulting in multiple tower models; The step of selecting virtual subspace pairs that meet preset conditions from multiple virtual subspaces of each tower disk model and constructing a target tower disk model based on the virtual subspace pairs includes: determining that the tower disk model includes a disk model and a tower model, wherein the disk model includes multiple virtual subspaces and the tower model includes multiple virtual subspaces; pairing each virtual subspace in the disk model with each virtual subspace in the tower model to obtain the distance between each virtual subspace in the disk model and each virtual subspace in the tower model; constructing virtual subspace pairs using two virtual subspaces whose distance is less than the preset cutoff radius, and constructing the target tower disk model using the virtual subspace pairs.
2. The method according to claim 1, characterized in that, The step of transferring the particles to be calculated into the target tray model and determining the target particle pairs participating in the calculation of the Hamiltonian includes: Mark the first three-dimensional coordinates corresponding to each virtual subspace in the target tower model; Obtain the second three-dimensional coordinates of the particle to be calculated in space; The particles whose first three-dimensional coordinates are the same as those in the second three-dimensional coordinates are moved to the corresponding virtual subspace to obtain the target particle pairs that participate in the calculation of the Hamiltonian.
3. The method according to claim 2, characterized in that, The calculation of the interaction between the target particle pairs based on the target tower model and the target particle pairs includes: Calculate the zero-order Hamiltonian matrix based on the target particle pairs in the target tower model; Based on the current coordinates of the particle in the zero-order Hamiltonian matrix, the particle is relocated to the corresponding virtual subspace, and the charge-related second-order Hamiltonian matrix is calculated. The second-order Hamiltonian matrix is iterated multiple times until convergence is achieved to obtain the target Hamiltonian matrix. The interaction between the target particle pairs is calculated using the target Hamiltonian matrix.
4. The method according to claim 3, characterized in that, The calculation of the interaction between the target particle pairs using the target Hamiltonian matrix includes: Based on the particle structure of the target Hamiltonian matrix, calculate the force information of each particle; The interactions between particles are calculated based on the force information and velocity of each particle.
5. The method according to claim 4, characterized in that, The method further includes: The position of the particles in space is updated based on the interaction between the target particle pairs.
6. A device for determining inter-particle interactions based on a matrix, characterized in that, include: The construction module is used to obtain multiple computing units currently participating in the calculation, and to divide the physical space corresponding to the computing units to obtain the tower disk model corresponding to the computing units; The filtering module is used to filter out pairs of virtual subspaces that meet preset conditions from multiple virtual subspaces of each tray model, and to construct a target tray model based on the pairs of virtual subspaces. The migration module is used to migrate the particles to be calculated to the target tray model and determine the target particle pairs participating in the calculation of the Hamiltonian. The calculation module is used to calculate the interaction between the target particle pairs based on the target tower model and the target particle pairs; The construction module is specifically used to divide the physical space of each computing unit into multiple virtual subspaces, obtaining multiple virtual subspaces corresponding to each computing unit; using the physical space of each computing unit as the central grid point, and with a preset cutoff radius as the radius, select the virtual subspace of each computing unit. , , Virtual subspaces within a preset cutoff radius in the three axes; , The virtual subspace within the preset cutoff radius along the axial direction is used as the disk model in the tower disk model. The virtual subspace within the preset cutoff radius along the axial direction is used as the tower model in the tower model, resulting in multiple tower models; The filtering module is used to determine that the tower model includes a tray model and a tower model, wherein the tray model includes multiple virtual subspaces and the tower model includes multiple virtual subspaces; pairing each virtual subspace in the tray model with each virtual subspace in the tower model to obtain the distance between each virtual subspace in the tray model and each virtual subspace in the tower model; constructing virtual subspace pairs using two virtual subspaces whose distance is less than the preset cutoff radius, and constructing the target tower model using the virtual subspace pairs.
7. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a program stored in the memory for determining inter-particle interactions based on a matrix, to implement the method for determining inter-particle interactions based on a matrix as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the matrix-based method for determining inter-particle interactions as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data processing method and device, equipment and readable storage medium
CN113705065A