High performance non-bonded interaction calculation engine based on molecular distribution

By designing a high-performance non-bonding interaction calculation engine based on molecular distribution, using Taylor expansion and non-uniform lookup table technology, the problem of high-precision calculation in molecular dynamics simulation is solved, and higher calculation accuracy and efficiency are achieved.

CN119920331AInactive Publication Date: 2025-05-02ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510390290.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing molecular dynamics simulations are computationally expensive, especially in the case of high precision requirements. The general dependence of single-precision formats and suboptimal processing of non-bond interactions at different distances limit the accuracy of the simulation.

Method used

A high-performance non-bonded interaction calculation engine based on molecular distribution is designed, using a distance calculator, coefficient lookup table and core calculation unit to construct a non-uniform lookup table through Taylor expansion, and non-bonded interaction evaluation is performed in combination with radial distribution functions to reduce the error of critical distance calculation.

Benefits of technology

By reducing rounding errors and improving the calculation accuracy of critical distances, more accurate non-bonding forces and potential energy calculations are achieved, reducing resource occupation and improving calculation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119920331A_ABST
    Figure CN119920331A_ABST
Patent Text Reader

Abstract

The invention discloses a high-performance non-bonding interaction calculation engine based on molecular distribution. The high-performance non-bonding interaction calculation engine comprises a distance calculator, a coefficient lookup table and a core calculation unit, the distance calculator calculates the absolute distance # imgabs 1 # of the atom pair based on the input position coordinate difference vector # imgabs 0 # of the atom pair; parameters related to the atom type are obtained based on the interaction type of the input atom pair through a coefficient lookup table; and the core calculation unit is used for calculating the Lenard-Jones potential # imgabs3 #, the coulomb potential # imgabs4 # and the acting force based on the absolute distance # imgabs2 # calculated by the distance calculator and the parameters related to the atom type found by the coefficient lookup table. According to the high-performance non-bonding interaction calculation engine based on molecular distribution, the distribution perception interpolator based on Taylor series expansion is adopted, and molecular distribution for performing non-bonding interaction evaluation through a radial distribution function is combined, so that the error of critical distance calculation is reduced, and meanwhile, a reasonable resource proportion is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention specifically relates to a high performance non-bonded interaction calculation engine based on molecular distribution. Background Art

[0002] Molecular dynamics is a computer simulation technology that describes the interaction relationship between atoms through a series of potential functions, and non-bonded forces are the main calculation part. Molecular dynamics can study a large number of molecules and their dynamic behaviors. In addition to simulating the macroscopic physical properties of materials, it can also help researchers explore microscopic structures at scales that cannot be observed by experimental means. It is widely used in protein folding, drug design, cell membrane mechanisms and other fields.

[0003] Molecular dynamics simulation achieves microscopic simulation by analyzing the force relationship of atoms and iterating the state of atoms in discrete, infinitesimal time intervals. Due to the extensive interaction of atoms and the nature of iterative operations, the calculations of molecular dynamics simulation in space and time are coupled. It is difficult for a single simulation to achieve high-speed operations through large-scale parallelism. This is why molecular dynamics simulation is so computationally expensive. Therefore, hardware accelerators play an important role in the field of molecular dynamics simulation, including graphics processing units (GPUs), field programmable gate arrays (FPGAs) and application specific integrated circuits (ASICs). Using these advanced hardware can not only speed up the calculation speed, but also expand the scope and scale of molecular dynamics research and promote breakthrough discoveries in various scientific disciplines.

[0004] Most mature molecular dynamics software packages (such as Amber, Gromacs, and NAMD) support GPUs and have excellent performance. The advantages of GPUs are mature development environments and resources as well as low costs. However, GPUs lack hardware flexibility and can only use fixed data types, mainly single-precision floating-point types. There is also the problem of discontinuous calculation execution caused by the control flow overhead. FPGAs have greater flexibility in data scheduling and type customization. The more representative work of Martin uses linear interpolation to solve the higher-order terms in non-bonded forces. In recent years, there has also been work by Alberte that uses coordinate rotation digital calculation methods to solve exponential and logarithmic problems to solve higher-order terms. However, these FPGA-based molecular dynamics simulations are mainly based on single-precision floating-point numbers. ASIC's work is mainly focused on Anton of DE Shaw's research group and MDGRAPE of RIKEN, both of which are large-scale simulation clusters composed of customized circuits. Compared with the above accelerators, they have considerable speedup ratios. When calculating non-bonded forces, Anton3 customizes different types of paired point interaction pipelines for atomic pairs at different distances, with 23-bit and 14-bit data paths, which bring roughly equal numerical errors in force calculations for close and distant atomic pairs. MDGRAPE-4A can simultaneously calculate Coulomb force, van der Waals force and their potential energy, using single-precision floating points in the calculations and converting the output into 32-bit fixed-point numbers.

