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

当前位置:爱学范文网>>实用资料>>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、外商来本地区(单位)参观时,对本地区(单位)介绍应简明扼要、实事求是;内容要真实、材料要丰富、形式要活泼多样,既不夸大成绩,也不掩饰不足。2、外商参观工厂、学校不应停工、停课,工作和学习都要照常进

    六月里花儿香,六月里好阳光。在又一个国际六一儿童节即将到来之际,我们的心情特别喜悦,格外激动。下面是爱学范文网小编给大家整理的幼儿园庆祝六一活动致辞范文,仅供参考。 幼儿园庆祝六一活动致辞范文 尊敬

    同志们一个多月。主要基于两个方面的目的一是通过召开这次会议,县委、县政府再次召开招商引资暨跑项目争资金工作调度会。全面了解和掌握全县各单位、各乡(镇)110月份招商引资暨跑项目争资金工作进展情况;二是

    总结是对过去一定时期的工作、学习或思想状况进行回顾和分析,并作出客观评价的书面材料。按内容分为学习总结、工作总结、思想总结等,按时间分为年度总结、季度总结、月度总结等,人们经常对所做的工作进行回顾和分

    电话营销的开场白1电话销售话术开场白,作为一名优秀的电话销售话术员,在初次打电话给客户时,必须要在30秒内做到公司及自我介绍,引起客户的兴趣,让客户愿意继续谈下去。即销售员要在30秒钟内清楚地让客户知

    【爱学范文网 - 科室季度工作总结报告】这篇科室税务年度工作总结报告的文章,是爱学范文网特地为大家整理的,希望对大家有所帮助!我科在局领导的正确领导和其他科室的大力支持下,经过全科同志的共同努力,我们

    传销的本质就是旁氏骗局,即以后来这的钱来给付先到者的收益。以下是本站小编为大家带来的传销口号搞笑短句16字,以供大家参考!传销口号搞笑短句16字篇一1、珍爱家庭,远离传销;珍爱亲情,拒绝传销。2、保持

    工作粗心大意的检讨书是关于工作检讨书范文的精选内容,内容包含了与工作粗心大意的检讨书相关的经典语句以及工作检讨书范文大全、工作检讨书范文范文、工作检讨书范文模板等相关资料,为朋

    美丽的作文600字模板7篇美丽的作文600字篇1在浩瀚的宇宙中,8颗美丽的行星围绕着大火球—太阳,一圈,一圈地不停地转着,这就是神秘的太阳系。而我们的家—地球,就是太阳系中蓝色的那一颗。下面是小编为大

    50万创业项目强荐150万创业项目强荐:加盟服装店和好朋友合开一家服装店,每个人出资十万元,所有的货源均从香港进,卖仅此一件的衣服和饰品,我们挑选的店面地处闹市,所以租金比较贵,每个月800下面是小编