Molecular dynamics calculation method based on non-von Neumann architecture

文档序号:1244135 发布日期:2020-08-18 浏览:11次 中文

阅读说明:本技术 一种基于非冯诺依曼架构的分子动力学计算方法 (Molecular dynamics calculation method based on non-von Neumann architecture ) 是由 刘杰 周骞 周晓凡 莫平辉 叶雅琴 史余辉 于 2020-05-05 设计创作,主要内容包括:本发明属于人工智能领域,公开了一种基于非冯诺依曼架构的分子动力学计算方法。本发明首先选定一个原子作为参考原子,并根据其初始位置构建局部坐标环境;将参考原子截断半径内每个原子的全局坐标转换为局部坐标环境下的局部坐标并求得其输入特征,作为参考原子的所有特征参数;将所有特征参数输入到一个全连接多层感知机神经网络框架,拟合得到参考原子的受力;并行求得所有原子的受力后,根据每个原子的初始位置,速度以及受力,求得所有原子新的位置;重复执行上述步骤,并记录每一次的位置结果,最终整合得到分子动力学计算的结果。本发明在确保高精度计算分子动力学的基础上,对计算效率有极大的提升,具有高精度、高效率的特点。(The invention belongs to the field of artificial intelligence and discloses a molecular dynamics calculation method based on a non-von Neumann architecture. Firstly, selecting an atom as a reference atom, and constructing a local coordinate environment according to the initial position of the atom; converting the global coordinate of each atom in the truncation radius of the reference atom into a local coordinate under a local coordinate environment, and obtaining the input characteristic of the local coordinate as all characteristic parameters of the reference atom; inputting all characteristic parameters into a fully-connected multi-layer perceptron neural network frame, and fitting to obtain the stress of a reference atom; after the stress of all atoms is solved in parallel, new positions of all atoms are obtained according to the initial position, the speed and the stress of each atom; and (4) repeatedly executing the steps, recording the position result of each time, and finally integrating to obtain the result of the molecular dynamics calculation. The method greatly improves the calculation efficiency on the basis of ensuring high-precision calculation molecular dynamics, and has the characteristics of high precision and high efficiency.)

1. A method for molecular dynamics computation based on a non-von neumann architecture, comprising the steps of:

step 1, selecting an atom as a reference atom for a multi-atom system, and constructing a local coordinate environment of the reference atom according to the initial position of the atom;

step 2, converting the global coordinate of each atom in the truncated radius of the reference atom into a local coordinate under the local coordinate environment of the reference atom;

step 3, obtaining the input characteristics of each atom according to the local coordinates of each atom in the truncation radius of the reference atom, and using the input characteristics as all characteristic parameters of the reference atom;

step 4, inputting all characteristic parameters of the reference atoms into a fully-connected multi-layer perceptron neural network frame, and fitting to obtain the stress of the reference atoms;

step 5, obtaining the stress of all atoms in the system according to the steps 1-4, and obtaining new positions of all atoms in the system according to the initial position, the speed and the stress of each atom;

and 6, repeatedly executing the steps 1-5, recording the position result of each time, and finally integrating to obtain the result of the molecular dynamics calculation.

2. The non-von based von Neuroy device of claim 1The molecular dynamics calculation method of the Manchester framework is characterized in that in the step 1, for a multi-atom system, the local coordinate environment of a selected reference atom is expressed as A ═ e [ e ]xeyez]Whereinez=ex×ey,dr12=r2-(r2·ex)·exIs calculated by Schmidt orthogonality1And r2Respectively representing vectors pointing from the reference atom to the first and second adjacent two atoms within the truncation radius of the reference atom, | r1I and | dr12Respectively representing the vector r1Sum vector dr12Die length of (2).

3. The non-von Neumann-based molecular dynamics computation method of claim 1, wherein in step 2, the local coordinates of each atom within the truncation radius of the reference atom under the local coordinate environment A of the reference atom are represented asWhereinIs referenced to an atom R within the truncation radius of the atomiGlobal coordinate of (2), xi,yi,zi) Is the atom RiThe converted local coordinates.

