Streaming non-bonding force calculation engine for molecular dynamics simulation calculation

Through the particle pair matching mechanism combining streaming Manhattan filtering with parallel Euclidean filtering and parallelized non-bonded force calculation, the low efficiency problem in molecular dynamics simulation calculation is solved, efficient particle pair screening and non-bonded force calculation are achieved, and hardware resource utilization is improved.

CN120808909APending Publication Date: 2025-10-17ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510858440.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing molecular dynamics simulations have low computational efficiency, especially in particle pair matching and non-bonded force calculations, which are computationally intensive and inefficient.

Method used

A particle pair matching mechanism combining streaming Manhattan filtering and parallel Euclidean filtering is adopted. Through Manhattan distance pre-screening and Euclidean distance precise screening, combined with parallel calculation of van der Waals force and electrostatic force, the non-bonded force calculation module is optimized. The parallelism is adjustable and it is implemented based on FPGA hardware.

Benefits of technology

It significantly improves the efficiency of particle pair screening, reduces hardware resource consumption, and improves the overall performance and efficiency of simulation calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808909A_ABST
    Figure CN120808909A_ABST
Patent Text Reader

Abstract

The invention discloses a molecular dynamics simulation calculation-oriented streaming non-bonding force calculation engine, which comprises a particle pair matching module, the particle pair matching module comprises a streaming Manhattan filtering unit and a parallel Euclidean filtering unit, the streaming Manhattan filtering unit pre-screens particle pairs based on a Manhattan distance, and the parallel Euclidean filtering unit carries out parallel Euclidean filtering on the particle pairs; the parallel Euclidean filtering unit screens the pre-screened particle pairs based on the Euclidean distance; the non-bonding force calculation module comprises Van der Waals force calculation and electrostatic force calculation, and the non-bonding force calculation module calculates stress and potential energy at the same time; and the scheduler is used for transmitting the effective particle pair information screened out by the streaming Manhattan filter unit to the parallel Euclidean filter unit and transmitting the particle pair information screened out by the parallel Euclidean filter unit to the non-bonding force calculation module. According to the streaming non-bonding force calculation engine for molecular dynamics simulation calculation, through a particle pair matching mechanism combining streaming Manhattan filtering and parallel Euclidean filtering, the particle pair screening efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer, and particularly relates to a streaming non-bonding force calculation engine for molecular dynamics simulation calculation. BACKGROUND

[0002] Molecular dynamics (MD) simulation is a technology of simulating the change of molecular atoms in the microcosmic world through a computer, which provides strong support for studying the physical behavior and interaction of molecular atoms in the microcosm.

[0003] In the simulation calculation, particles in a molecular system are abstracted by physical modeling, and the particles are regarded as mass points in space, having properties such as mass, position, and velocity. The process of the change of the particles in space under the influence of interaction is the process of MD simulation.

[0004] After the system is initialized, particle information, dynamic parameters and other data are loaded into the system. Then, a particle in the system is selected as a calculation object, and another particle in the space is selected to form a particle pair. Through the matching of the particle pair, it is determined the type of calculation that needs to be performed on the particle pair. If the particle pair matching is successful, the interaction calculation between the particles is performed; otherwise, it is an invalid particle pair, and the particle needs to be selected again. After the calculation is completed, the related data is cached, and it is checked whether all particles have been selected. If the particles have been selected, the particle dynamics iteration is performed according to the motion iteration equation, otherwise the particle is continuously selected and the calculation is completed.

[0005] After the calculation, the particle state is updated and it is checked whether the space traversal is completed. If the traversal is completed, the calculation of the current time step is completed; otherwise, the new calculation object is loaded and the calculation is continued. When all the calculations of the current time step are completed, the system queries whether the simulation is completed. If the simulation is not completed, the updated particle information is loaded and the calculation of the next time step is performed. Through the traversal of the particle pair, the calculation of one time step can be completed, and the calculation iteration of multiple time steps can obtain the motion trajectory of the particles at a certain time. Based on the motion trajectory, various properties of the system can be further analyzed and studied, which constitutes the basic framework of the classical MD simulation model.

[0006] In the simulation calculation, since all particle pairs in the space need to be matched, the particle pair matching and the calculation of the interaction force between the particles constitute the most intensive and important part of the simulation process. In the existing technology, the efficiency of the MD simulation calculation is low. SUMMARY

