Suche Bilder Maps Play YouTube News Gmail Drive Mehr »
Anmelden
Nutzer von Screenreadern: Klicke auf diesen Link, um die Bedienungshilfen zu aktivieren. Dieser Modus bietet die gleichen Grundfunktionen, funktioniert aber besser mit deinem Reader.

Patentsuche

  1. Erweiterte Patentsuche
VeröffentlichungsnummerCN103279645 A
PublikationstypAnmeldung
AnmeldenummerCN 201310154296
Veröffentlichungsdatum4. Sept. 2013
Eingetragen28. Apr. 2013
Prioritätsdatum28. Apr. 2013
Auch veröffentlicht unterCN103279645B
Veröffentlichungsnummer201310154296.8, CN 103279645 A, CN 103279645A, CN 201310154296, CN-A-103279645, CN103279645 A, CN103279645A, CN201310154296, CN201310154296.8
Erfinder孟小华, 郑冬琴, 宁蓉, 钟伟荣
Antragsteller暨南大学
Zitat exportierenBiBTeX, EndNote, RefMan
Externe Links:  SIPO, Espacenet
Carbon nano tube molecular dynamics simulation method based on GPU parallel computation
CN 103279645 A
Zusammenfassung
The invention discloses a carbon nano tube molecular dynamics simulation method based on GPU parallel computation. The method includes the following steps: (1) structuring a carbon nano tube system model composed of carbon nano tubes and C60 molecules through database files; (2) stressing the C60 molecules so that the C60 molecules can oscillate back and forth at an equilibrium position, wherein when the C60 molecules are in an equilibrium state, the positions and speeds of carbon particles on the walls of the carbon nano tubes and the positions and speeds of the C60 molecules are made to change; (3) dividing the carbon nano tubes into a plurality of layers of computing units on a CUDA platform, performing round robin computation by the utilization of a CPU traversal computing unit to obtain a parallel computation queue, and scheduling a stream processing unit of a GPU to perform parallel computation and processing; (4) executing the step (3) repeatedly, finally outputting the motion trajectory of the C60 molecules along with simulation time, drawing a curve chart of temperature change along with energy transmission in the carbon nano tubes, and completing the simulation process. The carbon nano tube molecular dynamics simulation method based on the GPU parallel computation promotes computing efficiency of molecular dynamics simulation.
Ansprüche(6)  übersetzt aus folgender Sprache: Chinesisch
1.基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于包括以下步骤: 1)由数据库文件构造碳纳米管系统模型,该模型由碳纳米管和设置在碳纳米管内部的C60分子组成,对模型进行初始化,读取模型中所有粒子的速度和位置坐标; 2)C60分子受到碳纳米管管壁上碳粒子产生的力,在平衡位置上来回振动,当C60分子处于平衡状态时,在碳纳米管的前、后两端同时分别设置不同温度的条件进行模拟,并设定模拟时间,使碳纳米管管壁上碳粒子和C60分子的速度和位置不断发生变化,进而使C60分子的受力、运动状态和能量不断发生变化; 3)在CUDA平台上对碳纳米管进行分割,分割成多层相互独立的计算单元,采用CPU遍历计算单元进行轮转计算得到可并行运算队列,再调度GPU的流处理单元,采用Verlet算法进行并行运算和处理; 4)重复执行步骤3),直至模拟时间结束,采用数据库文件记录相关数据,输出C60分子随着模拟时间的运行轨迹,并描绘碳纳米管内随着能量传递的温度变化曲线图,完成仿真过程。 1. GPU parallel computing molecular dynamics simulation method based on carbon nanotubes, comprising the following steps: 1) from the database file structure of carbon nanotubes system model, which is provided inside the carbon nanotubes and carbon nanotube C60 molecules, the model initialization, speed and position coordinates of all the particles in the model read; 2) C60 molecules on the walls of carbon nanotubes by the force generated by the carbon particles, vibrating back and forth in a balanced position, when the C60 molecules are in equilibrium When, before the carbon nanotubes, are provided at both ends after the same time at different temperatures to simulate the conditions and set the simulation time, so that the speed and position of the walls of carbon nanotubes of carbon particles and C60 molecules are constantly changing, and thus make Force C60 molecules, motion and energy is changing; 3) on CUDA platform for carbon nanotubes is divided, split into multi-independent computing unit, calculation using the CPU traversing unit rotate calculated in parallel computing queue then scheduling GPU stream processing unit, Verlet algorithm using parallel computing and processing; 4) Repeat steps 3), until the end of the simulation time, the use of the database file records data, output C60 molecule with the running track simulation time, and With the temperature inside the carbon nanotube depicting a graph of energy transfer, complete simulation process.
2.根据权利要求1所述的基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于:所述碳纳米管为层状中空结构,由多个六边形碳环结构组成;所述C60分子有一个或多个。 The molecular dynamics simulation method based on carbon nanotubes parallel GPU computing according to claim 1, wherein: said carbon nanotubes are layered hollow structure, a plurality of hexagonal carbon ring structures; the said C60 molecule has one or more.
3.根据权利要求1或2所述的基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于:所述步骤2)中,采用Gaussian热浴模拟法在碳纳米管的前、后两端分别设置不同温度的热浴条件,并设定热浴时间作为模拟时间。 3. The carbon nanotube molecular dynamics simulation method GPU-based parallel computing 1 or 2 of the preceding claims, wherein: the step 2), using Gaussian hot bath simulation of carbon nanotubes before, after are provided at both ends of a hot bath at different temperatures, and set a hot bath time as an analog time.
4.根据权利要求3所述的基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于:所述步骤3)中,采用CPU遍历计算单元进行轮转计算具体如下: a)若所有粒子均已作为中心计算粒子,跳到步骤h); b)按次序找到第一个非竞争粒子并没有按中心计算的粒子,加入可并行运算队列; c)标记该粒子的所有近邻为本并行队列一度不可并行粒子,若近邻已经是二度不可并行粒子,则提升为一度不可计算; d)标记该粒子所有次邻为本并行队列二度不可并行粒子,若次邻为一度不可并行粒子,则不修改其度数; e)标记本粒子为已按中心计算粒子; f)是否已遍历到粒子队尾? The carbon nanotube molecular dynamics simulation method based GPU parallel computing according to claim 3, wherein: the step 3), using CPU computing units traversing calculated specific rotation follows: a) If all particles are calculated as the central particle, skip to step h); b) sequentially to find the first non-competitive and not particle by particle center computing, parallel computing can join the queue; all neighbors c) Mark the particles oriented parallel queue It was not parallel particle, if the neighbor is already the second time not parallel particle, once the upgrade is incalculable; d) mark all times of the particles oriented parallel adjacent non-parallel particle queue the second time, if the time was not adjacent to parallel particle, then do not modify its degree; e) of the particles labeled particles have been calculated according to the center; f) whether the particles traversing the tail? 若是继续执行,若否跳到步骤a); g)下一个可并行队列开始,返回步骤b); h)结束。 If proceed, if not skip to step a); g) under a parallel queues began to return to step b); h) end.
5.根据权利要求4所述的基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于:所述步骤3)中,采用Verlet算法进行并行运算和处理具体如下: a)按碳纳米管系统模型所有粒子的位置,计算近邻粒子以及次邻粒子间的键关系和角度关系; b)调度GPU的流处理单元,并行计算被分割在不同计算单元里的粒子,并积累计算碳纳米管管壁上内每个粒子与其近邻粒子的相互作用力; c)根据C60分子所在区域,计算C60分子内每个粒子与其所在碳纳米管区域中的每个粒子的相互作用力;d)根据粒子所受到的力及其速度,更新粒子位置,再执行步骤b)和c); e)根据粒子所受到的力,计算粒子本次速度及碳纳米管前、后两端热浴的热流值; f)若达到循环频数,则计算结束;否则,在CPU端间隔保存粒子的数据,返回步骤d)。 According to claim GPU parallel computing molecular dynamics simulation method based on carbon nanotubes, wherein 4 wherein: the step 3), using the Verlet algorithm for parallel computing and processing as follows: a) Press nanocarbon Location tube system model all the particles, calculated key relationships and angles neighboring particles, and second neighbor relations between the particles; b) scheduling GPU stream processing units, parallel computing is divided in different computing unit inside the particle, and the accumulation of carbon nanotubes computing c) based on the region where the C60 molecules, each particle of C60 nanotubes within the computing area where every interaction with its particles;; each interaction of particles within the particle and its neighbor on the wall d) according to the particle The force and speed by updating the particle position, and then steps b) and c); e) according to the force by the particles, the particles before calculating this speed and carbon nanotubes, both ends of the hot bath after a heat flow; f) If the final cycle frequency, then the calculation is finished; otherwise, the data stored in the CPU side interval particle returns to step d).
6.根据权利要求5所述的基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于:所述步骤3)中,Verlet算法具体设计如下: a)将x(t+At)和x(t-At)进行泰勒展开如下式所示: According to claim GPU-based parallel computing nanotube molecular dynamics simulation method of claim 5, characterized in that: the step 3), Verlet algorithm specifically designed as follows: a) Set x (t + At) and x (t-At) Taylor expand the following formula:
Figure CN103279645AC00031
其中,x(t+At)表示为前一时刻的位置,x(t-At)表示为后一时刻的位置; b)将式(I)和式(2)相加,得到位置表达式如下: Wherein, x (t + At) is represented as the position of the previous time, x (t-At) is represented as a position after a time; b) of formula (I) and formula (2) are added, the following expression is obtained position :
Figure CN103279645AC00032
在已知碳纳米管系统模型粒子当前时刻t的位置和加速度,以及前一时刻t_A的位置的情况下,推算出下一时刻t+At的位置; c)将式(I)和式(2)相减,再两边同时除以2 At,获得速度的表达式如下: In the known carbon nanotubes model particle current position and time t the position and acceleration, as well as the previous time t_A case, calculate the next time t + At position; c) of the formula (I) and (2 ) subtraction, then both sides at the same time divided by 2 At, get speed expression is as follows:
Figure CN103279645AC00033
在已知碳纳米管系统模型粒子前一时刻t- A t的位置和后一时刻t+ A t的位置的情况下,推算出当前时刻t的速度V (t); d)由式(I)〜(4),在已知粒子t-2 At时刻的位置、t-At时刻的位置和t-At时刻的加速度的情况下,启动Verlet算法进行积分:根据t_2 A t时刻的位置、t_ A t时刻的位置和t- A t时刻的加速度,将t = t- A t代入式(3),获得当前时刻t的位置;根据当前时刻t的位置,基于一定的势函数更新当前时刻t的加速度;同时,根据当前时刻t的位置和t-2 A t时刻的位置,将t = t- A t代入式⑷,更新t- A t时刻的速度;即得到粒子当前时刻t的位置、t-At时刻的速度和t时刻的加速度,重复执行该步骤。 In the known system model particle nanotubes t + A t the case at a position t- A t the position and after a time the previous time, the current time t is calculated velocity V (t); d) represented by the formula (I) ~ (4), the position of the particle in the known t-2 At time, t-At the time when the position and time t-At acceleration start points Verlet algorithm: t_2 A t time according to the position, t_ A t time position and t- A t the time of acceleration, the t = t- A t into the equation (3) to obtain the current position at time t; t the current time position, based on certain potential function updates the current time t acceleration; Meanwhile, according to the current location and time t t-2 A t the time position of the t = t- A t into equation ⑷, t- A t time update rate; i.e. particles obtained current position at time t, t -At the time of the speed and acceleration at time t, repeat this step.
Beschreibung  übersetzt aus folgender Sprache: Chinesisch