4. The method according to claim 1, wherein in step 3, an atom R within a truncation radius of the reference atom is determinediIs expressed asWherein xi,yiAnd ziRespectively representAtom RiThe values in the three directions of the local coordinates,representing the sum of the squares of the vectors in which the atoms lie.

5. The method according to claim 1, wherein the determination of all characteristic parameters of the reference atoms in step 3 is performed by sorting all atoms within a truncation radius of the reference atoms according to their relative distances from the reference atom, and determining the input features of all atoms within the truncation radius of the reference atoms as all characteristic parameters of the reference atom according to steps 1-3.

6. The non-von Neumann-based molecular dynamics computation method of claim 1, wherein in step 4, the fully-connected multi-layer perceptron neural network is a fully-connected network comprising multiple input layer nodes and multiple output layer nodes, and the input layer node values of the network are all characteristic parameters of a reference atom, and the output layer node values are forces in three directions applied to the reference atom.

7. The non-von Neumann-based molecular dynamics computation method of claim 1, wherein in the step 4, the hidden layer of the fully-connected multi-layer perceptron neural network uses a hyperbolic tangent function as an activation function, the function is processed by coordinate rotation computation, and the output layer uses a linear function as an activation function.

8. The non-von Neumann-based molecular dynamics computation method of claim 1, wherein in step 5, the stress of all atoms in the system is determined by designing parallel units with each atom in parallel as a reference atom, and each parallel unit obtains the corresponding stress of the atom as the stress of all atoms according to the steps 1-4.

9. The method according to claim 1, wherein in step 5, the new position of an atom in the system is represented as x1=x0+v1Dt, wherein x1Indicates the new absolute position of the atom, x0Representing the original absolute position of the atom, dt represents the runtime of the system,indicates the new movement velocity, v, of the atom0The initial velocity of the atom is represented, f represents the force borne by the atom, m represents the mass of the atom, and new positions of all atoms in the system can be obtained after all atoms are calculated according to the formula.

10. The method according to claim 1, wherein in step 6, the position result of each calculation is recorded and used as an initial value of the next calculation, and steps 1-5 are repeated to finally integrate the results of the molecular dynamics calculations.

Technical Field

The invention relates to a method for accelerating molecular dynamics calculation, which realizes the great improvement of the calculation efficiency of molecular dynamics on the basis of ensuring high-precision calculation by fitting interatomic stress and a non-von Neumann calculation framework through a neural network, and belongs to the field of artificial intelligence.

Background

The traditional molecular dynamics calculation is based on the density functional theory and is completed by means of computer software simulation, and although the calculation accuracy can be guaranteed, the high calculation cost limits the application of the traditional molecular dynamics calculation in a system with hundreds of atoms and a time scale of 100 ps. In recent years, machine learning methods, especially deep learning, are considered as tools for establishing molecular system potential energy surface models by using density functional theory data, and significant efficiency improvement is realized. However, most of the current computing architectures adopt the traditional von neumann architecture, i.e. the processor and the memory are designed separately, so that the overall efficiency of the system is severely limited by massive data transmission, and the method is not suitable for molecular dynamics computation of high-dimensional substances. Aiming at the problem, a storage and computation integrated framework designed by simulating a human brain structure is used for realizing distributed and concurrent data transmission, which is equivalent to ultra-large-scale parallel computation. The realization of the molecular dynamics computing system based on the framework has great significance to artificial intelligence of the physical, biochemical and medical fields.

Disclosure of Invention

The invention aims to solve the technical problem that aiming at the defects of the prior art, the invention provides a molecular dynamics calculation method based on a non-von Neumann architecture, which accelerates the molecular dynamics calculation through a neural network so as to complete accurate molecular dynamics simulation.

The technical scheme adopted by the invention is as follows:

a method of molecular dynamics computation based on a non-von neumann architecture, comprising the steps of:

1) for a multi-atom system, selecting an atom as a reference atom, and constructing a local coordinate environment of the reference atom according to the initial position of the atom;

2) converting the global coordinate of each atom in the truncated radius of the reference atom into a local coordinate under the local coordinate environment of the reference atom;

3) obtaining the input characteristics of each atom according to the local coordinates of each atom in the truncation radius of the reference atom, and using the input characteristics as all characteristic parameters of the reference atom;

4) inputting all characteristic parameters of the reference atoms into a fully-connected multi-layer perceptron neural network frame, and fitting to obtain the stress of the reference atoms;

5) obtaining the stress of all atoms in the system according to the steps 1-4, and obtaining new positions of all atoms in the system according to the initial position, the speed and the stress of each atom;

6) and (5) repeatedly executing the steps 1-5, recording the position result of each time, and finally integrating to obtain the result of the molecular dynamics calculation.

As a further improvement of the invention, in the step 1), for a multi-atom system, the local coordinate environment of the selected reference atom is expressed asWhereinez=ex×ey,dr12=r2-(r2·ex)·exIs calculated by Schmidt orthogonality1And r2Respectively representing vectors pointing from the reference atom to the first and second adjacent two atoms within the truncation radius of the reference atom, | r1I and | dr12Respectively representing the vector r1Sum vector dr12Die length of (2).

As a further improvement of the invention, in the step 2), the local coordinate of each atom in the reference atom truncation radius under the reference atom local coordinate environment A is expressed asWhereinIs referenced to an atom R within the truncation radius of the atomiGlobal coordinate of (x)i,yi,zi) Is the atom RiThe converted local coordinates.

As a further improvement of the invention, in the step 3), a certain atom R in a truncation radius of the reference atom is usediIs expressed asWherein xi,yiAnd ziEach represents an atom RiThe values in the three directions of the local coordinates,representing the sum of the squares of the vectors in which the atoms lie.

As a further improvement of the present invention, in the step 3), the determination method of all characteristic parameters of the reference atom is to sort all atoms within the truncated radius of the reference atom according to the relative distance from the reference atom, and obtain the input characteristics of all atoms within the truncated radius of the reference atom as all characteristic parameters of the reference atom according to the steps 1-3.

As a further improvement of the present invention, in the step 4), the fully-connected multi-layer perceptron neural network is a fully-connected network including multiple input layer nodes and multiple output layer nodes, and the input layer node values of the network are all characteristic parameters of the reference atom, and the output layer node values are forces in three directions applied to the reference atom.

As a further improvement of the present invention, in the step 4), a hyperbolic tangent function is used as the activation function in the hidden layer of the fully-connected multi-layer perceptron neural network, the function is processed by using a coordinate rotation calculation method, and a linear function is used as the activation function in the output layer.

As a further improvement of the present invention, in the step 5), the determination method of the stress of all atoms in the system is to design parallel units by taking each atom as a reference atom in parallel, and each parallel unit obtains the corresponding stress of the atom as the stress of all atoms according to the steps 1 to 4.

As a further improvement of the invention, in the step 5), a new position of a certain atom in the system is represented as x1=x0+v1Dt, wherein x1Indicates the new absolute position of the atom, x0Representing the original absolute position of the atom, dt represents the runtime of the system,indicates the new movement velocity, v, of the atom0The initial velocity of the atom is represented, f represents the force borne by the atom, m represents the mass of the atom, and new positions of all atoms in the system can be obtained after all atoms are calculated according to the formula.

As a further improvement of the present invention, in the step 6), the position result of each calculation is recorded, and the position result of this time is used as the initial value of the next calculation, and the steps 1-5 are repeatedly executed, and finally the results of the molecular dynamics calculation are integrated.

Compared with the prior art, the invention has the beneficial effects that:

the invention provides a non-von Neumann architecture-based molecular dynamics calculation method, which aims at the problem of high complexity of the traditional density functional theory for calculating molecular dynamics, and realizes high-efficiency molecular dynamics calculation by using the non-von Neumann architecture on the basis of ensuring the calculation accuracy by constructing a neural network to fit the stress among atoms. Compared with the traditional method, the method has the characteristics of high precision and high efficiency.

Drawings

FIG. 1 is a general flow diagram of an implementation of the present invention;

FIG. 2 is a diagram of a non-von Neumann architecture based molecular dynamics computing system architecture as proposed by the present invention;

FIG. 3 is a diagram of a fully-connected multi-layered perceptron neural network framework;

FIG. 4 is a graph showing the comparison of the dynamic changes of bond length and bond angle after 100 molecular dynamics calculations of benzene ring molecules by the present invention;

FIG. 5 is a graph showing the comparative results of standard vibration mode analysis after 100 molecular dynamics calculations of water molecules by the present invention;

FIG. 6 is a graph showing the comparison of the time consumption of the molecular dynamics calculation using the conventional density functional theory, the molecular dynamics calculation using the neural network on the CPU, and the calculation of the present invention in the system environment with the same atomic number.

Detailed Description

The invention is described in further detail below with reference to the figures and specific examples of the specification.

Referring to fig. 1, the invention provides a molecular dynamics computation method based on a non-von neumann architecture, which includes firstly selecting an atom in a multi-atom system as a reference atom, and constructing a local coordinate environment of the reference atom according to an initial position of the atom; converting the global coordinate of each atom in the truncated radius of the reference atom into a local coordinate under the local coordinate environment of the reference atom; obtaining the input characteristics of each atom according to the local coordinates of each atom in the truncation radius of the reference atom, and using the input characteristics as all characteristic parameters of the reference atom; then inputting all characteristic parameters of the reference atoms into a fully-connected multi-layer perceptron neural network frame, and fitting to obtain the stress of the reference atoms; after the stress of all atoms in the system is solved in parallel, new positions of all atoms in the system are obtained according to the initial position, the speed and the stress of each atom; and (4) repeatedly executing the steps, recording the position result of each time, and finally integrating to obtain the result of the molecular dynamics calculation. Fig. 2 is a diagram of a non-von neumann architecture-based molecular dynamics computing system architecture proposed by the present invention. First, the control module maps the global coordinates x of all atoms in the system0Inputting a characteristic calculating module and calculating the corresponding initial speed v0An input integration module; next, a local coordinate environment is created by referencing a neighborhood of atoms, where global coordinates of all atoms within the truncation radius are converted to local coordinates, and all input features x 'of the referenced atoms are computed'0(ii) a All input features of the reference atom are MLP fittedThen, obtaining the stress f of the atom; finally, through an integral module, a new atomic coordinate x is obtained1And inputting the initial value into the control module again to be used as the initial value of the next calculation, and circulating the calculation.

The preferred implementation steps of the invention are as follows:

1. for a multi-atom system, selecting an atom as a reference atom, and constructing a local coordinate environment of the reference atom according to the initial position of the atom;

for a multi-atom system, the local coordinate environment of the selected reference atom is represented asWherein ez=ex×ey,dr12=r2-(r2·ex)·exIs calculated by Schmidt orthogonality1And r2Respectively representing vectors pointing from the reference atom to the first and second adjacent two atoms within the truncation radius of the reference atom, | r1I and | dr12Respectively representing the vector r1Sum vector dr12Die length of (2).

2. Converting the global coordinate of each atom in the truncated radius of the reference atom into a local coordinate under the local coordinate environment of the reference atom;

the local coordinate of each atom in the reference atom truncation radius under the reference atom local coordinate environment A is expressed asWhereinIs referenced to an atom R within the truncation radius of the atomiGlobal coordinate of (2), xi,yi,zi) Is the atom RiThe converted local coordinates.