[0007] The present application provides a streaming non-bonding force calculation engine for molecular dynamics simulation calculation, which at least solves one of the above technical problems, and specifically adopts the following technical solution:

[0008] A streaming non-bonding force calculation engine for molecular dynamics simulation calculation, comprising:

[0009] A particle pair matching module, configured to match particles in space in a streaming manner in the molecular dynamics simulation, and screen out particle pairs meeting a cutoff radius condition; the particle pair matching module comprises a streaming Manhattan filter unit and a parallel Euclidean filter unit, the streaming Manhattan filter unit performs pre-screening on the particle pairs based on Manhattan distance, and the parallel Euclidean filter unit performs accurate screening on the pre-screened particle pairs based on Euclidean distance;

[0010] A non-bonding force calculation module, configured to calculate non-bonding forces of the screened particle pairs, including van der Waals force calculation and electrostatic force calculation; the non-bonding force calculation module adopts a joint calculation manner to simultaneously calculate forces and potential energy, and the van der Waals force calculation and the electrostatic force calculation are implemented in parallel on hardware;

[0011] A scheduler, configured to transmit valid particle pair information screened out by the streaming Manhattan filter unit to the parallel Euclidean filter unit, and transmit particle pair information screened out by the parallel Euclidean filter unit to the non-bonding force calculation module.

[0012] Further, the streaming Manhattan filter unit comprises a plurality of Manhattan filters, two FIFOs and one MUX; the Manhattan filter is composed of three subtractors, two adders, two flip-flops and a plurality of comparators, and is configured to calculate Manhattan distance of the particle pairs and perform preliminary screening.

[0013] Further, the parallel Euclidean filter unit adopts a two-stage cascaded coordinate rotation digital computer (CORDIC) module combined with a comparator to design an architecture, and is configured to calculate Euclidean distance of the particle pairs and complete accurate screening.

[0014] Further, the particle pair matching module further comprises an arbitration and scheduling unit, which serves as a control hub for collaborative work, and coordinates work of the streaming Manhattan filter unit and the parallel Euclidean filter unit.

[0015] Further, the non-bonding force calculation module comprises:

[0016] An electrostatic force calculation unit, configured to calculate electrostatic force between the particle pairs;

[0017] An electrostatic potential calculation unit, configured to calculate electrostatic potential energy between the particle pairs;

[0018] A van der Waals force calculation unit, configured to calculate van der Waals force between the particle pairs;

[0019] A van der Waals potential calculation unit, configured to calculate van der Waals potential energy between the particle pairs;

[0020] a dynamics iteration unit, configured to update the kinetic state of the particles according to the calculated non-bonding force result, and provide a basis for simulation calculation of a subsequent time step;

[0021] a system energy analysis unit, configured to analyze the energy state of the system according to the calculated potential energy result, and ensure the accuracy and stability of the simulation calculation.

[0022] Further, the van der Waals force calculation is approximated by a Lennard-Jones potential, and the electrostatic force calculation is approximated by a reaction field.

[0023] Further, the ratio of the streaming Manhattan filter unit to the parallel Euclidean filter unit is 6:1, and the entire module can be freely expanded in parallel.

[0024] Further, the computing engine further comprises an optimization mechanism, configured to dynamically adjust the parallelism of the streaming Manhattan filter unit and the parallel Euclidean filter unit according to the particle density in the molecular dynamics simulation and the complexity of the computing task, so as to realize efficient use of computing resources and further improve the computing efficiency.

[0025] Further, the particle pair matching module and the non-bonding force calculation module are both implemented based on FPGA hardware, and the simulation calculation efficiency is improved through module parallelization strategy and internal structure optimization.

[0026] The streaming non-bonding force calculation engine for molecular dynamics simulation calculation provided by the present application significantly improves the particle pair screening efficiency and reduces the hardware resource consumption through the particle pair matching mechanism combining the streaming Manhattan filter and the parallel Euclidean filter. Meanwhile, the performance of the non-bonding force calculation is further optimized by jointly calculating the van der Waals force and the electrostatic force. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0028] Figure 1 A schematic diagram of a streaming non-bonding force calculation engine for molecular dynamics simulation calculation provided by the present application;

[0029] Figure 2 A schematic diagram of a particle pair matching module provided by the present application;

[0030] Figure 3 A schematic diagram of a non-bonding force calculation module provided by the present application;

