1、#边界条件 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为柔性
2、边界,允许边界上的粒子有微小移动以反映内层原子的作用力施加到它们身上的情况。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 styl
3、e 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
4、 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-i
5、nf,+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-asperi
6、ty 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#创建两个粗糙表
7、面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-s
8、lab区域里的原子组叫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 typ
9、e 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 g
10、roup 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 grou
11、pof 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 degree
12、s 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风格使用一个随机数发生器与
13、指定的种子产生一个整体的速度作为指定的温度。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 = v
14、x 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可以是任意数值,虽然目前所有编译器都将
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1