欢迎来到冰豆网! | 帮助中心 分享价值,成长自我!
冰豆网
全部分类
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • 党团工作>
  • ImageVerifierCode 换一换
    首页 冰豆网 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    LAMMPS讲课教案.docx

    • 资源ID:24945580       资源大小:36.19KB        全文页数:28页
    • 资源格式: DOCX        下载积分:3金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    LAMMPS讲课教案.docx

    1、LAMMPS讲课教案Minimize命令Minimize命令 使用格式: 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 描述: 该命令用来执行一个系统的能量的最小化(en

    2、ergy 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 overl

    3、apped 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 lin

    4、e 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 d

    5、imensional 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 restar

    6、t 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).有点晕户,希望明白的后面之解释一 下。 在优化期间,

    7、只有施加了力约束的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:

    8、/D:/ My%20Documents/桌面/lammps-11Sep06/doc/fix_modify.htmlfix_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 (关闭)bon

    9、ds 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 sup

    10、ported 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 cont

    11、ribute 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.

    12、 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 constra

    13、ined 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

    14、 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

    15、)版本) 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

    16、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 iterat

    17、ion, 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 mi

    18、n_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 dist

    19、ance 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 不同的设置

    20、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

    21、 secant style uses two successive force/energy evaluations两个继承的 to create a parabola抛物线 and pick its minimum as an estimate of the next iterations 1d minimum选择最小值做为下一次叠代的一维最小的估计值. The scan style starts its 1d search at dmin 开始一维搜索在一个维度上and doubles加倍 the distance along the line at which the energy is

    22、 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

    23、 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 t

    24、hought to require high-accuracy line searches in order to converge efficiently收敛效率.忘记谁写的了,是你的话来认领吧谈谈关于LAMMPS输出【Output】的问题无论任何模拟,我们都是想从模拟中得到我们想要的数据【data】,然后分析这些数据,从而提取出相关的信息【MAYBE新的发现】,那么数据的输出是 必然的一道程序,下面谈谈LAMMPS软件是如何输出data。 LAMMPS中处理的输出数据主要分一下三个大的部分: 1.断点数据,这个主要是为了防止模拟过程中出现意外,比如实验室或机房突然断电,程序部分阶段有错误等

    25、等。 2.系统热力学量的输出,这些量一般是体系中各个原子的集体行为量,比如温度,压强等 3.单原子详细信息的输出,如我们想得到的轨迹文件 对应于上面的三大部分,LAMMPS设置了不同的命令,有些命令结合在一起实现相关的功能。 1.对于断点数据,原始数据,LAMMPS主要有一下命令进行数据的输入输出。read_data,read_restart【读入】, restart,write_restart【输出】,如果能灵活运用这几个命令,会让你的模拟在突发事件下得到经济上的收获。其中命令里有两类通配 符,* 表示时间步,% 表示CPU编号。 2.全局热力学数据,也就是所谓的thermodynamic

    26、output,这些量是面向于系统的,而不是面向于某一类,某一组,原子的。一般是系统 宏观信息的数据。处理这些数据的命令主要有如下几个 thermo, thermo_modify, thermo_style这个命令对于初学者要 认真研究和调试,还有相关的把单原子信息转换为【global quantities】的辅助命令:fix ave/time,fix ave/ spatial, compute reduce 这些命令可以自己设定输出的频率,文件名等等。thermo_style 和 compute/ fix/variable命令结合进行数据的处理和输出是个大学问,这个需要不断的调试才能熟练掌握。

    27、其实研究variable compute和少数 关于数据处理的fix可以节约你大量后期数据处理的时间。 3.单原子数据。相关命令主要有dump, dump_modify,undump.时刻牢记这些命令用于处理atom的数据对于你出现的错误就有敏感 性了,呵呵。 4。echo,print,fix print结合variable可以用于调试你的脚本,纠错。 5.秀个例子,用于输出setforce, group原子于其他相互作用力 #- fix 3 tetras setforce 0.0 0.0 0.0 variable fx equal f_31 variable fy equal f_32 va

    28、riable fz equal f_33 fix 4 tetras print 1 - $fx $fy $fz - #- thermo 2 thermo_style custom step f_31 f_31 f_31 #- 以上由redream/一下是fc所写关于output,手册4.15,曾粗略翻译过 除了restart文件,LAMMPS还有两种基本的输出。第一种是热力学输出,每隔一定的时间步就打印到屏幕和log文件的一列数。第二种是dump 文件,包括按照一定的频率写入文件的原子位置快照和各种per-atom数值。每个模拟打印一组热力学输出;可能生成任意数目的dump文件。如下所讨 论的

    29、,LAMMPS为你提供多种方式来决定当热力学信息和dump文件输出的时候,哪些量是需要计算和打印的。有3个fix命令可以按照用户选择的量执 行它们自己的输出:fix ave/time用来做时间平均,fix ave/spatial用来做空间平均,以及fix print。下面会详述。贯 穿这个讨论,用户要注意他们可以添加自己的compute命令和fix命令,通过这些命令定义自己的输出。 Thermodynamic output 热力学输出的频率和格式是由thermo、thermo_style、thermo_modify命令设置 的。thermo_style命令也指定了哪些数值需要被计算输出。可以指

    30、定预先定义的变量(例如press、etotal等等)。还可以指定三类 keyword(c_ID、f_ID、 v_name),分别由compute、fix、variable命令提供相应的数据。以下依次讲述。 在LAMMPS中,有两种类型的compute命令:一种计算global value(例如温度,压强张量)另一种计算per-atom values。只有前者可以作为热力学输出。用户指定的compute命令的ID加上一个可选的下标作为thermo_style命令的一部分。例如 c_myTemp 输出由该compute得到的标量值;c_myTemp2输出第2个矢量分量。注意compute reduce可以对per- atom的量加和得到global标量和矢量。 fix命令可以生成由热力学输出的global scalar或vector,例如压头(indenter)与原子之间的相互作用能。这些数值可以通过 与前述compute命令同样的格式,如f_ID、 f_IDN。至于哪个fix计算可通过热力学信息输出的global values请参阅见各 个fix的手册。 fix ave/time生成的时间平均的全局量可由热力学输出,例如按时间平均的压强。 可以在in文件中定义变量,除了atom style的变量之外,其它所有的变量都可以通过热力学信息输出,


    注意事项

    本文(LAMMPS讲课教案.docx)为本站会员主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2022 冰点文档网站版权所有

    经营许可证编号:鄂ICP备2022015515号-1

    收起
    展开