3. Obtaining the input characteristics of each atom according to the local coordinates of each atom in the truncation radius of the reference atom, and using the input characteristics as all characteristic parameters of the reference atom;

truncating a reference atom by an atom R within a radiusiIs expressed asWherein xi,yiAnd ziEach represents an atom RiThe values in the three directions of the local coordinates,representing the sum of the squares of the vectors in which the atoms lie.

The method for determining all characteristic parameters of the reference atom is to sort all atoms in the truncation radius of the reference atom according to the relative distance between the atoms and the reference atom, and to obtain the input characteristics of all atoms in the truncation radius of the reference atom according to the steps 1-3, wherein the input characteristics are used as all characteristic parameters of the reference atom.

4. Inputting all characteristic parameters of the reference atoms into a fully-connected multi-layer perceptron neural network frame, and fitting to obtain the stress of the reference atoms;

as shown in fig. 3, the fully-connected multi-layer perceptron neural network is a fully-connected network including multiple input layer nodes and multiple output layer nodes, and the input layer node values of the network are all characteristic parameters of a reference atom, and the output layer node values are forces in three directions borne by the reference atom.

The hidden layer of the fully-connected multilayer perceptron neural network uses a hyperbolic tangent function as an activation function, the function is processed in a coordinate rotation calculation mode, and the output layer uses a linear function as the activation function.

5. Obtaining the stress of all atoms in the system according to the steps 1-4, and obtaining new positions of all atoms in the system according to the initial position, the speed and the stress of each atom;

the method for determining the stress of all atoms in the system is to design parallel units by taking each atom as a reference atom in parallel, and each parallel unit obtains the corresponding stress of the atoms as the stress of all atoms according to the steps 1-4.

The new position of a certain atom in the system is represented as x1=x0+v1Dt, wherein x1Indicates the new absolute position of the atom, x0Representing the original absolute position of the atom, dt represents the runtime of the system,indicates the new movement velocity, v, of the atom0The initial velocity of the atom is represented, f represents the force borne by the atom, m represents the mass of the atom, and new positions of all atoms in the system can be obtained after all atoms are calculated according to the formula.

6. Repeatedly executing the steps 1-5, recording the position result of each time, and finally integrating to obtain the result of molecular dynamics calculation;

and (3) recording the position result of each calculation, taking the position result of the time as the initial value of the next calculation, repeatedly executing the steps 1-5, and finally integrating to obtain the result of the molecular dynamics calculation.

FIG. 4 is a graph showing the comparison result of the dynamic changes of bond length and bond angle after 100 molecular dynamics calculations of benzene ring molecules are performed by the present invention, wherein a black curve is the calculation result of the present invention in FPGA, and a white curve is the calculation result of CPU, showing that the calculation result of the present invention is substantially fitted with CPU; FIG. 5 is a graph of the comparison result of the standard vibration mode analysis after the molecular dynamics of water molecules are calculated for 100 times by the present invention, the black curve is the calculation result of the present invention in FPGA, and the white curve is the calculation result of CPU, so that the present invention can achieve the purpose of calculating the molecular dynamics with high precision; fig. 6 is a graph showing the results of molecular dynamics calculation using the conventional density functional theory, molecular dynamics calculation using a neural network on a CPU, and time-consuming comparison of the present invention in the system environment with the same atomic number, and it can be seen that the present invention can accelerate the molecular dynamics calculation using the neural network on the CPU by 2 orders of magnitude and can accelerate the molecular dynamics calculation using the conventional density functional theory by 6 orders of magnitude, thereby showing the high calculation efficiency of the present invention.

While the foregoing specification illustrates and describes embodiments of the invention in its application, it is to be understood that the invention is not limited to the precise form disclosed herein and that modifications and other embodiments are not to be considered as exclusive of other embodiments, but may be used in various other combinations, modifications and environments and is capable of changes within the scope of the inventive concept as expressed herein, commensurate with the above teachings, or the skill of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种轻烃与甲醇耦合反应的动力学建模方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!