您好,欢迎来到爱学范文!

当前位置:爱学范文网>>实用资料>>lammp中文手册

lammp中文手册

标签:时间:

【综合文库】

lammps简要使用说明

李小椿

北京航空航天大学物理科学与核能工程学院

bestlxc@163.com

更新于:2022年2月1日星期一

目录

lammps简要使用说明 .......................................................................................................................................................... 1

LAMMPS介绍 ................................................................................................................................................................. 4 文件 ................................................................................................................................................................................ 4 1. 系统初始化..................................................................................................................................................................... 4

units lj/real/metal/si/cgs ................................................................................................................................................. 4 atom_style angle/atomic/bond/charge/dipole/dpd/ellipsoid/full/granular/molecular/hybrid ..................................... 5 atom_modify map/first ................................................................................................................................................... 5 dimension N ,N=2/3 ......................................................................................................................................................... 5 boundary x y z, default=boundary p p p ......................................................................................................................... 5 newton flag/flag1 flag2 ................................................................................................................................................... 5 communicate single/multi group/cutoff ......................................................................................................................... 5 processors Px Py Pz ......................................................................................................................................................... 6 2. 创建模拟晶胞 ................................................................................................................................................................. 6

lattice none/sc/bcc/fcc/hcp/diamond/sq/sq2/hex/custom scale keyword values ......................................................... 6 region ID style block/cylinder/prism/sphere/union/intersect args keyword value ........................................................ 6 group ID region/type/id/molecule/subtract/union/intersect ......................................................................................... 6 create_box N region?ID .................................................................................................................................................. 7 create_atoms type box/region/single args keyword values ............................................................................................ 7 delete_atoms group/region/overlap/porosity args ........................................................................................................ 7 read_restart file/read_date file ....................................................................................................................................... 7 set atom/group/region ID keyword values ..................................................................................................................... 8 displace_atoms group?ID move/ramp/random args keyword value .............................................................................. 8 displace_box group?ID parameter args ... keyword value …........................................................................................... 9 change_box ortho/triclinic .............................................................................................................................................. 9 replicate nx ny nz ............................................................................................................................................................ 9 3. 设置 ................................................................................................................................................................................ 9

mass I value ..................................................................................................................................................................... 9 velocity group?ID create/set/scale/ramp/zero args keyword value ............................................................................... 9 timestep dt .................................................................................................................................................................... 10 reset_timestep N ........................................................................................................................................................... 10 neighbor skin bin/nsq/multi ......................................................................................................................................... 10 neigh_modify keyword values....................................................................................................................................... 10 4. 输出 .............................................................................................................................................................................. 10

dump ID group?ID bond/dcd/xtc/xyz/custom N file args ............................................................................................. 10 dump_modify dump?ID format/scale/image/flush/unwrap/every/precision/region/thresh values ........................... 11 undump dump?ID ......................................................................................................................................................... 11 thermo_style one/multi/custom(args) ......................................................................................................................... 11 thermo_modify lost/norm/flush/line/format/temp/press value ................................................................................. 12

1

thermo N ....................................................................................................................................................................... 12 print string ..................................................................................................................................................................... 12 restart N root ................................................................................................................................................................. 13 write_restart file ........................................................................................................................................................... 13 echo none/screen/log/both .......................................................................................................................................... 13 log filename .................................................................................................................................................................. 13 5. FIX.................................................................................................................................................................................. 13

fix ID group?ID style args .............................................................................................................................................. 13 系综相关....................................................................................................................................................................... 15 力和速度的控制 ........................................................................................................................................................... 15 计算特定量................................................................................................................................................................... 16 模拟晶胞的控制 ........................................................................................................................................................... 18 模拟过程的控制 ........................................................................................................................................................... 18 unfix fix-id ...................................................................................................................................................................... 19 6. COMPUTE ...................................................................................................................................................................... 19