基于GPU并行运算的碳纳米管分子动力学仿真方法 GPU-based parallel computing nanotube molecular dynamics simulation method

技术领域 Technical Field

[0001] 本发明涉及一种碳纳米管分析动力学仿真方法,尤其是一种基于GPU并行运算的碳纳米管分子动力学仿真方法,属于仿真技术领域。 [0001] The present invention relates to a carbon nanotube dynamics simulation analysis method, especially a GPU parallel computing molecular dynamics simulation of carbon nanotubes, which belongs to the field of simulation-based technology.

背景技术 Background

[0002] 在碳纳米管分子动力学仿真过程中,由于其运算中涉及超大规模的分子量及大量的复杂的浮点运算,使得碳纳米管分子动力学模拟需要极强的计算能力。 [0002] In the carbon nanotube molecular dynamics simulation, because of its large scale operation involving molecular weight and a large number of complex floating-point operations, so that the carbon nanotube molecular dynamics simulation requires strong computing power. 因为碳纳米管由大量分子构成,其模拟仿真中涉及大量的浮点运算,随着分子动力学仿真规模的扩大,仿真结果的可视化也非常重要。 Because the carbon nanotubes by a large number of molecules, which simulate a large number of floating-point operations are involved, along with the expansion of the molecular dynamics simulation of the scale, the visualization of the simulation results is also very important. 对于这些碳纳米管分子动力学模拟系统来说,提高仿真算法的浮点运算能力和并行计算能力具有重大作用。 For these carbon nanotube molecular dynamics simulation systems, simulation methods to improve floating point capability and the ability to have a significant role in parallel computing.

