Molecular dynamics simulation method and device

Optimizing molecular dynamics simulation through hierarchical structure and clustering algorithm solves the problems of low computing efficiency and large memory consumption in molecular dynamics simulation, and achieves efficient calculation and resource optimization.

CN118280458BActive Publication Date: 2024-09-20YIXIN TECH (HANGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410678292.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-20
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Molecular dynamics simulation has low computing efficiency and large memory consumption when processing large-scale molecular systems, and requires additional linked lists to ensure memory continuity, resulting in a waste of computing resources and reduced efficiency.

Method used

A hierarchical Hierarchy structure is used to construct the molecular system to be simulated. The force is calculated through the middle layer between the top and bottom layers of the Hierarchy structure, and the storage of repeating units is optimized through a clustering algorithm to reduce unnecessary force judgment and memory consumption.

Benefits of technology

It improves the computing efficiency of molecular dynamics simulations, reduces memory consumption, and supports distributed processing and multi-thread processing, improving computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118280458B
    Figure CN118280458B
Patent Text Reader

Abstract

The present application discloses a molecular dynamics simulation method and device, which adopts a hierarchy structure to construct a molecular system to be simulated, and updates the data of each unit within the distance range by judging the distance between units included in the hierarchy structure, and iterates the data to higher layers at the same time, until the top layer of the hierarchy structure is completely updated, thereby reducing the judgment of many forces between atoms that do not affect each other and improving the calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to computer chemistry and computer biology technology, and in particular to a molecular dynamics simulation method and device. Background Art

[0002] In the field of molecular dynamics (MD), researchers can often only simulate very small ranges and a limited number of molecular systems. Because molecular dynamics simulations involve precise numerical calculations of the motion of atoms and molecules, such simulations require a large amount of computing resources, that is, a large amount of computing power is required to process. Molecular dynamics has many applications in the biomedical field, which makes molecular dynamics one of the important tools in the biomedical field, providing strong support for drug development, disease mechanism research, and the design of new treatment methods.

[0003] The Flatten Cell Grid method usually refers to a technique used to process spatial grids in molecular dynamics simulations. Its characteristic is that the dimensions of the grid are flattened into a one-dimensional array. In molecular dynamics simulations, it is usually necessary to divide the space of the simulation system into grids in order to more efficiently calculate the interactions between molecules. However, the Flatten Cell Grid method also brings problems such as low computational efficiency, excessive memory consumption, and the need for additional linked lists to ensure memory continuity. Summary of the invention

[0004] The present application provides a molecular dynamics simulation method and device, which can improve computational efficiency.

[0005] An embodiment of the present invention provides a molecular dynamics simulation method, comprising:

[0006] A molecular system to be simulated is constructed using a hierarchical Hierarchy structure; wherein the top layer of the Hierarchy structure includes all information of the molecular system to be simulated consisting of one or more units; the bottom layer of the Hierarchy structure includes information of basic elements determined according to simulation accuracy; between the top layer and the bottom layer of the Hierarchy structure, one or more intermediate layers are included according to the chemical structure decomposition of the molecular system to be simulated, and each intermediate layer includes one or more units;

[0007] Traverse the constructed Hierarchy structure, take each basic element of the Hierarchy structure as the current target basic element, calculate the force of each other basic element in the Hierarchy structure within the preset distance from the current target basic element on the current target basic element and accumulate them;

[0008] Obtaining the status information of the current target basic element according to the accumulated force, and returning to the step of traversing and constructing the Hierarchy structure until all the basic elements of the Hierarchy structure are traversed;

[0009] Determine whether a preset end condition is met. If the end condition is met, end; if the end condition is not met, return to the step of traversing and constructing the Hierarchy structure.

[0010] In an exemplary embodiment, the intermediate layer of the Hierarchy structure is obtained through biological / chemical experience, and / or a clustering algorithm.

[0011] In an exemplary embodiment, in the case where the units included in the intermediate layer include repeating units, only the content of one unit in the repeating unit and a plurality of position information of the unit in the molecular system are stored.

[0012] In an exemplary embodiment, the repeating unit is a short sequence with the longest identical information, or a short sequence with the identical information of a certain length determined according to actual needs.

[0013] In an exemplary embodiment, the traversal constructs the Hierarchy structure, taking each basic element of the Hierarchy structure as the current target basic element, including:

[0014] Starting from the top level of the constructed Hierarchy structure, taking the units included in the top level as units, searching for the basic element from top to bottom in the decomposition structure of the units, and taking the found basic element as the current target basic element.

[0015] In an exemplary embodiment, calculating and accumulating the force exerted by each other basic element in the Hierarchy structure within a preset distance from the current target basic element on the current target basic element may include:

[0016] In the cell where the current target basic element is located, the decomposition structure of the cell is traversed to search for other basic elements from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, and the force exerted by the other basic elements found this time whose distance to the current target basic element is within a preset range on the current target basic element is calculated; until the traversal of the cell where the current target basic element is located is completed, the obtained forces are accumulated to obtain a first accumulated force;

[0017] In each unit of the layer where the current target basic element is located and whose distance from the current target basic element is less than a preset distance, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, and the force exerted on the current target basic element by the other basic elements found this time and whose distance from the current target basic element is within a preset range; until each unit of the layer where the current target basic element is located is traversed, the obtained forces are accumulated to obtain a second accumulated force;

[0018] In each unit whose distance from the current target basic element is less than a preset distance in each layer above the layer where the current target basic element is located to the top layer, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, and the force exerted on the current target basic element by the other basic elements found this time whose distance from the current target basic element is within the preset range is calculated; until each unit of each layer above the layer where the current target basic element is located to the top layer is traversed, the obtained forces are accumulated to obtain a third accumulated force;

[0019] The first accumulated force, the second accumulated force and the third accumulated force are accumulated to obtain the force of each other basic element in the Hierarchy structure whose distance from the current target basic element is within a preset range on the current target basic element.

[0020] In an exemplary embodiment, the end condition is the end of a process; or, the end condition is that the molecular system to be simulated reaches a stable state.

[0021] In an exemplary embodiment, the information of the basic element is information at the atomic level or information at the molecular level.

[0022] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the molecular dynamics simulation methods described above.

[0023] An embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores the following instructions executable by the processor: for executing the steps of any of the molecular dynamics simulation methods described above.

[0024] The present application embodiment further provides a molecular dynamics simulation device, including: a construction module, a traversal module, an acquisition module, and a judgment module; wherein,

[0025] A construction module is used to construct a molecular system to be simulated using a Hierarchy structure; wherein the top layer of the Hierarchy structure, i.e., the uppermost layer, includes all information of the molecular system to be simulated composed of one or more units; the bottom layer of the Hierarchy structure includes information of basic elements determined according to the simulation accuracy, such as atomic-level information or molecular-level information; between the top layer and the bottom layer of the Hierarchy structure, one or more intermediate layers are included according to the chemical structure decomposition of the molecular system to be simulated, and each intermediate layer includes one or more units;

[0026] A traversal module is used to traverse the constructed Hierarchy structure, take each basic element of the Hierarchy structure as the current target basic element, calculate the force of each other basic element in the Hierarchy structure whose distance from the current target basic element is within a preset range on the current target basic element, and accumulate them;

[0027] The acquisition module is used to obtain the status information of the current target basic element according to the accumulated force, and return to the traversal module to continue traversing until all the basic elements of the Hierarchy structure are traversed;

[0028] The judgment module is used to end when a preset end condition is met, and return to the traversal module to continue traversal when the end condition is not met.

[0029] The molecular dynamics simulation method provided in the embodiment of the present application adopts a hierarchy structure to construct a molecular system to be simulated, and updates the data of each unit within the distance range by judging the distance between the units included in the hierarchy structure, and iterates the data to higher layers at the same time, until the top layer of the hierarchy structure is completely updated, thereby reducing the judgment of many forces between atoms that do not affect each other and improving the computing efficiency.

[0030] Furthermore, the embodiment of the present application can obtain repeating units with the same information in the molecular system to be simulated through a clustering algorithm. For repeating units, in the Hierarchy structure in the embodiment of the present application, only the detailed content of one unit and multiple position information of the unit are stored, thereby reducing memory consumption.

[0031] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0033] Figure 1 This is a schematic diagram of the molecular dynamics simulation method in the embodiment of the present application;