[0031] Figure 4 A schematic diagram of a calculation flow of the non-bonding force calculation module provided by the present application;

[0032] Figure 5 A schematic diagram of the influence of matching parallelism on processing time;

[0033] Figure 6 A schematic diagram of the influence of module parallelism on processing time. DETAILED DESCRIPTION

[0034] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0035] In molecular dynamics simulation calculation, due to the particularity of simulation, the calculation process has an iterative relationship in time, that is, the calculation of the next time depends on the result of the last time step, which makes it infeasible to parallelize the simulation calculation in time. By spatial decomposition, the simulation space is divided into cubic subspaces of uniform size, which provides a basis for parallel calculation in each iteration period. With this spatial decomposition method, particles in the simulation space can be allocated to different computing processing units according to their subspaces, and each unit is responsible for calculating the interaction between particles in the subspace and its surrounding subspaces. This method allows multiple computing units to perform parallel computing tasks, thereby significantly improving the computing efficiency of MD simulation.

[0036] The interaction between particles is the core part of simulation calculation and also the key to improving the efficiency of simulation calculation. Particle pair matching, as the primary screening part of calculation, is used to obtain particle pairs that meet the truncated radius model from a large number of particle pairs for subsequent calculation. The efficiency of particle pair matching not only affects the throughput of calculation, but also determines the utilization rate of hardware resources, and is a key part of optimizing simulation calculation.

[0037] Under the framework of spatial decomposition model, although the particle search strategy has been optimized from global search to local area search, with the increase of the size of the simulated system, the particle pair matching efficiency still has a significant bottleneck. To improve the efficiency of particle pair matching, the present application adopts an optimization strategy based on parallelism improvement.

[0038] As Figure 1As shown in the specification, the application discloses a streaming non-bonding force calculation engine for molecular dynamics simulation calculation, which divides data sources into two categories of center data and adjacent data. The center data corresponds to the particle coordinate information of the center subspace, and the adjacent data comes from the particle data set of the adjacent subspace. In this architecture, particle matching needs to complete two tasks: performing particle pair matching in the center subspace and performing particle cross-matching in the adjacent subspace. To achieve efficient screening, the system uses a local multicast mechanism to distribute the center data to all particle pair matching modules, and quickly screens out particle pairs that meet the truncation radius condition. The parallelism of the matching framework is denoted as P, which represents the number of particle pair matching modules used. After matching, the effective particle pair information is transmitted to the computing unit (the subsequent non-bonding force calculation module) by the scheduler, providing data support for subsequent molecular dynamics key tasks such as non-bonding force calculation.

[0039] Specifically, as shown in the specification, the application discloses a streaming non-bonding force calculation engine for molecular dynamics simulation calculation, which includes a particle pair matching module, a non-bonding force calculation module and a scheduler. In the embodiments of the application, the particle pair matching module and the non-bonding force calculation module are both implemented based on FPGA hardware, and the simulation calculation efficiency is improved through module parallelization strategy and internal structure optimization. Figure 1

[0040] The particle pair matching module is used to match particles in space in a streaming manner and screen out particle pairs that meet the truncation radius condition in molecular dynamics simulation. The particle pair matching module includes a streaming Manhattan filtering unit and a parallel Euclidean filtering unit. The streaming Manhattan filtering unit performs pre-screening on particle pairs based on Manhattan distance, and the parallel Euclidean filtering unit performs accurate screening on the pre-screened particle pairs based on Euclidean distance.

[0041] The non-bonding force calculation module is used to calculate the non-bonding force of the screened particle pairs, including van der Waals force calculation and electrostatic force calculation. The non-bonding force calculation module adopts a joint calculation method to simultaneously calculate the force and potential energy, and the van der Waals force calculation and the electrostatic force calculation are implemented in parallel in hardware.

[0042] The scheduler is used to transmit the effective particle pair information screened by the streaming Manhattan filtering unit to the parallel Euclidean filtering unit, and transmit the particle pair information screened by the parallel Euclidean filtering unit to the non-bonding force calculation module.

[0043] In the process of particle pair screening, the Euclidean distance is a direct basis for measuring the distance between particles and is also the main screening standard of the truncation radius model. The calculation of the Euclidean distance between particles is as follows:

[0044]

