使用格式: minimize(命令名) tolerance(误差限) maxiter ( )maxeval( )
说明:tolerance = stopping tolerance停止公差、容差
maxiter = 优化器的最大叠代次数(max iterations of minimizer)
maxevel = 总的( 力/能 )评估值的最大个数(max number of total force/
energy evalutions)
例子:
minimze 1.0e-4 100 1000
描述:
该命令用来执行一个系统的能量的最小化(energy minimization),通过调整每个原子的原子坐标。使用的优化算法由命令
min_style设置。能量最小化命令可以被和run命令交替使用(interspersed),在松弛和动力学之间分布(Minimize
commands can be interspersed with run commands to alternate between
relaxation and dynamics.)。
最小化器 are implemented in a robust fashion坚固的方式 that should allow for
systems with highly overlapped atoms (large energies and forces) to
still be minimized by pushing the atoms off of each other.(通过推开每个原子,使得即
使有重叠的原子(具有高的能量和力)仍然可以优化,因为算法是很强壮的。不知道这样翻译对不对,这句太难理解了。
最优化器involves包括一个外部迭代循环outer iteration loop(用以设置搜索迭代方向,在这个方向上坐标被改变),内部的迭
代使用一个线搜索算法(An inner iteration is then performed using a line search
algorithm. T)。线搜寻专门评估力和能量(几次),以设置新的坐标。最小化器在满足下列的任何一个准则的时候停止:
* the change in energy between outer iterations is less than the
tolerance
* 外部迭代的能量的改变小于容许限的时候
* the number of outer iterations exceeds maxiter
* 外部迭代超出最大迭代次数
* the number of force evaluations exceeds maxeval
* 力评估次数超限
* the 3N dimensional force vector goes (nearly) to zero
* 三维力矢量接近与零
对第一个准则,指定的误差是无单位的。当能量delta(即能量之差吧)对能量的幅度magnitude的比等于容差限的时候满足。(e.g. 在上面
的例子中为one part in 1.0e4,某分之一)
在优化期间,外层的迭代次数被当做一个时间步。输出是被这个时间步触发的。即动力学输出或者dump和restart文件等。Output is
triggered by this timestep, e.g. thermodynamic output or dump and
restart files.
For optimal convergence对优化收敛性,pair_style最好在能量和力的截断距离上是光滑到零的,尽管不是必须的,但是是
最好使用。例子包括了pair/lj/charmm/coul/charmm and pair/lj/charmm/coul/long.。如果一个
软势函数被使用,则Astop值用来做预先因子(不和时间有关)If a soft potential is used the Astop
value is used for the prefactor (no time dependence).有点晕户,希望明白的后面之解释一
下。
在优化期间,只有施加了力约束的fix(操作)才被调用。目前的执行表列出:The list of the currently
implemented ones include fix addforce, aveforce, enforce2d, indent,
lineforce, planeforce, setforce, and wall/lj93。
注意indent和wall/lj93有一个联合势能。如果你希望这个能量被包括在系统的总势能中,(属性量正在优化的系统),你必须使得
fix_modify命令的能量energy选项对这个fix有效。 you must enable the [url=file:///D:/
My%20Documents/桌面/lammps-11Sep06/doc/fix_modify.html]fix_modify[/url]
energy option for that fix.
接着优化器的是一个统计的特征总结被打印出来,其中有能量的变化,收敛准则信息等。
限制:这里列出来的两个特征还不能做。万一,以防,in case,有些人知道怎么写代码。
两个不能被最优化器调用的fix分别是fix_shake和fix_rigid。
It is an error to usefix shake with minimization because it turns off
(关闭)bonds that should be included in the potential energy of the system
(应当被包括在系统势能汇总的键). The effect of a fix shake can be approximated (近似)
during a minimization by using stiff spring constants for the bonds
and/or angles that would normally be constrained by the SHAKE
algorithm.
Fix rigid is also not supported by minimization. It is not an error to
have it defined(?????), but the energy minimization will not keep the
defined body(s) rigid (不能保持定义的刚体???)during the minimization.
Note that if bonds, angles, etc internal to a rigid body have been
turned off (e.g. via neigh_modify exclude), they will not contribute
to the potential energy which is probably not what is desired(可能就不符合实际情
况的意思吧).
The volume of the simulation domain is not allowed to change (不许改变)
during a minimzation. Ideally理想的 we would allow a fix such as npt to
impose an external pressure that would be included in the minimization
(i.e. allow the box dimensions to change), but this has not yet been
implemented.
88888888888888888888888888888888888888
下面的是老版本文字的说明
The effect of a fix shake can be approximated近似 during a minimization
by using stiff spring constants刚性弹簧常数 for the bonds and/or angles that
would normally通常,正常 be constrained by the SHAKE algorithm.
在最小化期间,模拟域的体积是不容许改变的。理想的,我们容许诸如npt的操作fix 来施加一个外部的压力(将被包含在优化器中),即容许模拟盒子的
纬度改变,但是这个部分还没有实现。()The volume of the simulation domain is not allowed
to change during a minimzation. Ideally we would allow a fix such as
npt to impose an external pressure that would be included in the
minimization (i.e. allow the box dimensions to change), but this has
not yet been implemented
相关命令min_modify min_style run_style
默认:无
min_style command 最小化类型命令格式:min_style style
* style = cg or cg/fr or sd
例子
min_style cgmin_style sd 描述:选择一个最小化算法,为minimize命令的执行。
类型cg是共轭梯度算法(CG)的Polak_Ribiere(PR)版本)
At each iteration 在每个叠代中,the force gradient is combined with the
previous iteration information 联合前一个叠代的信息to compute a new search
direction以计算一个新的搜索方向, perpendicular (conjugate) to previous search
directions.和前一个方向是正交的(共轭)。
The PR variant变化(变量) affects how the direction is chosen 方向如何选择and how
the CG method is restarted CG方法如何被重启,when it ceases to make progress当为了
进一步而停止的时候. The PR variant is thought to be the most effective CG
choice.
Style cg/fr is the Fletcher-Reeves version of the conjugate gradient
algorithm. 共轭梯度算法的另一个版本
Style sd is a steepest descent algorithm最速降线法,. At each iteration, the
downhill direction 下降方向corresponding to the force vector (negative
gradient of energy) is searched along by a 1d line search沿一个一维线查找.
Typically, steepest descent will not converge 不收敛as quickly as CG, but
may be more robust in some situations.
限制 无
相关命令min_modify minimize
默认:min_style cg
min_modify command
格式:min_modify keyword values ...
* one or more keyword/value pairs may be listed (变量)
· keyword = linestyle or dmin or dmax or
lineiter·
linestyle value = secant正割 or scan
· dmin value = min
· min = minimum distance for line search to move
(distance units)·
dmax value = max
· max = maximum distance for line
search to move (distance units)·
lineiter value = N
· N = max number of iterations in a
line search
Examples:
min_modify linestle scan dmin 0.001 dmax 0.2min_modify lineiter 5
Description:
This command sets parameters 设置参数that affect the minimization
algorithms. The various settings 不同的设置may effect the convergence rate收敛
速率 and overall number of force evaulations required by a minimization整个
力计算的次数, so users can experiment with these parameters to tune协调 their
minimizations.
The linestyle sets the algorithm used for 1d line searches一维线查找 at
each outer iteration of the minimizer.
The secant style uses two successive force/energy evaluations两个继承的 to
create a parabola抛物线 and pick its minimum as an estimate of the next
iteration's 1d minimum选择最小值做为下一次叠代的一维最小的估计值. The scan style starts its
1d search at dmin 开始一维搜索在一个维度上and doubles加倍 the distance along the
line at which the energy is computed until the minimum is passed直到能量超
过. It continues only as far as dmax. Normally通常, the secant method
should find more accurate 1d minimums in less iterations, but the scan
method can be more robust.
The dmin and dmax settings are both used by the scan line search as
described above. For the secant line search, only the dmin value is
used to pick an initial point to begin the secant approximation.
The lineiter setting is used by the secant algorithm to limit its
iterations叠代. The smaller the setting, the more inaccurate 越不准确the
line search becomes.
Nonlinear conjugate gradient is not thought to require high-accuracy
line searches in order to converge efficiently收敛效率.
限制: none
相关命令]min_style minimize
默认:The option defaults are linestyle = secant, dmin = 1.0e-5, dmax =
0.1, and lineiter = 10.
关于优化的一点群讨论
谁对能量最小化熟悉阿,可以问问
崔_哈工大 21:06:00
好像就是一种优化吧
研盟♀LAMMPS 21:07:22
我现在知道lammps中提到一个是所谓的优化算法有cg和sd等方法。涉及的还需要考虑具体的执行中对于收敛准则的考虑以及内外循环参数的设置
崔_哈工大 21:08:10
我一般都是先最速下降,然后共轭梯度
研盟♀LAMMPS 21:10:21
还有lammps提到说最优化可以和模拟交替进行,以完成松弛和动力学效应。是什么意思,你为什么要用两种优化算法,先后计算是处于什么考虑呢
崔_哈工大 21:12:06
最速开始比较块,后来就慢了,共轭后面也比较块,而且共轭对系统要求比较高,最速低一些,所以就这么结合着用了
研盟♀LAMMPS 21:12:36
也可以一直用某个算法优化到底吧
崔_哈工大 21:12:53
可以
崔_哈工大 21:12:58
就是慢一些
再上征程 21:16:13
崔_哈工大,请问你用共轭梯度法是控制那些参数来使系统能量最低的?只是能量么
研盟♀LAMMPS 21:16:24
有这么一句,为了最优化收敛性,对势在截断距离应该平滑的趋于0,尽管不是必须的,但是因为能量和力应该被用到。对于软势的使用,也要有特殊处理?这个
怎么理解
崔_哈工大 21:17:18
是不是很弱啊
崔_哈工大 21:17:52
你说的太具体了,我没仔细考虑过这个
研盟♀LAMMPS 21:18:19
主要是我对优化原理不明白
崔_哈工大 21:18:50
其实,我觉得最优化的用处
崔_哈工大 21:19:03
大部分是在无定形态
崔_哈工大 21:20:05
或者聚合物,这样的材料没有固定的形态,所以我们不知道它们的稳定状态,才需要用最优
崔_哈工大 21:20:31
一般我做的都是晶体,本身知道原子的排布的
崔_哈工大 21:20:43
所以是可以不用最优的
研盟♀LAMMPS 21:21:57
考虑到表明能不是应该做优化吗
再上征程 21:22:47
对啊,初始结构建立后是要用共轭梯度法做静态驰豫的
研盟♀LAMMPS 21:22:50
这里的能量应该指总能量还是势能
研盟♀LAMMPS 21:23:19
表明能应该在优化的时候没有考虑吧,目前所有的算法中
崔_哈工大 21:24:10
我做的时候是只考虑势能
崔_哈工大 21:24:30
动能和温度有关,最优的时候,其实是认为0k的
崔_哈工大 21:24:43
什么是静态弛裕啊
再上征程 21:25:02
我问过lammps,共轭梯度法跟温度无关
再上征程 21:25:18
共轭梯度法就是静态驰豫的一种方法
再上征程 21:25:44
抱歉,是跟系综无关
崔_哈工大 21:26:09
能讲讲静态弛裕吗,不是很清楚
崔_哈工大 21:27:47
静态驰豫
再上征程 21:28:26
我只是知道在lammps中cg和sd是两种静态驰豫的方法,是跟nvt或npt的动态驰豫相对应的,在文献中看到静态驰豫似乎并不会发生剧烈的晶体结
构变化,其他的自己也不是很清楚了
大漠一滴水 21:29:17
是否是不考虑运动的因素,只考虑粒子间的相互作用势能?静态驰豫是一种搜索新位置以使势能最小?而动力学是按照动力学的流程图来控制粒子的运动的
大漠一滴水 21:30:06
谁有这两种算法的详细介绍资料吗?
崔_哈工大 21:30:37
呵呵,我还头一次知道静态弛裕呢
崔_哈工大 21:30:45
嘿嘿,以前从来没注意过
再上征程 21:32:31
《计算方法》中似乎有一点这方面的资料,但不是针对MD的
研盟♀zingo 21:32:54
niu
东 21:34:21
这两种算法的全称是什麽?
再上征程 21:35:33
《计算方法》里面是纯数学和计算的介绍,只能当作一个简单的介绍,如果谁有针对MD的一定要推荐一下啊
研盟♀LAMMPS 21:35:49
似乎这样解释最好,所谓静态驰豫就是仅仅考虑势能,使得能量在最小状态,计算的过程仅仅参考原子的位置变化。而所谓动态驰豫就是动力学模拟过程,这个包
括动能和势能之间的转化,已经算是实际的模拟过程了。
再上征程 21:36:13
conjugate gradient: 共轭梯度
大漠一滴水 21:36:36
所谓动态驰豫就是动力学模拟过程,同意lammps
研盟♀LAMMPS 21:36:37
前者用于寻求稳定的结构和初始构型,而后者是动力学过程,针对于平衡态问题
再上征程 21:36:38
独孤求败 21:41:45
呵呵,刚才的讨论没怎么看明白
lammps怎么 来完成静态弛豫呀?
thermodynamics equilibrium 与kineticequilibrium 有啥区别亚?
鄙人认为是指,热力学平衡和动力学平衡,热力学平衡是指体系自由能变化为零或者体系自由能不变.动力学平衡是指体系内不存在梯度,一般是指化学势相等,
嘿嘿
blueboy(50316512) 08:49:11
考博面试时还需要简历?
叶随风舞(79579965) 09:16:41
热力学平衡包括热学平衡(温度一致),力学平衡(受力情况一致)及化学平衡