[0003] 在新兴的纳米工程领域,建立在连续介质基础上的宏观机理很难解释纳米工程中出现的一些特殊现象,因而分子动力学方法成为重要的研究手段之一。 [0003] In the emerging field of nanotechnology project, built on the basis of macro-continuum is difficult to explain the mechanism of special phenomena occurring in nano-engineering, molecular dynamics and thus become an important research tool. 碳纳米管分子动力学仿真,主要通过牛顿力学模拟碳纳米管体系的运动,在其不同状态时的数据集合中抽取数据样本,从而计算碳纳米管体系的构型积分,并以构型积分的结果为基础进一步计算碳纳米管体系的热力学量和其他宏观性质,从而高效仿真碳纳米管系统。 Molecular dynamics simulation of carbon nanotubes, mainly through the movement of carbon nanotubes Newtonian mechanics simulation system, taking data samples in the data set in its different state, to calculate the carbon nanotube configuration system integration, and integration of configuration Further calculation based on the results of the thermodynamic quantities of carbon nanotubes system and other macroscopic properties to efficiently simulate the carbon nanotube systems. 但碳纳米管分子动力学仿真算法受计算能力两大局限:其一是极小空间内包括极大量粒子,计算量极大;其二是为保证数值模拟稳定性,典型的分子动力学时间步长为飞秒(fs)级,对计算机性能要求高。 But carbon nanotubes by molecular dynamics simulation algorithm computing power two limitations: first, a very small space includes a very large number of particles, computationally intensive; the other is to ensure the stability of the numerical simulation, molecular dynamics typical of the time step length of femtoseconds (fs) level, high-performance requirements of the computer.

[0004] 受限于计算机性能的发展,为扩大仿真算法规模,国内外许多专家学者对分子动力学仿真算法做了大量研究。 [0004] limited to the development of computer performance, to expand the scale of simulation algorithms, many experts and scholars to study molecular dynamics simulation algorithm lot. 由最初扩大单机规模的串行算法,发展到现在通过将计算任务分配给多个CPU而扩大模拟规模的并行算法,可以模拟的规模由最初的几千个原子提高到上百万、上千万甚至到上亿个原子的规模。 From the initial expansion of the scale of single serial algorithm, developed by computing tasks now assigned to multiple CPU and expand the scale parallel simulation algorithm can simulate the size increase from the initial several thousand atoms to millions, tens of millions Even on the scale million atoms. 虽然CPU的计算能力已经非常强大,但对于具有实际意义的超大规模的模拟系统来说,其运行速度还远不能满足实际需求,而且对于其批量处理碳,单CPU的串行实现效率相对来说也比较低。 Although the computing power of the CPU has been very strong, but for very large-scale simulation system has practical significance, its speed also can not meet the actual demand, and batch processing for its carbon, single CPU serial achieve efficiency is relatively It is relatively low. 因此,大规模的碳纳米管分子动力学仿真算法需要进一步突破。 Thus, large-scale carbon nanotube molecular dynamics simulation algorithm requires further breakthroughs.

发明内容 DISCLOSURE

[0005] 本发明的目的是为了解决上述现有技术的缺陷,提供一种基于GPU并行运算的碳纳米管分子动力学仿真方法,该方法能大幅度提高碳纳米管的模拟规模,极大地提高分子动力学仿真的运算效率。 [0005] The object of the present invention is to solve the deficiencies of the prior art to provide a GPU parallel computing molecular dynamics simulation method based on carbon nanotubes, which can greatly improve analog scale carbon nanotubes, which greatly improved Molecular dynamics simulation of the operation efficiency.

[0006] 本发明的目的可以通过采取如下技术方案达到: [0006] The object of the present invention can be reached by taking the following technical solutions:

[0007] 基于GPU并行运算的碳纳米管分子动力学仿真方法,其特征在于包括以下步骤: [0007] GPU-based parallel computing nanotube molecular dynamics simulation method comprising the steps of:

