A programmable logic device, a bonding force calculation method and a verification platform
By using programmable logic devices in molecular dynamics simulations to divide the three-dimensional space into unit spaces and calculate the bonding forces of simulated particles, the problems of large computational load and low efficiency are solved, achieving savings in hardware resources and an increase in computational speed.
Patent Information
- Application Number
- CN202410520894.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-04-28
AI Technical Summary
Molecular dynamics simulations are computationally intensive and inefficient, especially in bond force calculations where the acceleration effects of CPUs and GPUs are limited.
A programmable logic device is used, including a block random access memory, a logic controller, a bonding force calculator, and a writeback unit. By dividing the three-dimensional space into multiple unit spaces, the logic controller traverses the box and calculates the bonding force of the simulated particles, and finally writes the total bonding force back to the block random access memory.
It improves the computational efficiency of molecular dynamics simulations, reduces hardware resource consumption, and optimizes the bond force calculation process.
Smart Images

Figure CN118351954B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of molecular dynamics technology, and in particular to a programmable logic device, a method for calculating bonding forces, and a verification platform. Background Technology
[0002] In the field of molecular dynamics, molecular dynamics simulations (i.e., using computers to solve the equations of motion for all particles in a system) can be used to simulate the motion trajectory of particles, thereby obtaining macroscopic and microscopic process quantities such as temperature, volume, and pressure of the system.
[0003] Molecular dynamics involves alternating between force calculations and motion updates, with the majority of computation being force calculations, followed by integration. The calculated forces depend on the system being simulated and generally include bonded forces (bond forces, angle forces, and dihedral forces) as well as unbonded forces (Leonard-Jones forces and Coulomb forces).
[0004] Currently, non-bonding forces are mainly accelerated using CPUs and GPUs, while the calculation of bonding forces is performed by the host computer, resulting in a large computational load and low computational efficiency in molecular dynamics simulations. Summary of the Invention
[0005] This invention provides a programmable logic device, a method for calculating bonding forces, and a verification platform to address the problems of large computational load and low computational efficiency in molecular dynamics simulations in the prior art.
[0006] In a first aspect, to solve the above-mentioned technical problems, embodiments of the present invention provide a programmable logic device, comprising: A block random access memory is configured to store a plurality of boxes for representing a three-dimensional space occupied by a simulated organic compound. The three-dimensional space is divided into a plurality of unit spaces, each unit space corresponding to one of the boxes. The boxes include a plurality of simulated particles for representing the particles that make up the organic compound in the corresponding unit space. A logic controller, connected to the output of the block random access memory, is configured to traverse the boxes in the block random access memory and obtain the simulated particle information of each simulated particle contained in the currently traversed box. A bonding force calculator is connected to the output of the logic controller. The bonding force calculator is configured to obtain each simulated particle from the logic controller and calculate each bonding force of the corresponding simulated particle based on the simulated particle information of each simulated particle. A writeback device is configured to write back the total bond force corresponding to each simulated particle to the corresponding simulated particle in the block random access memory, based on the identifier of each simulated particle; wherein the total bond force is the sum of all bond forces corresponding to the simulated particle.
[0007] One possible implementation of the bonding force calculator includes: A bond force calculation unit is connected between the logic controller and the write-back unit. The bond force calculation unit is configured to retrieve a first particle pair containing the particle to be processed from the data lookup table corresponding to the current box based on the identifier of any particle to be processed in the current box, and calculate the bond force of each simulated particle in the first particle pair based on the position information of each simulated particle in the first particle pair; wherein, the first particle pair consists of two simulated particles, and the data lookup table contains the bonding relationship between the simulated particles located in the current box; An angle force calculation unit is connected between the logic controller and the write-back unit. The angle force calculation unit is configured to retrieve a second particle pair containing the particle to be processed from the data lookup table based on the identifier of the particle to be processed, and calculate the angle force of the particle to be processed based on the position information of each simulated particle in the second particle pair; wherein, the second particle pair consists of 3 simulated particles. A dihedral force calculation unit is connected between the logic controller and the write-back unit. The dihedral force calculation unit is configured to obtain a third particle pair containing the particle to be processed from the data lookup table based on the identifier of the particle to be processed, and calculate the dihedral force of the particle to be processed based on the position information of each simulated particle in the third particle pair; wherein, the third particle pair consists of 4 simulated particles.
[0008] One possible implementation, the bond force calculation unit includes: A bond force calculator is connected to the output of the logic controller. The bond force calculator is configured to calculate the bond force of each simulated particle in the first particle pair based on the position information and first parameter information of each simulated particle in the first particle pair. The first parameter information is a parameter related to the calculation of the bond force. A first temporary register, connected between the bond force calculator and the write-back unit, is configured to acquire and temporarily store the bond force of each simulated particle in the first particle pair from the bond force calculator.
[0009] One possible implementation, the first temporary register includes: A first filter is connected to the output of the bond force calculator. The first filter is configured to obtain first relevant information containing the bond force from the bond force calculator and filter out the bond force of the particle to be processed from the first relevant information; wherein, the first relevant information is used to characterize information related to the particle to be processed. A first sub-register is connected to the output of the bond force calculator. The first sub-register is configured to obtain and temporarily store second related information containing the bond force from the bond force calculator. The second related information is used to characterize information related to another simulated particle in the first particle pair, and the bond force of the particle to be processed is the same as the bond force of the other simulated particle. A second filter is connected to the output of the first sub-register. The second filter is configured to obtain the second relevant information from the first sub-register and filter out the bond force of the other simulated particle in the first particle pair from the second relevant information. The second sub-register is connected to the output of the logic controller. The second sub-register is configured to sequentially store the simulated particle information of each simulated particle in the first particle pair. After the bond force calculator outputs the bond force related information corresponding to each simulated particle in the first particle pair, the second sub-register sequentially outputs the simulated particle information of each simulated particle in the first particle pair. The bond force related information includes the first related information and the second related information. The third sub-register is connected to the output of the first filter, the output of the second filter, and the output of the second sub-register. The output of the third sub-register is connected to the write-back unit. The third sub-register is configured to sequentially obtain the bond force of the particle to be processed and the bond force of the other simulated particle from the first filter and the second filter, so as to sequentially update the simulated particle information of the particle to be processed and the simulated particle information of the other simulated particle obtained from the second sub-register, and sequentially obtain and output the updated simulated particle information of the particle to be processed and the updated simulated particle information of the other simulated particle.
[0010] In one possible implementation, the first temporary register further includes: A first comparator is connected to the output of the second sub-register. The first comparator is configured to obtain the first remaining storage capacity of the second sub-register from the two sub-registers, and determine the state of the second sub-register based on the first remaining storage capacity and a first threshold. The state includes an idle state and a non-idle state. A second comparator is connected to the output of the third sub-register. The second comparator is configured to obtain the second remaining storage capacity of the third sub-register from the third sub-register, and determine the state of the third sub-register based on the second remaining storage capacity and a second threshold. The first AND calculator is connected to the outputs of the first comparator and the second comparator. The first AND calculator is configured to take the state of the first sub-register and the state and result of the second sub-register as the state of the bond force calculation unit.
[0011] One possible implementation, the included angle force calculation unit includes: An angle force calculator, connected to the output of the logic controller, is configured to calculate the angle force of each simulated particle in the second particle pair based on the position information of each simulated particle in the second particle pair and the second parameter information; wherein, the second parameter information is a parameter related to the calculation of the angle force; A second register, connected between the angle force calculator and the write-back unit, is configured to obtain the angle force of each simulated particle in the second particle pair from the angle force calculator.
[0012] One possible implementation, the second temporary register includes: A third filter is connected to the output of the angle force calculator. The third filter is configured to obtain third relevant information containing the angle force from the angle force calculator and filter out the angle force of the particle to be processed from the third relevant information; wherein, the third relevant information is used to characterize information related to the particle to be processed. A fourth sub-register is connected to the output of the angle force calculator. The fourth register is configured to obtain and temporarily store fourth related information containing the angle force from the angle force calculator. The second particle pair includes the particle to be processed, the first simulated particle, and the second simulated particle. The fourth related information is used to characterize information related to the first simulated particle. A fourth filter is connected to the output of the fourth sub-register. The fourth filter is configured to obtain the fourth relevant information from the fourth sub-register and filter out the angular force of the first simulated particle from the fourth relevant information. A fifth sub-register is connected to the output of the angle force calculator. The fifth sub-register is configured to obtain and temporarily store fifth related information containing the angle force from the angle force calculator; wherein the fifth related information is used to characterize information related to the second simulated particle. The fifth filter is connected to the output of the fifth sub-register. The fifth filter is configured to obtain the fifth relevant information from the fifth sub-register and filter out the angular force of the second simulated particle from the fifth relevant information. The sixth sub-register is connected to the output of the logic controller. The sixth sub-register is configured to sequentially store the simulated particle information of each simulated particle in the second particle pair. After the angle force calculator outputs the relevant information corresponding to each simulated particle in the second particle pair, the sixth sub-register sequentially outputs the simulated particle information of each simulated particle in the second particle pair. The relevant information includes the third relevant information, the fourth relevant information, and the fifth relevant information. The seventh sub-register is connected to the output terminals of the third filter, the fourth filter, the fifth filter, and the sixth sub-register. The output terminal of the seventh sub-register is connected to the write-back unit. The seventh sub-register is configured to sequentially obtain the included force of the corresponding simulated particles from the third filter, the fourth filter, and the fifth filter, so as to sequentially update the simulated particle information of the particle to be processed, the simulated particle information of the first simulated particle, and the simulated particle information of the second simulated particle obtained from the sixth sub-register, and sequentially obtain and output the updated simulated particle information of the corresponding simulated particles.
[0013] In one possible implementation, the second temporary register further includes: A third comparator is connected to the output of the sixth sub-register. The third comparator is configured to obtain the third remaining storage capacity of the sixth sub-register from the sixth sub-register, and determine the state of the sixth sub-register based on the third remaining storage capacity and a third threshold. The state includes an idle state and a non-idle state. A fourth comparator is connected to the output of the seventh sub-register. The fourth comparator is configured to obtain the fourth remaining storage capacity of the seventh sub-register from the seventh sub-register, and determine the state of the seventh sub-register based on the fourth remaining storage capacity and a fourth threshold. The second AND calculator is connected to the outputs of the third and fourth comparators. The second AND calculator is configured to take the state of the sixth sub-register and the state and result of the seventh sub-register as the state of the angle force calculation unit.
[0014] One possible implementation, the dihedral force calculation unit includes: A dihedral force calculator is connected to the output of the logic controller. The dihedral force calculator is configured to calculate the dihedral force of each simulated particle in the third particle pair based on the position information and third parameter information of each simulated particle in the third particle pair. The third parameter information is a parameter related to the calculation of the dihedral force. A third register, connected between the dihedral force calculator and the write-back unit, is configured to obtain the dihedral force of each simulated particle in the third particle pair from the dihedral force calculator.
[0015] One possible implementation, the third register includes: A sixth filter, connected to the output of the dihedral force calculator, is configured to obtain sixth relevant information containing the dihedral force from the dihedral force calculator, and filter out the dihedral force of the particle to be processed from the sixth relevant information; wherein, the sixth relevant information is used to characterize information related to the particle to be processed; The eighth sub-register is connected to the output of the dihedral force calculator. The eighth sub-register is configured to obtain and temporarily store the seventh related information containing the dihedral force from the dihedral force calculator. The third particle pair includes the particle to be processed, the third simulated particle, the fourth simulated particle, and the fifth simulated particle. The seventh related information is used to characterize information related to the third simulated particle. A seventh filter is connected to the output of the eighth sub-register. The seventh filter is configured to obtain the seventh relevant information from the eighth sub-register and filter out the dihedral force of the third simulated particle from the seventh relevant information. A ninth sub-register is connected to the output of the dihedral force calculator. The ninth sub-register is configured to acquire and temporarily store an eighth related information containing the dihedral force from the dihedral force calculator. The eighth related information is used to characterize information related to the fourth simulated particle. The eighth filter is connected to the output of the ninth sub-register. The eighth filter is configured to obtain the eighth relevant information from the ninth sub-register and filter out the dihedral force of the fourth simulated particle from the eighth relevant information. The tenth sub-register is connected to the output of the dihedral force calculator. The tenth sub-register is configured to obtain and temporarily store the ninth related information containing the dihedral force from the dihedral force calculator; wherein the ninth related information is used to characterize information related to the fifth simulated particle. The ninth filter, connected to the output of the tenth sub-register, is configured to obtain the ninth relevant information from the tenth sub-register and filter out the dihedral force of the fifth simulated particle from the ninth relevant information; The eleventh sub-register is connected to the output of the logic controller. The eleventh sub-register is configured to sequentially store the simulated particle information of each simulated particle in the third particle pair. After the dihedral force calculator outputs the relevant information corresponding to each simulated particle in the third particle pair, the eleventh sub-register sequentially outputs the simulated particle information of each simulated particle in the third particle pair. The relevant information includes the sixth relevant information, the seventh relevant information, the eighth relevant information, and the ninth relevant information. The twelfth sub-register is connected to the output terminals of the sixth filter, the seventh filter, the eighth filter, the ninth filter, and the eleventh sub-register. The twelfth sub-register is configured to sequentially obtain the dihedral forces of the corresponding simulated particles from the sixth filter, the seventh filter, the eighth filter, and the ninth filter, so as to sequentially update the simulated particle information of the particle to be processed, the simulated particle information of the third simulated particle, the simulated particle information of the fourth simulated particle, and the simulated particle information of the fifth simulated particle obtained from the eleventh sub-register, and sequentially obtain and output the updated simulated particle information of the corresponding simulated particles.
[0016] In one possible implementation, the third temporary register further includes: A fifth comparator is connected to the output of the eleventh sub-register. The fifth comparator is configured to obtain the fifth remaining storage capacity of the eleventh sub-register from the eleventh sub-register, and determine the state of the eleventh sub-register based on the fifth remaining storage capacity and a fifth threshold. The state includes an idle state and a non-idle state. A sixth comparator is connected to the output of the twelfth sub-register. The sixth comparator is configured to obtain the sixth remaining storage capacity of the twelfth sub-register from the twelfth sub-register, and determine the state of the twelfth sub-register based on the sixth remaining storage capacity and a sixth threshold. The third AND calculator is connected to the outputs of the fifth and sixth comparators. The third AND calculator is configured to use the state of the eleventh sub-register and the state and result of the twelfth sub-register as the state of the dihedral force calculation unit.
[0017] One possible implementation of the writeback device includes: An arbitrator is connected to the output of the bond force calculation unit, the included angle force calculation unit, and the dihedral angle force calculation unit. The arbitrator is configured to sum all the bond forces of each simulated particle according to the identifier of each simulated particle in the current box, so as to obtain the total bond force of the corresponding simulated particle. A bonding force buffer is connected to the output of the arbitrator. The output of the bonding force buffer is connected to the input and output of the write-back device. The bonding force buffer is configured to write the total bonding force of the corresponding simulated particle into the corresponding simulated particle in the block random access memory according to the identifier of each simulated particle in the current box.
[0018] One possible implementation includes the simulated particle information, comprising: The first simulated particle information is used to record the position and parameter information of the simulated particle before it drifts; The second simulated particle information is used to record the position and parameter information of the simulated particle after drifting.
[0019] In one possible implementation, the block random access memory is further configured to release the storage space corresponding to the second sub-simulated particle information after traversing all boxes and completing the write-back of the simulated particles in each box.
[0020] Secondly, embodiments of the present invention provide a method for calculating bonding force, applied to a programmable logic device. The programmable logic device includes a block random access memory (BRAM) for storing multiple boxes. These boxes characterize a three-dimensional space occupied by a simulated organic compound. The three-dimensional space is divided into multiple unit spaces, each unit space corresponding to one box. Each box includes multiple simulated particles, which characterize the particles constituting the organic compound in the corresponding unit space, including: Traverse the boxes in the block random access memory and obtain the simulated particle information of each simulated particle contained in the current box from the currently traversed box; Each type of bonding force for each simulated particle is calculated based on the simulated particle information to determine the total bonding force of the corresponding simulated particle; wherein, the total bonding force is the sum of all bonding forces corresponding to the simulated particle; Based on the identifier of each simulated particle, the total bonding force of the corresponding simulated particle is written back to the corresponding simulated particle in the block random access memory.
[0021] Thirdly, embodiments of the present invention provide a verification platform, including: A development board, wherein the development board is configured with programmable logic devices as described in the first aspect and dynamic random access memory; The host server is configured to call the program under test through a test script program. The program under test is used to control the programmable logic device to read test data from the first location of the dynamic random access memory for testing, and write the test result to the second location of the dynamic random access memory after the test is completed. The program under test reads the test result from the second location and compares the test result with the expected value to obtain a comparison result. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the structure of a programmable logic device provided in an embodiment of the present invention; Figure 2 A three-dimensional spatial schematic diagram of an organic compound provided in an embodiment of the present invention; Figure 3 A resource utilization diagram for bonding force calculation in existing technologies; Figure 4 A resource utilization diagram for angular force calculation in existing technologies; Figure 5 This is a resource utilization diagram for calculating dihedral forces in existing technologies; Figure 6 This is a schematic diagram of a bonding force calculator provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a bond force calculation unit provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of a molecular structure corresponding to bond forces provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of a first temporary register provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of another first temporary register provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the structure of an angle force calculation unit provided in an embodiment of the present invention; Figure 12 This is a schematic diagram of the molecular structure corresponding to the included angle force provided in an embodiment of the present invention; Figure 13 This is a schematic diagram of the structure of the second temporary register provided in an embodiment of the present invention; Figure 14 This is a schematic diagram of another second temporary register provided in an embodiment of the present invention; Figure 15 This is a schematic diagram of the structure of a dihedral force calculation unit provided in an embodiment of the present invention; Figure 16This is a schematic diagram of the molecular structure corresponding to a dihedral angle force provided in an embodiment of the present invention; Figure 17 This is a schematic diagram of the structure of a third temporary register provided in an embodiment of the present invention; Figure 18 This is a schematic diagram of another third temporary register provided in an embodiment of the present invention; Figure 19 A schematic diagram of another programmable logic device provided in an embodiment of the present invention; Figure 20 A schematic diagram of the overall computing architecture of a programmable logic device provided in an embodiment of the present invention; Figure 21 A flowchart of a bonding force calculation method provided in an embodiment of the present invention; Figure 22 This is a schematic diagram of the structure of a verification platform provided in an embodiment of the present invention.
[0023] Figure label: Block Random Access Memory 1, Logic Controller 2, Bond Force Calculator 3, Writeback Unit 4, Bond Force Calculation Unit 31, Angle Force Calculation Unit 32, Dihedral Angle Force Calculation Unit 33, Bond Force Calculator 311, First Register 312, First Filter 3121, First Sub-Register 3122, Second Filter 3123, Second Sub-Register 3124, Third Sub-Register 3125, First Comparator 3126, Second Comparator 3127, First AND Calculator 3128, Angle Force Calculator 321, Second Register 322, Third Filter 3221, Fourth Sub-Register 3222, Fourth Filter 3223, Fifth Sub-Register 3224, Fifth Filter 3225, sixth sub-register 3226, seventh sub-register 3227, third comparator 3228, fourth comparator 3229, second AND calculator 322A, dihedral force calculator 331, third register 332, sixth filter 3321, eighth sub-register 3322, seventh filter 3323, ninth sub-register 3324, eighth filter 3325, tenth sub-register 3326, ninth filter 3327, eleventh sub-register 3328, twelfth sub-register 3329, fifth comparator 332A, sixth comparator 332B, third AND calculator 332C, arbitrator 41, bond force buffer 42. Detailed Implementation
[0024] This invention provides a programmable logic device, a method for calculating bonding forces, and a verification platform to address the problems of large computational load and low computational efficiency in molecular dynamics simulations in the prior art.
[0025] It should be understood that the specific structural and functional details disclosed in the embodiments of the present invention are merely representative and are intended to describe exemplary embodiments of this application. However, this application can be implemented in many alternative forms and should not be construed as being limited solely to the embodiments set forth herein.
[0026] In the description of this application, it should be understood that the terms "center," "lateral," "upper," "lower," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing this application 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, and therefore should not be construed as a limitation of this application. Furthermore, 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 as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more. Additionally, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion.
[0027] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linkage" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0028] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit exemplary embodiments. Unless the context clearly indicates otherwise, the singular forms “a” and “an” as used herein are also intended to include the plural. It should also be understood that the terms “comprising” and / or “including” as used herein specify the presence of the stated features, integers, steps, operations, units, and / or components, without excluding the presence or addition of one or more other features, integers, steps, operations, units, components, and / or combinations thereof.
[0029] In this invention, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.
[0030] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. However, the exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided to make the present invention more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the figures denote the same or similar structures, and therefore repeated descriptions of them will be omitted. Terms describing position and direction in the present invention are illustrative based on the accompanying drawings, but changes can be made as needed, and all such changes are included within the scope of protection of the present invention. The accompanying drawings of the present invention are for illustrative purposes only and do not represent actual proportions.
[0031] It should be noted that specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many ways other than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below. The following description is a preferred embodiment for carrying out the present application; however, the description is for the purpose of illustrating the general principles of the application and is not intended to limit the scope of the application. The scope of protection of this application shall be determined by the appended claims.
[0032] The following description, in conjunction with the accompanying drawings, details a programmable logic device, a method for calculating bonding force, and a verification platform provided by embodiments of the present invention.
[0033] Please see Figure 1 This is a schematic diagram of a programmable logic device provided in an embodiment of the present invention. The programmable logic device includes: Block random access memory 1 is configured to store multiple boxes, which are used to characterize the three-dimensional space occupied by the simulated organic compound. The three-dimensional space is divided into multiple unit spaces, each unit space corresponding to a box. Each box includes multiple simulated particles, which are used to characterize the particles that make up the organic compound in the corresponding unit space. Logic controller 2 is configured to traverse the boxes in block random access memory 1 and obtain the simulated particle information of each simulated particle contained in the current box from the currently traversed box; The bonding force calculator 3 is configured to acquire each simulated particle from the logic controller 2 and calculate each type of bonding force of the corresponding simulated particle based on the simulated particle information of each simulated particle. Writeback 4 is configured to write back the total bond force corresponding to each simulated particle to the corresponding simulated particle in the block random access memory 1 according to the identifier of each simulated particle; wherein, the total bond force is the sum of all bond forces corresponding to the simulated particle.
[0034] Organic compounds can be proteins, amino acids, fats, etc.
[0035] Programmable logic devices can be Field Programmable Gate Arrays (FPGAs), Complex Programmable Logic Devices (CPLDs), Programmable Logic Devices (PLDs), etc.
[0036] Please see Figure 2 This is a three-dimensional spatial diagram of an organic compound provided in an embodiment of the present invention. A unit space can be a small three-dimensional space with the same length, width, and height. The three-dimensional space occupied by the organic compound is divided into multiple unit spaces, each of which is abstracted as a box. The particles in each unit space are abstracted as simulated particles within the boxes. Each box records the simulated particles contained within it and their information, including the particle's identifier, position, and bonding relationships. Particles in the organic compound may shift; for example, under different conditions and influenced by forces, particles may drift and potentially form bonds with particles in a new unit space.
[0037] In some embodiments, the simulated particle identifier can be composed of the box number corresponding to the box containing the simulated particle and the particle's serial number within the box. For example, the simulated particle identifier of simulated particle i is (c i ,o i Where c is the box number of the simulated particle i, o i This represents the index of simulated particle i within box c. By constructing a simulated particle identifier using the box number corresponding to the box containing the simulated particle and the particle's index within the box, the information of the box containing the simulated particle can be directly read through the simulated particle identifier. This facilitates traversing simulated particles by box and obtaining the simulated particle's position information.
[0038] In some embodiments, each simulated particle carries simulated particle information containing two sets of storage spaces, storing a first sub-simulated particle information and a second sub-simulated particle information, respectively. The first sub-simulated particle information records the position and parameter information of the simulated particle before drifting; the second sub-simulated particle information records the position and parameter information of the simulated particle after drifting. Their initial values are the same. When a simulated particle drifts, the new storage information points to a new address (i.e., a new simulated particle identifier), and the old simulated particle information of the corresponding simulated particle is copied to a new box. If subsequent simulated particles need to use the old simulated particle information, the selection of which address's information to use can be determined directly by judging whether the old simulated particle identifier and the new simulated particle identifier (i.e., the old address and the new address) are the same.
[0039] In some embodiments, the block random access memory 1 is further configured to release the storage space corresponding to the second sub-simulated particle information after traversing all boxes and completing the write-back of the simulated particles in each box. For example, when simulated particle i drifts into a new box, it is necessary to migrate all the old simulated particle information carried by simulated particle i to the new box. By setting up separate storage spaces for storing new and old sets of simulated particle information for each simulated particle, the data access process can be simplified, and the hardware implementation can be completed through sequential addressing without requiring a large number of pairings, thereby effectively reducing resource consumption.
[0040] The programmable logic device is designed to include: a block random access memory 1 storing multiple boxes; a logic controller 2 connected to the block random access memory 1, configured to traverse the boxes in the block random access memory 1 and obtain the simulated particle information of each simulated particle from the currently traversed box; a bonding force calculator 3 connected to the output of the logic controller 2, configured to calculate each type of bonding force of the simulated particles based on the simulated particle information obtained from the logic controller 2; and a writeback device 4 connected to the output of the bonding force calculator 3, which calculates the total bonding force of the corresponding simulated particle based on the identifier (i.e., simulated particle identifier) of each simulated particle and writes it back to the corresponding simulated particle in the block random access memory. When the bonding forces of the simulated particles in all boxes in the block random access memory 1 have been written back, the motion update of the organic compound is completed. At this time, the simulated particles will drift, and the simulated particles contained in each box and the simulated particle information of the simulated particles will also be updated synchronously. Then, the above process is repeated.
[0041] Bonding forces include bonding forces, angular forces, and dihedral forces.
[0042] Please see Figures 3-5 , Figure 3 This is a resource utilization map for bonding force calculation in existing technologies. Figure 4This is a resource utilization diagram for calculating the included angle force in existing technologies. Figure 5 This is a resource utilization diagram for calculating dihedral forces in existing technologies. From... Figures 3-5 It can be seen that the resource utilization rate of bonding forces, angular forces, and dihedral forces is extremely low.
[0043] Taking a programmable logic device (FPGA) as an example, please refer to Table 1, which is a comparison table of bonding force resource consumption under different platforms provided in the embodiments of the present invention.
[0044] Table 1
[0045] As shown in Table 1, using FPGA to calculate bonding force can effectively save hardware resource consumption.
[0046] In the embodiments provided by this invention, the three-dimensional space occupied by the organic compound is divided into multiple unit spaces, each unit space corresponding to a box. Each box includes multiple simulated particles, which simulate the particles constituting the organic compound in the corresponding unit space. The programmable logic device is designed to include a block random access memory 1 storing multiple boxes. A logic controller 2 connected to the block random access memory 1 is configured to traverse the boxes in the block random access memory 1 and obtain the simulated particle information of each simulated particle contained in the currently traversed box. A bonding force calculator 3 connected to the logic controller 2 is configured to obtain each simulated particle from the logic controller 2 and calculate each type of bonding force of the corresponding simulated particle based on the simulated particle information. A write-back device 4 is configured to write back the total bonding force corresponding to each simulated particle to the corresponding simulated particle in the block random access memory 1 based on the identifier of each simulated particle; wherein, the total bonding force is the sum of all bonding forces corresponding to the simulated particle. This allows for high-speed interconnection of the components in the programmable logic device, optimizing and accelerating the calculation of bonding forces in molecular dynamics simulation, and effectively reducing hardware resource consumption.
[0047] Please see Figure 6 This is a schematic diagram of a bonding force calculator provided in an embodiment of the present invention. The bonding force calculator 3 includes: The bond force calculation unit 31 is configured to retrieve a first particle pair containing the particle to be processed from the data lookup table corresponding to the current box based on the identifier of any particle to be processed in the current box, and calculate the bond force of each simulated particle in the first particle pair based on the position information of each simulated particle in the first particle pair; wherein, the first particle pair consists of 2 simulated particles, and the data lookup table contains the bonding relationship between the simulated particles located in the current box. The angle force calculation unit 32 is configured to retrieve a second particle pair containing the particle to be processed from a data lookup table based on the identifier of the particle to be processed, and calculate the angle force of the particle to be processed based on the position information of each simulated particle in the second particle pair; wherein, the second particle pair consists of 3 simulated particles. The dihedral force calculation unit 33 is configured to retrieve a third particle pair containing the particle to be processed from a data lookup table based on the identifier of the particle to be processed, and to calculate the dihedral force of the particle to be processed based on the position information of each simulated particle in the third particle pair; wherein the third particle pair consists of 4 simulated particles.
[0048] The input terminals of the bond force calculation unit 31, the included angle force calculation unit 32, and the dihedral angle calculation unit are all connected to the output terminal of the logic controller 2, and the output terminals of the bond force calculation unit 31, the included angle force calculation unit 32, and the dihedral angle force calculation unit 33 are all connected to the input terminal of the writeback unit 4.
[0049] For example, the logic controller 2 is currently traversing the current box c from the block random access memory 1. The current box c contains 4 simulated particles (1~4). Assume that the bonding relationship of these four simulated particles is that simulated particles 1~4 are bonded in sequence. If the particle to be processed is simulated particle 1, the data lookup table stored in the current box is shown in Table 2.
[0050] Table 2
[0051] The bond force calculation unit 31 can find out from the table that simulated particle 1 and simulated particle 2 form the first particle pair. Based on the obtained position information of the two simulated particles, the bond force of simulated particle 1 is calculated. Since the bond forces of simulated particle 1 and simulated particle 2 are the same, it is not necessary to calculate the bond force between simulated particle 2 and simulated particle 1 again.
[0052] The angle force calculation unit 32 can find out from the table that simulated particle 1, simulated particle 2, and simulated particle 3 form a second particle pair. Based on the position information of the three simulated particles, the angle force between them is calculated. Since the angle force between these three simulated particles is the same, the angle force between these three simulated particles only needs to be calculated once.
[0053] The dihedral force calculation unit 33 can find by looking up the table that simulated particle 1 and simulated particles 2 to 4 form a third particle pair. Based on the obtained position information of these four simulated particles, their dihedral forces are calculated. Since the dihedral forces of these four simulated particles are the same, the dihedral forces of these four simulated particles only need to be calculated once.
[0054] When the particle to be processed is simulated particle 2, repeat the above process. Since the dihedral force has already been calculated when the particle to be processed is simulated particle 1, it does not need to be calculated again. The processing method when the particle to be processed is other simulated particles is similar and will not be described in detail.
[0055] Writeback device 4 calculates the total bond force of each simulated particle based on the bond force of each simulated particle, and writes it to the corresponding simulated particle according to the simulated particle identifier.
[0056] In the embodiments provided by the present invention, by setting up independent calculation units for the bond force, the included angle force, and the dihedral angle force of the bonding force, each type of bond force can be calculated simultaneously, thereby improving the calculation efficiency.
[0057] Please see Figure 7 This is a schematic diagram of a bond force calculation unit provided in an embodiment of the present invention. The bond force calculation unit includes: The bond force calculator 311 is connected to the output of the logic controller 2 and is configured to calculate the bond force of each simulated particle in the first particle pair based on the position information and the first parameter information of each simulated particle in the first particle pair; wherein, the first parameter information is a parameter related to the calculation of the bond force. The first temporary register 312, connected to the output of the bond force calculator 311, is configured to acquire and temporarily store the bond force of each simulated particle in the first particle pair from the bond force calculator 311.
[0058] Please see Figure 8 This is a schematic diagram of a molecular structure corresponding to a bond force, provided in an embodiment of the present invention.
[0059] Figure 8 The molecular structures of simulated particles i and j are shown in the figure, and the formula for calculating the bond forces is as follows: (1); in, To simulate the bond forces of particle i, r is a unit vector ij Let be the distance between simulated particle i and simulated particle j, k be the elastic constant, and r0 be the equilibrium distance.
[0060] The bond force calculator 311 can determine the distance between two simulated particles based on the position information of each simulated particle in the first particle pair. The first parameter information is the other parameters in formula (1) except for the distance between the two simulated particles. After calculating the bond force of simulated particle i (which is also the bond force of simulated particle j), the bond force calculator 311 temporarily stores the bond forces of simulated particle i and simulated particle j in the first temporary register 312.
[0061] In the embodiments provided by the present invention, the bond force calculation unit 31 is configured to include a bond force calculator 311 and a first temporary register 312. The bond force is calculated by the bond force calculator 311 and the bond force of the two simulated particles in the first particle pair is temporarily stored by the first temporary register 312, so as to facilitate the sequential output of the bond force of the simulated particles.
[0062] Please see Figure 9 This is a schematic diagram of a first temporary register provided in an embodiment of the present invention. The first temporary register 312 includes: The first filter 3121, connected to the output of the bond force calculator 311, is configured to obtain first relevant information containing bond forces from the bond force calculator 311, and filter out the bond forces of the particles to be processed from the first relevant information; wherein, the first relevant information is used to characterize information related to the particles to be processed; The first sub-register 3122, connected to the output of the bond force calculator 311, is configured to acquire and temporarily store second related information containing bond force from the bond force calculator 311; wherein, the second related information is used to characterize information related to another simulated particle in the first particle pair, and the bond force of the particle to be processed is the same as the bond force of the other simulated particle; the first related information and the second related information include, for example, the calculated bond force, as well as the relevant parameters required to calculate the bond force; The second filter 3123 is connected to the output of the first register 312 and is configured to obtain the second relevant information from the first sub-register 3122 and filter out the bond force of the other simulated particle in the first particle pair from the second relevant information. The second sub-register 3124 is connected to the output of the logic controller 2 and is configured to sequentially store the simulated particle information of each simulated particle in the first particle pair. After the bond force calculator 311 outputs the bond force related information corresponding to each simulated particle in the first particle pair, it sequentially outputs the simulated particle information of each simulated particle in the first particle pair. The bond force related information includes the first related information and the second related information. The third sub-register 3125 has its input connected to the first filter 3121, the second filter 3123, and the output of the second sub-register 3124. The output of the third sub-register 3125 is connected to the input of the write-back unit 4. The third sub-register 3125 is configured to sequentially obtain the bond force of the particle to be processed and the bond force of another simulated particle from the first filter 3121 and the second filter 3123, so as to sequentially update the simulated particle information of the particle to be processed and the simulated particle information of the other simulated particle obtained from the second sub-register 3124, and sequentially obtain and output the updated simulated particle information of the particle to be processed and the updated simulated particle information of the other simulated particle.
[0063] For example, the particle to be processed is a simulated particle i. The first particle pair containing simulated particle i also includes another simulated particle j. The bond force of simulated particle i is calculated by the bond force calculator 311. Since the bond forces of simulated particle i and simulated particle j are the same, there is no need to calculate the bond force of simulated particle j. However, the directions of the bond forces of simulated particle i and simulated particle j are different, so they need to be recorded separately. The bond force calculator 311 simultaneously outputs the first and second related information. The first filter 3121 filters out the bond force of simulated particle i from the first related information, while the first sub-register 3122 temporarily stores the second related information. Then, the first filter 3121 transfers the bond force of simulated particle i to the third sub-register 3125 for temporary storage, while the first sub-register 3122 transfers the second related information to the second filter 3123. The second filter 3123 filters out the bond force of simulated particle j from the second related information, and then sends the bond force of simulated particle j to the third sub-register 3125 for temporary storage. Thus, the third sub-register 3125 first temporarily stores the bond force of simulated particle i, and then temporarily stores the bond force of simulated particle j. The second sub-register 3124 obtains the simulated particle information of simulated particle i and simulated particle j from the logic controller 2, and after the bond force calculator 311 outputs the bond force of simulated particle i and simulated particle j, it sequentially transmits the simulated particle information of simulated particle i and simulated particle j to the third sub-register 3125. The third sub-register 3125 uses the bond force of simulated particle i and the bond force of simulated particle j received sequentially from the first filter 3121 and the second filter 3123 to update the simulated particle information of simulated particle i and simulated particle j received from the second sub-register 3124, and sequentially outputs the updated simulated particle information of simulated particle i and simulated particle j to the write-back unit 4.
[0064] In the embodiments provided by the present invention, by configuring the first temporary register 312 to include a first filter 3121, a first sub-temporary register 3122 and a second filter 3123, as well as a second sub-temporary register 3124 and a third sub-temporary register 3125, the first filter 3121 and the first sub-temporary register 3122 respectively receive first related information and second related information containing bond forces, and the first filter 3121 filters out the bond forces of the particles to be processed from the first related information, the first sub-temporary register 3122 temporarily stores the second related information, and the first filter 3121 transmits the bond forces of the particles to be processed to the third sub-temporary register. When the device is in the third sub-scraping unit 3125, the first sub-scraping unit 3122 transmits the second relevant information to the second filter 3123, and uses the second filter 3123 to filter out the bond force of another simulated particle from the second relevant information before transmitting it to the third sub-scraping unit 3125. This allows the bond force of the particle to be processed and the bond force of the other simulated particle to be transmitted to the third sub-scraping unit 3125 in sequence, so that the simulated particle signal of the particle to be processed and the simulated particle information of the other simulated particle obtained from the second sub-scraping unit 3124 can be updated in sequence with the bond force of the particle to be processed and the bond force of the other simulated particle, so that the entire bond force processing process can be carried out in a pipeline.
[0065] Please see Figure 10 This is a schematic diagram of another first temporary register provided in an embodiment of the present invention. The first temporary register 312 further includes: The first comparator 3126 is connected to another output of the second sub-register 3124 and is configured to obtain the first remaining storage capacity of the second sub-register 3124 from the second sub-register and determine the state of the second sub-register 3124 based on the first remaining storage capacity and a first threshold; the state includes an idle state and a non-idle state. The second comparator 3127 is connected to another output of the third sub-register 3125 and is configured to obtain the second remaining storage capacity of the third sub-register 3125 from the third sub-register 3125 and determine the state of the third sub-register 3125 based on the second remaining storage capacity and the second threshold. The first input and output of the calculator 3128 are respectively connected to the output terminals of the first comparator 3126 and the second comparator 3127. The first state output is configured to take the state of the first sub-register 3122 and the state of the second sub-register 3124 and the result as the state of the bond force calculation unit 31.
[0066] For example, the first comparator 3126 obtains from the second sub-register 3124 that the remaining capacity of the second sub-register 3124 is a, and the second comparator 3127 obtains from the third sub-register 3125 that the remaining capacity of the third sub-register 3125 is b. Both the first threshold and the second threshold are c (assuming c > a and c < b). The first comparator 3126 determines that the remaining capacity a of the second sub-register 3124 is less than c, and determines that the second sub-register 3124 is in a non-idle state (where the idle state is identified by 1 and the non-idle state is represented by 0). The second comparator determines that the remaining capacity b of the third sub-register 3125 is greater than c, and determines that the third sub-register 3125 is in an idle state. The first AND calculator 3128 ANDs the non-idle state (0) of the second sub-register 3124 and the idle state (1) of the third sub-register 3125 obtained from the first comparator 3126 and the second comparator 3127 respectively, and the result obtained is 0 (non-idle state), and then uses this as the state of the key force calculation unit 31 for output. For example, it can be output to the logic controller 2 to cause the logic controller 2 to reduce the data transmission frequency.
[0067] In the embodiment provided by the present invention, the first comparator 3126 and the second comparator 3127 are respectively used to obtain the corresponding remaining capacities from the second sub-register 3124 and the third sub-register 3125, and the states of the corresponding sub-registers are determined according to the remaining capacities and the corresponding thresholds. Then, the first AND calculator 3128 determines the state of the key force calculation unit 31 according to the AND result of the states of the second sub-register 3124 and the third sub-register 3125, so that the state of the key force calculation unit 31 can be used as the feedback result of the logic controller 2 or the sub-register space division for relevant adjustments, preventing data overflow and improving the correctness of the data output by the key force calculation unit 31.
[0068] Please refer to Figure 11 FIG. is a schematic structural diagram of an included angle force calculation unit provided by an embodiment of the present invention. The included angle force calculation unit 32 includes: An included angle force calculator 321, the input end of the included angle force calculator 321 is connected to the output end of the logic controller 2, and is configured to calculate the included angle force of each simulated particle in the second particle pair according to the position information of each simulated particle in the second particle pair and the second parameter information; wherein, the second parameter information is a parameter related to calculating the included angle force; A second register 322, connected between the included angle force calculator 321 and the write-back unit 4, and is configured to obtain the included angle force of each simulated particle in the second particle pair from the included angle force calculator 321.
[0069] Please refer to Figure 12 FIG. is a schematic molecular structure diagram corresponding to the included angle force provided by an embodiment of the present invention. The calculation formula of the included angle force is as follows: (2); (3).
[0070] in, , , It is a unit vector, and θ is a vector. and The angle between them, θ0 is the equilibrium angle, k θ k is the included angle constant. ub It is the Urey Bradley constant, r ub It is the balance distance.
[0071] Based on the position information of each simulated particle in the second particle pair, the three unit vectors in the above formula for the included angle force can be determined. and The angle between them, and the rest are parameters related to the calculation of the angle force (forming the second parameter information).
[0072] For example, the second particle pair includes simulated particle i, simulated particle j, and simulated particle k. The angle force calculator 321 obtains the position information and second parameter information of each simulated particle in the second particle pair from the logic controller 2. The angle force calculator 321 calculates the angle force of each simulated particle in the first particle pair using formula (2) based on the obtained information and transmits it to the second temporary storage 322 for temporary storage.
[0073] Please see Figure 13 This is a schematic diagram of the structure of the second temporary register provided in an embodiment of the present invention. The second temporary register 322 includes: The third filter 3221, connected to the output of the angle force calculator 321, is configured to obtain third relevant information containing the angle force from the angle force calculator 321, and filter out the angle force of the particle to be processed from the third relevant information; wherein, the third relevant information is used to characterize information related to the particle to be processed; The fourth sub-register 3222 is connected to the output of the angle force calculator 321 and is configured to obtain and temporarily store the fourth related information containing the angle force from the angle force calculator 321; wherein, the second particle pair includes the particle to be processed, the first simulated particle, and the second simulated particle, and the fourth related information is used to characterize the information related to the first simulated particle; The fourth filter 3223, connected to the output of the fourth sub-register 3222, is configured to obtain the fourth relevant information from the fourth sub-register 3222 and filter out the angle force of the first simulated particle from the fourth relevant information. The fifth sub-register 3224 is connected to the output of the angle force calculator 321 and is configured to obtain and temporarily store the fifth related information containing the angle force from the angle force calculator 321; wherein the fifth related information is used to characterize information related to the second simulated particle; The fifth filter 3225, connected to the output of the fifth sub-register 3224, is configured to obtain the fifth relevant information from the fifth sub-register 3224 and filter out the angular force of the second simulated particle from the fifth relevant information. The sixth sub-register 3226 is connected to the output of the logic controller 2 and is configured to sequentially store the simulated particle information of each simulated particle in the second particle pair. After the angle force calculator 321 outputs the relevant information corresponding to each simulated particle in the second particle pair, it sequentially outputs the simulated particle information of each simulated particle in the second particle pair. Among them, the relevant information includes the third relevant information, the fourth relevant information, and the fifth relevant information. The seventh sub-register 3227 has its input connected to the outputs of the third filter 3221, the fourth filter 3223, the fifth filter 3225, and the sixth sub-register 3226. Its output is connected to the write-back unit 4. It is configured to sequentially obtain the angle force of the corresponding simulated particles from the third filter 3221, the fourth filter 3223, and the fifth filter 3225, so as to sequentially update the simulated particle information of the particle to be processed, the simulated particle information of the first simulated particle, and the simulated particle information of the second simulated particle obtained from the sixth sub-register 3226, and sequentially obtain and output the updated simulated particle information of the corresponding simulated particles.
[0074] For example, the particle to be processed is simulated particle i, the first simulated particle is simulated particle j, and the second simulated particle is simulated particle k. The angle force calculator 321 calculates the angle force between simulated particles i, j, and k. The angle force calculator 321 simultaneously outputs third, fourth, and fifth related information. The third filter 3221 filters out the angle force of simulated particle i from the third related information. Simultaneously, the fourth sub-register 3222 temporarily stores the fourth related information, and the fifth sub-register 3224 temporarily stores the fifth related information. Then, the third filter 3221 transmits the angle force of simulated particle i to the seventh sub-register 3227 for temporary storage, while the fourth sub-register 3222 transmits the fourth related information to the fourth filter 3223. Filter 3223 filters out the angular force of simulated particle j from the fourth relevant information. Then, filter 3223 sends the angular force of simulated particle j to the seventh sub-register 3227 for temporary storage. While filter 3223 is sending the angular force of simulated particle j to the seventh sub-register 3227, the fifth sub-register 3224 sends the fifth relevant information to the fifth filter 3225. The fifth filter 3225 filters out the angular force of simulated particle k from the fifth relevant information and sends it to the seventh sub-register 3227. Thus, in the seventh sub-register 3227... First, the included angle force of simulated particle i is temporarily stored, then the included angle force of simulated particle j is temporarily stored, and finally the included angle force of simulated particle k is temporarily stored. The second sub-register 3124 obtains the simulated particle information of simulated particles i, j, and k from the logic controller 2, and after the included angle force calculator 321 outputs the included angle forces of simulated particles i, j, and k, it sequentially transmits the simulated particle information of simulated particles i, j, and k to the seventh sub-register 3227. The seventh sub-register 3227 uses the information from the first... The third filter 3221, the fourth filter 3223, and the fifth filter 3225 sequentially receive the included angle force of simulated particle i, the included angle force of simulated particle j, and the included angle force of simulated particle k. They update the simulated particle information of simulated particle i, simulated particle j, and simulated particle k received from the sixth sub-register 3226, and sequentially output the updated simulated particle information of simulated particle i, simulated particle j, and simulated particle k to the write-back unit 4.
[0075] The timing of the fourth and fifth sub-registers 3222 and 3224 outputting the fourth and fifth related information, respectively, can be controlled by a clock. That is, the fifth sub-register 3224 can output the fifth related information one clock cycle before the fourth sub-register 3222 outputs the fifth related information; or, the fourth sub-register 3222 and 3224 can output the fourth and fifth related information simultaneously, respectively, so that the fifth filter 3225 outputs the angle force of the second simulated particle one clock cycle before the fourth filter 3223.
[0076] In the embodiments provided by the present invention, by configuring the second register 322 to include a third filter 3221, a fourth sub-register 3222 and a fourth filter 3223, a fifth sub-register 3224 and a fifth filter 3225, a sixth sub-register 3226 and a seventh sub-register 3227, the third filter 3221, the fourth filter 3223 and the fifth filter 3225 sequentially output the angle force of the corresponding simulated particles to the seventh sub-register 3227, so that the angle force of the particle to be processed, the angle force of the first simulated particle and the angle force of the second simulated particle are sequentially updated with the simulated particle information of the particle to be processed, the simulated particle information of the first simulated particle and the simulated particle information of the second simulated particle obtained from the sixth sub-register 3226, so that the entire angle force processing process can be carried out in an assembly line manner.
[0077] Please see Figure 14 This is a schematic diagram of another second temporary register provided in an embodiment of the present invention. The second temporary register 322 further includes: The third comparator 3228 is configured to obtain the third remaining storage capacity of the sixth sub-register 3226 from the sixth sub-register, and determine the state of the sixth sub-register 3226 based on the third remaining storage capacity and the third threshold; the state includes an idle state and a non-idle state. The fourth comparator 3229 is configured to obtain the fourth remaining storage capacity of the seventh sub-register 3227 from the seventh sub-register 3227, and determine the state of the seventh sub-register 3227 based on the fourth remaining storage capacity and the fourth threshold. The second calculator 322A uses the state of the sixth sub-register 3226 and the state and result of the seventh sub-register 3227 as the state of the angle force calculation unit 32.
[0078] For example, the third comparator 3228 obtains from the sixth sub-register 3226 that the remaining capacity of the sixth sub-register 3226 is a, and the fourth comparator 3229 obtains from the seventh sub-register 3227 that the remaining capacity of the seventh sub-register 3227 is b. Both the third threshold and the fourth threshold are c (assuming c < a and c < b). The third comparator 3228 determines that the remaining capacity a of the sixth sub-register 3226 is greater than c, and determines that the second sub-register 3124 is in the idle state (where the idle state is identified by 1 and the non-idle state is represented by 0). The fourth comparator determines that the remaining capacity b of the seventh sub-register 3227 is greater than c, and determines that the seventh sub-register 3227 is in the idle state. The second AND calculator 322A ANDs the idle state (1) of the sixth sub-register 3226 and the idle state (1) of the seventh sub-register 3227 obtained from the third comparator 3228 and the fourth comparator 3229 respectively, and the result obtained is 1 (idle state), and then outputs it as the state of the bond force calculation unit 31. For example, it can be output to the logic controller 2 to enable the logic controller 2 to increase the data transmission frequency.
[0079] In the embodiment provided by the present invention, the third comparator 3228 and the fourth comparator 3229 respectively obtain the corresponding remaining capacities from the sixth sub-register 3226 and the seventh sub-register 3227, and determine the states of the corresponding sub-registers according to the remaining capacities and the corresponding thresholds. Then, the second AND calculator 322A determines the state of the dihedral angle force calculation unit 32 according to the AND result of the states of the sixth sub-register 3226 and the seventh sub-register 3227, so that the state of the dihedral angle force calculation unit 32 can be used as the feedback result of the logic controller 2 or the sub-register space division for relevant adjustments, preventing data overflow and improving the correctness of the data output by the dihedral angle force calculation unit 32.
[0080] Please refer to Figure 15 FIG. is a schematic structural diagram of a dihedral angle force calculation unit provided by an embodiment of the present invention. The dihedral angle force calculation unit 33 includes: A dihedral angle force calculator 331, connected to the output end of the logic controller 2, and configured to calculate the dihedral angle force of each simulated particle in the third particle pair according to the position information of each simulated particle in the third particle pair and the third parameter information; where the third parameter information is a parameter related to the calculation of the dihedral angle force; A third register 332, connected between the dihedral angle force calculator 331 and the write-back unit 4, and configured to obtain the dihedral angle force of each simulated particle in the third particle pair from the dihedral angle force calculator 331.
[0081] Please refer to Figure 16 FIG. is a schematic molecular structure diagram corresponding to the dihedral angle force provided by an embodiment of the present invention. The calculation formula of the dihedral angle force is: (4); (5); Where n is the period, and ψ is the plane (i,j,k) and (j,k, l Angles between planes Let k be the phase shift angle and k be the force constant. For particle i and particle l Spatial location difference.
[0082] ψ can be determined based on the position information of each simulated particle in the third particle pair, and the remaining parameters are parameters related to the calculation of the dihedral angle force (i.e., the third parameter information).
[0083] The dihedral force calculator 331 calculates the dihedral force of each simulated particle in the third particle pair using the above formula (4) based on the position information and third parameter information of each simulated particle in the third particle pair received, and transmits it to the third temporary storage 332 for temporary storage.
[0084] Please see Figure 17 This is a schematic diagram of the structure of a third temporary register 332 provided in an embodiment of the present invention. The third temporary register 332 includes: The sixth filter 3321, connected to the output of the dihedral force calculator 331, is configured to obtain the sixth relevant information containing dihedral forces from the dihedral force calculator 331, and filter out the dihedral forces of the particles to be processed from the sixth relevant information; wherein, the sixth relevant information is used to characterize information related to the particles to be processed; The eighth sub-register 3322 is connected to the output of the dihedral force calculator 331 and is configured to obtain and temporarily store the seventh related information containing dihedral force from the dihedral force calculator 331; wherein, the third particle pair includes the particle to be processed, the third simulated particle, the fourth simulated particle, and the fifth simulated particle, and the seventh related information is used to characterize the information related to the third simulated particle. The seventh filter 3323, connected to the output of the eighth sub-register, is configured to obtain the seventh relevant information from the eighth sub-register 3322 and filter out the dihedral force of the third simulated particle from the seventh relevant information. The ninth sub-register 3324 is connected to the output of the dihedral force calculator 331 and is configured to obtain and temporarily store the eighth related information containing dihedral force from the dihedral force calculator 331; wherein the eighth related information is used to characterize information related to the fourth simulated particle; The eighth filter 3325, connected to the output of the ninth sub-register 3324, is configured to obtain the eighth relevant information from the ninth sub-register 3324 and filter out the dihedral force of the fourth simulated particle from the eighth relevant information. The tenth sub-register 3326 is connected to the output of the dihedral force calculator 331 and is configured to obtain and temporarily store the ninth related information containing dihedral force from the dihedral force calculator 331; wherein the ninth related information is used to characterize the information related to the fifth simulated particle; The ninth filter 3327, connected to the output of the tenth sub-register 3326, is configured to obtain the ninth relevant information from the tenth sub-register 3326 and filter out the dihedral force of the fifth simulated particle from the ninth relevant information. The eleventh sub-register 3328 is connected to the output of the logic controller 2 and is configured to sequentially store the simulated particle information of each simulated particle in the third particle pair. After the dihedral force calculator 331 outputs the relevant information corresponding to each simulated particle in the third particle pair, it sequentially outputs the simulated particle information of each simulated particle in the third particle pair. Among them, the relevant information includes the sixth relevant information, the seventh relevant information, the eighth relevant information, and the ninth relevant information. The twelfth sub-register 3329 has its input connected to the output of the sixth filter 3321 to the ninth filter 3327, and its output connected to the write-back unit 4. The twelfth sub-register 3329 is configured to sequentially obtain the dihedral forces of the corresponding simulated particles from the sixth filter 3321, the seventh filter 3323, the eighth filter 3325, and the ninth filter 3327, so as to sequentially update the simulated particle information of the particle to be processed, the simulated particle information of the third simulated particle, the simulated particle information of the fourth simulated particle, and the simulated particle information of the fifth simulated particle obtained from the eleventh sub-register 3328, and sequentially obtain and output the updated simulated particle information of the corresponding simulated particles.
[0085] For example, the particle to be processed is simulated particle i, the third simulated particle is simulated particle j, the fourth simulated particle is simulated particle k, and the fifth simulated particle is simulated particle j. l The dihedral force calculator 331 simultaneously sends the relevant information corresponding to simulated particles i, j, k, and l to the sixth filter 3321, the eighth sub-register 3322, the ninth sub-register 3324, and the tenth sub-register 3326, respectively. The sixth filter 3321 filters out the dihedral force of simulated particle i from the sixth relevant information. At the same time, the eighth sub-register 3322 transmits the seventh relevant information to the seventh filter 3323. The ninth sub-register 3324 and the tenth sub-register 3326 output the eighth and ninth relevant information one and two clock cycles later than the eighth sub-register 3322, respectively. In this way, the sixth filter 3321 to the ninth filter 3327 can sequentially output the dihedral force of simulated particle i, the dihedral force of simulated particle j, the dihedral force of simulated particle k, and the dihedral force of simulated particle l. lThe dihedral force is given to the twelfth temporary register 3329, which facilitates the use of simulated particle i~ to simulate particles. l The two-sided interaction forces sequentially update the simulated particle information of the corresponding simulated particle obtained from the eleventh sub-register 3328, and output it to the writeback unit 4 in sequence.
[0086] To make the sixth filter 3321 to the ninth filter 3327 output the dihedral forces of the corresponding simulated particles in sequence, the eighth sub-register 3322 and the tenth sub-register 3326 can also output the corresponding relevant information at the same time. Then, by controlling the eighth filter 3325 and the ninth filter 3327 to output the dihedral forces of the corresponding simulated particles one and two clock cycles later than the seventh filter 3323, respectively.
[0087] In the embodiments provided by the present invention, by configuring the third register 332 to include a sixth filter 3321, an eighth sub-register 3322 and a seventh filter 3323, a ninth sub-register 3324 and an eighth filter 3325, a tenth sub-register 3326 and a ninth filter 3327, an eleventh sub-register 3328 and a twelfth sub-register 3329, the sixth filter 3321 to the ninth filter 3327 sequentially output the dihedral forces of the corresponding simulated particles to the twelfth sub-register 3329. This facilitates the sequential updating of the simulated particle information of the particle to be processed, the simulated particle information of the third simulated particle, the simulated particle information of the fourth simulated particle, and the simulated particle information of the fifth simulated particle obtained from the eleventh sub-register 3328 using the dihedral forces of the particle to be processed, the third simulated particle, the fourth simulated particle, and the fifth simulated particle, thereby enabling the entire dihedral force processing process to be carried out in a streamlined manner.
[0088] Please see Figure 18 This is a schematic diagram of another third temporary register 332 provided in an embodiment of the present invention. The third temporary register 332 further includes: The fifth comparator 332A is configured to obtain the fifth remaining storage capacity of the eleventh sub-register 3328 from the eleventh sub-register 3328, and determine the state of the eleventh sub-register 3328 based on the fifth remaining storage capacity and the fifth threshold; the state includes an idle state and a non-idle state. The sixth comparator 332B is configured to obtain the sixth remaining storage capacity of the twelfth sub-register 3329 from the twelfth sub-register 3329, and determine the state of the twelfth sub-register 3329 based on the sixth remaining storage capacity and the sixth threshold. The third and calculator 332C uses the state of the eleventh sub-register 3328 and the state and result of the twelfth sub-register 3329 as the state of the dihedral force calculation unit 33.
[0089] For example, the fifth comparator 332A obtains the remaining capacity a of the eleventh sub-register 3328 from the eleventh sub-register 3328, and the sixth comparator 332B obtains the remaining capacity b of the twelfth sub-register 3329 from the twelfth sub-register 3329. The fifth threshold and the sixth threshold are both c (assuming c b). The fifth comparator 332A determines that the remaining capacity a of the eleventh sub-register 3328 is greater than c, and determines that the second sub-register 3124 is in the idle state (where the idle state is identified by 1 and the non-idle state is represented by 0). The sixth comparator determines that the remaining capacity b of the twelfth sub-register 3329 is less than c, and determines that the twelfth sub-register 3329 is in the non-idle state. The third AND calculator 332C ANDs the idle state (1) of the eleventh sub-register 3328 and the non-idle state (0) of the twelfth sub-register 3329 obtained from the fifth comparator 332A and the sixth comparator 332B respectively, and the result obtained is 0 (non-idle state), and then outputs it as the state of the dihedral force calculation unit 33, such as outputting it to the logic controller 2 to cause the logic controller 2 to reduce the data transmission frequency.
[0090] In the embodiment provided by the present invention, the fifth comparator 332A and the sixth comparator 332B are respectively used to obtain the corresponding remaining capacities from the eleventh sub-register 3328 and the twelfth sub-register 3329, and the states of the corresponding sub-registers are determined according to the remaining capacities and the corresponding thresholds. Furthermore, the third AND calculator 332C determines the state of the dihedral force calculation unit 33 according to the AND result of the states of the eleventh sub-register 3328 and the twelfth sub-register 3329, so that the state of the dihedral force calculation unit 33 can be used as the feedback result of the logic controller 2 or the sub-register space division for relevant adjustments, preventing data overflow and improving the correctness of the data output by the dihedral force calculation unit 33.
[0091] Please refer to Figure 19 FIG. is a schematic structural diagram of another programmable logic device provided by an embodiment of the present invention. The write-back unit 4 in the programmable logic device includes: An arbiter 41, connected to the output ends of the bond force calculation unit 31, the included angle force calculation unit 32, and the dihedral force calculation unit 33, and configured to sum all the bond forces of each simulated particle according to the identifier of each simulated particle in the current box to obtain the total bond force of the corresponding simulated particle; A bond force buffer 42, the input end of the bond force buffer 42 is connected to the output end of the arbiter 41, the output end of the bond force buffer 42 is connected to the input end of the block random access memory 1, and the bond force buffer 42 is configured to sequentially write the total bond force of the corresponding simulated particle into the corresponding simulated particle in the block random access memory 1 according to the identifier of each simulated particle in the current box.
[0092] For example, the bond force of simulated particle i in the first particle pair 1 is a1, the bond force in the first particle pair 2 is a2, the angular force in the second particle pair 1 is b1, the angular force in the second particle pair 2 is b2, the dihedral force in the third particle pair 1 is c1, and the dihedral force in the third particle pair 3 is c3. a1+a2+b1+b2+c1+c3 is the total bond force of simulated particle i. The calculation method of the total bond force of other simulated particles is similar. When caching the total bond force of simulated particles, the bond force buffer 42 caches the total bond force of simulated particles according to the simulated particle identifier. When outputting the total bond force of simulated particles, it also outputs according to the identifier of the simulated particles and writes it into the block random access memory 1.
[0093] Please see Figure 20 This is a schematic diagram of the overall computing architecture of a programmable logic device provided in an embodiment of the present invention.
[0094] Block random access memory 1 is bound to main memory, so that reading and writing data can be completed directly by reading and writing to main memory. Calculating bonding forces, angular forces, and dihedral forces involves vector subtraction, vector multiplication, triangular harmonics, arctangent, dot product, cross product, sine and cosine operations, which are very complex. Using the structure of the programmable logic device provided in this embodiment to implement pipelined operations can reduce addressing time and improve processing efficiency. The writeback unit 4, bound to a forced cache (bonding force cache 42), allows simulated particles to be output sequentially according to their identifiers, reducing the complexity of writing data back to block random access memory 1.
[0095] Based on the same inventive concept, this invention provides a method for calculating bonding force, applied to a programmable logic device as described above. The programmable logic device includes a block random access memory (BRAM) for storing multiple boxes. These boxes represent the three-dimensional space occupied by a simulated organic compound. The three-dimensional space is divided into multiple unit spaces, each unit space corresponding to one box. Each box includes multiple simulated particles, which represent the particles constituting the organic compound in the corresponding unit space. See [link to previous document]. Figure 21 A flowchart of a bonding force calculation method provided in an embodiment of the present invention is shown. The calculation method includes: Step S11: Traverse the boxes in the block random access memory and obtain the simulated particle information of each simulated particle contained in the current box from the currently traversed box; Step S12: Calculate each type of bonding force for each simulated particle based on the simulated particle information to determine the total bonding force of the corresponding simulated particle; wherein, the total bonding force is the sum of all bonding forces corresponding to the simulated particle; Step S13: Based on the identifier of each simulated particle, write back the total bond force of the corresponding simulated particle to the corresponding simulated particle in the block random access memory.
[0096] Based on the same inventive concept, embodiments of the present invention provide a verification platform, please refer to... Figure 22 This is a schematic diagram of a verification platform provided in an embodiment of the present invention. The verification platform includes: Development board 100, which is equipped with the programmable logic device and dynamic random access memory (not shown) as described above. The host server 200 and the development board 100 are plugged into the host server 200 through a preset interface. The host server 200 is configured to call the program under test through a test script program. The program under test is used to control the programmable logic device to read test data from the first location of dynamic random access memory for testing, and write the test results to the second location of dynamic random access memory after the test is completed. The program under test reads the test results from the second location and compares the test results with the expected values to obtain the comparison results.
[0097] For example, the programmable logic device can be an FPGA chip, and the preset interface can be a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCI Ex) 16. The programmable logic device can be equipped with input control logic, a module under test, and test output logic. After receiving the command of the program under test, the programmable logic device reads the test data from the first location of the dynamic random access memory by the input control logic and provides it to the module under test for testing. The test result is written to the second location of the dynamic random access memory through the test output logic. The program under test reads the test result from the second location and compares it with the expected value to obtain the comparison result. The host server can output the comparison result through a display screen or a printer.
[0098] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0099] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A programmable logic device, characterized in that, include: A block random access memory is configured to store a plurality of boxes for representing a three-dimensional space occupied by a simulated organic compound. The three-dimensional space is divided into a plurality of unit spaces, each unit space corresponding to one of the boxes. The boxes include a plurality of simulated particles for representing the particles that make up the organic compound in the corresponding unit space. A logic controller, connected to the output of the block random access memory, is configured to traverse the boxes in the block random access memory and obtain the simulated particle information of each simulated particle contained in the currently traversed box. A bonding force calculator is connected to the output of the logic controller. The bonding force calculator is configured to obtain each simulated particle from the logic controller and calculate each bonding force of the corresponding simulated particle based on the simulated particle information of each simulated particle. A writeback device is configured to write back the total bond force corresponding to each simulated particle to the corresponding simulated particle in the block random access memory, based on the identifier of each simulated particle; wherein the total bond force is the sum of all bond forces corresponding to the simulated particle.
2. The programmable logic device as claimed in claim 1, characterized in that, The bond force calculator includes: A bond force calculation unit is connected between the logic controller and the write-back unit. The bond force calculation unit is configured to retrieve a first particle pair containing the particle to be processed from the data lookup table corresponding to the current box based on the identifier of any particle to be processed in the current box, and calculate the bond force of each simulated particle in the first particle pair based on the position information of each simulated particle in the first particle pair; wherein, the first particle pair consists of two simulated particles, and the data lookup table contains the bonding relationship between the simulated particles located in the current box; An angle force calculation unit is connected between the logic controller and the write-back unit. The angle force calculation unit is configured to retrieve a second particle pair containing the particle to be processed from the data lookup table based on the identifier of the particle to be processed, and calculate the angle force of the particle to be processed based on the position information of each simulated particle in the second particle pair; wherein, the second particle pair consists of 3 simulated particles. A dihedral force calculation unit is connected between the logic controller and the write-back unit. The dihedral force calculation unit is configured to obtain a third particle pair containing the particle to be processed from the data lookup table based on the identifier of the particle to be processed, and calculate the dihedral force of the particle to be processed based on the position information of each simulated particle in the third particle pair; wherein, the third particle pair consists of 4 simulated particles.
3. The programmable logic device as described in claim 2, characterized in that, The bond force calculation unit includes: A bond force calculator is connected to the output of the logic controller. The bond force calculator is configured to calculate the bond force of each simulated particle in the first particle pair based on the position information and first parameter information of each simulated particle in the first particle pair. The first parameter information is a parameter related to the calculation of the bond force. A first temporary register, connected between the bond force calculator and the write-back unit, is configured to acquire and temporarily store the bond force of each simulated particle in the first particle pair from the bond force calculator.
4. The programmable logic device as described in claim 3, characterized in that, The first temporary register includes: A first filter is connected to the output of the bond force calculator. The first filter is configured to obtain first relevant information containing the bond force from the bond force calculator and filter out the bond force of the particle to be processed from the first relevant information; wherein, the first relevant information is used to characterize information related to the particle to be processed. A first sub-register is connected to the output of the bond force calculator. The first sub-register is configured to obtain and temporarily store second related information containing the bond force from the bond force calculator. The second related information is used to characterize information related to another simulated particle in the first particle pair, and the bond force of the particle to be processed is the same as the bond force of the other simulated particle. A second filter is connected to the output of the first sub-register. The second filter is configured to obtain the second relevant information from the first sub-register and filter out the bond force of the other simulated particle in the first particle pair from the second relevant information. The second sub-register is connected to the output of the logic controller. The second sub-register is configured to sequentially store the simulated particle information of each simulated particle in the first particle pair. After the bond force calculator outputs the bond force related information corresponding to each simulated particle in the first particle pair, the second sub-register sequentially outputs the simulated particle information of each simulated particle in the first particle pair. The bond force related information includes the first related information and the second related information. The third sub-register is connected to the output of the first filter, the output of the second filter, and the output of the second sub-register. The output of the third sub-register is connected to the write-back unit. The third sub-register is configured to sequentially obtain the bond force of the particle to be processed and the bond force of the other simulated particle from the first filter and the second filter, so as to sequentially update the simulated particle information of the particle to be processed and the simulated particle information of the other simulated particle obtained from the second sub-register, and sequentially obtain and output the updated simulated particle information of the particle to be processed and the updated simulated particle information of the other simulated particle.
5. The programmable logic device as claimed in claim 4, characterized in that, The first temporary register also includes: A first comparator is connected to the output of the second sub-register. The first comparator is configured to obtain the first remaining storage capacity of the second sub-register from the two sub-registers, and determine the state of the second sub-register based on the first remaining storage capacity and a first threshold. The state includes an idle state and a non-idle state. A second comparator is connected to the output of the third sub-register. The second comparator is configured to obtain the second remaining storage capacity of the third sub-register from the third sub-register, and determine the state of the third sub-register based on the second remaining storage capacity and a second threshold. The first AND calculator is connected to the outputs of the first comparator and the second comparator. The first AND calculator is configured to take the state of the first sub-register and the state and result of the second sub-register as the state of the bond force calculation unit.
6. The programmable logic device as claimed in claim 2, characterized in that, The included angle force calculation unit includes: An angle force calculator, connected to the output of the logic controller, is configured to calculate the angle force of each simulated particle in the second particle pair based on the position information of each simulated particle in the second particle pair and the second parameter information; wherein, the second parameter information is a parameter related to the calculation of the angle force; A second register, connected between the angle force calculator and the write-back unit, is configured to obtain the angle force of each simulated particle in the second particle pair from the angle force calculator.
7. The programmable logic device as claimed in claim 6, characterized in that, The second temporary register includes: A third filter is connected to the output of the angle force calculator. The third filter is configured to obtain third relevant information containing the angle force from the angle force calculator and filter out the angle force of the particle to be processed from the third relevant information; wherein, the third relevant information is used to characterize information related to the particle to be processed. A fourth sub-register is connected to the output of the angle force calculator. The fourth sub-register is configured to obtain and temporarily store fourth related information containing the angle force from the angle force calculator. The second particle pair includes the particle to be processed, the first simulated particle, and the second simulated particle. The fourth related information is used to characterize information related to the first simulated particle. A fourth filter is connected to the output of the fourth sub-register. The fourth filter is configured to obtain the fourth relevant information from the fourth sub-register and filter out the angular force of the first simulated particle from the fourth relevant information. A fifth sub-register is connected to the output of the angle force calculator. The fifth sub-register is configured to obtain and temporarily store fifth related information containing the angle force from the angle force calculator; wherein the fifth related information is used to characterize information related to the second simulated particle. The fifth filter is connected to the output of the fifth sub-register. The fifth filter is configured to obtain the fifth relevant information from the fifth sub-register and filter out the angular force of the second simulated particle from the fifth relevant information. The sixth sub-register is connected to the output of the logic controller. The sixth sub-register is configured to sequentially store the simulated particle information of each simulated particle in the second particle pair. After the angle force calculator outputs the relevant information corresponding to each simulated particle in the second particle pair, the sixth sub-register sequentially outputs the simulated particle information of each simulated particle in the second particle pair. The relevant information includes the third relevant information, the fourth relevant information, and the fifth relevant information. The seventh sub-register is connected to the output terminals of the third filter, the fourth filter, the fifth filter, and the sixth sub-register. The output terminal of the seventh sub-register is connected to the write-back unit. The seventh sub-register is configured to sequentially obtain the included force of the corresponding simulated particles from the third filter, the fourth filter, and the fifth filter, so as to sequentially update the simulated particle information of the particle to be processed, the simulated particle information of the first simulated particle, and the simulated particle information of the second simulated particle obtained from the sixth sub-register, and sequentially obtain and output the updated simulated particle information of the corresponding simulated particles.
8. The programmable logic device as claimed in claim 7, characterized in that, The second temporary register also includes: A third comparator is connected to the output of the sixth sub-register. The third comparator is configured to obtain the third remaining storage capacity of the sixth sub-register from the sixth sub-register, and determine the state of the sixth sub-register based on the third remaining storage capacity and a third threshold. The state includes an idle state and a non-idle state. A fourth comparator is connected to the output of the seventh sub-register. The fourth comparator is configured to obtain the fourth remaining storage capacity of the seventh sub-register from the seventh sub-register, and determine the state of the seventh sub-register based on the fourth remaining storage capacity and a fourth threshold. The second AND calculator is connected to the outputs of the third and fourth comparators. The second AND calculator is configured to take the state of the sixth sub-register and the state and result of the seventh sub-register as the state of the angle force calculation unit.
9. The programmable logic device as claimed in claim 2, characterized in that, The dihedral force calculation unit includes: A dihedral force calculator is connected to the output of the logic controller. The dihedral force calculator is configured to calculate the dihedral force of each simulated particle in the third particle pair based on the position information and third parameter information of each simulated particle in the third particle pair. The third parameter information is a parameter related to the calculation of the dihedral force. A third register, connected between the dihedral force calculator and the write-back unit, is configured to obtain the dihedral force of each simulated particle in the third particle pair from the dihedral force calculator.
10. The programmable logic device as claimed in claim 9, characterized in that, The third temporary register includes: A sixth filter, connected to the output of the dihedral force calculator, is configured to obtain sixth relevant information containing the dihedral force from the dihedral force calculator, and filter out the dihedral force of the particle to be processed from the sixth relevant information; wherein, the sixth relevant information is used to characterize information related to the particle to be processed; The eighth sub-register is connected to the output of the dihedral force calculator. The eighth sub-register is configured to obtain and temporarily store the seventh related information containing the dihedral force from the dihedral force calculator. The third particle pair includes the particle to be processed, the third simulated particle, the fourth simulated particle, and the fifth simulated particle. The seventh related information is used to characterize information related to the third simulated particle. A seventh filter is connected to the output of the eighth sub-register. The seventh filter is configured to obtain the seventh relevant information from the eighth sub-register and filter out the dihedral force of the third simulated particle from the seventh relevant information. A ninth sub-register is connected to the output of the dihedral force calculator. The ninth sub-register is configured to acquire and temporarily store an eighth related information containing the dihedral force from the dihedral force calculator. The eighth related information is used to characterize information related to the fourth simulated particle. The eighth filter is connected to the output of the ninth sub-register. The eighth filter is configured to obtain the eighth relevant information from the ninth sub-register and filter out the dihedral force of the fourth simulated particle from the eighth relevant information. The tenth sub-register is connected to the output of the dihedral force calculator. The tenth sub-register is configured to obtain and temporarily store the ninth related information containing the dihedral force from the dihedral force calculator; wherein the ninth related information is used to characterize information related to the fifth simulated particle. The ninth filter, connected to the output of the tenth sub-register, is configured to obtain the ninth relevant information from the tenth sub-register and filter out the dihedral force of the fifth simulated particle from the ninth relevant information; The eleventh sub-register is connected to the output of the logic controller. The eleventh sub-register is configured to sequentially store the simulated particle information of each simulated particle in the third particle pair. After the dihedral force calculator outputs the relevant information corresponding to each simulated particle in the third particle pair, the eleventh sub-register sequentially outputs the simulated particle information of each simulated particle in the third particle pair. The relevant information includes the sixth relevant information, the seventh relevant information, the eighth relevant information, and the ninth relevant information. The twelfth sub-register is connected to the output terminals of the sixth filter, the seventh filter, the eighth filter, the ninth filter, and the eleventh sub-register. The twelfth sub-register is configured to sequentially obtain the dihedral forces of the corresponding simulated particles from the sixth filter, the seventh filter, the eighth filter, and the ninth filter, so as to sequentially update the simulated particle information of the particle to be processed, the simulated particle information of the third simulated particle, the simulated particle information of the fourth simulated particle, and the simulated particle information of the fifth simulated particle obtained from the eleventh sub-register, and sequentially obtain and output the updated simulated particle information of the corresponding simulated particles.
11. The programmable logic device as claimed in claim 10, characterized in that, The third temporary register also includes: A fifth comparator is connected to the output of the eleventh sub-register. The fifth comparator is configured to obtain the fifth remaining storage capacity of the eleventh sub-register from the eleventh sub-register, and determine the state of the eleventh sub-register based on the fifth remaining storage capacity and a fifth threshold. The state includes an idle state and a non-idle state. A sixth comparator is connected to the output of the twelfth sub-register. The sixth comparator is configured to obtain the sixth remaining storage capacity of the twelfth sub-register from the twelfth sub-register, and determine the state of the twelfth sub-register based on the sixth remaining storage capacity and a sixth threshold. The third AND calculator is connected to the outputs of the fifth and sixth comparators. The third AND calculator is configured to use the state of the eleventh sub-register and the state and result of the twelfth sub-register as the state of the dihedral force calculation unit.
12. The programmable logic device according to any one of claims 2-11, characterized in that, The writeback unit includes: An arbitrator is connected to the output of the bond force calculation unit, the included angle force calculation unit, and the dihedral angle force calculation unit. The arbitrator is configured to sum all the bond forces of each simulated particle according to the identifier of each simulated particle in the current box, so as to obtain the total bond force of the corresponding simulated particle. A bonding force buffer is connected to the output of the arbitrator. The output of the bonding force buffer is connected to the input and output of the write-back device. The bonding force buffer is configured to write the total bonding force of the corresponding simulated particle into the corresponding simulated particle in the block random access memory according to the identifier of each simulated particle in the current box.
13. The programmable logic device according to any one of claims 1-11, characterized in that, The simulated particle information includes: The first simulated particle information is used to record the position and parameter information of the simulated particle before it drifts; The second simulated particle information is used to record the position and parameter information of the simulated particle after drifting.
14. The programmable logic device as claimed in claim 13, characterized in that, The block random access memory is also configured to release the storage space corresponding to the second sub-simulated particle information after traversing all boxes and completing the write-back of the simulated particles in each box.
15. A method for calculating bonding force, applied to a programmable logic device, the programmable logic device comprising a block random access memory (BRAM) for storing multiple boxes, the multiple boxes representing a three-dimensional space occupied by a simulated organic compound, the three-dimensional space being divided into multiple unit spaces, each unit space corresponding to one of the boxes, each box comprising multiple simulated particles, the simulated particles representing the particles constituting the organic compound in the corresponding unit space, characterized in that... include: Traverse the boxes in the block random access memory and obtain the simulated particle information of each simulated particle contained in the current box from the currently traversed box; Each type of bonding force for each simulated particle is calculated based on the simulated particle information to determine the total bonding force of the corresponding simulated particle; wherein, the total bonding force is the sum of all bonding forces corresponding to the simulated particle; Based on the identifier of each simulated particle, the total bonding force of the corresponding simulated particle is written back to the corresponding simulated particle in the block random access memory.
16. A verification platform, characterized in that, include: A development board, wherein the development board is configured with a programmable logic device as described in any one of claims 1-14, and a dynamic random access memory; The host server is configured to call the program under test through a test script program. The program under test is used to control the programmable logic device to read test data from the first location of the dynamic random access memory for testing, and write the test result to the second location of the dynamic random access memory after the test is completed. The program under test reads the test result from the second location and compares the test result with the expected value to obtain a comparison result.
Citation Information
Patent Citations
Molecular dynamics calculation method based on domestic many-core architecture
CN114970301A
Address conflict processing system and method, electronic equipment and medium
CN116340199A