A method and apparatus for shortening the time delay of short-range force calculation in molecular dynamics
By employing pipelined parallel processing and cache preloading techniques, the latency problem in short-range force calculations in molecular dynamics was solved, thereby improving the system's response speed and throughput.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING FENGHUA CHUANGZHI TECHNOLOGY CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-07-21
Smart Images

Figure CN122431808A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip design technology, and in particular to a method and apparatus for shortening the calculation delay of short-range forces in molecular dynamics. Background Technology
[0002] Molecular dynamics (MD) is a computational method for studying the behavior of matter by simulating the motion of molecules at the atomic level. It calculates the microscopic forces acting on atoms (short-range, long-range, and bonding forces, etc.) by solving Newton's equations, thereby tracking the trajectories of atoms or molecules to understand the properties and behavior of matter. Given the initial positions and velocities of each atom, the various interaction forces between atoms can be calculated to determine the positional updates of each atom after time t. Atom updates trigger a series of chain reactions, and many key physical properties can be derived through statistical analysis of atomic trajectories. For example, the movement of one atom can compress or pull its neighboring atoms, altering local bond lengths, bond angles, or dihedral angles. This is crucial for studying the occurrence of chemical reactions, protein folding, and local deformation of materials.
[0003] Because the total number of atoms involved in practical applications is large, multiple boards can be used to construct a 3D ring computing cluster network. Each board is responsible for calculating the position updates of a portion of the atoms, thereby enabling large-scale parallel simulation calculations of molecular dynamics. For example... Figure 1 As shown, in the simulation, the range of motion of numerous atoms can be regarded as a cuboid bounding box (i.e., the simulation space), and this simulation space is uniformly divided into three-dimensional spatial nodes of H×W×D, with each three-dimensional spatial node deployed on a board. For example... Figure 2 As shown, each small square represents a board, and all boards communicate with each other via 3D interconnection. The boards perform calculations of various interaction forces. The boards can be based on Field-Programmable Gate Arrays (FPGAs).
[0004] Among the various interaction forces involved in molecular dynamics, short-range forces, due to the large number of atoms involved, have become the bottleneck for the computational performance of the entire system. Each calculation requires intra-card communication and / or inter-card communication to acquire the data needed for the computation task. The large amount of data required for data acquisition significantly impacts the computational latency of short-range forces.
[0005] Therefore, overcoming the shortcomings of the existing technology is an urgent problem to be solved in this technical field. Summary of the Invention
[0006] The technical problem to be solved by the embodiments of the present invention is that in the process of calculating short-range forces between atoms, due to the large amount of data, it takes a certain amount of time to obtain the data, which has a significant impact on the calculation delay of short-range forces.
[0007] The embodiments of the present invention adopt the following technical solutions: Firstly, a method for shortening the calculation time delay of short-range forces in molecular dynamics is provided, including: Each cell space is taken as a central space, and the central space and its neighboring spaces are packaged into a computational task. Retrieve the i-th set of data required by the i-th level computation task from the cache set; Execute the i-th level computation task based on the i-th set of data, and determine whether the (i+1)-th set of data required for the (i+1)-th level computation task exists in the cache set; If there is missing data, a data acquisition request is sent to the corresponding board to preload the (i+1)th set of data while executing the i-th level computing task.
[0008] Furthermore, the cache set includes multiple cache units, each cache unit being used to store atomic attribute information of a cell space, and the method further includes: Before storing the acquired data in the corresponding cache unit, it is determined whether the cache unit can be occupied. If the space is available, the preloaded data will be stored in the corresponding storage unit. If the cache unit cannot be occupied, wait until it becomes available before storing the preloaded data in the corresponding storage unit.
[0009] Furthermore, the method also includes: A counter is set for each of the aforementioned storage units; When a computing task being executed hits data in a storage unit, the counter of the corresponding storage unit is incremented by 1; when the computing task no longer uses the data stored in a storage unit, the counter of the corresponding storage unit is decremented by 1; wherein, a counter value of 0 for the cache unit indicates that the cache unit can be occupied.
[0010] Furthermore, the cache set comprises 27 cache units.
[0011] Furthermore, the method also includes: When there is duplicate data between the i-th group of data required by the i-th level computing task and the i+1-th group of data required by the (i+1)-th level computing task, only the non-duplicate data is preloaded.
[0012] Furthermore, the method also includes: Take one atom from each of the neighbor spaces corresponding to the i-th level computation task, and use the taken atom as a reference atom; Traverse all atoms in the central space corresponding to the i-th level computation task, and pair the currently traversed atom with the reference atom. The atom pairs are screened using a filter, and the interaction forces of the screened atom pairs are calculated.
[0013] Furthermore, the method also includes: Van der Waals and Coulomb forces were calculated for the selected atom pairs.
[0014] Furthermore, the method also includes: If not all of the data in the i-th group are in the cache set, the missing data is obtained through intra-card communication or inter-card communication. During the process of obtaining the data in the i-th group, it is simultaneously determined whether the data in the i+1-th level computing task required by the i+1-th group exists in the cache set, and the missing data is obtained. Alternatively, synchronously query the cache set to see if the i-th group of data and the (i+1)-th group of data exist. If they are missing, send a data acquisition request to the corresponding board. After acquiring all the i-th group of data, execute the i-th level computing task and continue to acquire the data missing from the (i+1)-th level computing task.
[0015] Secondly, an apparatus for shortening the calculation time delay of short-range forces in molecular dynamics is provided, comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor for performing the method for shortening the time delay of short-range force calculations in molecular dynamics as described in the first aspect.
[0016] Thirdly, a non-volatile computer storage medium is provided, the computer storage medium storing computer-executable instructions, the computer-executable instructions being executed by one or more processors, for performing the method described in the first aspect for shortening the calculation delay of short-range forces in molecular dynamics.
[0017] Compared with existing technologies, the beneficial effects of this invention are as follows: It employs a pipelined approach to acquire the data required for computational tasks, assigns the computational tasks of each stage to different processing units, and allows each stage to be processed in parallel at different times, thereby reducing the latency between each step. This parallel processing enables the preloading of data required for the next computational task, allowing each step to start as early as possible, greatly reducing system idle time, and thus improving system response speed and the throughput of the entire processing system. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of a structure that divides the simulation space into three-dimensional spatial nodes, provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of a multi-board cascade structure provided by an embodiment of the present invention; Figure 3 This is a schematic diagram of the execution flow of a molecular dynamics system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the distribution of a certain cell space and its surrounding cell spaces provided in an embodiment of the present invention; Figure 5 This is a simplified model diagram of a short-range force calculation system provided in an embodiment of the present invention; Figure 6 This is a flowchart illustrating a method for shortening the calculation time delay of short-range forces in molecular dynamics, provided by an embodiment of the present invention. Figure 7 This is a schematic diagram of a short-range force calculation system scheduling provided by an embodiment of the present invention; Figure 8 This is a schematic diagram of cell traversal distribution for a short-range force calculation model provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the cell space required for two adjacent pipeline tasks provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of a cache set provided in an embodiment of the present invention; Figure 11 This is a flowchart illustrating another method for shortening the calculation delay of short-range forces in molecular dynamics, provided by an embodiment of the present invention. Figure 12This is a schematic diagram of a device for shortening the calculation delay of short-range forces in molecular dynamics, provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0021] Unless the context otherwise requires, throughout the specification and claims, the term "comprising" is interpreted as openly inclusive, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this disclosure. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics mentioned may be included in any suitable manner in any one or more embodiments or examples; that is, although they may be incorporated into embodiments or examples using the above terms for reasons such as order and position, it does not limit them to be incorporated in combination by a single embodiment or example.
[0022] In the description of this invention, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this disclosure.
[0023] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, for example, the description may use the prefix "A" or "B" to describe the same type of nouns as two independent entities. In this case, the corresponding features defined with "A" and "B" are used only to distinguish between similar entities and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features.
[0024] In describing some embodiments, the terms "coupled," "coupled," and "connected," and their derivative expressions, may be used. For example, the term "connected" may be used in describing some embodiments to indicate that two or more components have direct physical or electrical contact with each other. Similarly, the term "coupled" may be used in describing some embodiments to indicate that two or more components have direct physical or electrical contact. However, the terms "connected" or "coupled" may also refer to two or more components that do not have direct contact with each other but still cooperate or interact with each other, such as "optical coupling," "wireless connection," etc. The embodiments disclosed herein are not necessarily limited to the scope of this invention.
[0025] In the description of this invention, the expression “A and / or B” (where A and B are used to formally represent specific features) will be used. The corresponding expression includes the following three combinations: only A, only B, and a combination of A and B.
[0026] As used in this invention, “about,” “approximately,” or “approximately” includes the stated value and the average value within an acceptable range of deviation from a particular value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).
[0027] Among the numerous interaction forces, short-range forces require calculating the resultant force of Coulomb and van der Waals forces between all atoms within a cutoff radius centered on each atom. Therefore, short-range forces are the bottleneck for the computational performance of the entire system. To reduce the computational complexity of the model, each board further divides the three-dimensional spatial nodes into multiple R×R×R three-dimensional subspaces (hereinafter referred to as cell spaces), each containing multiple atoms. Specifically, to shorten the calculation range of short-range forces and reduce the computational complexity of the model, the side length R of the cell space is chosen as the cutoff radius required for the atomic short-range force calculation.
[0028] Since the atoms are distributed on different boards, the atoms on this board need to access the memory of this board and communicate with other boards when calculating the interaction forces. At the same time, after the position of each atom is updated and calculated, it is necessary to determine whether an atom on a certain board has escaped to other boards.
[0029] Once all atomic information has been updated, one iteration is complete, and the next position update calculation can continue. The entire execution flow can be simplified to... Figure 3The flowchart shown illustrates a task for a specific board. First, the task data sent by the host is read and broken down into multiple sub-tasks. Then, the sub-tasks are sent to the corresponding interaction force calculation units. These units calculate the interaction forces between atoms on the board and other atoms (either on the board itself or not) using cell space as the unit. After each component force is calculated, the resultant force of the multiple components is calculated. Finally, the position update for each atom is calculated and synchronized to other boards.
[0030] Given that short-range forces require calculating the resultant force between the current atom and all atoms in all directions within a cutoff radius centered on that atom, since the node space on each card has been divided into multiple R×R×R cell spaces, where R is the cutoff radius for short-range forces, for an atom within a given cell space, the atoms whose interaction forces need to be calculated are located in that cell space and the 26 adjacent cell spaces. Figure 4 As shown.
[0031] Meanwhile, since forces are mutual, existing strategies often employ the half-shell method to simplify the computational complexity of short-range forces. (See also...) Figure 4 Each three-dimensional grid space is called a cell space. Assuming that the location of point A in the figure is selected as the central space (i.e., the home cell), and its specific adjacent (with limited directions) 13 cell spaces are called the neighbor spaces (i.e., the neighbor cells), when calculating the short-range forces of all atoms in the central space, it is assumed that only the interaction forces of the atomic pairs in the 14 cell spaces need to be calculated.
[0032] In molecular dynamics systems, based on the semi-shell method, the cell space contained in a node is traversed sequentially as the central space. Assuming the cell (0,0,0) located at coordinates x=0, y=0, z=0 is taken as the central space, the interaction forces between the atom set in this cell and 14 other cell groups are calculated. The remaining 13 interaction forces are updated when cell (0,0,0) is taken as the neighbor space. In summary, this method reduces the computational complexity of the interaction forces between 27 cell groups to 14, thus achieving the goal of reducing computational complexity.
[0033] Based on the aforementioned principle of the semi-shell method, such as Figure 5 The figure shows a simplified implementation model of the short-range force calculation system. First, the task scheduler takes the multiple R×R×R cell subspaces contained in the node on the current board as the center space, and packages the center space and its adjacent neighbor space into a task and sends it to the downstream data acquisition module.
[0034] The data acquisition module sends requests to the HBM (High Bandwidth Memory) within or between cards based on the cell configuration information in the task. At this point, due to the limited range of short-range forces, the amount of data requested may be larger than required for calculation. Therefore, before performing short-range force calculations on each atom in the central space, a filter is needed to select atoms from the 14 cells based on their cutoff radius. Only the selected atoms participate in the interaction force calculations.
[0035] exist Figure 5 In the serial processing demonstrated, each step must be completed sequentially, and each step can only begin after the previous step is finished. This leads to a waste of time and resources, as well as a reduction in system throughput. For example, after the data acquisition phase ends, the data acquisition module will be idle in subsequent phases, greatly amplifying the blocking impact of intra-card and inter-card communication on the entire short-range force calculation system.
[0036] To address the significant latency issues caused by card-to-card communication in existing short-range force calculation methods, this invention provides a method for reducing the computational latency of short-range forces in molecular dynamics. This method utilizes data preloading to streamline short-range force calculation and data acquisition, minimizing the latency impact of data loading. Simultaneously, a caching unit is introduced to buffer the data required for short-range force calculation.
[0037] See Figure 6 and Figure 7 As shown, this embodiment of the invention provides a method for shortening the calculation time delay of short-range forces in molecular dynamics, including: Step 101: Treat each cell space as a central space, and package the central space and its neighboring spaces into a computational task.
[0038] In this embodiment, the task is first assembled and distributed. Multiple R×R×R cell spaces are used as the center space, and the center space and its neighboring space are packaged into a computing task (i.e., task). Subsequent modules need to calculate the short-range forces of each atom in the center space.
[0039] In step 101, after generating multiple computing tasks, it is also necessary to sort the multiple computing tasks according to the computing order to determine the next level computing task corresponding to the current level computing task, so as to preload the data required by the next level computing task while processing the current level computing task.
[0040] Step 102: Retrieve the i-th set of data required by the i-th level computing task from the cache set.
[0041] Here, the i-th level computation task can be understood as the current computation task, and the (i+1)-th level computation task is the next level computation task after the i-th level computation task.
[0042] The computational task includes short-range force calculations, and the data required for the computational task includes the attribute information of relevant atoms, such as atomic velocity and atomic position.
[0043] In this embodiment, a cache set is designed to cache the atomic data of each cell space. When executing a computation task, the cache set is first checked to see if the data required by the current computation task exists. If it exists, step 103 is executed. If there is missing data, the missing data is obtained through intra-board communication or inter-board communication and stored in the cache set. Simultaneously, this embodiment also dynamically updates the cache set based on the execution status of the computation task.
[0044] Step 103: Execute the i-th level computing task based on the i-th group of data, and determine whether the i+1-th group of data required for the i+1-th level computing task exists in the cache set.
[0045] The (i+1)th level computation task (hereinafter referred to as task(i+1)) is the next level computation task after the i-th level computation task (hereinafter referred to as task(i)). After the i-th level computation task is completed, the (i+1)th level computation task is executed.
[0046] In one embodiment, if not all of the data in the i-th group are in the cache set, the missing data is obtained through intra-card communication or inter-card communication. During the process of obtaining the data in the i-th group, it is simultaneously determined whether the data in the i+1-th level computing task required by the i+1-th group exists in the cache set, and the missing data is obtained.
[0047] That is, if the i-th group of data is not all in the cache set, the missing data needs to be obtained through intra-card communication or inter-card communication. In this process, the step of determining whether the i+1th group of data required by the i+1th level computing task exists in the cache set can also be triggered synchronously in step 103.
[0048] If all the data in the i-th group is already in the cache set, then the data is retrieved and sent to the subsequent module for computation, and the step of determining whether the i+1-th group of data required by the i+1-th level computation task exists in the cache set is triggered in step 103.
[0049] In one embodiment, the cache set can be synchronously queried to see if the i-th group of data and the (i+1)-th group of data exist. If they are missing, a data acquisition request is sent to the corresponding board. After all the i-th group of data is acquired, the i-th level computing task is executed, and the missing data of the (i+1)-th level computing task is acquired.
[0050] That is, during the execution of the i-th level computation task, it will synchronously check whether the data required by task (i+1) is stored in the cache set. If it is missing, a corresponding cell request will be sent to HBM in the card or between cards.
[0051] Step 104: If there is missing data, send a data acquisition request to the corresponding board to preload the (i+1)th group of data while executing the i-th level computing task.
[0052] In short-range force calculation systems, each calculation task often spends a significant amount of time loading data from multiple sets of cells, especially when inter-card communication is required. Parallelizing the serial processing flow can reduce the waiting time of subsequent calculation modules and improve the system's response speed. However, pipelined processing cannot completely solve the data acquisition latency problem, because if a significant latency still exists in data acquisition, subsequent steps still need to wait for the data to be ready. Therefore, data preloading technology is particularly important. This invention proposes a data preloading scheme that preloads the data required by the next-level calculation task (i+1) while calculating task(i), further reducing the waiting time of the calculation module and accelerating the overall processing speed when task(i+1) is officially executed.
[0053] In this embodiment, a pipelined approach is used to acquire the data required for the computational tasks. The computational tasks at each stage are assigned to different processing units, and each stage is processed in parallel at different times, thereby reducing the latency between each step. This parallel processing enables the preloading of data required for the next computational task, allowing each step to start as early as possible, significantly reducing system idle time and thus improving system response speed and overall throughput.
[0054] In one embodiment, to meet the data preloading requirement, this invention constructs a cache set to cache the data required by the current computation task (i) and the next-level computation task (i+1). Based on the computational principle of the semi-shell method, as follows: Figure 8 and Figure 9As shown, assuming a node contains 3×3×3 cells, the cell space with x=0, y=0, z=0 is taken as the center space (H) of task(i), and 4 cells in the z=0 plane and 9 cells in the z=1 plane are selected as the neighbor space (N). Subsequently, the cell space with x=1, y=0, z=0 is selected as the center space (H) of the next-level computation task(i+1). After integrating the duplicate cell data of task(i) and task(i+1), task(i+1) needs to preload the attribute information of 6 cell spaces (P).
[0055] When the task corresponding to the next-level pipeline is a cell space on the z=1 plane, it needs to preload cell information for 3×3=9 cell spaces on the z=2 plane. Therefore, this embodiment designs a cache set, which includes multiple cache units, each used to store atomic attribute information for one cell space. A cell space includes multiple atoms, each atom having atomic velocity and atomic position.
[0056] In one embodiment, the cache set comprises 27 cache units. For example... Figure 10 As shown, each square represents an independent cache unit, and there are a total of 27 cache units, which can store the atomic attribute information of 27 cell spaces to meet various expected situations that occur during the traversal of the cell space.
[0057] In one embodiment, such as Figure 11 As shown, the method further includes: Step 201: Before storing the acquired data in the corresponding cache unit, determine whether the cache unit can be occupied.
[0058] In this embodiment, since the number of cache units is limited, the data stored in the cache unit is updated in real time according to the actual situation. However, before updating, it is necessary to confirm whether the cache unit can be occupied. If it can be occupied, it means that no other computing task is currently using the data in the cache unit, and step 202 can be executed; if it cannot be occupied, it means that other computing tasks are using the data in the cache unit, and step 203 can be executed.
[0059] Step 202: If the data can be occupied, the preloaded data is stored in the corresponding storage unit.
[0060] Step 203: If the cache unit cannot be occupied, wait until it becomes available before storing the preloaded data in the corresponding storage unit.
[0061] In one embodiment, to better characterize whether a storage unit can be occupied, a counter is set for each storage unit; when the executing computing task hits the data in a storage unit, the counter of the corresponding storage unit is incremented by 1; when the computing task no longer uses the data stored in a storage unit, the counter of the corresponding storage unit is decremented by 1; wherein, the count value of the counter of the cache unit is equal to 0, which means that the cache unit can be occupied.
[0062] In practical applications, the 14 cell information required by task(i) and task(i+1) may contain duplicate cell information, such as... Figure 9 As shown, there is 8 duplicate cell information between task(i) and task(i+1), resulting in inefficient consumption of limited bandwidth resources and affecting the overall model efficiency. To avoid bandwidth waste caused by duplicate data requests, this invention only preloads non-duplicate data. In one embodiment, when the i-th group of data required by the i-th level computing task has duplicate data with the i+1-th group of data required by the i+1-th level computing task, only the non-duplicate data is preloaded.
[0063] The data preloading technology in this embodiment can reduce repeated requests to external resources and improve the execution efficiency of data streams. Whether in high-concurrency, real-time data processing or big data analysis scenarios that require fast response, this approach can bring significant performance improvements to the system.
[0064] In one embodiment, the execution of each computational task includes: retrieving one atom from each of the neighbor spaces corresponding to the i-th computational task, and using the retrieved atom as a reference atom; traversing all atoms in the central space corresponding to the i-th computational task, and forming atom pairs with the currently traversed atom and the reference atom; filtering the atom pairs, and calculating the interaction forces of the filtered atom pairs. Van der Waals forces and Coulomb forces are calculated for the filtered atom pairs.
[0065] In one embodiment, the filter conditions are as follows: ; ; ; ; ; in, These correspond to the absolute values of the differences between the two atoms in different vector directions. The cutoff radius is denoted as .
[0066] In this embodiment, one atom is extracted from each of the corresponding neighboring spaces and used as a reference atom. Then, all atoms in the central space are traversed, and atoms in the central space and reference atoms are paired. Interaction forces are calculated for the atom pairs that pass the filter. At this point, the interaction forces of each atom and numerous atoms in the central space along the xyz three-dimensional vector directions are obtained. Then, the force situation of each atom in the central space is integrated through resultant force calculation. Finally, the calculated results are written to a cache set for caching. This cache set also collects the force situation of each cell space in this board when it is used as a neighboring space.
[0067] like Figure 12 The diagram shown is a schematic representation of the architecture of a device for shortening the calculation delay of short-range forces in molecular dynamics according to an embodiment of the present invention. The device for shortening the calculation delay of short-range forces in molecular dynamics according to this embodiment includes one or more processors 21 and a memory 22. Figure 12 Take a processor 21 as an example.
[0068] Processor 21 and memory 22 can be connected via a bus or other means. Figure 12 Taking the example of a connection between China and Israel via a bus.
[0069] Memory 22, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs and non-volatile computer-executable programs. Processor 21 executes a method to shorten the time delay of short-range force calculations in molecular dynamics by running the non-volatile software programs and instructions stored in memory 22.
[0070] Memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 22 may optionally include memory remotely located relative to processor 21, which can be connected to processor 21 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0071] The program instructions / modules are stored in the memory 22. When executed by one or more processors 21, they perform the method for shortening the calculation delay of short-range forces in molecular dynamics as described in the above embodiments. For example, they perform each step of the method for shortening the calculation delay of short-range forces in molecular dynamics as described above.
[0072] It is worth noting that the information interaction and execution process between the modules and units in the above-mentioned device and system are based on the same concept as the processing method embodiment of the present invention. For details, please refer to the description in the method embodiment of the present invention, and will not be repeated here.
[0073] Those skilled in the art will understand that all or part of the steps in the various methods of the embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for shortening the calculation time delay of short-range forces in molecular dynamics, characterized in that, include: Each cell space is taken as a central space, and the central space and its neighboring spaces are packaged into a computational task. Retrieve the i-th set of data required by the i-th level computation task from the cache set; Execute the i-th level computation task based on the i-th set of data, and determine whether the (i+1)-th set of data required for the (i+1)-th level computation task exists in the cache set; If there is missing data, a data acquisition request is sent to the corresponding board to preload the (i+1)th set of data while executing the i-th level computing task.
2. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to claim 1, characterized in that, The cache set includes multiple cache units, each cache unit being used to store atomic attribute information for a cell space. The method further includes: Before storing the acquired data in the corresponding cache unit, it is determined whether the cache unit can be occupied. If the space is available, the preloaded data will be stored in the corresponding storage unit. If the cache unit cannot be occupied, wait until it becomes available before storing the preloaded data in the corresponding storage unit.
3. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to claim 2, characterized in that, The method further includes: A counter is set for each of the aforementioned storage units; When a computing task being executed hits data in a storage unit, the counter of the corresponding storage unit is incremented by 1; when the computing task no longer uses the data stored in a storage unit, the counter of the corresponding storage unit is decremented by 1; wherein, a counter value of 0 for the cache unit indicates that the cache unit can be occupied.
4. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to claim 2, characterized in that, The cache set comprises 27 cache units.
5. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to claim 1, characterized in that, The method further includes: When there is duplicate data between the i-th group of data required by the i-th level computing task and the i+1-th group of data required by the (i+1)-th level computing task, only the non-duplicate data is preloaded.
6. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to claim 1, characterized in that, The method further includes: Take one atom from each of the neighbor spaces corresponding to the i-th level computation task, and use the taken atom as a reference atom; Traverse all atoms in the central space corresponding to the i-th level computation task, and pair the currently traversed atom with the reference atom. The atom pairs are screened using a filter, and the interaction forces of the screened atom pairs are calculated.
7. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to claim 5, characterized in that, The method further includes: Van der Waals and Coulomb forces were calculated for the selected atom pairs.
8. The method for shortening the calculation time delay of short-range forces in molecular dynamics according to any one of claims 1-7, characterized in that, The method further includes: If not all of the data in the i-th group are in the cache set, the missing data is obtained through intra-card communication or inter-card communication. During the process of obtaining the data in the i-th group, it is simultaneously determined whether the data in the i+1-th level computing task required by the i+1-th group exists in the cache set, and the missing data is obtained. Alternatively, synchronously query the cache set to see if the i-th group of data and the (i+1)-th group of data exist. If they are missing, send a data acquisition request to the corresponding board. After acquiring all the i-th group of data, execute the i-th level computing task and continue to acquire the data missing from the (i+1)-th level computing task.
9. A device for shortening the calculation time delay of short-range forces in molecular dynamics, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the processor for performing the method for shortening the calculation delay of short-range forces in molecular dynamics as described in any one of claims 1-8.
10. A non-volatile computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which are executed by one or more processors to perform the method for shortening the calculation delay of short-range forces in molecular dynamics as described in any one of claims 1-8.