[0005] Despite these advances, the general reliance on single-precision formats and suboptimal treatment of non-bonded interactions at different distances still limit the accuracy of molecular dynamics simulations. On the other hand, calculations of non-bonded interactions in molecular dynamics often involve computationally expensive operations such as division and square roots, which have been widely used in hardware implementations for many years. Given the required accuracy and performance for large-scale atomic interactions, these operations are not fully optimized for molecular dynamics. This is particularly problematic in cases where high accuracy is required, such as normal mode analysis or long-term energy conservation. Summary of the invention

[0006] The present invention provides a high-performance non-bonded interaction calculation engine based on molecular distribution to solve at least one of the above-mentioned technical problems, and specifically adopts the following technical solutions:

[0007] A high-performance non-bonded interaction calculation engine based on molecular distribution, including: distance calculator, coefficient lookup table and core calculation unit;

[0008] The distance calculator is based on the position coordinate difference vector of the atomic pair as input Calculate the absolute distance between atom pairs ;

[0009] Obtaining parameters related to the atom type based on the interaction type of the input atom pair through the coefficient lookup table;

[0010] The core computing unit is used to calculate the absolute distance based on the distance calculator. The Leonard-Jones potential is calculated using the atomic type-related parameters found in the coefficient lookup table. , Coulomb potential and forces.

[0011] Further, the parameters related to the atom type are obtained based on the interaction type of the input atom pair through the coefficient lookup table, including , and ,in, Leonard Jones The distance when it becomes zero, represents the potential well depth, Coulomb coefficient.

[0012] Further, the core computing unit comprises: a distribution-aware interpolator and a multiply-add pipeline;

[0013] The distribution-aware interpolator is used to calculate the absolute distance Perform reciprocal calculations;

[0014] The multiplication-addition pipeline is used to calculate the absolute distance And parameters , and Calculate the Leonard-Jones potential , Coulomb potential and scalar forces.

[0015] Furthermore, the core computing unit further comprises a vector decomposer;

[0016] The vector resolver is based on the scalar force and position coordinate difference vectors Get the vector result of the force in space.

[0017] Furthermore, the distribution-aware interpolator uses a non-uniform interpolation method to calculate the absolute distance Perform a reciprocal calculation.

[0018] Furthermore, by constructing an interpolation lookup table through Taylor expansion, the functions that can be constructed are not limited to the inverse. The Taylor expansion of an infinitely variable real variable function defined on an open interval is as follows:

[0019]

[0020] in, To determine the point of information, Taylor expansion can be described Nearby The corresponding function value is When the value is finite, the difference between the expanded term and the exact value can be obtained by the remainder measure:

[0021]

[0022] The Taylor terms of each order are related to the independent variable Irrelevant parts Recorded in the storage resources and obtained through table lookup, the values ​​of each order derivative are based on the spatial distribution characteristics of atoms in the simulation system.

[0023] Furthermore, the interpolation lookup table is a non-uniform lookup table based on the radial distribution function The calculation weights are constructed based on the curves of the non-bonded force and the non-uniform distribution function is obtained based on the calculation weights. :

[0024]

[0025] in, is the table index, is the cut-off radius, is the lookup table depth;

[0026] The non-uniform lookup table content can be constructed according to the following formula:

[0027] .

[0028] Furthermore, the radial distribution function The specific method for calculating the weight of the curve of the non-bonded force is:

[0029] Radial distribution function Integrate and take non-bonded forces into account to construct the calculation weights :

[0030]