[0008] I)由数据库文件构造碳纳米管系统模型,该模型由碳纳米管和设置在碳纳米管内部的C60分子组成,对模型进行初始化,读取模型中所有粒子的速度和位置坐标; [0008] I) constructed of carbon nanotubes by the database file system model, the model set by the C60 molecules inside carbon nanotubes and carbon nanotube composition, the model initialization, speed and position coordinates of all the particles in the model read;

[0009] 2)C60分子受到碳纳米管管壁上碳粒子产生的力,在平衡位置上来回振动,当C60分子处于平衡状态时,在碳纳米管的前、后两端同时分别设置不同温度的条件进行模拟,并设定模拟时间,使碳纳米管管壁上碳粒子和C60分子的速度和位置不断发生变化,进而使C60分子的受力、运动状态和能量不断发生变化; [0009] 2) C60 molecules on the walls of carbon nanotubes by the force generated by the carbon particles, vibrating back and forth in a balanced position, when the C60 molecules in equilibrium before carbon nanotubes are provided at both ends at the same time at different temperatures after The conditions were simulated, and set the simulation time, so that the speed and position of the walls of carbon nanotubes of carbon particles and C60 molecules are constantly changing, and thus make the force C60 molecules change the state of motion and energy continue to occur;

[0010] 3)在CUDA平台上对碳纳米管进行分割,分割成多层相互独立的计算单元,采用CPU遍历计算单元进行轮转计算得到可并行运算队列,再调度GPU的流处理单元,采用Verlet算法进行并行运算和处理,重复执行该步骤直至模拟时间结束; [0010] 3) on CUDA platform for carbon nanotubes is divided, split into multi-independent computing unit, calculation using the CPU traversing unit rotate calculated parallel computing queue, and then scheduling GPU's stream processing units, using Verlet algorithms for parallel computing and processing, repeat this step until the end of the simulation time;

[0011] 4)采用数据库文件记录相关数据,输出C60分子随着模拟时间的运行轨迹,并描绘碳纳米管内随着能量传递的温度变化曲线图,完成仿真过程。 [0011] 4) The database file records data, output C60 molecule with the running track simulation time, and paint inside the nanotubes change with temperature graph of energy transfer, complete simulation process.

[0012] 作为一种优选方案,所述碳纳米管为层状中空结构,由多个六边形碳环结构组成;所述C60分子有一个或多个。 [0012] As a preferred embodiment, the hollow carbon nanotubes layered structure, a plurality of hexagonal carbon ring structures; the C60 molecule has one or more.

[0013] 作为一种优选方案,所述步骤2)中,采用Gaussian热浴模拟法在碳纳米管的前、后两端分别设置不同温度的热浴条件,并设定热浴时间作为模拟时间。 [0013] As a preferred embodiment, the step 2), using Gaussian simulation method in a hot bath before carbon nanotubes are provided at both ends after a hot bath at different temperatures, and set the time as an analog thermal bath time .

[0014] 作为一种优选方案,所述步骤3)中,采用CPU遍历计算单元进行轮转计算具体如下: [0014] As a preferred embodiment, in step 3) above, using the CPU traversal cycle calculation unit calculated as follows:

[0015] a)若所有粒子均已作为中心计算粒子,跳到步骤h); [0015] a) If all the particles have been calculated as the central particle, skip to step h);

[0016] b)按次序找到第一个非竞争粒子并没有按中心计算的粒子,加入可并行运算队列; [0016] b) in sequence to find the first non-competitive and not particle by particle-centric computing, adding parallel computing queue;

[0017] c)标记该粒子的所有近邻为本并行队列一度不可并行粒子,若近邻已经是二度不可并行粒子,则提升为一度不可计算; All neighbors [0017] c) Mark the particles oriented parallel queue was not parallel particle, if the neighbor is already the second time not parallel particle, once the upgrade is incalculable;

[0018] d)标记该粒子所有次邻为本并行队列二度不可并行粒子,若次邻为一度不可并行粒子,则不修改其度数; [0018] d) mark all times of the particles oriented parallel adjacent non-parallel particle queue the second time, if the time was not parallel particle neighbors, not to modify its degree;

[0019] e)标记本粒子为已按中心计算粒子; [0019] e) mark of the particles have been calculated according to the core particle;

[0020] f)是否已遍历到粒子队尾? [0020] f) whether the particle has traversed the tail? 若是继续执行,若否跳到步骤a); If proceed, if not skip to step a);

[0021] g)下一个可并行队列开始,返回步骤b); [0021] g) start the next parallel queue, returning to step b);

[0022] h)结束。 [0022] h) end.

[0023] 作为一种优选方案,所述步骤3)中,采用Verlet算法进行并行运算和处理具体如下: [0023] As a preferred embodiment, step 3) above, using the Verlet algorithm for parallel computing and processing as follows:

[0024] a)按碳纳米管系统模型所有粒子的位置,计算近邻粒子以及次邻粒子间的键关系和角度关系; [0024] a) according to the positions of all the particles of carbon nanotubes model of key relationships and neighboring particles, and calculate the angular relationship between the particles adjacent times;

[0025] b)调度GPU的流处理单元,并行计算被分割在不同计算单元里的粒子,并积累计算碳纳米管管壁上每个粒子与其近邻粒子的相互作用力; [0025] b) scheduling GPU stream processing units, parallel computing is divided in different computing unit where the particles and calculate the interaction force on the accumulation of carbon nanotube walls of each particle and its neighbor particles;

[0026] c)根据C60分子所在区域,计算C60分子内每个粒子与其所在碳纳米管区域中的每个粒子的相互作用力; [0026] c) according to the area where the C60 molecule, calculated for each particle in the C60 molecule to its location in the area of carbon nanotubes each particle interaction;