[0045] where the coordinates of the two particles are (x1, y1, z1) and (x2, y2, z2) respectively. In order to solve the problem of high complexity and significant delay caused by square and square root operations in the calculation of Euclidean distance, the application proposes a pre-screening optimization strategy based on Manhattan distance. As an alternative measure to Euclidean distance, Manhattan distance achieves effective approximation to traditional geometric distance by calculating the sum of the absolute values of the projection distances of two points on each coordinate axis. Its mathematical expression is defined as:

[0046] r m = |x1-x2| + |y1-y2| + |z1-z2|

[0047] Compared with Euclidean distance, the calculation of Manhattan distance only involves addition and subtraction operations and absolute value operations, consuming less computing resources. However, Manhattan distance is not a strict measurement. Under the same cutoff radius, the number of particle pairs screened by Manhattan distance is usually greater than that screened by Euclidean distance.

[0048] In order to reduce the consumption of computing resources while meeting the calculation accuracy, the screening process of the pre-screening optimization strategy based on Manhattan distance adopted by the application is as follows: first, the particle pairs in space are preliminarily screened by Manhattan distance to quickly eliminate particle pairs that obviously exceed the cutoff radius, avoiding the execution of high-complexity Euclidean distance calculation on all calculated particle pairs. The calculation overhead of this stage is low, which can effectively reduce the data set to be processed. The screening formula is as follows:

[0049]

[0050] The particle pairs screened by Manhattan will be screened accurately by Euclidean distance to ensure that the final output result meets the cutoff radius. Due to the rapid screening by Manhattan distance, the data volume and calculation volume of this stage are greatly reduced, improving the utilization rate of hardware resources and reducing resource consumption.

[0051] Combining the low calculation overhead characteristics of Manhattan distance and the high accuracy advantages of Euclidean distance, the calculation efficiency of particle pair matching can be significantly improved and the resource utilization rate can be optimized. The particle pair matching module based on Manhattan distance is shown in Figure 2 As shown in the figure, the module innovatively adopts a hierarchical filtering pipeline system. The streaming Manhattan filtering unit and the parallel Euclidean screening unit work cooperatively in the module. In the embodiments of the application, the particle pair matching module also includes an arbitration scheduling unit, which serves as the control hub of cooperative work, coordinating the work of the streaming Manhattan filtering unit and the parallel Euclidean filtering unit. With the arbitration scheduling unit as the control hub of cooperative work, multi-level optimization of particle pair matching is realized.

[0052] The streaming Manhattan filter unit is mainly used to complete Manhattan distance approximate screening, which linearizes the algorithm with a complexity of by spatial decoupling. In the embodiments of the present application, the streaming Manhattan filter unit includes m Manhattan filters, two FIFOs (first-in first-out queues) and a MUX (multiplexer). The FIFOs are used to buffer data and ensure smooth transmission of data in streaming processing. In the streaming Manhattan filter unit, the FIFOs can temporarily store the input particle data to ensure that the data can be processed in order. The MUX is used to select different data paths. In the streaming Manhattan filter unit, the MUX can select different input data for processing according to the control signal. Specifically, after the center data sequence and the adjacent data sequence enter the pipeline, they are first buffered in the FIFOs, and then sequentially input through the CI and NI data interfaces. The center data sequence inputs m data at a time, and the adjacent data sequence is input all the time, and then the streaming passes through m Manhattan filters to complete the Manhattan distance approximate screening. After the adjacent data sequence completes the calculation in the last Manhattan filter, it will be input into the FIFO for the next round of calculation. When the adjacent data completes a round of calculation, the center data sequence will input the subsequent m data for calculation.

[0053] Each Manhattan filter is composed of three subtractors, two adders, two flip-flops and a plurality of comparators, which is used to calculate the Manhattan distance of particle pairs and perform preliminary screening. The data is divided into x, y and z parts in the Manhattan filter, and the subtraction calculation is performed respectively to obtain Δx, Δy and Δz. The sum of these three data in the adder can obtain all the data required for Manhattan filtering. After the respective comparison, it can be judged whether the particle pair meets the requirements. If it meets the requirements, only Δx, Δy and Δz data need to be transmitted to the subsequent module, avoiding the waste of resources in the calculation of Euclidean distance.

