免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
#文件结构#Initialization#Atom definition#Settings#Run a simulation#注意本程序由于默认的单位体制是LJ# 2d friction simulation#初始化dimension2 #维数boundaryp s p #边界条件 boundary x y z x,y,z =porsorform, one or two letters p is periodic f is non-periodic and fixed s is non-periodic and shrink-wrapped m is non-periodic and shrink-wrapped with a minimum value s为收缩边界(自由边界),用于有限尺寸的维度,随原子移动而改变,原子不会跑出边界;f为固定边界,同样用于有限尺寸的维度,模拟时原子可能跑出边界,跑出则程序终止;p为周期边界,原子可以周期穿过盒子边界。m为柔性边界,允许边界上的粒子有微小移动以反映内层原子的作用力施加到它们身上的情况。atom_styleatomic #atomic原子模式(用于粗粒液体,固体和金属的模拟)。Define what style of atoms to use in a simulation 定义模拟体系中的原子属性。用比需要的范围大的类型。neighbor0.3 bin #建近邻表参数(r+rc),rc为力的截断距离,缓冲距离r=0.3sigma(),bin表示为近邻表类型。所有截止距离等于它的力的截断距离加上缓冲距离的原子对都被存储在列表里。其值的选择取决于单位制。Syntax:neighbor skin style This command sets parameters that affect the building of pairwise neighbor lists. skin = extra distance beyond force cutoff (distance units)style =bin or nsq or multineigh_modify delay 5#间隔5载荷步重新形成近邻表 # create geometry #创建初始几何构形latticehex 0.9 #定义晶格类型(二维hex)和Lennard-Jones折算密度0.9regionbox block 0 50 0 22 -0.25 0.25 #定义模拟盒子(区域)的大小,在空间x0,50,y0,22,z-0.25,0.25的范围内创建区域。create_box4 box #在上述空间内创建一个具有四种原子类型的模拟盒子(原子位置初始化)mass1 1.0#第一种原子类型质量为1g/molmass2 1.0#第二种原子类型质量为1g/molmass3 1.0#第三种原子类型质量为1g/molmass4 1.0#第四种原子类型质量为1g/mol# atom regionsregion lo-fixed block INF INF INF 1.1 INF INF#定义了一个叫lo-fixed的区域x-inf,+inf,y-inf,1.1,z-inf,+infregion lo-slab block INF INF INF 7 INF INFregion above-lo block INF INF INF 7 INF INF side out#side out表示与所给坐标相反的一边region hi-fixed block INF INF 20.9 INF INF INFregion hi-slab block INF INF 15 INF INF INFregion below-hi block INF INF 15 INF INF INF side outregionlo-asperity sphere 32 7 0 8#定义了一个叫lo- asperity(sprti粗糙)的球形区域,球心(32,7,0),球的半径8regionhi-asperity sphere 18 15 0 8regionlo-half-sphere intersect 2 lo-asperity above-lo#定义lo-asperity和above-lo两个区域的相交区域为lo-half-sphere区域regionhi-half-sphere intersect 2 hi-asperity below-hi# create 2 surfaces with asperities#创建两个粗糙表面create_atoms1 region lo-slab#在lo-slab区域里创建第1种原子create_atoms1 region hi-slabcreate_atoms2 region lo-half-spherecreate_atoms3 region hi-half-sphere# LJ potentials#LJ势函数pair_stylelj/cut 2.5#定义势函数是lj势,截断半径为2.5pair_coeff* * 1.0 1.0 2.5#指定lj势参数 cutoff# define groups#定义组,便于加载group lo region lo-slab#定义lo-slab区域里的原子组叫lo组grouplo type 2#并不能改变原子类型,仅仅是将第2种原子定义入lo组grouphi region hi-slabgrouphi type 3grouplo-fixed region lo-fixedgrouphi-fixed region hi-fixedgroupboundary union lo-fixed hi-fixed#定义总边界组lo-fixed+hi-fixed= boundarygroupmobile subtract all boundary#定义可动原子组mobile=all-boundarysetgroup lo-fixed type 4#指定group lo-fixed为第四种原子类型setgroup hi-fixed type 4#指定group hi-fixed为第四种原子类型# initial velocities#设定初始速度compute new mobile temp/partial 0 1 0#定义温度的计算(可动区域内统计平均), 用户为计算取的名字new(ID),group-ID ,mobile原子组,temp/partiale(style)XYZ的对应位置0或1表示排除或包含这个方向Define a computation that calculates the temperature of a group of atoms, after excluding one or more velocity components. A compute of this style can be used by any command that computes a temperature, e.g.thermo_modify, fix temp/rescale, fix npt, etc.The temperature is calculated by the formula KE = dim/2 N k T, where KE = total kinetic energy of the groupof atoms (sum of 1/2 m v2), dim = dimensionality of the simulation, N = number of atoms in the group, k =Boltzmann constant, and T = temperature. The calculation of KE excludes the x, y, or z dimensions if xflag,yflag, or zflag = 0. The dim parameter is adjusted to give the correct number of degrees of freedom.velocitymobile create 0.1 482748 temp new#格式:velocity group-ID style args keyword value .mobile(group ID)按指定的温度(0.1)计算方法,初始化原子的速度。The create style generates an ensemble of velocities using a random number generator with the specified seed as the specified temperature.create风格使用一个随机数发生器与指定的种子产生一个整体的速度作为指定的温度。Create args = temp seedtemp = temperature value (temperature units) 0.1seed = random # seed (positive integer) 482748temp value = temperature compute ID temp newvelocityhi set 1.0 0.0 0.0 sum yes# velocity group-ID style args keyword valuehi原子组x方向的速度为1.0,set(style),set args = vx vy vzvx,vy,vz = velocity value or NULL (velocity units)any of vx,vy,vz van be a variable (see below)sum(keyword)其值为yes或者no (The sum keyword is used by all styles, except zero. The new velocities will be added to the existing ones ifsum = yes, or will replace them if sum = no).# fixes #fix指令的用途是对一组原子进行定义,可以用于更新原子的位置、速度、控制温度、加常力、施加边界条件等。当两个或更多fix在同一过程中作用时,根据程序中的先后顺序执行fix指令。fix1 all nve#nve微正则系综的时间积分算法,N分子数,V体积,E能量 fix2 boundary setforce 0.0 0.0 0.0#2 (fix ID),边界上XYZ方向力条件,边界不加力0。NULL表示指针为空的宏,0是没有任何特殊含义的值。也就是说,理论上来讲NULL可以是任意数值,虽然目前所有编译器都将其设为0。fix3 mobile temp/rescale 200 0.1 0.1 0.02 1.0#重置一组原子的温度通过明确调整它们的速度。3:fix编号,moblie原子组,200:每200步调节一次温度。开始温度0.1,结束温度0.1,温度在0.10.02之外调节,1.0调节分度。fix_modify3 temp new#3(fix-ID)要调整的fix命令编号,temp(温度)调温时,计算温度采用new计算fix 4 all enforce2d#二维模拟执行方式:z坐标方向的力和速度都是0.# Run#进行模拟timestep0.0025#时间步长0.0025thermo1000#每隔1000步输出热动力学统计量,默认值为0,只在开头和结尾输出热力学温度。thermo_modifytemp new#计算温度通过new指示的方法计算#dump1 all atom 500 dump.friction.lammpstrj#1(dump ID)all(group ID),atom(style)每隔500步将原子信息写入文件dump.friction#dump2 all image 500 image.*.jpg type type 每隔500步生成记录原子形态的image.*.jpg文件,color:type(由原子类型决定),diameter:type(由原子类型决定)#zoom 1.6 adiam 1.5#zoomvalue = zfactor = size that simulation box appears in imagezfactor = scale image size by factor 1 to enlarge, factor 1 to shrinkzfactor can be a variable (see below)adiam value = number = numeric value for atom diameter (distance un
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 工程转移支付协议书
- 潮汕租龙船合同范本
- 工程合同延期协议书
- 扩路占用土地协议书
- 扶贫代管代种协议书
- 扶贫帮扶框架协议书
- 批发商转让合同范本
- 承包保洁协议书模板
- 承包员工餐饮协议书
- 承包戒毒所合同范本
- 项目实施团队组建与人员配置方案
- 雨课堂在线学堂《信息素养-学术研究的必修课》作业单元考核答案
- 挡土墙施工私人协议书
- 2025年秋人教 PEP 版小学英语四年级上册期中检测试卷及答案(共3套)
- 财务管理记账工作表格模板
- 2025后勤考试试卷及答案
- 山东省青岛市市南区2023-2024学年八上期末数学试题(原卷版)
- 灌溉渠工程项目可行性研究报告
- 2025劳动合同书(上海市人力资源和社会保障局监制)
- 专利布局培训课件
- 仪表实操题库-《化工仪表维修工》(初级工)实际操作考核试卷
评论
0/150
提交评论