[0027] d)根据粒子所受到的力及其速度,更新粒子位置,再执行步骤b)和c); [0027] d) based on particles by the force and speed, update the particle's position, then steps b) and c);

[0028] e)根据粒子所受到的力,计算粒子本次速度及碳纳米管前、后两端热浴的热流值; [0028] e) according to the force by the particles, the particles before calculating this speed and carbon nanotubes, both ends of the hot bath after a heat flow;

[0029] f)若达到循环频数,则计算结束;否则,在CPU端间隔保存粒子的数据,返回步骤d)。 [0029] f) If the final cycle frequency, then the calculation is finished; otherwise, the data stored in the CPU side interval particle returns to step d).

[0030] 作为一种优选方案,所述步骤3)中,Verlet算法具体设计如下: [0030] As a preferred embodiment, the step 3), Verlet algorithm specifically designed as follows:

[0031 ] a)将X (t+ A t)和X (t- A t)进行泰勒展开如下式所示:[0032] [0031] a) The X (t + A t) and X (t- A t) Taylor expansion by the following formula: [0032]

Figure CN103279645AD00061

[0034] 其中,x(t+At)表示为前一时刻的位置,x(t_ A t)表示为后一时刻的位置; [0034] where, x (t + At) is represented as the position of the previous time, x (t_ A t) represents the location after a time;

[0035] b)将式(I)和式⑵相加,得到位置表达式如下: [0035] b) of the formula (I) and formula ⑵ added to give the position expressed as follows:

[0036] [0036]

Figure CN103279645AD00062

[0037] 在已知碳纳米管系统模型粒子当前时刻t的位置和加速度,以及前一时刻tA的位置的情况下,推算出下一时刻t+At的位置; [0037] In the known carbon nanotube model particle system of the current position of the position and acceleration time t, and the previous time tA case, calculate the next time t + At position;

[0038] c)将式⑴和式⑵相减,再两边同时除以2 At,获得速度的表达式如下: [0038] c) the type and style ⑴ ⑵ subtraction, then both sides at the same time divided by 2 At, get speed expression is as follows:

[0039] [0039]

Figure CN103279645AD00063

[0040] 在已知碳纳米管系统模型粒子前一时刻t-At的位置和后一时刻t+ A t的位置的情况下,推算出当前时刻t的速度v(t); [0040] In known particle system model nanotubes previous time t-At and after a time position t + A t the position of the case under the current time t is estimated velocity v (t);

[0041] d)由式(I)〜(4),在已知粒子t-2 At时刻的位置、t-At时刻的位置和t-At时刻的加速度的情况下,启动Verlet算法进行积分:根据t_2 A t时刻的位置、t-At时刻的位置和t-At时刻的加速度,将t = t-At代入式(3),获得当前时刻t的位置;根据当前时刻t的位置,基于一定的势函数更新当前时刻t的加速度;同时,根据当前时刻t的位置和t-2 At时刻的位置,将t = t-At代入式(4),更新t-At时刻的速度;即得到粒子当前时刻t的位置、t- A t时刻的速度和t时刻的加速度,重复执行该步骤。 [0041] d) represented by the formula (I) ~ (4), the particles in the known time t-2 At the position, t-At the time when the position and time t-At acceleration start points Verlet algorithm: According t_2 A t time position, t-At time position and t-At the time of acceleration, the t = t-At substituting into equation (3), to obtain the current position at time t; according to the current time t of the position, based on a certain The potential function updates the current time t acceleration; Meanwhile, according to the current time t location and t-2 At time position, t = t-At substituting into equation (4), update t-At time rate; i.e., to obtain particles t the present time position, t- A t the time of the speed and acceleration at time t, repeat this step.

[0042] 本发明相对于现有技术具有如下的有益效果: [0042] The present invention relative to the prior art has the following beneficial effects:

[0043] 1、本发明采用数据库文件构造碳纳米球C60模型和碳纳米管结构模型,从而对碳纳米管分子动力学进行仿真,不仅方便计算,也便于构造多种不同模型进行比较,可移植性较高,并利用算法可以模拟足球状结构的C60分子在碳纳米管里的运行轨迹。 [0043] 1, the present invention uses a database file structure carbon nanospheres and nanotubes C60 model structure model, and thus the carbon nanotube molecular dynamics simulation, the calculation is not only convenient, but also easy to construct a number of different models are compared, portable higher and C60 algorithm can simulate the molecular structure of football in the carbon nanotube in the running track.

[0044] 2、本发明采用由NVIDIA公司发布的基于GPU的并行运算平台CUDA进行了图像处理,CUDA平台是一个基于C语言的基础架构,具备有大量高性能计算指令和良好的编程接口,可以极大地提高碳纳米管分子动力学仿真方法的效率。 [0044] 2, the present invention uses the NVIDIA GPU-based company released the CUDA parallel computing platform to perform image processing, CUDA platform is a C language-based infrastructure, with a large number of high-performance computing instructions and good programming interface, greatly improve the efficiency of carbon nanotubes by molecular dynamics simulation method.

[0045] 3、本发明通过CUDA平台可以对大型的碳纳米管系统模型进行分割,分割成多层大小适宜、相互独立且GPU能承受的计算单元,使得各算法在CUDA中并行运行,极大提高了碳纳米管分子动力学仿真方法的速度。 [0045] 3, the present invention is by CUDA platform large carbon nanotubes system model is divided, split into multiple layers suitable size, independent of each other and can withstand GPU computing unit, such that each algorithm is run in parallel CUDA, a great improve the carbon nanotube molecular dynamics simulation method speeds.

附图说明 Brief Description