compute ID group?ID style args .................................................................................................................................... 19 compute ID group?ID ackland/atom ............................................................................................................................. 19 compute ID group?ID centro/atom ............................................................................................................................... 19 compute ID group?ID coord/atom cutoff ..................................................................................................................... 20 compute ID group?ID damage/atom ............................................................................................................................ 20 compute ID group?ID displace/atom fix?ID .................................................................................................................. 20 compute ID group?ID group/group group2?ID ............................................................................................................. 20 compute ID group?ID ke ............................................................................................................................................... 20 compute ID group?ID ke/atom ..................................................................................................................................... 20 compute ID group?ID pe (keyword=pair/bond/angle/dihedral/improper/kspace) ...................................................... 20 compute ID group?ID pe/atom (keyword=pair/bond/angle/dihedral/improper) ........................................................ 20 compute ID group?ID pressure temp?ID keyword=ke/pair/bond/angle/dihedral/improper/kspace/fix ..................... 20 compute ID group?ID reduce mode=sum/min/max input1 input2 … .......................................................................... 20 compute ID group?ID stress/atom (keyword= ke/pair/bond/angle/dihedral/improper/kspace/fix) ........................... 21 compute_modify compute?ID keyword value .............................................................................................................. 21 compute ID group?ID temp .......................................................................................................................................... 21 compute ID group?ID temp/com .................................................................................................................................. 21 compute ID group?ID temp/deform ............................................................................................................................. 21 compute ID group?ID temp/partial xflag yflag zflag ..................................................................................................... 21 compute ID group?ID temp/ramp vdim vlo vhi dim clo chi keyword value .................................................................. 21 compute ID group?ID temp/region region?ID .............................................................................................................. 21 uncompute compute-ID ................................................................................................................................................ 21 7. 势函数 .......................................................................................................................................................................... 21

pair_style ....................................................................................................................................................................... 21 pair_style tersoff ........................................................................................................................................................... 22 kspace_style .................................................................................................................................................................. 23 kspace_modify .............................................................................................................................................................. 23 pair_write itype jtype N r/rsq/bitmap inner outer file keyword Qi Qj.......................................................................... 23 8. 运行 .............................................................................................................................................................................. 24

run N upto/start/stop/pre/post/every values ............................................................................................................... 24 run_style verlet/respa(args) .......................................................................................................................................... 24 minimize etol ftol maxiter maxeval ............................................................................................................................... 24

2

min_style cg/sd ............................................................................................................................................................. 24 min_modify dmax 0.2 (default=0.1).............................................................................................................................. 24 temper........................................................................................................................................................................... 24 clear ............................................................................................................................................................................... 24 9. 其他 .............................................................................................................................................................................. 25 variable name delete/index/loop/world/universe/uloop/equal/atom ........................................................................ 25 next variables ................................................................................................................................................................ 26 jump file label ............................................................................................................................................................... 26 label string ..................................................................................................................................................................... 26 if value1 operator value2 then command1 else command2 ........................................................................................ 26 include filename ............................................................................................................................................................ 27 shell cd/mkdir/mv/rm/rmdir ........................................................................................................................................ 27 10. 模拟方法论 ........................................................................................................................................................... 27

缺陷的生成................................................................................................................................................................... 27 晶格常数....................................................................................................................................................................... 27 迁移 .............................................................................................................................................................................. 27 表面 .............................................................................................................................................................................. 28 立方晶系弹性常数 ....................................................................................................................... 错误!未定义书签。

3

LAMMPS介绍

LAMMPS= Large-scale Atomic/Molecular Massively Parallel Simulator. http://lammps.sandia.gov ? Sandia National Laboratories

命令行选项:-in file输入文件;-log file 输出文件;-screen file屏幕输出文件;-echo style,输入文件内容是否输出到输出文件和屏幕,style=none/screen/log/both(default=log)。 特点:免费,C++,并行,集成大量势函数

并行:mpirun -nolocal -machinefile node -np $ncpu /opt/lammps/lmp_mpi -in in-screen log.screen & 串行:/opt/lammps/lmp

串行:/opt/lammps/lmp-screen log.screen-in in