[0054] The data amount passing through the streaming Manhattan filter unit will be greatly reduced, and will be uniformly transmitted to the parallel Euclidean filter unit by the arbitration and scheduling unit to complete the Euclidean distance accurate screening. For uniformly distributed particle space, the number of particles meeting the Manhattan preselection accounts for 19.8% of all particles when the spatial lattice adopts cubic segmentation, and the number of particle pairs meeting the truncated radius accounts for about 15.5%. Therefore, the number of Euclidean filters is much less than that of Manhattan filters to meet the bandwidth demand. In the present application, the ratio of the streaming Manhattan filter unit to the parallel Euclidean filter unit is 6:1. The entire module can be freely expanded in parallel, and the number of Euclidean distance filters is the parallel degree K. The computing engine of the present application also includes an optimization mechanism for dynamically adjusting the parallel degree of the streaming Manhattan filter unit and the parallel Euclidean filter unit according to the particle density in the molecular dynamics simulation and the complexity of the calculation task, so as to realize efficient utilization of computing resources and further improve the computing efficiency.

[0055] In the embodiments of the present application, the parallel Euclidean filtering unit adopts a two-stage cascade coordinate rotation digital computer (CORDIC) module combined with a comparator for calculating the Euclidean distance of particle pairs and completing accurate screening. The operation process is as follows: first, the absolute differences of the three-dimensional coordinate components output by the streaming Manhattan filter are sorted, and the order of the amplitudes of the coordinate components is determined through a sorting circuit. The two components with larger amplitudes are selected as input 1 into the first-stage CORDIC module, and the Euclidean distance in the two-dimensional plane is calculated through vector mode operation. Then, the plane distance and the third-dimensional coordinate component are input into the second-stage CORDIC module for secondary operation, and finally the Euclidean distance in the three-dimensional space is output. Finally, the effective screening of the distance value is completed through the dynamic threshold judgment of the comparator unit.

[0056] The two-stage screening structure fully combines the characteristics of Manhattan distance calculation and Euclidean distance calculation, making the particle pair matching process efficient and economical. Through the combination of streaming Manhattan filtering and parallel Euclidean filtering, the overall calculation complexity can be effectively reduced, the matching speed can be improved, and the utilization rate of FPGA hardware resources can be optimized.

[0057] After the particle pair matching, the calculation of the interaction between particles needs to be completed, including the calculation of non-bonding interaction and non-bonding potential energy. In MD simulation, potential energy reflects the interaction energy between particles, while force is the manifestation of potential energy transmission between particles. Force is an important indicator for evaluating particle motion, and potential energy is used to evaluate whether the simulation calculation is proceeding normally. Both of them are indispensable parts of simulation calculation. Non-bonding force calculation mainly includes van der Waals and electrostatic two parts, among which van der Waals force is usually approximated by LJ (Lennard-Jones) potential, and electrostatic force is approximated by RF (Reaction Field). Their calculation formulas are as follows:

[0058] Van der Waals force:

[0059]

[0060] Electrostatic force:

[0061]

[0062] wherein ∈ and σ are parameters related to particles in the calculation process of van der Waals force, q i and q j are the charge amounts carried by the particles, ε0 and ε r are the vacuum electrostatic constant and the dielectric constant of the simulation space, respectively, k rfIt is a variable related to the cutoff radius and the spatial environment in the electrostatic force calculation. The corresponding potential energy calculations are LJ potential energy and electrostatic potential approximated by the reaction field, and the formulas are as follows:

[0063] LJ trend:

[0064]

[0065] Electrostatic potential energy:

[0066]

[0067] Among them, c rf With k rf Similarly, it is a variable related to the cutoff radius and spatial environment in the electrostatic force calculation.

[0068] It can be seen from the above formula that there is no complex computational coupling relationship between the force and potential energy calculated for van der Waals interaction and electrostatic interaction, which provides good conditions for parallel computing. In actual calculations, the force and potential energy calculations of the same interaction can be performed simultaneously, thereby improving computational efficiency. In addition, the calculation formulas for van der Waals force and electrostatic force have certain structural similarities, which further promotes their parallel implementation in hardware. The FPGA-based acceleration solution can significantly improve computational efficiency by dividing the computational tasks into multiple small blocks for parallel execution. Non-bonded force calculation module such as Figure 3 As shown, the system includes an electrostatic force calculation unit, an electrostatic potential calculation unit, a van der Waals force calculation unit, a van der Waals potential calculation unit, a dynamics iteration unit, and a system energy analysis unit. The electrostatic force calculation unit calculates the electrostatic force between particle pairs, using the reaction field approximation method to improve computational efficiency. The electrostatic potential calculation unit calculates the electrostatic potential energy between particle pairs, also using the reaction field approximation method, providing data support for system energy analysis. The van der Waals force calculation unit calculates the van der Waals force between particle pairs, using the Lennard-Jones potential approximation to evaluate non-bonded interactions between particles. The van der Waals potential calculation unit calculates the van der Waals potential energy between particle pairs, providing data support for system energy analysis. The dynamics iteration unit updates the particle dynamic state based on the calculated non-bonded force results, providing a basis for simulation calculations in subsequent time steps. The system energy analysis unit analyzes the system energy state based on the calculated potential energy results, ensuring the accuracy and stability of the simulation calculations.