[0031] in, The function is based on the Savitzky-Golay filter to smooth the weight curve. Used to normalize the weight values ​​to facilitate subsequent correspondence with lookup tables of any depth;

[0032] Calculate the weight Integrate and normalize the independent variable to obtain the non-uniform distribution function :

[0033] .

[0034] Furthermore, in the specific case of low-order Taylor expansions, the depth of the final-order table is doubled relative to the depths of the other tables.

[0035] The invention is beneficial in that it provides a high-performance non-bonded interaction calculation engine based on molecular distribution, and designs a dedicated fixed-point data format in combination with the inherent numerical characteristics of molecular dynamics, thereby reducing rounding errors.

[0036] The benefit of the present invention lies in the high-performance non-bonded interaction calculation engine based on molecular distribution provided, which reduces the error of critical distance calculation by adopting a non-uniform lookup table based on Taylor series expansion, combined with molecular distribution for non-bonded interaction evaluation through radial distribution function, while achieving a reasonable resource ratio. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0038] Figure 1 A schematic diagram of a high-performance non-bonded interaction calculation engine based on molecular distribution provided by the present invention;

[0039] Figure 2 is a schematic diagram of the structure of the core computing unit of the present invention;

[0040] Figure 3 Schematic diagram of radial distribution function of liquid argon of the present invention;

[0041] Figure 4 A schematic diagram showing the comparison between uniform indexing and non-uniform indexing;

[0042] Figure 5 A schematic diagram of a coefficient file construction process of the present invention;

[0043] Figure 6 is a schematic diagram of the structure of the distributed perceptual interpolator of the present invention;

[0044] Figure 7 is a schematic diagram of absolute residual errors at different lookup table depths of the present invention;

[0045] Figure 8 Schematic diagram of simulation results of different methods;

[0046] Fig. 9 A schematic diagram of the drift of position and speed in the actual simulation of the present invention; DETAILED DESCRIPTION

[0047] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0048] This application proposes a high-performance non-bonded interaction calculation engine based on molecular distribution. Specifically, the non-bonded interaction includes the Lennard-Jones potential and the Coulomb potential. and Leonard-Jones potential Mathematically defined as:

[0049]

[0050] in is the interatomic distance, represents the potential well depth, Indicates potential The distance at which the potential becomes zero. The corresponding force from this potential is:

[0051]

[0052] in It is an atom Point to Atom The above equation shows that the Lennard-Jones interaction will weaken rapidly with increasing distance. In order to improve the calculation efficiency, the radius beyond the predetermined cutoff The interactions are usually ignored because their contribution is negligible.

[0053] In contrast, the Coulomb potential that governs the electrostatic interactions between charged particles decays more slowly with increasing distance. To address this issue in our simulations, we used the reaction field method. This method works by assuming that The dielectric constant is The Coulomb interaction is approximated by a constant medium. The modified Coulomb potential is expressed as:

[0054]

[0055] Figure 2 In the figure, the symbol of Coulomb potential is Vcl.

[0056] in and Atom and The charge, is the dielectric constant of free space. and is defined as:

[0057]

[0058]

[0059] in is the relative dielectric constant, which takes a value of 1 in a vacuum environment.

[0060] The modified Coulomb force obtained from the potential energy gradient is:

[0061]

[0062] The high-performance non-bonded interaction calculation engine based on molecular distribution proposed in this application realizes the calculation of the above potential energy and force based on a dedicated hardware circuit design. The specific scheme is as follows.

[0063] like Figure 1 As shown in FIG. 1 , the high-performance non-bonded interaction calculation engine based on molecular distribution includes: a distance calculator, a coefficient lookup table, and a core calculation unit. The input of the high-performance non-bonded interaction calculation engine based on molecular distribution is the interaction type of the atomic pair and the position coordinate difference vector of the atomic pair. .

[0064] The distance calculator is based on the position coordinate difference vector of the input atomic pair. Calculate the absolute distance between atom pairs . Then, the parameters related to the atom type are obtained based on the interaction type of the input atom pair through the coefficient lookup table. The parameters related to the atom type are obtained based on the interaction type of the input atom pair through the coefficient lookup table. , and ,in, Leonard Jones The distance when it becomes zero, represents the potential well depth, Coulomb coefficient. Finally, the core calculation unit is used to calculate the absolute distance based on the distance calculator The Leonard-Jones potential is calculated from the atomic type-dependent parameters found in the coefficient lookup table. , Coulomb potential and forces.