文件

in.*文件:输入文件,控制整个计算过程。

每一非空行都被认为是一条命令(大小写敏感,极少有命令或参数大写的)。

读入一行执行一行,有些命令在其他命令后有效,有些命令要用到其他命令的输出, in文件中各命令的顺序可能会对计算产生影响,但大部分情况下不会有影响。 每行后的“&” 表示续行(类似fortran)。“#”表示注释(类似bash)。

每行命令中的不同字段由空格或者制表符分隔开来,每个字段可以由字母、数字、下划线、或标点符号构成。 每行命令中第一个字段表示命令名,之后的字段都是相关的参数。

提醒:注意单位。命令使用时一定一定要注意他们的默认设置,否则错了你都找不到北。很多命令都是在需要修改默认值的情况下才特别设置的。

log.lammps:记录了整个计算过程屏幕上显示的所有信息。

dump文件:输出应力、能量、原子位置、速度等,由dump命令控制输出文件。 restart文件:断点续算文件,由write_restart命令控制。

1. 系统初始化

units lj/real/metal/si/cgs default=units lj

units定义单位系统,该命令定义了input里所有变量的单位。 Units Real Metal Si cgs g/mol Kg G 质量 g/mol Ang m cm 距离 Ang Ps s S 时间 fs 能量 速度 力 温度 压力 粘度 电荷 lj mass or m sigma, where x* = x / sigma tau, where tau = t* = t (epsilon / m / sig-ma^2)^1/2 Kc/mol eV J ergs epsilon, where E* = E / epsilon Aug/fs Aug/ps m/s cm/s sigma/tau, where v* = v tau / sigma Kc/mol/Aug eV/Aug N dynes epsilon/sigma, where f* = f sigma / epsilon K K K K reduced LJ temperature, where T* = T Kb / epsilon atm Bar Pa dyne/cm^2;1.0e-6bars reduced LJ pressure, P* = P sigma^3 / epsilon Poise Poise Pa*s Poise reduced LJ viscosity, eta* = eta sigma^3 / ep-silon / tau multiple of multiple of C statcoulombs or esu reduced LJ charge, where q* = q / (4 pi perm0 electron charge electron sigma epsilon)^1/2 (+1.0 is a pro-charge (+1.0 ton) is a proton) charge*Aug charge*Aug C*m statcoul?cm = 10^18 reduced LJ dipole, moment where *mu = mu / 4

偶极

debye (4 pi perm0 sigma^3 epsilon)^1/2 子 V/Aug V/m statvolt/cm or force/charge, where E* = E (4 pi perm0 sigma 电场V/Aug dyne/esu epsilon)^1/2 sigma / epsilon 强度1Aug=1e-10 m=1e-8 cm

1ps=1e-12 s, 1fs=1e-15 s, 1ps=1000 fs

1eV=23.0445512 Kc/mol, 1ev=3.8276e-23 Kc, 1eV=1.60217733e-19 J, 1eV=1.60217733e-12 erg, 1mol=6.0221367e23 1J=0.23884 c, 1erg=1e-7 J, 1Kc=4186.8 J, 1Kc=4.1868e10 erg, 1Kc=2.6126e22 eV 1atm=1.01325 bar =101325 Pa, 1bar=100000 Pa

atom_style angle/atomic/bond/charge/dipole/dpd/ellipsoid/full/granular/molecular/hybrid

default=atom_style atomic

定义使用什么样的原子类型,决定了原子的属性,该命令应该在其他命令前。 style = angle/atomic/bond/charge/dipole/dpd/ellipsoid/full/granular/molecular/hybrid

atom_modify map/first

定义并行计算如何求最近邻 atom_modify map array/hash map定义了并行计算求最近邻的方法,array表示每个CPU都储存领域列表,hash表示每个CPU只储存在分配在本CPU的领域列表,array更快,但是体系特别大的时候会消耗更多系统内存。 atom_modify first groupID

允许某一组原子在领域列表是作为第一个原子。

