lammp中文手册(2)

来源:网络收集 时间:2025-08-15 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xuecool-com或QQ:370150219 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

processors Px Py Pz

Specify how processors are mapped as a 3d logical grid to the global simulation box. Px,Py,Pz = # of processors in each dimension of a 3d grid

2. 创建模拟晶胞

lattice none/sc/bcc/fcc/hcp/diamond/sq/sq2/hex/custom scale keyword values

lattice fcc 3.52 lattice hex 0.85

lattice sq 0.8 origin 0.0 0.5 0.0 orient x 1 1 0 orient y ?1 1 0

lattice custom 3.52 a1 1.0 0.0 0.0 a2 0.5 1.0 0.0 a3 0.0 0.0 0.5 basis 0.0 0.0 0.0 basis 0.5 0.5 0.5 lattice none

定义一个计算点阵,sc/bcc/fcc/hcp/diamond为三维点阵,sq/sq2/hex为二维点阵。

scale=晶格常数(非LJ unit) && reduced density rho* (for LJ units)。同时,该命令将改变系统长度单位为三个方向的基矢长度,特别注意。

origin:定义点阵的起点。将点阵平移 x,y,z 个晶格常数。0

orient dim ijk:将点阵旋转,dim为xyz,ijk为晶向指数,注意旋转后的三个基矢必须还是正交的。切符合右手规则。

spacing dx dy dz:分别定义在xyz三个方向的间隔。 custom:自定义晶胞基矢和间隔。

basis x y z:fractional coords of a basis atom

region ID style block/cylinder/prism/sphere/union/intersect args keyword value

region 1 block ?3.0 5.0 INF 10.0 INF INF region 2 sphere 0.0 0.0 0.0 5 side out

region void cylinder y 2 3 5 ?5.0 EDGE units box region 1 prism 0 10 0 10 0 10 2 0 0

region outside union 4 side1 side2 side3 side4 定义一个空间区域。

block xlo xhi ylo yhi zlo zhi:正交区域。

cylinder dim c1 c2 radius lo hi:定义圆柱,dim=xyz,c1,c2为圆柱轴在其它方向坐标,radius为半径,lo,hi为圆柱在轴向范围。

prism xlo xhi ylo yhi zlo zhi xy xz yz:棱柱体,xy = y在x方向倾斜量,xz,yz类似。 sphere x y z radius(半径):球面

union N reg?ID1 reg?ID2:多个区域的并集,N为数目 intersect N reg?ID1 reg?ID2 :多个区域的交集,N为数目 side out=定义的区域为描述的几何空间之外。默认为side in。

units lattice以晶格常数为单位(默认),units box表示以units定义的标准距离单位定义区域。特别注意这个问题。 EDGE=当前模拟盒子定义的边界;INF=无限大。

group ID region/type/id/molecule/subtract/union/intersect

group edge region regstrip

group water type 3 4 !类型为3、4 group sub id <= 150 !id小于150

group polyA molecule 50 250 !分子序号在50-250间(含)。 group boundary subtract all a2 a3 !a1-a2-a2 group boundary union lower upper !lower+upper

6

group boundary intersect upper flow !lower .and. upper

region ID:一次性操作,以后原子跑出区域依然属于这个组。

type/id/molecule:支持列表,逻辑符号(>=,==,!=),between,比如50 250 表示50-250 subtract two or more group IDs:第一个组减去后面的组 union one or more group IDs:并集 intersect two or more group IDs:交集

all这个组已经提前定义好了,包含所有的原子。包括all在内总共不能超过32个组。

create_box N region?ID

create_box 2 box

N = # of atom types to use in this simulation原子种类 region?ID = ID of region to use as simulation domain

在区域中创建一个模拟box,含N种原子,使用前应该先定义一个区域

create_atoms type box/region/single args keyword values

create_atoms 1 box

create_atoms 3 region regsphere basis 2 3 create_atoms 3 single 0 0 5 units box

create_atoms 1 box:在模拟盒子中产生原子种类为1的原子,必须先有create_box定义模拟box。lattice也应先定义。

region:在区域内创建原子。

create_atoms 1 single 0.0 0.0 0.0:增加单个原子,原子种类为1,坐标为0.0 0.0 0.0,可以用于产生间隙原子。 basis:给单胞内原子指定不同原子类型,参见lattice的custom选项。