[0065] like Figure 2 As shown, the core computing unit includes: a distribution-aware interpolator and a multiply-add pipeline.

[0066] The distribution-aware interpolator is used to calculate the absolute distance Perform reciprocal calculation. It is understandable that the reciprocal of the distance, as the basic operation in the first step, directly affects the calculation accuracy of the final result. In order to achieve high-precision and low-latency reciprocal calculation, we designed a dedicated interpolation calculator for reciprocal solution to achieve high-performance solution.

[0067] The multiply-add pipeline is used to calculate the absolute distance And parameters , and Calculate the Leonard-Jones potential , Coulomb potential In the multiplication-addition pipeline structure, expand the structure according to the formula and reuse the intermediate results as much as possible, and solve the Coulomb potential energy, Lanner-Jones potential energy, and scalar force with high-precision multiplication-addition units.

[0068] The core computing unit also contains a vector resolver. The vector resolver is based on the scalar force and position coordinate difference vectors. The vector result of the force in space is obtained. Specifically, the scalar result of the force is decomposed into three dimensional components by a vector decomposer.

[0069] Since the force and potential energy results are calculated based on the reciprocal term, and it is too expensive to implement high-precision division in hardware circuits, and the interpolation method takes into account both area and performance when storage resources are sufficient, the present invention designs a special interpolation method for solving the reciprocal term.

[0070] In this application, an interpolation lookup table is constructed by Taylor expansion. Taylor expansion is a formula that uses information about a function at a certain point to describe the value of the function nearby. In mathematics, the Taylor expansion of an infinitely variable real variable function defined on an open interval is as follows:

[0071]

[0072] in, That is, to determine the point of information, Taylor expansion can describe Nearby The corresponding function value is When the value is finite, the difference between the expanded term and the exact value can be obtained by the remainder measure:

[0073]

[0074] In practical applications, the Taylor terms and independent variables Irrelevant parts Recorded in the storage resource, obtained by table lookup. In this application, the derivative values ​​of each order are not uniformly between 0 and Nanostructured structures are not based on the spatial distribution characteristics of atoms in the simulation system.

[0075] Radial distribution function Describes how the relative density of a particle changes with its distance from a reference particle. Figure 3 The radial distribution function of liquid argon is shown. Since the non-bonded force manifests as close-range exchange repulsion and long-range dispersion attraction, the relative density has a peak at the equilibrium distance, indicating the influence of non-bonded interactions.

