LAMMPS中的系统定义命令
region
定义区域。语法为
region ID style args keyword arg
ID是名字,style是区域形状,后面跟上style对应的参数args,最后的keyword和arg非必需。例如
region simulation_box block -20 20 -20 20 -20 20
定义一个叫 simulation_box 的block(长方体)区域,block的六个参数是 xlo xhi ylo yhi zlo zhi,不难理解,xlo 就是 x坐标最小值(x-low),zhi 就是 z坐标最大值(z-high)。这里省略了keyword和其arg。
region region_cylinder_in cylinder z 0 0 10 INF INF side in
定义一个叫 region_cylinder_in 的cylinder(圆柱)区域,圆柱的六个参数是 dim c1 c2 radius lo hi ,结合上面的语句,我们定义的圆柱轴线在 z 方向,xy平面的位置在(0,0),底面半径为10,高度从 INF 到 INF。这里还指定了关键字为 side,参数为 in,表示这个区域位于圆柱内部;若为 out,则位于圆柱外部。
create_box
创建盒子。语法为
create_box N region-ID keyword value
上命令在指定区域 region-ID 里面创建一个盒子,盒子里面有N类atom。keyword 和 value 非必需。
create_box 2 simulation_box
在 simulation_box 里面创建两类 atom。
create_atoms
创建atom。语法为
create_atoms type style args keyword values
上命令按 style 样式创建类型为 type 的atom,args 是 style 的参数。keyword value 非必需。
create_atoms 1 random 1500 341341 simulation_box
这里 type 是 1 (编号),样式是 random ,也就是随机创建。random 的参数包括 N seed region-ID,也就是说,上面命令随机创建了 1500 个 type 为 1的原子,随机数种子为 341341,所在区域为 simulation_box。
delete_atoms
删除atom。语法为
delete_atoms style args keyword value ...
上命令删除样式为 style 的atom,args 是 style 的参数。keyword value 非必需。
delete_atoms group group_type_1
例如删除group_type_1组的所有atom。
group
将某类样式相同的atom定义为 group。语法为
group ID style args
上述命令按照样式 style 定义一个叫 ID 的 group,style 的参数是args。例如把 type 为 1 的分为一个组,此时样式为 type:
group group_type_1 type 1
把 region 为 region_cylinder_in 的分为一个组,此时样式为 region:
group group_region_in region region_cylinder_in
把同在 region1 和 region2 的一个组,即求两个region的交集,此时样式为 intersect:
group group_region12 intersect region1 region2
评论
九妹

干货推荐

计算机材料设计Materials-Studio教程12
活着
44 2

电镜的局限性
Mr弘🔬
83 6

计算机材料设计Materials-Studio教程3
活着
33 1

小胶质细胞
Mr弘🔬
63 8

CP2K计算能带结构与DOS图
齐振宏
310 2

神经元
Mr弘🔬
77 7
