好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

Lammps程序.pptx

49页
  • 卖家[上传人]:油条
  • 文档编号:26739982
  • 上传时间:2017-12-31
  • 文档格式:PPTX
  • 文档大小:160.57KB
  • / 49 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • Lammps程序,关于lammps基础知识,lammps的输入文件一般分为4个部分Initialization, Atom definition, Settings, Run a simulation,后面的两个部分可以按照需要多次重复;,(1) Initialization,在你的模拟体系定义之前, 一些参数必须要被设置. 相关的命令有:units, dimension, newton, processors, boundary, atom_style, atom_modify其中,units: 选择单位系统, lammps提供了lj、real、metal三种单位系统;dimension: 2d模拟还是3d模拟, 默认是3d;boundary: 边界条件:周期性边界or自由边界;atom_style: 定义你的模拟体系中的原子属性, 注意这个style要区分后面设置力场参数时命令里提到的atom type;还有, 这些命令告诉lammps在你的模拟中使用何种力场: pair_style, bond_style, angle_style, dihedral_style, improper_style.,,在LJ类型中,所有变量都是无单位的,实际量换算成简化单位量有系列公式缺省状态默认为LJ类型,(2)Atom definition,lammps提供3种方式定义原子:① 通过read_data或read_restart命令从data或restart文件读入, 这些文件可以包含分子拓扑结构信息. ② 按照晶格的方式创建原子(不包含分子拓扑信息), 你会用到这几个命令: lattice, region, create_box, create_atoms. ③ 已经设置好的原子可以用replicate命令复制以生成一个更大规模的模拟体系.,(3)Settings,原子和分子的拓扑信息定义好后, 你要制定一系列的设置: 力场系数、模拟参数、输出选项 等等. ①力场系数可以通过这些命令定义: pair_coeff, bond_coeff, angle_coeff, dihedral_coeff, improper_coeff, kspace_style, dielectric, special_bonds. 注意, 其实力场系数也可以在data文件中制定; ②各种模拟参数由这些命令设置: neighbor, neigh_modify, group, timestep, reset_timestep, run_style, min_style, min_modify.,Suppliment,fix命令是lammps中很重要的一个命令, 它包括很多子命令, 可以施加一系列的边界条件、时间积分、诊断选项等等;fix指令的用途是对一组原子进行定义,可以用于更新原子的位置、速度、控制温度、加常力、施加边界条件等。

      当两个或更多fix在同一过程中作用时,根据程序中的先后顺序执行fix指令Fix指令可通过unfix指令来消除,形式为unfix fix-ID)模拟过程中通过下面的命令制定lammps进行各种计算: compute, compute_modify, variable.输出选项由thermo, dump, restart命令设置.,,fix ID group−ID style args · ID = user−assigned name for the fix ID是用户自己定义的名字,便于通过fix定义 · group−ID = ID of the group of atoms to apply the fix to · style = one of a long list of possible style names (see below) · args = arguments used by a particular style Examples: fix 1 all nve fix 3 all nvt temp 300.0 300.0 0.01 fix mine top setforce 0.0 NULL 0.0,,对于run 100 start 0 stop 1000 这个语句来说,主要与fix语句配合使用。

      fix 1 all nvt 200.0 300.0 1.0 这两个指令的功能是在接下来的1000步运行中,每 run 100步,温度都要从200度升到300度,,fix 1 all nvt 200.0 300.0 1.0 对于左侧的一组指令,温度随着从0到10000步的执行 run 1000 start 0 stop 10000 逐渐升至300.0度,是一个发生在整个过程的渐变行为 run 1000 start 0 stop 10000 ... run 1000 start 0 stop 10000(共10个),,至于pre and post大概是这样的,pre no 的意思是跳过初始设定阶段,如果以下的计算是承接之前运行命令的话(意思是采用之前的参数) 但是如果该run指令是第一个指令是,该设定会被忽略若是post no,则跳过full timing summary, 输出one-line summary timing,,Every 的作用是将一个run分成一系列较短的runs variable q equal x run 6000 every 2000 "print Coord = $q" 每运行2000步输出一次某原子的x坐标值,,要设定一组原子的温度, 那么用group命令定义哪些原子属于这个组才行;每个命令的详细介绍中的Restrictions部分会说明要使用该命令定义的时候哪些命令必须要被预先定义;如果你的输入文件书写的格式有问题, lammps在执行的时候会提示ERROR或者WARNING , 出现类似信息时, 你可以到手册的第九章中查询原因;,(4)Run a simulation,使用run命令开始一个分子动力学模拟, 用minimize命令来实施能量最小化(molecular statics), 使用temper命令来进行parallel tempering(replica-exchange) simulation.,Commands listed by category,,,Initialization: atom_modify, atom_style, boundary, dimension, newton, processors, units;Atom definition: create_atoms, create_box, lattice, read_data, read_restart, region, replicate;Force fields: angle_coeff, angle_style, bond_coeff, bond_style, dielectric, dihedral_coeff, dihedral_style, improper_coeff, improper_style, kspace_modify, kspace_style, pair_coeff, pair_modify, pair_style, pair_write, special_bonds;,,Settings: communicate, dipole, group, mass, min_modify, min_style, neigh_modify, neighbor, reset_timestep, run_style, set, shape, timestep, velocity;Fixes: fix, fix_modify, unfix;Computes: compute, compute_modify, uncompute;Output: dump, dump_modify, restart, thermo, thermo_modify, thermo_style, undump, write_restart;Actions: delete_atoms, delete_bonds, displace_atoms, displace_box, minimize, run, temper;Miscellaneous: clear, echo, if, include, jump, label, log, next, print, shell, variable.,Lammps中特殊符号含义,(1) 命令行后的 & 表示这一行跟下一行是同一条命令.(2) 命令行最开始的 # 表示这一行在执行过程中被忽略, 你可以用它来写注释.(3)$ 是跟声明变量有关系的。

      4) 命令行被tabs, spaces间隔成各个“words”, 注意这里的“words”可以包含字母、数字、下划线、或标点符号.,,(5) 一行中第一个词是命令名, 后续的词是相关的参数.(6) 双引号内的文字空格被整体地当作一个参数, 其中的 # 或 $ 就没有前面说的作用了.,Pure Cu crystal,,,(1) Initializationunits metal金属单位制:mass = grams/mole 质量:g/moldistance = Angstroms 距离:埃time = picoseconds 时间:皮秒energy = eV 能量:velocity = Angstroms/picosecond 速度force = eV/Angstrom 力:,,temperature = degrees K 温度pressure = bars 压力dynamic viscosity = Poise 动力学粘性系数:泊charge = multiple of electron charge (+1.0 is a proton) 电荷:电荷整数倍dipole = charge*Angstroms 偶极矩electric field = volts/Angstrom density = gram/cm^dim torque = eV 力矩,,atom_style charge原子属性:带电粒子系统dimension 3维数:3boundary p p p边界条件:p is periodic p指周期性 f is non-periodic and fixed:固定非周期 s is non-periodic and shrink-wrapped:收缩的非周期性的 m is non-periodic and shrink-wrapped with a minimum value 有最小值的收缩的非周期,,(2)Atom definitionlattice fcc 3.615晶格点阵:Lattices of style sc, fcc, bcc, and diamond are 3d lattices that define a cubic unit cell with edge length = 1.0.fcc类型的点阵是定义的一个边长为1.0埃的立方体三维晶格点阵specifying scale = 3.615 would create a cubic lattice with a spacing of 3.615Angstroms.边长为3。

      615埃,,region box block 0 4 0 4 0 4 区域:以0 4 0 4 0 4为立方箱x、y、z边界条件;create_box 1 box在上述区域创建一个只有1个原子类型的模拟箱The argument N is the number of atom types that will be used in the simulationcreate_atoms 1 box :This command creates atoms on a lattice, or a single atom, or a random collection of atoms, as an alternative to reading in their coordinates explicitly via a read_data or read_restart command. A simulation box must already exist, which is typically created via the create_box command. Before using this command, a lattice must also be defined using the lattice command. The only exceptions are for the single style with units = box or the random style. .这个命令用于在晶格点阵、单个原子和原子随机组合中创建原子,这样通过从文件中读数据命令读出原子在晶格中的相对位置来替代原子的位置坐标。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.