[0076] Radial distribution function can be interpreted as the distance from the reference atom The probability density of finding neighboring atoms at nanometers. By adding the volume factor (Considering the radius The relative probability of atoms appearing at different distances in the space of 1 nm around the reference atom can be obtained by using the surface area of ​​the spherical shell (relative to 1 nm).

[0077] Considering the interaction characteristics of non-bonded forces, which are larger near and smaller far, the results of too large forces at close distances will produce absolute errors far greater than those of forces at long distances. Therefore, improving the calculation accuracy of critical distances is crucial to obtaining accurate non-bonded force results. In this application, a curve combining the probability of atomic occurrence and the size of non-bonded forces is used to construct calculation weights, such as Figure 4 As shown. For any reference atom, the calculation weight is extremely low because there are almost no other atoms at close distances. Although there are more atoms at long distances, their non-bonded forces acting on the reference atom are smaller. The absolute error of the force is overwhelmed by the error of the closer interaction force when accumulated. Therefore, the calculation weight of the long distance is not high.

[0078] To improve the accuracy of the interpolation method, the resource allocation is mapped to an interpolation lookup table, which is calculated using a coefficient file based on different atomic systems and cutoff distances. Given the fundamental role of the reciprocal distance term in nonbonded interactions, the accuracy of this interpolation is critical.

[0079] For stored functions Uniformly distributed lookup table, table index With independent variable The linear relationship is

[0080]

[0081] in, is the cut-off radius, is the lookup table depth. This relationship is Figure 4 The corresponding solid lines are shown in the figure.

[0082] Furthermore, the interpolation lookup table is a non-uniform lookup table, and for the radial distribution function Integrate and take non-bonded forces into account to construct the calculation weights .

[0083]

[0084] in, The function is based on the Savitzky-Golay filter to smooth the weight curve. Used to normalize the weight values ​​to facilitate subsequent correspondence with lookup tables of any depth;

[0085] Calculate the weight Integrate and normalize the independent variable to obtain the non-uniform distribution function :

[0086]

[0087] Rather than a uniform distribution function It can be used to construct a lookup table, and its relationship with the lookup table is:

[0088]

[0089] in, is the table index, is the cut-off radius, is the lookup table depth.

[0090] The non-uniform lookup table content can be constructed according to the following formula:

[0091]

[0092] The non-uniform function lookup table values ​​are constructed and stored in the coefficient file, which is loaded into the block random access memory when the system is initialized. The construction process of the coefficient file is as follows: Figure 5 As shown, in order to obtain a suitable radial distribution function, a molecular dynamics program is required to perform calculations and analysis in actual simulations.

[0093] The distribution-aware interpolator is implemented by non-uniform interpolation based on a special distribution, and includes a block random access memory for storage, and a table lookup logic for determining a non-uniform table index. Figure 6 The detailed structure of the distribution-aware interpolator is presented, focusing on how the block random access memory and logic circuits are organized to support non-uniform indexing. Figure 6 In the figure, registers and block random access memory are distinguished by long rounded rectangles and rectangles.

[0094] To facilitate efficient search operations, the distance variable is divided into the head term, remainder term and tail term, corresponding to , and Bit width. Taylor approximation It consists of the head term and the remainder term, and the difference That is the tail term. The nonlinear mapping table records the starting index of each non-uniform interval, and the mask table records the remainder mask value of each interval. In the first stage, the mask is used to select the dynamic remainder and tail term, and the starting index and remainder obtained by the head term are added to form the complete index of the non-uniform table, and the tail term directly participates in the multiplication and addition operation in the Taylor formula. The complete index is used to retrieve the values ​​of each Taylor level in the second stage, and then it is input into the multiplication and addition operation in the third stage to form the sum shown in the Taylor formula.

[0095] The size of the non-uniform mapping table and the mask table is determined by the depth and storage bit width:

[0096]

[0097]

[0098] in is the bit width of the index.

[0099] Bit width Fixed in calculations, but allowed to change in the starting configuration to fine-tune for non-uniform distributions. More granularity can be obtained to refine the details of non-uniform distribution changes, and when it increases until it is equal to the table depth, the contents of the mapping table and the interpolation table correspond one to one, and the mask table is no longer needed. to zero, we get a uniform lookup table. This ensures that the lookup table complies with the characteristics of atomic distribution while minimizing the resource usage of indexing logic.

[0100] In the specific case of low-order Taylor expansions, the approximation error can be significantly reduced by doubling the depth of the last order table relative to the depth of the other tables, achieving comparable accuracy to increasing the depth of all tables in the first-order Taylor expansion (n=1), and also improving in the case of second- and third-order Taylor expansions, but decreasingly. Preferably, n is less than or equal to 10.

[0101] Assumptions The order Taylor coefficients are stored in a more detailed lookup table, then the residual can be expressed as

[0102]

[0103] Can be combined into:

[0104]

[0105] here, As the The index of the table, and As the index of other tables. Accordingly, the calculation formula for the next index in the table is and .item Can be used To approximate, we get the following residual expression:

[0106]

[0107] Since the depth of the last level table is different from the depth of other tables, x is in the interval Existence as well as There are two situations. hour, , if is a monotonic function and is in the interval If the inner part is close to linear, The absolute value of The absolute error increases with the increase of Approach When When and only when When , the residual term is

[0108]

[0109] At this time if is a monotonic function and is close to linear in the interval, then The absolute value of In the interval The absolute error decreases with the increase of When When , its derivative is not strictly linear, but it has approximate properties in a very small interval, such as Figure 7 As shown, It refers to the remainder of increasing the depth of both tables at the same time, that is,

[0110]

[0111] The analysis shows that The maximum absolute error of However, as the order of the Taylor expansion increases, the accuracy of this optimization decreases, and the overall performance also depends on the type of function being approximated.

[0112] The present invention uses fixed-point numbers to calculate non-bonded forces and potential energy, reduces rounding errors, and improves the calculation accuracy of key distances based on the non-uniform interpolation method of radial distribution, making the final accumulated force result more accurate. Taylor expansion and non-uniform interpolation methods reduce the resource occupation of FPGA division operations and improve calculation efficiency.

[0113] In this application, the Verilog hardware design language is used to describe and simulate, synthesize and implement the structure of the present invention on the Xilinx Alveo U280 accelerator card through Vivado Design Suite 2023.2. For comparative evaluation, several comparison methods are used to determine the performance and accuracy of the structure of the present invention. Design I is based on the method introduced in Martin's work. As input, the high-order terms of the non-bonding force are directly calculated by linear interpolation. Design II uses single-precision floating-point operations to directly calculate the non-bonding force, while Design III uses fixed-point to implement the same direct calculation structure. Design IV uses uniform interpolation, and all other parameters are consistent with the structure of the present invention as the ablation experiment of the structure of the present invention. The simulation data of each scheme takes into account the error caused by the machine rounding of the atomic pair distance.

[0114] The simulation results were evaluated by plotting the error curves of the non-binding forces at different distances. Figure 8 These error curves are plotted with the atomic pair distance on the horizontal axis and the absolute error on a logarithmic scale on the vertical axis. The structure of the present invention shows excellent accuracy, especially in the highlighted area where accuracy is most critical. Although the accuracy is reduced at longer distances due to the limited fractional bit width compared to the single precision design, this small error becomes negligible during the force accumulation stage due to the larger error term when the force is accumulated.

[0115] In order to quantify the dynamic error of atoms in the actual simulation, we use the relative root mean square force error (RRMSFE) to evaluate the error of the cumulative force applied to each atom, which is defined as:

[0116]

[0117] in Represents atoms exist The interaction force in space, Represents the corresponding exact force, which is implemented with double precision in the experiment.

[0118] Table 1 lists the RRMSFE values ​​of each scheme and compares their performance. Design I reduces the number of multiplications by directly interpolating high-order terms, thereby greatly improving resource utilization efficiency, but this is at the expense of increased storage. The accuracy of Design I is affected because the linear interpolation of high-order terms will bring larger errors compared with other designs. Design II uses single-precision direct calculation, and the RRMSFE reaches 4.02291e-06. Design III uses a fixed-point data format, and the rounding error of position calculation is smaller than that of Design II, which reduces the RRMSFE by 71.4%. Compared with Design III, Design IV uses a uniform interpolation method instead of a division-based method, thereby reducing latency and improving resource utilization. The structure of the present invention uses non-uniform lookup table logic to increase the sampling density of key areas while optimizing the depth of the interpolation table. Compared with Design IV, the RRMSFE is reduced by 76.6%. The improvement of the structure of the present invention compared with Design IV lies in the improvement of the interpolation method, which proves the effectiveness of the structure of the present invention.

[0119] Table 1 Effect comparison results

[0120] plan Calculation Type RRMSFE LUT BRAM (Kb) DSP Slice Frequency (MHz) Delay (ns) Design I Single-precision floating point 2.47E-05 1145(0.09%) 288(0.40%) 11(0.12%) 601.44 68.2 Design II Single-precision floating point 4.02E-06 1984(0.15%) 0(0.00%) 40(0.44%) 602.35 106.3 Design III Fixed point 1.15E-06 2932(0.22%) 0(0.00%) 19(0.21%) 570.88 148.9 Design IV Fixed point 4.92E-06 1605(0.12%) 72(0.10%) 20(0.22%) 597.49 68.6 The present invention Fixed point 1.15E-06 1652(0.13%) 72(0.10%) 20(0.22%) 595.36 70.5

[0121] RRMSFE reflects the atomic errors in the force accumulation process, which has a cumulative effect on the velocity and position variables in each motion update step. Since molecular dynamics is chaotic, the drift of velocity and position will seriously affect the stability and accuracy of molecular dynamics simulation. To evaluate the dynamic accuracy of the proposed design, a liquid argon system simulation was performed with a time step of 2 fs. The FPGA implementation of the present invention was benchmarked against GROMACS, a single-precision software widely used in molecular dynamics. Fig. 9 The drift of atomic velocity and position during the first 1000 simulation steps is shown, where the x-axis corresponds to the argon atomic index, the y-axis corresponds to time, and the z-axis corresponds to the deviation from the double-precision GROMACS result. Statistical analysis shows that the average position drift of each atom in the proposed design is 3.61e-07 nm per picosecond and the average velocity drift is 1.26e-06 nm·ps per picosecond. -1 , which is significantly better than the single-precision GROMACS results (2.61e-06 nm per picosecond and 8.75e-06 nm·ps per picosecond, respectively). -1 ). This drift analysis highlights the higher dynamic accuracy of the proposed FPGA design compared to the single-precision reference standard.