[0034] Figure 2 This is a schematic diagram of an embodiment of obtaining a repeating unit by a clustering algorithm in an embodiment of the present application;

[0035] Figure 3 This is a schematic diagram of a decomposition example using an amino acid chain as an example of a molecular system to be simulated in an embodiment of the present application;

[0036] Figure 4 Schematic diagram of the composition structure of the molecular dynamics simulation device in the embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0038] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0040] It is understood that the terms "first" and "second" used in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0041] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.

[0042] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0043] The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. Also, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a sequence different from that shown here.

[0044] Molecular dynamics is a cutting-edge technology that combines mathematics, physics, chemistry, biology and other disciplines. Molecular dynamics is a computational science task that simulates the motion of atoms and molecules to reveal the dynamic behavior of molecular systems, including vibrations, conformational changes and interactions, providing key understanding and prediction capabilities for research fields including biology, materials science and chemistry. This simulation of the motion state of molecules and atoms in the system over a certain period of time can be used to dynamically observe the behavior of the system evolving over time, which can be used to reveal the microscopic physical process of chemical reactions, photosynthesis, new drug search, and nanomaterial property prediction.

[0045] Figure 1 Schematic diagram of the molecular dynamics simulation method in the embodiment of the present application. Figure 1 As shown, it may include:

[0046] Step 100: Use the Hierarchy structure to construct the molecular system to be simulated.

[0047] The top level of the hierarchy structure includes all the information of the molecular system to be simulated, which is composed of one or more units.

[0048] The lowest level of the hierarchy structure includes information about basic elements determined according to simulation accuracy, such as atomic-level information or molecular-level information;

[0049] Between the top layer and the bottom layer of the Hierarchy structure, there are one or more intermediate layers decomposed according to the chemical structure of the molecular system to be simulated, and each intermediate layer includes one or more cells.

[0050] In an exemplary embodiment, the Hierarchy structure can be a tree structure, which is used to describe the hierarchical relationship between various elements. In the tree structure, there is a root node (such as the top layer in the embodiment of the present application), and then multiple child nodes (such as the middle layer in the embodiment of the present application) are branched out, and each child node can have its own child node (such as the middle layer in the embodiment of the present application), and so on, until the last child node (such as the bottom layer in the embodiment of the present application), forming a hierarchical relationship.

[0051] In an exemplary embodiment, the scale requirement to be simulated determines whether the information of the basic elements included in the bottom layer of the Hierarchy structure is atomic-level information or molecular-level information. For example, if the scale requirement is high, that is, the simulation accuracy is high, the bottom layer of the Hierarchy structure may be atomic-level information. For another example, if the scale requirement is not high, that is, the simulation accuracy is not high, the bottom layer of the Hierarchy structure may be small molecule-level or macromolecule-level information.

[0052] In an exemplary embodiment, the intermediate levels of the hierarchy structure can be obtained through biological / chemical experience, and / or clustering algorithms, etc.

[0053] In one embodiment, examples obtained through biological (or chemical) experience may include, but are not limited to, for example: basic chemical groups composed of atoms and small molecules (such as hydroxyl carboxyl groups, water molecules, etc.) can be used as the upper layer of atoms; another example: larger molecular structures composed of basic chemical groups (such as amino acids in protein molecules) can be used as the upper layer of basic chemical groups; another example: multiple amino acid chains form a protein, then this protein is the upper layer of these multiple amino acid chains.

[0054] In one embodiment, examples obtained by the clustering algorithm may include but are not limited to: for example, there are many repeating units in an amino acid chain (an amino acid chain can be considered to be composed of many different amino acids, and there will be many repeated short amino acid sequences in it), and these repeated short amino acid sequences can be clustered as repeating units to serve as the next layer of the amino acid chain. Figure 2 Taking the amino acid chain ABCDABCA shown as an example, the amino acid chain ABCDABCA includes different amino acids such as ABC, D, and A, wherein ABC is a short sequence of amino acids that appear repeatedly. Therefore, the information of the molecule in the next layer of the amino acid chain ABCDABCA may include: the short sequence of amino acids ABC (two different positions are identified), as well as amino acid D and amino acid A. That is to say, in the Hierarchy structure in the embodiment of the present application, for the repeated units, that is, multiple units are the same, only the detailed content of one unit and the multiple position information of the unit in the molecular system can be stored, thereby reducing memory consumption.

[0055] In an exemplary embodiment, the repeating unit may be the longest short sequence with the same information, or a short sequence with the same information of a certain length determined according to actual needs. For example, in the amino acid chain ABCDABCA, in one embodiment, the longest short sequence with the same information, i.e., the amino acid short sequence ABC, may be used as the repeating unit; in another embodiment, a short sequence with the same information of a certain length, i.e., the amino acid short sequence AB, may be used as the repeating unit according to actual needs.

[0056] Taking an amino acid chain AGVAGA as an example of a molecular system to be simulated, in this embodiment, a high scale requirement, i.e., a high simulation accuracy, is taken as an example, wherein A, G, and V in the amino acid chain AGVAGA represent glycine, alanine, and valine, respectively. Figure 3 As shown in the figure, the Top Level of the Hierarchy structure covers the information of all molecules included in the molecular system to be simulated, including the first cell 1 (cell 1), the second cell 2 (cell 2), the third cell 3 (cell 3), the fourth cell 4 (cell 4), the fifth cell 5 (cell 5) and the sixth cell 6 (cell 6). Figure 3 The numbers 1-6 are used to represent them. Figure 3 As shown, the first unit and the sixth unit are other components of the amino acid chain AGVAGA, such as the H atom of the first unit and the OH group of the sixth unit in this embodiment; the second unit and the fourth unit are respectively composed of the seventh unit 7 (cell 7) and the eighth unit 8 (cell 8), Figure 3The numbers 7 and 8 are used to represent them respectively. The seventh unit is glycine A, the eighth unit is alanine G, and the second and fourth units are respectively short amino acid sequences consisting of glycine A and alanine G. The third unit is valine V. The fifth unit is glycine A.