[0046] 图1为本发明的C60分子示意图。 [0046] FIG. 1 C60 molecule schematic diagram of the present invention.

[0047] 图2为本发明的碳纳米管示意图。 [0047] FIG. 2 a schematic diagram of the present invention, the carbon nanotubes.

[0048] 图3为本发明构造的碳纳米管系统模型的结构示意图。 [0048] FIG. 3 a schematic structure of the carbon nanotube structure of the present invention system model.

[0049] 图4为本发明在CPU与GPU中碳纳米管分子动力学仿真的数据流框图。 [0049] Figure 4 is a block diagram of a data stream invention CPU and GPU molecular dynamics simulation of carbon nanotubes in.

[0050] 图5为本发明在CUDA环境下进行碳纳米管分子动力学仿真的流程示意图。 [0050] FIG. 5 is a schematic flow diagram of invention carbon nanotube molecular dynamics simulation in CUDA environment.

[0051] 图6为本发明基于GPU并行运算与传统的串行运算的运行时间对比图。 [0051] FIG. 6 of the present invention GPU-based parallel computing with the traditional serial computation running time comparison chart. 具体实施方式 DETAILED DESCRIPTION

[0052] 实施例1: [0052] Example 1:

[0053] 如图1〜图5所示,本实施例基于GPU并行运算的碳纳米管分子动力学仿真方法如下: [0053] As shown in Figure 1 ~ 5, the present embodiment is based on carbon nanotubes GPU parallel computing molecular dynamics simulation method is as follows:

[0054] I)在数据库文件中读取碳纳米管系统的参数条件,如初始温度、粒子数、密度时间等,构造碳纳米管系统模型MODl及参数模型M0D2,模型M0D2可以设置各种参数在模型MODl上使用,模型MODl如图1〜图3所示,由碳纳米管和设置在碳纳米管内部的一个足球状C60分子(由60个碳原子构成的分子,形似足球,又名足球烯)组成,所述碳纳米管为层状中空结构,管身是准圆管结构,由多个六边形碳环结构单元(由碳原子构成)组成,其直径一般在一到几十个纳米之间,长度则远远大于其直径,对该模型进行初始化,读取模型中所有粒子的速度和位置坐标; [0054] I) read nanotubes system parameters in the database file conditions such as initial temperature, particle number density of the time, the carbon nanotube structure model parameter model MODl and M0D2, model M0D2 can set various parameters Model MODl use the model shown in Figure 1 ~ 3 MODl, carbon nanotubes and carbon nanotubes disposed inside a football-shaped C60 molecule (molecule consists of 60 carbon atoms, and the shape of soccer, also known as football ene ) composed of the carbon nanotube structure is layered hollow tube body is a quasi-tube structure, a plurality of hexagonal carbon ring structural unit (composed of carbon atoms), whose diameter is generally one to several tens of nanometers between, the length is far greater than its diameter, the model initialization, speed and position coordinates of all the particles in the model read;

[0055] 2)C60分子受到碳纳米管管壁上碳粒子产生的力,在平衡位置上来回振动,当C60分子处于平衡状态时,采用Gaussian热浴法(约束温度调节方法),在碳纳米管两端同时分别设置不同温度的热浴条件,并设定热浴时间,使碳纳米管管壁上碳粒子和C60分子因平衡状态被打破而发生位置和速度的变化,而这些变化是相互影响的,具有传递性的,伴随着这些粒子位置和速度的变化,能量在长管状的碳纳米管系统内发生传递,由于C60分子位于碳纳米管内,其受力会随着碳纳米管组成粒子的位置改变而改变,因此伴随这能量传递的过程,C60分子的运动状态和能量也会发生改变; [0055] 2) C60 molecules on the walls of carbon nanotubes by the force generated by the carbon particles, vibrating back and forth in a balanced position, when the C60 molecules are in equilibrium, using Gaussian thermal bath (constraints temperature control method), carbon nano pipe ends simultaneously set different temperatures hot bath, hot bath and set the time, the carbon particles on the walls of carbon nanotubes and C60 molecules because equilibrium is broken and change the position and velocity of occurrence, and these changes are mutually impacts transitive, along with changes in the position and velocity of the particles, energy transfer occurs over a long tubular carbon nanotubes system, because C60 molecule is located within a carbon nanotube, its force would be composed of particles with carbon nanotubes The position change and change, so along with this energy transfer process, C60 molecular motion and energy may also change;

[0056] 采用Gaussian热浴法的基本原理是在运动方程中加入摩擦力fp并将其与粒子速度Vi联系起来,其受:力公式为: [0056] The basic principle of Gaussian thermal bath is to add friction fp in the equations of motion and Vi linked to the particle velocity, its subject: the force formula is:

[0057] fi = Hiai+ I HiVi [0057] fi = Hiai + I HiVi

[0058] 当平衡态时,系统温度不变,因此有dEk/dt = 0 [0058] When the equilibrium, the system temperature is constant, it is dEk / dt = 0

[0059]即有:Z vA =O [0059] that is: Z vA = O

I I

E fivi E fivi

[0060] 由此可得4 = ~^——T [0060] thereby obtain 4 = ~ ^ - T

m Vi m Vi

I I

[0061] 3)在CUDA平台上对碳纳米管进行分割,分割成多层大小适宜、相互独立的计算单元,分割原则是在避免过多重复计算的前提上提高并行度,即分割的计算单元必须合理粗细化,因为计算单元过大,则并行不明显,计算单元过小,会导致太多不必要的重复的计算; [0061] 3) on CUDA platform for carbon nanotubes is divided, split into multiple layers of suitable size, independent computing unit, division principle is to increase the degree of parallelism in the calculation to avoid excessive repetition premise computing unit that is divided must be of reasonable thickness, because the calculation unit is too large, obvious parallel calculation unit is too small, will cause too much unnecessary duplication of calculation;

