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

当前位置:爱学范文网>>实用资料>>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中文手册》的人还看了以下文章

    延伸阅读

    指导思想以《邱村中学*-2022学年度工作计划》对教科研工作提出的要求为总体框架和研究方向,以“有效教学”理念为指导,努力从深化管理和开展行动研究两个方面积极探索提高教学效率的策略和途径,初步形成符合

    客服工作总结篇1  时光转瞬即逝,不知不觉来到公司已经大半年,忙忙碌碌中时光已近年末。回顾过去工作中的点点滴滴,才发现自己真的收益良多,作为公司的一名售后客服,我也深知自己所肩负的责任。售后服务工作作

    教师是立校之本,师德是教育之魂。《面向21世纪教育振兴行动计划》指出,要“大力提高教师队伍的整体素质,特别要加强师德建设”。要达到高质量的教育,必须要有高素质的教师。今天,小编为您介绍的是师德师风作文

    首先我先总结一下20xx年我看到的关于公司一些方面的不足,都是我的个人看法,稍显幼稚,若有不妥之处请原谅。1、经销商为盈利影响我司销售2、价格差在终端零点对于销售的影响3、广告劣势。我

    读书笔记是指读书时为了把自己的读书心得记录下来或为了把文中的精彩部分整理出来而做的笔记。在读书时,写读书笔记是训练阅读的好方法。下面是本站为大家带来的读书笔记,希望能帮助到大家!读书笔记《夏洛的网》读

    线上平台的交流沟通中,名字成为了个人形象的第一彰显,在微信上举个以诗词起名而来的微信名字,可以体现出不一样的文化自信,以下是小编为大家收集的古诗词的名字【三篇】,仅供参考,欢迎大家阅读。古诗词的名字1

    丹柯的读后感作文读后感是指读了一本书,一篇文章,一段话,几句名言,一段音乐,或者一段视频后,把具体感受和得到的启示写成的文章。下面是小编为您带来的是丹柯的读后感作文相关内容,希望对您有所帮助。丹柯的读

    校园辩论赛优秀策划案(3篇)校园辩论赛优秀策划案篇1一、活动目的:举办历届辩论赛既锻炼了机械系同学们的口才、丰富同学们的课余生活,活跃了校园气氛,又培养了机械系系优秀人才,同时也促进系学生间互动,

    银行担保申请书(30篇)银行担保申请书篇1________________公司:本公司拟向银行申请贷款,有关贷款情况等详见下述文件,恳请贵公司能予支持提供担保为盼。特此申请!申请单位:法定代表人:

    心中有不少心得体会时,不如来好好地做个总结,写一篇心得体会,如此可以一直更新迭代自己的想法。心得体会对于我们是非常有帮助的,可是应该怎么写心得体会呢?下面小编给大家带来关于学习心得体会范文,希望会对大