[0057] Figure 3 In the embodiment shown, taking the decomposition of glycine A in the second unit or the fourth unit in the hierarchy structure as an example, the next intermediate layer of the top level of the hierarchy structure includes the seventh unit 7 and the eighth unit 8, and marks that the short amino acid sequence composed of glycine A and alanine G appears at two positions of the amino acid chain AGVAGA. Figure 3 As shown below the dashed arrow, according to biological (chemical) experience and / or clustering algorithms, glycine A continues to decompose. Then, the next intermediate layer of glycine A may include some basic chemical groups and small molecular units composed of atoms, such as one of the units is the group NH , for example, one of the units is a CH group , for example, one of the units is a CH3 group , for example, one of the units is a group CO These basic chemical groups and small molecular units composed of atoms are further decomposed to obtain the bottom layer of the decomposition of the glycine A branch, such as Figure 3 As shown, it includes atom N, atom C, atom H and atom O, wherein atom C and atom H are repeating units, and their different unit positions appearing in the previous layer will be marked. Figure 3 The decomposition process of the amino acids in other units is similar to the decomposition process of glycine A. It is easy for those skilled in the art to implement the decomposition process of glycine A by referring to the embodiments of the present application, and will not be described in detail here.

[0058] Step 101: traverse the constructed Hierarchy structure, take each basic element of the Hierarchy structure as the current target basic element, calculate the force exerted on the current target basic element by each other basic element in the Hierarchy structure whose distance from the current target basic element is within a preset range, and accumulate them.

[0059] In the embodiments of the present application, in molecular dynamics, the interaction forces between molecules are local (mainly chemical bonds and van der Waals forces), that is, only some molecules that are relatively close to each other will have an impact on each other. Therefore, when calculating the force exerted on a molecule, the embodiments of the present application only focus on the impact of molecules within a certain range near the molecule on it, and molecules that are not within a certain range near the molecule are no longer calculated. In this way, the calculation efficiency is greatly improved.

[0060] In an exemplary embodiment, the Hierarchy structure obtained by traversal construction in step 101, taking each basic element of the Hierarchy structure as the current target basic element, may include:

[0061] Starting from the top level of the constructed Hierarchy structure, taking the units included in the top level as units, search for basic elements from top to bottom in the decomposition structure of the units, and use the found basic elements as the current target basic elements.

[0062] In an exemplary embodiment, calculating and accumulating the force exerted by each other basic element in the Hierarchy structure within a preset range of distance from the current target basic element on the current target basic element in step 101 may include:

[0063] In the unit where the current target basic element is located, the decomposition structure of the unit is traversed to search for other basic elements from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, if it is less than, it indicates that the distance between the other basic elements found this time and the current target basic element is within a preset range; if it is not less than, it indicates that the distance between the other basic elements found this time and the current target basic element is not within the preset range; calculate the force of the other basic elements found this time whose distance to the current target basic element is within the preset range on the current target basic element; until the traversal of the unit where the current target basic element is located is completed, the obtained forces are accumulated to obtain a first accumulated force;

[0064] In each unit of the layer where the current target basic element is located and whose distance from the current target basic element is less than the preset distance, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than the preset distance threshold; if it is less than, it indicates that the distance between the other basic elements found this time and the current target basic element is within the preset range; if it is not less than, it indicates that the distance between the other basic elements found this time and the current target basic element is not within the preset range; calculate the force of the other basic elements found this time and whose distance from the current target basic element is within the preset range on the current target basic element; until each unit of the layer where the current target basic element is located is traversed, the obtained forces are accumulated to obtain a second accumulated force;

[0065] In each unit whose distance from the current target basic element is less than a preset distance in each layer above the layer where the current target basic element is located to the top layer, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, and the force exerted by the other basic elements found this time whose distance from the current target basic element is within the preset range on the current target basic element is calculated; until each unit of each layer above the layer where the current target basic element is located to the top layer is traversed, the obtained forces are accumulated to obtain a third accumulated force;

[0066] The first accumulated force, the second accumulated force and the third accumulated force are accumulated to obtain the force of each other basic element in the Hierarchy structure whose distance from the current target basic element is within a preset range on the current target basic element.

[0067] Step 102: Obtain the status information of the current target basic element according to the accumulated force, and return to step 101 until all basic elements of the Hierarchy structure are traversed.

[0068] In an exemplary embodiment, the state information may include but is not limited to: position, speed, acceleration, etc. It should be noted that the specific implementation of calculating the state information of the current target basic element according to the obtained force is not used to limit the protection scope of this application and will not be repeated here.

[0069] Step 103: Determine whether a preset end condition is met. If the end condition is met, end the process; if the end condition is not met, return to step 101.

