| 5 | 1/1 | 返回列表 |
| 查看: 2552 | 回復(fù): 4 | |||
[交流]
【討論】LAMMPS 晶界計算 輸入腳本
|
|||
|
在一個網(wǎng)站上看到的一個研究晶界的能量隨各個自由度變化的LAMMPS輸入文件https://ccg.hpc.msstate.edu/medi ... boundary_generation,很強大的樣子,可是有一些設(shè)置不是太明白,拿出來大家討論一下。 我有這么幾處不明白,為什么overlapinic 要設(shè)為86?是怎么得到86這個數(shù)的? overlapdist 為什么要設(shè)為0.275+0.005*(v_c-1)?我知道它應(yīng)該是測試晶界區(qū)域中不同的原子數(shù)帶來的影響,可是這個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" |
» 搶金幣啦!回帖就可以得到:
+1/275
+1/184
+1/88
+1/55
+5/50
+1/38
+1/37
+1/37
+1/19
+1/18
+1/17
+5/15
+1/8
+1/5
+1/3
+1/2
+1/2
+1/2
+1/2
+1/1
| 5 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 265求調(diào)劑 +6 | yelck 2026-04-01 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 085701環(huán)境工程,267求調(diào)劑 +17 | minht 2026-03-26 | 17/850 |
|
|
[考研] 362求調(diào)劑 +10 | 西南交材料專碩3 2026-03-31 | 10/500 |
|
|
[考研] 307分求調(diào)劑 +7 | (o~o) 2026-03-31 | 7/350 |
|
|
[考研] 311求調(diào)劑 +9 | 李芷新1 2026-03-31 | 9/450 |
|
|
[論文投稿]
chinese chemical letters英文版投稿求助
120+4
|
Yishengeryi 2026-03-30 | 4/200 |
|
|
[考研] 省雙一流重點一本大學(xué)招收調(diào)劑 +3 | wwwwffffff 2026-03-31 | 5/250 |
|
|
[考研] 一志愿華東師范大學(xué)有機化學(xué)專業(yè),初試351分,復(fù)試被刷求調(diào)劑! +9 | 真名有冰 2026-03-29 | 10/500 |
|
|
[考研] 346求調(diào)劑 一志愿070303有機化學(xué) +11 | 蘿卜燉青菜 2026-03-28 | 12/600 |
|
|
[考研] 329求調(diào)劑,一志愿西北工業(yè)大學(xué),材料工程(085601) +6 | 小小機靈蟲 2026-03-29 | 12/600 |
|
|
[考研] 311求調(diào)劑 +9 | 藍月亮亮 2026-03-30 | 9/450 |
|
|
[考研] 343求調(diào)劑 +8 | 愛羈絆 2026-03-28 | 8/400 |
|
|
[考研] 本科211生物醫(yī)學(xué)工程085409求調(diào)劑339分 +7 | 里子木yy 2026-03-29 | 7/350 |
|
|
[考研] 276求調(diào)劑 +3 | 趙久華 2026-03-29 | 3/150 |
|
|
[考研] 福建理工大學(xué)材料學(xué)院先進合金團隊招收考研調(diào)劑學(xué)生 +3 | 大華金商都 2026-03-30 | 4/200 |
|
|
[考研] 281求調(diào)劑 +5 | 亞克西good 2026-03-26 | 7/350 |
|
|
[考研] 一志愿中南大學(xué)化學(xué)0703總分337求調(diào)劑 +6 | niko- 2026-03-27 | 6/300 |
|
|
[考研] 275求調(diào)劑 +15 | Micky11223 2026-03-25 | 20/1000 |
|
|
[考研] 一志愿北京理工大學(xué)本科211材料工程294求調(diào)劑 +8 | mikasa的圍巾 2026-03-28 | 8/400 |
|
|
[考研] 315分求調(diào)劑 +7 | 26考研上岸版26 2026-03-26 | 7/350 |
|