units lattice以晶格常数为单位(默认),units box表示以units定义的标准距离单位定义区域。特别注意这个问题。 四面体间隙0.5 0.25 0.0;八面体间隙0.5 0.5 0.0

delete_atoms group/region/overlap/porosity args

delete_atoms group edge delete_atoms region sphere

delete_atoms overlap 0.3 all all

delete_atoms overlap 0.5 solvent colloid delete_atoms porosity cube 0.1 group ID:删除组中原子 region ID:删除区域中原子

overlap cutoff gid1 gid2:cutoff为两个原子间最近距离,必须一个原子在一个组,另一个在另外一个组,这样属于第一个组的原子将会被删除。两个组可以是一样的名字,比如all。由于算法问题,不同CPU可能删除原子数可能不一样,当可以保证最后没有距离在cutoff内的原子对。

porosity region?ID fraction seed:特定比例的原子讲被删除, fraction为比例,seed为随机数seed。同样不同CPU结果可能不一样。

删除组groupid中的原子,删除区域regionid中的原子,可以产生一系列空位 指定位置产生一个空位:

region 1 sphere 0.000000 0.000000 0.000000 0.01 delete_atoms region 1

read_restart file/read_date file

read_restart file

从重启文件中读入坐标等 read_date filename

从file中读取坐标,具体坐标格式可以参照example Position data for Silicon-Carbon system 1400 atoms 7 1 0.00 0.00 0.00 Masses 1 183.8 Atoms 1 1 2 1 3 1 4 1

atom types 44.75985925 xlo xhi 50.000 ylo yhi 31.650 zlo zhi 0 0 0 2.237992963 2.237992963 0 0 4.475985925 0 2.237992963 6.713978888 0 set atom/group/region ID keyword values

set group solvent type 2

set group solvent type/fraction 2 0.5 12393 set group edge bond 4 set region half charge 0.5 set atom 100 x 0.5 vx 1.0 set atom 1492 type 3

对指定的多个原子设置特定的属性。

type/fraction:按比例设置指定的原子到新的type。

set keywords

type atom-type:设置原子种类。

type/fraction type fraction seed:按比例设置指定的原子到新的种类。type=新原子种类,fraction=比例 mol molecule-ID:设置分子种类。 x,y,z value = 原子坐标 (长度单位) vx,vy,vz value = 速度分量 (速度单位)

charge atomic-charge = 设置电荷 (charge units)

dipole values = x y z,x,y,z = orientation of dipole moment vector dipole/random value = seed

quat values = a b c theta,a,b,c = unit vector to rotate particle around via right?hand rule,theta = rotation angle in degrees quat/random value = seed

diameter value = particle diameter (distance units)

density value = particle density (mass/distance^3 units) volume value = particle volume (distance^3 units)

image nx ny nz:定义原子分配到那个镜像。nx,ny,nz = which periodic image of the simulation box the atom is in bond value = bond type for all bonds between selected atoms angle value = angle type for all angles between selected atoms

dihedral value = dihedral type for all dihedrals between selected atoms improper value = improper type for all impropers between selected atoms

displace_atoms group?ID move/ramp/random args keyword value

displace_atoms top move 0 ?5 0 units box

displace_atoms all random 1.0e-3 1.0e-3 1.0e-3 617 displace_atoms flow ramp x 0.0 5.0 y 2.0 20.5

displace_atoms group?ID style args :移动一组原子。 move delx dely delz:在xyz三个方向移动的距离。 random dx dy dz seed:随机移动原子

ramp ddim dlo dhi dim clo chi:ddim=xyz,dim=xyz,在ddim方向移动原子,移动范围为dlo-dhi,移动距离根据原子在dim方向的坐标大小来决定,小于cho移动dlo,大于chi移动dhi。

8

displace_box group?ID parameter args ... keyword value …

displace_box all xy final ?2.0 z final 0.0 5.0 units box displace_box all x scale 1.1 y volume z volume

displace_box group?ID parameter改变模拟盒子的形状、体积

change_box ortho/triclinic

change_box ortho 把模拟晶胞从三斜转换为正交晶胞 change_box triclinic 把模拟晶胞从正交转换为三斜晶胞 lammps默认是正交晶胞

