| 查看: 2503 | 回复: 4 | |||
[交流]
【讨论】LAMMPS 晶界计算 输入脚本
|
|||
|
在一个网站上看到的一个研究晶界的能量随各个自由度变化的LAMMPS输入文件https://ccg.hpc.msstate.edu/medi ... boundary_generation,很强大的样子,可是有一些设置不是太明白,拿出来大家讨论一下。 我有这么几处不明白,为什么overlapinic 要设为86?是怎么得到86这个数的? overlapdist 为什么要设为0.275+0.005*(v_c-1)?我知道它应该是测试晶界区域中不同的原子数带来的影响,可是这个0.275是怎么得到的? if $d == 2 then "delete_atoms overlap ${overlapdist} upper lower" 这句看起来比较奇怪,好像d只能是1,为什么还有这个句子? 望高手予以解答!! # LAMMPS Input File for Grain Boundaries # Mark Tschopp, Dec2009 # This file will generate numerous input files for LAMMPS # using a large number of grain boundaries # ---------- Setup Variables --------------------- variable etol equal 1.0e-25 variable ftol equal 1.0e-25 variable maxiter equal 5000 variable maxeval equal 10000 variable latparam equal 2.855312 variable minimumenergy equal -4.122435 variable overlapboth equal 1 variable gbname index Fe_100STGB1 variable counter equal 0 variable inc equal "v_latparam / 6" # Insert x,y,z sizes in LU and calculate in Angstroms variable xsize1 equal "sqrt(0^2 + 2^2 + 1^2)" variable zsize1 equal "sqrt(1^2 + 0^2 + 0^2)" variable xsize2 equal "sqrt(0^2 + 2^2 + -1^2)" variable zsize2 equal "sqrt(1^2 + 0^2 + 0^2)" if ${xsize1} <= ${xsize2} then "variable xsize equal ${xsize1}" else "variable xsize equal ${xsize2}" if ${zsize1} <= ${zsize2} then "variable zsize equal ${zsize1}" else "variable zsize equal ${zsize2}" variable xlen equal "v_xsize * v_latparam" variable zlen equal "v_zsize * v_latparam" # Determine number of increments for displacement grid in the in-plane GB directions variable xinc equal "floor(v_xlen / v_inc)" variable zinc equal "floor(v_zlen / v_inc)" # Implement overlap criterion variable overlapinc equal 86 # ---------- Define loops for simulation --------------------- label loopa variable a loop ${xinc} variable tx equal "(v_a-1) / v_xinc * v_xsize" label loopb variable b loop ${zinc} variable tz equal "(v_b-1) / v_zinc * v_zsize" label loopd variable d loop ${overlapboth} label loopc variable c loop ${overlapinc} variable overlapdist equal "0.275 + 0.005 * (v_c-1)" # ---------- Calculate counter and create data directory --------------------- variable ctemp equal ${counter}+1 variable counter equal ${ctemp} variable ctemp delete print "Counter: ${counter}" shell mkdir ${gbname} # ---------- Initialize Simulation --------------------- clear units metal dimension 3 boundary p p p atom_style atomic # ---------- Create Atomistic Structure --------------------- lattice bcc ${latparam} region whole block 0.000000 6.384672 -121.308763 121.308763 0.000000 2.855312 units box create_box 2 whole region upper block INF INF 0.000000 121.308763 INF INF units box lattice bcc ${latparam} orient x 0 2 1 orient y 0 -1 2 orient z 1 0 0 create_atoms 1 region upper region lower block INF INF -121.308763 0.000000 INF INF units box lattice bcc ${latparam} orient x 0 2 -1 orient y 0 1 2 orient z 1 0 0 create_atoms 2 region lower group upper type 1 group lower type 2 # ---------- Define Interatomic Potential --------------------- pair_style eam/fs pair_coeff * * /cavs/cmd/data1/users/mtschopp/LAMMPS/lammps-12Nov09/potentials/Fe_2.eam.fs Fe Fe neighbor 2.0 bin neigh_modify delay 10 check yes # ---------- Displace atoms and delete overlapping atoms --------------------- displace_atoms upper move ${tx} 0 ${tz} units lattice if $d == 1 then "delete_atoms overlap ${overlapdist} lower upper" if $d == 2 then "delete_atoms overlap ${overlapdist} upper lower" if $c == 1 then "variable atomprev equal 1" variable natoms equal "count(all)" print "Previous: ${atomprev}, Present: ${natoms}" if ${atomprev} == ${natoms} then "jump GB_Fe_100STGB1.in loopend" # ---------- Define Settings --------------------- compute csym all centro/atom compute eng all pe/atom compute eatoms all reduce sum c_eng # ---------- Run Minimization --------------------- reset_timestep 0 thermo 10 thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms min_style cg minimize ${etol} ${ftol} ${maxiter} ${maxeval} # ---------- Run Minimization 2--------------------- # Now allow the box to expand/contract perpendicular to the grain boundary reset_timestep 0 thermo 10 thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms fix 1 all box/relax aniso NULL 0.0 NULL vmax 0.001 min_style cg minimize ${etol} ${ftol} ${maxiter} ${maxeval} # ---------- Calculate GB Energy --------------------- variable esum equal "v_minimumenergy * count(all)" variable xseng equal "c_eatoms - (v_minimumenergy * count(all))" variable gbarea equal "lx * lz * 2" variable gbe equal "(c_eatoms - (v_minimumenergy * count(all)))/v_gbarea" variable gbemJm2 equal ${gbe}*16021.7733 variable gbernd equal round(${gbemJm2}) print "After third minimization:" print "GB energy is ${gbemJm2} mJ/m^2" # Store number of atoms for overlap criterion, i.e., do not rerun equivalent configurations variable atomprev equal "v_natoms" # ---------- Dump data into Data file ------------- shell cd Fe_100STGB1 reset_timestep 0 timestep 0.001 velocity all create 20 95812384 fix 2 all npt 1 1 100 xyz 0 0 100 drag 0.2 dump 1 all custom 1000 dump.${counter}_${gbernd} id type x y z c_csym c_eng run 0 shell cd .. # ---------- End of loop structure ------------- label loopend next c jump GB_Fe_100STGB1.in loopc variable c delete next d jump GB_Fe_100STGB1.in loopd variable d delete next b jump GB_Fe_100STGB1.in loopb variable b delete next a jump GB_Fe_100STGB1.in loopa print "All done" |
» 猜你喜欢
遇见不省心的家人很难过
已经有11人回复
博士延得我,科研能力直往上蹿
已经有4人回复
退学或坚持读
已经有24人回复
免疫学博士有名额,速联系
已经有14人回复
面上基金申报没有其他的参与者成吗
已经有4人回复
多组分精馏求助
已经有6人回复
» 本主题相关价值贴推荐,对您同样有帮助:
各位高手,怎么在windows下编译LAMMPS?
已经有4人回复
lammps的时间步长问题
已经有16人回复
寻求lammps的应用 欢迎大家畅所欲言
已经有8人回复
【求助】LAMMPS-运行报错
已经有9人回复
【讨论】想学lammps是否应该先学习C++
已经有28人回复
【讨论】lammps里的boundary的位置能够随意更改?
已经有14人回复
【求助】将MS数据文件转化成lammps data
已经有25人回复
【求助】MS建模导入lammps问题求救
已经有14人回复
【求助】Lammps 多机并行的问题
已经有11人回复
» 抢金币啦!回帖就可以得到:
哈尔滨工程大学青岛创新发展基地招聘青年教师
+1/513
南方科技大学周友运课题组诚聘博士后、科研助理
+1/173
深圳大学信息功能电子材料方向“申请-考核制”博士生招生
+2/100
Postdoctoral Research Fellow Position in Causal Inference Weill CorneIl Medicine
+1/92
丙烯液相
+1/77
诚聘 有机光电材料计算方向 博士后、科研助理、访问学生
+1/75
中国石油大学(北京)国家级大人才团队博士招生2名:化学、材料、石油工程:油田化学
+2/63
香港科技大学计算物理及流体力学课题组招收全奖博士后及博士生(2026年9月入学)
+1/41
西交利物浦大学招收26年【全奖】博士生1名(空间智能沉浸式手术导航)
+1/40
山东科技大学招聘化学化工博士博士后
+1/31
教育部重点实验室和清华大学某国家重点实验室,联合培养硕生、博生,并长期招博士后
+1/30
上海市“光探测材料与器件”工程技术研究中心(上海应用技术大学)招聘优秀研究人员
+1/28
山东科技大学招聘化学化工博士博士后
+1/28
武汉工程大学绿碳技术与智能材料课题组诚招2026年博士研究生
+2/22
德国Karlsruhe Institute of Technology招收电化学储能及联合培养CSC博士
+1/17
联合研究团队招聘博后等青年人才
+1/9
太原理工大学集成电路学院院长团队招收2026年博士研究生
+1/8
电子科技大学 电子科学与工程学院 杨青慧教授 2026年招博士研究生数名
+1/8
易度气体质量流量控制器应用于燃料电池行业
+1/5
【博士后/科研助理招聘-北京理工大学-集成电路与电子学院-国家杰青团队】
+1/4
2楼2011-03-29 18:34:29
3楼2012-06-05 21:54:28
5楼2015-05-11 10:54:00
简单回复
lcl1cxt4楼
2015-01-16 20:52
回复
顶一下,













回复此楼