[0062] 如图4所示,采用CPU遍历计算单元进行轮转计算得到n个可并行运算队列,如下: [0062] shown in Figure 4, using the CPU traversal cycle calculation unit may calculate the n parallel operation queue, as follows:

[0063] a)若所有粒子均已作为中心计算粒子,跳到步骤h); [0063] a) If all the particles have been calculated as the central particle, skip to step h);

[0064] b)按次序找到第一个非竞争粒子并没有按中心计算的粒子,加入可并行运算队列; [0064] b) in sequence to find the first non-competitive and not particle by particle-centric computing, adding parallel computing queue;

[0065] c)标记该粒子的所有近邻为本并行队列一度不可并行粒子,若近邻已经是二度不可并行粒子,则提升为一度不可计算; All neighbors [0065] c) Mark the particles oriented parallel queue was not parallel particle, if the neighbor is already the second time not parallel particle, once the upgrade is incalculable;

[0066] d)标记该粒子所有次邻为本并行队列二度不可并行粒子,若次邻为一度不可并行粒子,则不修改其度数; [0066] d) mark all times of the particles oriented parallel adjacent non-parallel particle queue the second time, if the time was not parallel particle neighbors, not to modify its degree;

[0067] e)标记本粒子为已按中心计算粒子; [0067] e) mark of the particles are particles have been calculated according to the center;

[0068] f)是否已遍历到粒子队尾? [0068] f) whether the particle has traversed the tail? 若是继续执行,若否跳到步骤a); If proceed, if not skip to step a);

[0069] g)下一个可并行队列开始,返回步骤b); [0069] g) start the next parallel queue, returning to step b);

[0070] h)结束; [0070] h) end;

[0071] 如图4和图5所示,调度GPU的流处理单元,采用Verlet算法进行并行运算和处理,如下: [0071] FIG. 4 and 5, the scheduling GPU's stream processing units, Verlet algorithm using parallel computing and processing, as follows:

[0072] a)按碳纳米管系统模型所有粒子的位置,计算近邻粒子以及次邻粒子间的键关系和角度关系; [0072] a) according to the positions of all the particles of carbon nanotubes model of key relationships and neighboring particles, and calculate the angular relationship between the particles adjacent times;

[0073] b)调度GPU的流处理单元,并行计算被分割在不同计算单元里的粒子,并积累计算碳纳米管管壁上每个粒子与其近邻粒子的相互作用力; [0073] b) scheduling GPU stream processing units, parallel computing is divided in different computing unit where the particles and calculate the interaction force on the accumulation of carbon nanotube walls of each particle and its neighbor particles;

[0074] c)根据C60分子所在区域,计算C60分子内每个粒子与其所在碳纳米管区域中的每个粒子的相互作用力(范德华力); [0074] c) according to the area where the C60 molecule, calculated within each particle interaction where carbon nanotubes C60 molecules to their area of each particle (van der Waals forces);

[0075] d)根据粒子所受到的力及其速度,更新粒子位置,再执行步骤b)和c); [0075] d) based on particles by the force and speed, update the particle's position, then steps b) and c);

[0076] e)根据粒子所受到的力,计算粒子本次速度及碳纳米管前、后两端热浴的热流值; [0076] e) according to the force by the particles, the particles before calculating this speed and carbon nanotubes, both ends of the hot bath after a heat flow;

[0077] f)若达到循环频数,则计算结束;否则,在CPU端间隔保存粒子的数据,返回步骤d)。 [0077] f) If the final cycle frequency, then the calculation is finished; otherwise, the data stored in the CPU side interval particle returns to step d).

[0078] 4)重复执行步骤3),直至热浴时间结束,采用数据库文件记录相关数据,输出C60分子随着模拟时间的运行轨迹,并描绘碳纳米管内随着能量传递的温度变化曲线图,完成仿真过程。 [0078] 4) Repeat steps 3) until completion of the thermal bath time, the use of the database file records data, output C60 molecule with the running track simulation time, and paint inside the nanotubes change with temperature graph of energy transfer, complete simulation process.

[0079] 所述步骤3)中,由于粒子间的作用力间距影响较大,必须设定一个距离临界值,以判断其位置关系,当粒子间的间距小于距离临界值,为近邻粒子,当粒子间的间距大于距离临界值,为次邻粒子,则认为其相互间的分子作用力可以忽略不计。 [0079] said step 3), since the distance between the particles force a greater impact, must be set a distance threshold, to determine its positional relationship, when the spacing between the particles is smaller than the distance threshold, the neighboring particles, when the spacing between the particles is greater than the distance threshold for the second adjacent particles, it is considered their mutual intermolecular forces are negligible.

[0080] 所述步骤3)中,Verlet算法具体设计如下: [0080] The step 3), Verlet algorithm specifically designed as follows:

[0081 ] a)将X (t+ A t)和X (t- A t)进行泰勒展开如下式所示: [0081] a) The X (t + A t) and X (t- A t) Taylor expansion by the following formula:

Figure CN103279645AD00081

[0084] 其中,x(t+At)表示为前一时刻的位置,x(t_ A t)表示为后一时刻的位置; [0084] where, x (t + At) is represented as the position of the previous time, x (t_ A t) represents the location after a time;

[0085] b)将式(I)和式⑵相加,得到位置表达式如下: [0085] b) of the formula (I) and formula ⑵ added to give the position expressed as follows:

[0086] [0086]

Figure CN103279645AD00082

[0087] 在已知碳纳米管系统模型粒子当前时刻t的位置和加速度,以及前一时刻tA的位置的情况下,推算出下一时刻t+At的位置; [0087] In the known carbon nanotube model particle system of the current position of the position and acceleration time t, and the previous time tA case, calculate the next time t + At position;