[0070] In an exemplary embodiment, the end condition may be that the molecular system to be simulated reaches an equilibrium state or after a relatively long period of time, that is, a preset time period, has passed.

[0071] In one embodiment, the equilibrium state refers to the situation in which the position of each molecule in the entire molecular system presents a periodic (such as every time length t) slight change. For example: at time t0, the state information of all molecules in the molecular system is recorded, and then recorded again at time (t0 + t)... and recorded again at time (t0 + 2*t). In this way, the state information of all molecules in the molecular system is recorded once every time length t. When the state information recorded for each molecule in the molecular system each time is basically the same (that is, the change is very small, such as changing within a certain range), it can be considered that the molecular system has reached an equilibrium state.

[0072] In one embodiment, after a long period of time, such as a preset time, the molecular dynamics simulation may fail, that is, the molecular system to be simulated has not found an equilibrium state. At this time, the simulation will not continue but end. This is equivalent to setting a maximum simulation end time limit, and a timeout means the simulation is terminated.

[0073] In an embodiment of the present application, before the termination condition is met, if the position of the molecules (or atoms) in the Hierarchy structure changes, then the molecular dynamics simulation method provided in the embodiment of the present application will update the Hierarchy structure, ensuring that the update of the state information changes in real time with the slight changes in the Hierarchy structure at this time.

[0074] In the embodiment of the present application, because the hierarchy structure is built on the basis of atoms, and the molecular dynamics simulation process generally does not include complex physical and chemical reactions, that is, the atoms here will not increase or decrease, and most chemical bonds will not be broken. Therefore, the update of the hierarchy structure rarely occurs and does not need to be reconstructed. However, it should be noted that when the same cell of the hierarchy structure appears in different positions, the state information of these cells at different positions is different. For example, Figure 3 Taking the Hierarchy structure shown as an example, the actual contents of the second unit 2 and the fourth unit 4 contained in the Top Level are the same, both are short amino acid sequences AG, but these two short amino acid sequences AG are in different environments, so their respective state information is different, and the state information of the same cell at different positions needs to be updated.

[0075] by Figure 3 Taking the Hierarchy structure shown in the figure as an example, the specific implementation process of traversing the Hierarchy structure and calculating the force exerted by each basic element in the Hierarchy structure whose distance to the current target basic element is within a preset range on the current target basic element is described in detail:

[0076] Starting from the Top Level, loop through each child cell of the Top Level, such as Figure 3 As shown, it is the first unit 1 to the sixth unit 6.

[0077] First, loop through each subcell of the first unit 1 until a basic element (an atom in this embodiment) is found. Since the first unit 1 in this embodiment only includes one H atom, the H atom is used as the current target basic element, and the distance from the H atom to the H atom is less than the preset distance. There are no other subcells in the first cell 1 where the H atom is located, so the other cells in the layer where the H atom is located are traversed, that is, other atoms are searched in the second cell 2 to the sixth cell 6. In one embodiment, suppose that the distance from a cell to the H atom is greater than the preset distance , then the distance between all atoms in this cell and the current H atom is not less than the preset distance Therefore, there is no need to process the atoms in this cell and the cell is not traversed. In one embodiment, suppose that the distance from a cell to the H atom is less than the preset distance , for example, the distance between the second unit 2 and the H atom is less than the preset distance Then, the sub-cell of the second unit 2 is judged. Similarly, only the sub-cell of the second unit 2 whose distance to the H atom is less than the preset distance is judged. The cells of the layer are traversed, and the search is performed from top to bottom until the smallest cell is found, that is, it contains only one atom, and the distance between this atom and the current H atom is less than the preset distance. Then, the force of this atom on the current H atom is calculated until all sub-cells of the current layer (the second unit 2 in this embodiment) are looped through, and then other cells of the layer where the current H atom is located are looped through. At least all cells are looped through and judged. After accumulating all the forces obtained, the force of each atom in the Hierarchy structure whose distance from the current H atom is within the preset range on the current H atom can be obtained.