[0069] The inter-particle distance obtained from the particle pair matching is taken as the core input of the non-bond and interaction calculation, and the van der Waals interaction calculation and the electrostatic interaction calculation are respectively completed. The force and potential energy calculation are complementary to each other, and finally the results obtained by the force calculation are input into the dynamic iteration module, and the results of the potential energy calculation are used for system energy analysis. The specific parallel non-bond and interaction calculation structure is as shown in Figure 4 The structure is composed of a large number of DSP (Digital Signal Processing) calculation units, and finally the resultant force of the non-bond interaction force in the standard space coordinate system and the potential energy of the two non-bond interactions can be calculated. In the FPGA, the rich DSP calculation unit provides a solid hardware foundation for the calculation of the non-bond interaction. As a basic operation, the multiplication and addition calculation can be efficiently executed through the DSP unit. Although the reciprocal operation is crucial in all calculations, it is difficult to achieve through direct calculation. In the FPGA, a lookup table can be used to quickly obtain without using complex algorithms.

[0070] Particle pair matching, as the basic link of simulation calculation, is the most time-consuming part of the entire simulation process. In order to improve the matching efficiency, the application adopts a module parallelization strategy, which effectively reduces the number of matches that a single module needs to process in a simulation calculation by deploying particle pair matching modules in parallel. On the internal structure of the module, a matching mechanism combining streaming Manhattan filtering and parallel Euclidean filtering is introduced, which effectively reduces the consumption of hardware resources while improving the matching speed. The overall matching acceleration performance is determined by the module parallelism P and the matching parallelism K, and their synergistic effect is of key significance to the improvement of simulation efficiency.

[0071] Firstly, the performance of a single particle pair matching module is tested, the module parallelism P is fixed at 1, and a system with uniformly distributed particles of different densities (the average number of particles in each subspace is 40, 80, 120, 160, and 200; the number of particles in each subspace is denoted as N) is input as a data source to simulate a simulation system under different densities. The performance of the particle pair matching module is tested under different matching parallelism K. The results are shown in Figure 5 Under the condition of maintaining constant system density, the data processing time and the parallelism degree show a significant negative correlation.

[0072] Table 1 Speedup ratio under different parallelism

[0073]

[0074] When the parallelism is raised from 2 to 32, the speedup ratio gradually increases, and the highest speedup ratio of different density systems can reach 6.47, 13.18, 19.92, 25.71, and 16.61. The speedup ratio gradually weakens as the parallelism increases, and the speedup ratio of the small density system is saturated first as the parallelism increases. The higher the parallelism, the higher the idle rate of the streaming unit in the last round of the loop iteration, which leads to better performance of the accelerated performance in the early stage of the parallelism growth. As the parallelism increases, the speedup ratio is saturated, because the number of particles in the central subspace is less than the number of streaming Manhattan filter units, resulting in redundant computing resources. At this time, increasing the parallelism to additionally increase the streaming unit cannot further improve the computing efficiency. When N = 200 and the parallelism is raised from 16 to 32, the trend of the speedup ratio increases slows down rapidly. This is because when the parallelism is 32, 192 streaming units are used, and the number of particles in the central subspace needs to be iterated twice, but the second time only occupies 8 of the 192 streaming units, resulting in a decrease in hardware utilization.

[0075] Secondly, the parallelism of the module is tested, the calculation parallelism K = 8 in the particle pair matching module is fixed, and different density simulation systems are used as data input. The time required for particles of different numbers to complete matching is tested under different module parallelism, and the results are shown in Figure 6 The module parallelism directly affects the number of particles in the input adjacent subspace. The results show that as the module parallelism increases, the particle matching time of different density systems significantly decreases. However, the efficiency of the calculation processing time of different particle density systems decreases with the increase of the parallelism.