[0088] c)将式⑴和式⑵相减,再两边同时除以2 At,获得速度的表达式如下: [0088] c) the type and style ⑴ ⑵ subtraction, then both sides at the same time divided by 2 At, get speed expression is as follows:

Figure CN103279645AD00083

[0090] 在已知碳纳米管系统模型粒子前一时刻t-At的位置和后一时刻t+ A t的位置的情况下,推算出当前时刻t的速度v(t); [0090] In known particle system model nanotubes previous time t-At and after a time position t + A t the position of the case under the current time t is estimated velocity v (t);

[0091] d)由式(I)〜(4),在已知粒子t-2 At时刻的位置、t-At时刻的位置和t-At时刻的加速度的情况下,启动Verlet算法进行积分:根据t_2 A t时刻的位置、t-At时刻的位置和t-At时刻的加速度,将t = t-At代入式(3),获得当前时刻t的位置;根据当前时刻t的位置,基于一定的势函数更新当前时刻t的加速度,从而得到其受力;同时,根据当前时刻t的位置和t-2 A t时刻的位置,将t = t- A t代入式⑷,更新t- A t时刻的速度;即得到粒子当前时刻t的位置、t-At时刻的速度和t时刻的加速度(受力),重复执行该步骤。 [0091] d) represented by the formula (I) ~ (4), the particles in the known time t-2 At the position, t-At the time when the position and time t-At acceleration start points Verlet algorithm: According t_2 A t time position, t-At time position and t-At the time of acceleration, the t = t-At substituting into equation (3), to obtain the current position at time t; according to the current time t of the position, based on a certain The potential function updates the current time t of the acceleration to obtain its force; at the same time, according to the current location and time t t-2 A t the time of the position, t = t- A t into equation ⑷, update t- A t time speed; obtain particle current position at time t, t-At time t time speed and acceleration (force), repeat this step.

[0092] 如图6所示,可以看到本发明采用的GPU并行运算,其执行时间要远远小于传统的串行运算,因此,其仿真效率较之传统的串行运算有很大的提高。 [0092] As shown in Figure 6, you can see the present invention uses the GPU parallel computing, the execution time is much less than traditional serial operation, therefore, the simulation efficiency compared to conventional serial operation have greatly improved .

[0093] 实施例2: [0093] Example 2:

[0094] 本实施例的主要特点是:所述步骤I)中,设置在碳纳米管内部的C60分子可以为多个,其余同实施例1。 The main features of [0094] the present embodiment is: the step I),, C60 molecules inside the carbon nanotubes can be provided in a plurality, the rest in Example 1.

[0095] 以上所述,仅为本发明优选的实施例,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明所公开的范围内,根据本发明的技术方案及其发明构思加以等同替换或改变,都属于本发明的保护范围。 [0095] The above is only a preferred embodiment of the invention, but the scope of the present invention is not limited to this, within the scope of any skilled in the art in the art disclosed in the present invention, according to the techniques of the present invention programs and their equivalents or inventive concept to be changed, all belong to the scope of the present invention.

Patentzitate
Zitiertes PatentEingetragen Veröffentlichungsdatum Antragsteller Titel
CN102411658A *25. Nov. 201111. Apr. 2012中国人民解放军国防科学技术大学Molecular dynamics accelerating method based on CUP (Central Processing Unit) and GPU (Graphics Processing Unit) cooperation
US20120120077 *9. Jan. 201217. Mai 2012Greg ScantlenRecruiting additional resource for hpc simulation
Nichtpatentzitate
Referenz
1 *120024264: "GPU加速计算分子模拟", 《小木虫学术科研第一站》, 3 March 2011 (2011-03-03), pages 1 - 2
2 *EVA GONZALEZ NOYA ET AL.: "Thermal conductivity of carbon nanotube peapods", 《PHYSICAL REVIEW》, vol. 70, no. 11, 30 November 2004 (2004-11-30), XP080325933, DOI: doi:10.1080/00268970902784926
3 *JOSHUA A.ANDERSON ET AL.: "General purpose molecular dynamics simulations fully implemented on graphics processing units", 《JOURNAL OF COMPUTATIONAL PHYSICS》, no. 10, 31 October 2008 (2008-10-31), pages 5342 - 5359, XP022577514
4 *刘文志等: "分子动力学模拟中基于GPU的范德华非键作用计算", 《计算机与应用化学》, vol. 27, no. 12, 28 December 2010 (2010-12-28), pages 1607 - 1612
5 *陈慧: "单壁碳纳米管导热系数的分子动力学仿真", 《中国优秀博硕士学位论文全文数据库(硕士)工程科技I辑》, no. 4, 15 April 2007 (2007-04-15)
6 *陈飞国等: "复杂多相流动分子动力学模拟在GPU上的实现", 《中国科学》, vol. 38, no. 12, 31 December 2008 (2008-12-31), pages 1120 - 1128
Referenziert von
Zitiert von PatentEingetragen Veröffentlichungsdatum Antragsteller Titel
CN104535859A *19. Dez. 201422. Apr. 2015桂林电子科技大学Method for testing temperature characteristic of carbon nanometer pipe
CN104535859B *19. Dez. 20141. Sept. 2017桂林电子科技大学测试碳纳米管温度特性的方法
WO2017071315A1 *20. Juli 20164. Mai 2017百度在线网络技术(北京)有限公司Related content display method and apparatus
Klassifizierungen
Internationale KlassifikationG06T1/20, G06F19/00
Juristische Ereignisse
DatumCodeEreignisBeschreibung
4. Sept. 2013C06Publication
9. Okt. 2013C10Entry into substantive examination
25. Mai 2016C14Grant of patent or utility model