dimension N ,N=2/3 default=dimension 3

设置模拟的维度,进行2维模拟前要先使用该命令设置模拟盒子。该命令应在创建晶胞前。

boundary x y z, default=boundary p p p

boundary p p f boundary p fs p boundary s f fm

设置晶胞在3个方向的边界条件,该命令应在创建晶胞前。x/y/z = p/s/f/m/2个字母组合,2个字母组合表示第一个字母分配给下表面,第二个字母分配给上表面。p必须应用到上下两个表面。 p=周期性

f=不是周期性,固定的,如果原子走出表面,可能丢失; s is non?periodic and shrink?wrapped

m is non?periodic and shrink?wrapped with a minimum value。

newton flag/flag1 flag2

Default=newton on

flag = on or off for both pairwise and bonded interactions flag1 = on or off for pairwise interactions flag2 = on or off for bonded interactions

This command turns Newton"s 3rd law on or off for pairwise and bonded interactions.

communicate single/multi group/cutoff

communicate multi

communicate multi group solvent communicate single cutoff 5.0 定义并行计算中CPU通讯方式。

5

推荐阅读:

    想了解更多实用资料的资讯,请访问:实用资料
    下载文档

    看过《lammp中文手册》的人还看了以下文章

    延伸阅读

    新的学期开始了,为做好幼儿园工作,如何制定计划呢?下面是爱学范文网小编收集整理的幼儿园工作计划,欢迎阅读。幼儿园工作计划篇一一、加强师德教育,提高教师整体素质。1、加强政治学习。要与学习贯彻国务院、省

    寒假社会实践,它不仅组织学生深入社会实际,了解社会生活,参与社会实践锻炼,而且帮助学生确立正确的政治方向,树立科学的世界观,人生观和价值观。下面给大家分享一些关于寒假社会实践报告,希望对大家有帮助。

    工程运输是铺架施工的一个重要环节,也是铺架工程顺利完工的基础保证。对于工程运输合同你还了解多少呢?以下是在爱学范文网小编为大家整理的工程运输合同范文,感谢您的阅读。工程运输合同范文1  甲方:  乙方

    医生年终工作总结篇1  ICU于20xx年成立,经历了七年发展壮大,已经具有很强的危重症救治能力医疗单元, 20xx年是ICU发展最快一年,进行了房屋改造,流程重新设计,扩大面积,增加了床位和人员,添

    销售客服工作职责销售客服工作职责(1):销售客服工作职责1、建立客户资料管理档案,根据客户状态变化而不断完善相关信息;2、完成负责区域的客户资料收集、汇总以及客户档案的管理3、与客

    阎浩大骨一班组织委员19票  10月24日我作为南昌航空大学代表的一员参加第九期大骨班培训,在一个多月的准备和策划下终于到了位于吉安的井冈大学。优秀的接待志愿者,优秀的会务志愿者,优秀的工作人员,心得体会

    精选竞聘副部长的演讲稿(通用11篇)?以下是小编收集整理的竞聘副部长的演讲稿(锦集6篇),仅供参考,希望能够帮助到大家。竞聘副部长的演讲稿1亲爱的各位评委老师,同学们:大家好,我是来自xx的xx,很荣

    西安初中小学语文美术教师求职简历模板是关于医学生个人简历的精选内容,内容包含了与西安初中小学语文美术教师求职简历模板相关的经典语句以及医学生个人简历大全、医学生个人简历范文、医

    感谢朋友的感谢信篇一我的朋友:你好!我生活在这个世上,并不是孤独的,因为除了父母,我还有身边那些知心的好朋友。我应该感恩父母对我们的恩情,同时也要对身边的朋友怀着一颗感恩的心,因为是好朋友,才能使自己

    光阴的迅速,一眨眼就过去了,很快就要开展新的工作了,来为今后的学习制定一份计划。怎样写计划才更能起到其作用呢?计划应该怎么制定呢?那么下面我就给大家讲一讲计划书怎么写才比较好,我们一起来看一看吧。急诊