[0078] Next, loop through each subcell of the second unit 2 until the basic element (atom in this embodiment) is found. The second unit 2 contains the seventh unit 7 and the eighth unit 8. You can start with the seventh unit 7. The seventh unit 7 is a glycine A. Glycine A contains the following subcells: group NH, group CH, group CH3 and group CO. You can start with the group NH. The group NH has two atoms, namely atom H and atom N. You can start with atom H and use the atom H as the current target basic element to find atoms whose distance from atom H is less than the preset distance: there is atom N in the same unit. If the calculated distance between atom N and the current atom H is less than the preset distance , then calculate the force of atom N on the current atom H. If the calculated distance between atom N and the current atom H is not less than the preset distance , then the other cells in the same layer are judged cyclically, including the CH group, CH3 group and CO group, and the distances from these groups to the current atom H are calculated in turn. If the distance is less than the preset distance, , recycle the atoms in the group and calculate the distance between these atoms and the current atom H less than the preset distance Then, the eighth unit 8, i.e., amino acid G, which is in the same layer as the seventh unit 7, i.e., amino acid A, is judged cyclically, as described above, and the distance between the eighth unit 8 and the seventh unit 7 is calculated first. If it is less than the preset distance, , and then loop down until other atoms are found, which will not be repeated here; after that, loop judgment is performed on each cell in the seventh unit 7, that is, the layer above the layer where the amino acid A is located, such as the third unit 3-sixth unit 6 in this embodiment. For a unit in the third unit 3-sixth unit 6, the specific implementation process is still to search for each subunit of this unit from top to bottom, and first search for a cell with a distance less than the preset distance from the current atom H. The atoms are traversed, and the forces are calculated again. After all sub-units are looped, the above loop processing is repeated for the next unit in the third unit 3-the sixth unit 6. After all atoms are traversed, all the forces obtained are accumulated to obtain Figure 3 The forces exerted by other atoms in the hierarchy structure on atom H in unit 7, i.e. glycine A.

[0079] The molecular dynamics simulation method provided in the embodiment of the present application reduces the judgment of many forces between atoms that do not affect each other by judging the distance between units, thereby improving the calculation efficiency.

[0080] The novel Hierarchy structure in the embodiment of the present application is used to accelerate the algorithm iteration process. Each unit updates its own data and iterates data to a higher level at the same time until the top level is fully updated. This solves the problems of excessive data volume and overly concentrated calculations, and further promotes the feasibility of distributed design.

[0081] In an exemplary embodiment, when cells in the same layer are updated cyclically, these cells can be distributed to multiple threads for execution. Figure 3 Taking the Hierarchy structure shown in the figure as an example, in the Top Level, if you want to loop through the first cell 1 to the sixth cell 6, a total of 6 cells, then you can distribute these 6 cells to 6 threads, and each thread handles the cyclic update process of 1 cell. Since each thread will only update the content of one cell when processing, and only read information from other cells, it is no problem to use multiple threads to process cells in the same layer at the same time. In one embodiment, Figure 3For example, the first cell 1 has only one atom, so the loop processing of the first cell 1 will end quickly, while the second cell 2 has many layers, so the loop processing time of the second cell 2 is relatively long. Therefore, the number of threads can be more reasonably allocated according to the amount of content included in the cell. For example, one thread executes the loop processing of the third cell 3 and the sixth cell 6, one thread executes the loop processing of the second cell 2, and one thread executes the loop processing of the fourth cell 4. The molecular dynamics simulation method provided in the embodiment of the present application supports distributed processing, i.e., multi-threaded processing, which will also better improve the computing efficiency.

[0082] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the molecular dynamics simulation methods described above.

[0083] The present application further provides a computer device, comprising a memory and a processor, wherein the memory stores the following instructions executable by the processor: for executing the steps of any of the molecular dynamics simulation methods described above.

[0084] Figure 4 Schematic diagram of the composition structure of the molecular dynamics simulation device in the embodiment of the present application. Figure 4 As shown, it may include: a construction module, a traversal module, an acquisition module, and a judgment module; wherein,

[0085] A construction module is used to construct a molecular system to be simulated using a Hierarchy structure; wherein the top layer of the Hierarchy structure, i.e., the uppermost layer, includes all information of the molecular system to be simulated composed of one or more units; the bottom layer of the Hierarchy structure includes information of basic elements determined according to the simulation accuracy, such as atomic-level information or molecular-level information; between the top layer and the bottom layer of the Hierarchy structure, one or more intermediate layers are included according to the chemical structure decomposition of the molecular system to be simulated, and each intermediate layer includes one or more units;

[0086] A traversal module is used to traverse the constructed Hierarchy structure, take each basic element of the Hierarchy structure as the current target basic element, calculate the force of each other basic element in the Hierarchy structure whose distance from the current target basic element is within a preset range on the current target basic element, and accumulate them;

[0087] The acquisition module is used to obtain the status information of the current target basic element according to the accumulated force, and return to the traversal module to continue traversing until all the basic elements of the Hierarchy structure are traversed;

[0088] The judgment module is used to end the process when the preset end condition is met, and return to the traversal module to continue traversal when the end condition is not met.

[0089] In an exemplary embodiment, the Hierarchy structure constructed by traversal in the traversal module, taking each basic element of the Hierarchy structure as the current target basic element, can include: starting from the top level of the constructed Hierarchy structure, taking the units included in the top level as units, searching for basic elements from top to bottom in the decomposition structure of the units, and taking the found basic elements as the current target basic elements.