[0122] As the core computing unit of the device, the processor is responsible for running applications, drivers, and the interaction logic between software and hardware.

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

Claims

1. A high-performance non-bonded interaction calculation engine based on molecular distribution, characterized in that: Contains: distance calculator, coefficient lookup table and core computing unit; The distance calculator is based on the position coordinate difference vector of the atomic pair as input Calculate the absolute distance between atom pairs ; Obtaining parameters related to the atom type based on the interaction type of the input atom pair through the coefficient lookup table; The core computing unit is used to calculate the absolute distance based on the distance calculator. The Leonard-Jones potential is calculated using the atomic type-related parameters found in the coefficient lookup table. , Coulomb potential and forces.

2. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 1, characterized in that: The parameters related to the atom type obtained by the coefficient lookup table based on the interaction type of the input atom pair include , and ,in, Leonard Jones The distance when it becomes zero, represents the potential well depth, Coulomb coefficient.

3. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 2, characterized in that: The core computing unit comprises: a distributed sensing interpolator and a multiply-add pipeline; The distribution-aware interpolator is used to calculate the absolute distance Perform reciprocal calculations; The multiplication-addition pipeline is used to calculate the absolute distance And parameters , and Calculate the Leonard-Jones potential , Coulomb potential and scalar forces.

4. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 3, characterized in that: The core computing unit also includes a vector decomposer; The vector resolver is based on the scalar force and position coordinate difference vectors Get the vector result of the force in space.

5. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 3, characterized in that: The distribution-aware interpolator uses a non-uniform interpolation method to calculate the absolute distance Perform a reciprocal calculation.

6. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 5, characterized in that: The interpolation lookup table is constructed by Taylor expansion. The functions that can be constructed are not limited to the inverse. The Taylor expansion of the infinitely variable real variable function defined on the open interval is as follows: ; in, To determine the point of information, Taylor expansion can be described Nearby The corresponding function value is When the value is finite, the difference between the expanded term and the exact value can be obtained by the remainder measure: ; The Taylor terms of each order are related to the independent variable Irrelevant parts Recorded in the storage resources and obtained through table lookup, the values ​​of each order derivative are based on the spatial distribution characteristics of atoms in the simulation system.

7. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 6, characterized in that: The interpolation lookup table is a non-uniform lookup table based on the radial distribution function. The calculation weights are constructed based on the curves of the non-bonded force and the non-uniform distribution function is obtained based on the calculation weights. : ; in, is the table index, is the cut-off radius, is the lookup table depth; The non-uniform lookup table content can be constructed according to the following formula: 。 8. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 7, characterized in that: The radial distribution function The specific method for calculating the weight of the curve of the non-bonded force is: Radial distribution function Integrate and take non-bonded forces into account to construct the calculation weights : ; in, The function is based on the Savitzky-Golay filter to smooth the weight curve. Used to normalize the weight values ​​to facilitate subsequent correspondence with lookup tables of any depth; Calculate the weight Integrate and normalize the independent variable to obtain the non-uniform distribution function : 。 9. The high-performance non-bonded interaction calculation engine based on molecular distribution according to claim 7, characterized in that: In the special case of low-order Taylor expansions, the depth of the final-order table is doubled relative to the depth of the other tables.