[0076] Finally, the non-bonding interaction calculation module is implemented on the FPGA, and the non-bonding force and potential energy are calculated respectively and jointly calculated in two ways, and the resource usage of the two schemes is compared and analyzed, as shown below:

[0077] Table 2 Non-bonding force calculation resource usage

[0078]

[0079] The experimental results show that after adopting the joint calculation strategy, the system significantly improves the logical resource utilization compared with the separate calculation mode, and the consumption of BRAM (block random access memory) and DSP is reduced by 75% and 40%, respectively. By establishing a resource sharing mechanism, resource reuse between calculation units is realized, which lays a solid foundation for the integration of high-density calculation units.

[0080] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the above embodiments do not limit the present application in any form, and any technical solutions obtained by equivalent replacement or equivalent transformation fall within the protection scope of the present application.

Claims

1. A streaming non-bonded force calculation engine for molecular dynamics simulation calculations, characterized by: include: A particle pair matching module is used to match particles in space in a streaming manner in molecular dynamics simulations to select particle pairs that meet the cutoff radius condition; the particle pair matching module includes a streaming Manhattan filtering unit and a parallel Euclidean filtering unit. The streaming Manhattan filtering unit pre-screens particle pairs based on Manhattan distance, and the parallel Euclidean filtering unit accurately screens the pre-screened particle pairs based on Euclidean distance. A non-bonded force calculation module is used to perform non-bonded force calculations on the selected particle pairs, including van der Waals force calculations and electrostatic force calculations. The non-bonded force calculation module uses a joint calculation method to simultaneously calculate the force and potential energy, and the van der Waals force calculation and the electrostatic force calculation are implemented in parallel on the hardware; The scheduler is used to transmit the effective particle pair information screened by the streaming Manhattan filtering unit to the parallel Euclidean filtering unit, and transmit the particle pair information screened by the parallel Euclidean filtering unit to the non-bonded force calculation module.

2. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The streaming Manhattan filtering unit includes multiple Manhattan filters, two FIFOs and a MUX; the Manhattan filter is composed of three subtractors, two adders, two triggers and several comparators, which are used to calculate the Manhattan distance of particle pairs and perform preliminary screening.

3. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The parallel Euclidean filtering unit adopts a two-stage cascaded coordinate rotation digital calculation module combined with a comparator to calculate the Euclidean distance of particle pairs and complete accurate screening.

4. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The particle pair matching module further includes an arbitration scheduling unit, which serves as a control center for collaborative work and coordinates the work of the streaming Manhattan filtering unit and the parallel Euclidean filtering unit.

5. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The non-bonded force calculation module includes: Electrostatic force calculation unit, used to calculate the electrostatic force between particle pairs; Electrostatic potential calculation unit, used to calculate the electrostatic potential energy between particle pairs; Van der Waals force calculation unit, used to calculate the van der Waals force between particle pairs; Van der Waals potential calculation unit, used to calculate the van der Waals potential energy between particle pairs; The dynamic iteration unit is used to update the dynamic state of the particles according to the calculated non-bonded force results, providing a basis for the simulation calculation of subsequent time steps; The system energy analysis unit is used to analyze the energy state of the system based on the calculated potential energy results to ensure the accuracy and stability of the simulation calculation.

6. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The van der Waals force calculation is performed using the Lennard-Jones potential approximation, and the electrostatic force calculation is performed using the reaction field approximation.

7. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The ratio of the streaming Manhattan filtering unit to the parallel Euclidean filtering unit is 6:1, and the parallelism of the entire module can be freely expanded.

8. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 7, characterized in that: The streaming non-bonded force calculation engine for molecular dynamics simulation calculations also includes an optimization mechanism for dynamically adjusting the parallelism of the streaming Manhattan filter unit and the parallel Euclidean filter unit according to the particle density and complexity of the calculation task in the molecular dynamics simulation, so as to achieve efficient utilization of computing resources and further improve computing efficiency.

9. The flow non-bonded force calculation engine for molecular dynamics simulation calculation according to claim 1, characterized in that: The particle pair matching module and the non-bonded force calculation module are both implemented based on FPGA hardware, and the simulation calculation efficiency is improved through module parallelization strategy and internal structure optimization.