[0090] In an exemplary embodiment, calculating in the traversal module the forces exerted on the current target basic element by each other basic element in the Hierarchy structure within a preset range of distance from the current target basic element and accumulating the forces may include:

[0091] In the unit where the current target basic element is located, the decomposition structure of the unit is traversed to search for other basic elements from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, if it is less than, it indicates that the distance between the other basic elements found this time and the current target basic element is within a preset range; if it is not less than, it indicates that the distance between the other basic elements found this time and the current target basic element is not within the preset range; calculate the force of the other basic elements found this time whose distance to the current target basic element is within the preset range on the current target basic element; until the traversal of the unit where the current target basic element is located is completed, the obtained forces are accumulated to obtain a first accumulated force;

[0092] In each unit of the layer where the current target basic element is located and whose distance from the current target basic element is less than the preset distance, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than the preset distance threshold; if it is less than, it indicates that the distance between the other basic elements found this time and the current target basic element is within the preset range; if it is not less than, it indicates that the distance between the other basic elements found this time and the current target basic element is not within the preset range; calculate the force of the other basic elements found this time and whose distance from the current target basic element is within the preset range on the current target basic element; until each unit of the layer where the current target basic element is located is traversed, the obtained forces are accumulated to obtain a second accumulated force;

[0093] In each unit whose distance from the current target basic element is less than a preset distance in each layer above the layer where the current target basic element is located to the top layer, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance threshold, and the force exerted by the other basic elements found this time whose distance from the current target basic element is within the preset range on the current target basic element is calculated; until each unit of each layer above the layer where the current target basic element is located to the top layer is traversed, the obtained forces are accumulated to obtain a third accumulated force;

[0094] The first accumulated force, the second accumulated force and the third accumulated force are accumulated to obtain the force of each other basic element in the Hierarchy structure whose distance from the current target basic element is within a preset range on the current target basic element.

[0095] The molecular dynamics simulation device provided in the embodiment of the present application reduces the judgment of many forces between atoms that do not affect each other by judging the distance between units, thereby improving the calculation efficiency.

[0096] In an illustrative example, the middle level of the Hierarchy structure in the building module can be obtained through biological (chemical) experience and / or clustering algorithms. In one embodiment, the clustering algorithm can be used to obtain repeating units with the same information in the molecular system to be simulated. For repeating units, in the Hierarchy structure in the embodiment of the present application, only the detailed content of one unit and multiple position information of the unit are stored. In one embodiment, the repeating unit can be the longest short sequence with the same information, or it can be a short sequence with the same information of a certain length determined according to actual needs. In the Hierarchy structure in the embodiment of the present application, for repeating units, only the detailed content of one unit and multiple position information of the unit can be stored, which reduces memory consumption.

[0097] Although the embodiments disclosed in this application are as above, the contents described are only embodiments adopted to facilitate understanding of this application and are not intended to limit this application. Any technician in the field to which this application belongs can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be based on the scope defined in the attached claims.

Claims

1. A molecular dynamics simulation method, characterized in that: include: A molecular system to be simulated is constructed by using a hierarchical structure; wherein the hierarchical structure is a tree structure, in which there is a root node and multiple child nodes branching out, and each child node may have its own child nodes; the top layer of the hierarchical structure includes all information of the molecular system to be simulated composed of one or more units; the bottom layer of the hierarchical structure includes information of basic elements determined according to simulation accuracy; between the top layer and the bottom layer of the hierarchical structure, one or more intermediate layers are included according to the chemical structure decomposition of the molecular system to be simulated, and each intermediate layer includes one or more units; the intermediate layers of the hierarchical structure are obtained by a clustering algorithm; Traverse the constructed hierarchical structure, take each basic element of the hierarchical structure as the current target basic element, calculate the force of each other basic element in the hierarchical structure within a preset distance from the current target basic element on the current target basic element and accumulate them; Acquire the state information of the current target basic element according to the accumulated action force, and return to the step of traversing the constructed hierarchical structure until all the basic elements of the hierarchical structure are traversed; Determine whether a preset end condition is met, and if so, end; if not, return to the step of traversing and constructing the hierarchical structure; The step of calculating and accumulating the force exerted by each other basic element in the hierarchical structure within a preset distance from the current target basic element on the current target basic element includes: In the cell where the current target basic element is located, the decomposition structure of the cell is traversed to search for other basic elements from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance, and the force exerted on the current target basic element by the other basic elements found this time within the preset distance from the current target basic element is calculated; until the traversal of the cell where the current target basic element is located is completed, the obtained forces are accumulated to obtain a first accumulated force; In each unit of the layer where the current target basic element is located and whose distance from the current target basic element is less than a preset distance, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than the preset distance, and the force exerted by the other basic elements found this time and whose distance from the current target basic element is within the preset distance on the current target basic element is calculated; until each unit of the layer where the current target basic element is located is traversed, the obtained forces are accumulated to obtain a second accumulated force; In each unit whose distance from the current target basic element is less than a preset distance in each layer above the layer where the current target basic element is located to the top layer, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than the preset distance, and the force exerted by the other basic elements found this time whose distance from the current target basic element is within the preset distance on the current target basic element is calculated; until each unit of each layer above the layer where the current target basic element is located to the top layer is traversed, the obtained forces are accumulated to obtain a third accumulated force; The first accumulated force, the second accumulated force and the third accumulated force are accumulated to obtain the force of each other basic element in the hierarchical structure within a preset distance from the current target basic element on the current target basic element.