replicate nx ny nz

nx,ny,nz = replication factors in each dimension,整数。

复制现有的模拟晶胞。原子属性也同时复制。1表示不变。

3. 设置

mass I value

mass 1 1.0 mass * 62.5 mass 2* 62.5

设置不同种类的原子质量。

Mass也可以由read_data命令从data文件读入。 pair_eam在eam势文件里设置了原子质量。 原子种类描述方法:* *n m* m*n 开始模拟前必须先定义原子质量。

velocity group?ID create/set/scale/ramp/zero args keyword value

velocity all create 300.0 4928459 rot yes dist gaussian velocity border set NULL 4.0 3.0 sum yes units box velocity flow scale 300.0

velocity flow ramp lattice vx 0.0 5.0 y 5 25 temp mytemp velocity all zero linear

velocity group?ID create/set/scale/ramp/zero create temp seed:随机产生指定温度的速度。

set vx vy vz:把这个group的速度设置成vx,vy,vz。 scale temp:标度到指定温度。 NULL为不变。 ramp vx/vy/vz vlo vhi x/y/z clo chi:产生速度梯度。

zero linear/angular:linear=总线速度为零,angular=总角速度为零。

dist uniform/gaussion:create速度分布是均匀分布还是高斯分布,默认均匀分布。 sum yes/no:新速度是叠加到之前的速度。否=替换之前的速度。(not zero) mom yes/no:for create,产生的总线速度=0 rot yes/no:for create,产生的总角速度=0

temp compute-id:指定计算温度方法。(for create/scale) loop all/local/geom:定义并行计算中原子速度产生方法。

units box/lattice:for set/ramp,使用说明坐标,box为绝对坐标,lattice为点阵坐标。 default: dist=uniform; sum=no; mom=yes; rot=no; loop=all

9

timestep dt

为接下来的MD计算定义时间步长。

也可以由fix dt/reset或run_style respa定义变化的时间步长。 Default:

timestep = 0.005 tau for units = lj timestep = 1.0 fmsec for units = real timestep = 0.001 psec for units = metal

timestep = 1.0e?8 sec (10 nsec) for units = si or cgs

reset_timestep N

reset_timestep 0

reset_timestep 4000000 重设时间步到指定值。

read_data/create_box设置时间步为0。 read_restart设置时间步为上次计算值。

不能用在dump/restart已经有输出的时候,这样会打乱文件输出。

neighbor skin bin/nsq/multi

neighbor skin style, style=bin/nsq/multi, (default: 2.0 bin for units = real or metal,) ?neighbor 2.0 bin This command sets parameters that affect the building of pairwise neighbor lists.

定义求最近邻的截断半径,bin模式在最长cutoff的基础上加2.0A作为新的截断半径

neigh_modify keyword values

neigh_modify every 20 delay 10 check yes

定义求最近邻原子数的方法,每隔20步更新最近邻,上次更新后10步内不更新,check设置判断原子是否大步移动,从而决定更新。

4. 输出

dump ID group?ID bond/dcd/xtc/xyz/custom N file args

dump myDump all atom 100 dump.atom dump 2 subgroup atom 50 dump.run.bin

dump 4a all custom 100 dump.myforce.* id type x y vx fx

dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke dump 1 all xtc 1000 file.xtc

定义一个输出,包含各种物理量,每隔N步输出到file中。

atom:文本文件,含原子坐标,ID,种类会输出到文件中。可用VMD打开。 custom:定制如何输出dump文件。

dcd:二进制文件,用于CHARMM,NAMD,Xplor,VMD xtc:二进制文件,用于GROMACS,VMD

xyz:简单文本文件,含原子坐标,种类,可用VMD打开。 文件名称规则:

file.%.* :*表示时间步,%表示CPU ID

file.bin:输出二进制文件。(可用binary2txt转换成文本) file.gz:输出gzipped文件。

10

百度搜索“70edu”或“70教育网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,70教育网,提供经典综合文库lammp中文手册(2)在线全文阅读。

lammp中文手册(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.70edu.com/wenku/346812.html(转载请注明文章来源)
Copyright © 2020-2025 70教育网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:370150219 邮箱:370150219@qq.com
苏ICP备16052595号-17
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:7 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219