2. The molecular dynamics simulation method according to claim 1, wherein: In the case where the units included in the intermediate layer include repeating units, only the content of one unit in the repeating units and a plurality of position information of the unit in the molecular system are stored.

3. The molecular dynamics simulation method according to claim 2, wherein: The repeating unit is the longest short sequence with the same information, or a short sequence with the same information of a certain length determined according to actual needs.

4. The molecular dynamics simulation method according to claim 1, wherein: The hierarchical structure constructed by traversing is constructed, and each basic element of the hierarchical structure is used as the current target basic element, including: Starting from the top level of the constructed hierarchical structure, taking the units included in the top level as units, searching for the basic element from top to bottom in the decomposition structure of the units, and taking the found basic element as the current target basic element.

5. The molecular dynamics simulation method according to claim 1, wherein: The end condition is the end of a process; or, the end condition is that the molecular system to be simulated reaches a stable state.

6. The molecular dynamics simulation method according to any one of claims 1 to 5, wherein: The information of the basic elements is information at the atomic level or information at the molecular level.

7. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the molecular dynamics simulation method according to any one of claims 1 to 6.

8. A computer device comprising a memory and a processor, wherein: The memory stores the following instructions executable by the processor: used to execute the steps of the molecular dynamics simulation method described in any one of claims 1-6.

9. A molecular dynamics simulation device, characterized in that: include: Construction module, traversal module, acquisition module, judgment module; among them, A construction module, used for constructing a molecular system to be simulated by adopting a hierarchical structure; wherein the hierarchical structure is a tree structure, in which there is a root node and multiple child nodes branching out, and each child node can have its own child nodes; the top layer of the hierarchical structure, i.e., the uppermost layer, includes all information of the molecular system to be simulated composed of one or more units; the bottom layer of the hierarchical structure includes information of basic elements determined according to simulation accuracy; between the top layer and the bottom layer of the hierarchical structure, one or more intermediate layers decomposed according to the chemical structure of the molecular system to be simulated are included, and each intermediate layer includes one or more units; the intermediate layers of the hierarchical structure are obtained by a clustering algorithm; A traversal module is used to traverse the constructed hierarchical structure, take each basic element of the hierarchical structure as the current target basic element, respectively calculate and accumulate the force of each other basic element in the hierarchical structure within a preset distance from the current target basic element on the current target basic element; wherein the calculation and accumulation of the force of each other basic element in the hierarchical structure within a preset distance from the current target basic element on the current target basic element includes: In the cell where the current target basic element is located, the decomposition structure of the cell is traversed to search for other basic elements from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than a preset distance, and the force exerted on the current target basic element by the other basic elements found this time within the preset distance from the current target basic element is calculated; until the traversal of the cell where the current target basic element is located is completed, the obtained forces are accumulated to obtain a first accumulated force; In each unit of the layer where the current target basic element is located and whose distance from the current target basic element is less than a preset distance, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than the preset distance, and the force exerted by the other basic elements found this time and whose distance from the current target basic element is within the preset distance on the current target basic element is calculated; until each unit of the layer where the current target basic element is located is traversed, the obtained forces are accumulated to obtain a second accumulated force; In each unit whose distance from the current target basic element is less than a preset distance in each layer above the layer where the current target basic element is located to the top layer, the decomposition structure of the unit is traversed respectively, and other basic elements are searched from top to bottom; each time other basic elements are found, it is determined whether the distance between the other basic elements found this time and the current target basic element is less than the preset distance, and the force exerted by the other basic elements found this time whose distance from the current target basic element is within the preset distance on the current target basic element is calculated; until each unit of each layer above the layer where the current target basic element is located to the top layer is traversed, the obtained forces are accumulated to obtain a third accumulated force; Accumulating the first accumulated force, the second accumulated force and the third accumulated force to obtain the force of each other basic element in the hierarchical structure within a preset distance from the current target basic element on the current target basic element; The acquisition module is used to obtain the status information of the current target basic element according to the accumulated force, and return to the traversal module to continue traversing until all the basic elements of the hierarchical structure are traversed; The judgment module is used to end when a preset end condition is met, and return to the traversal module to continue traversal when the end condition is not met.