首页 >> 仿真软件说明 >>ABACUS >>朱雪刚版 >> 5.2 Be薄膜生长模拟 2024.06.21
详细内容

5.2 Be薄膜生长模拟 2024.06.21

# sample surface deposition script for atoms with fixed layer by zhuxuegang 

# --------------- VARIABLE ------------------
label   loop
suffix      gpu
variable    tp index 333.15 273.15 373.15 423.15 623.15
variable    bxh equal 20
variable    xn equal 14
variable    yn equal 10
variable    zn equal 10
variable    btk equal 10
variable    dpatomnum index 9

#substrate thickness 'btk' should larger than 3 for the fix, constant temp layer
variable    vtk equal 10
# 'vtk' is the thickness of vacuum
variable        rneq equal 50000

variable        dag index 0  15 30 38 45 60 
variable        dae index 2 5 10 1 0.5 15 20   
variable        daed equal 0.0

variable        numvl index 3 5 7 10 13 16 19 23 25 
#first of all define the variable using in the follow context
#temperature tp,temperature low / high tpl / tph, boxs size and
variable    tpl equal 10
variable    tph equal 2000

#lattice constant lt
variable    bxl equal 0
variable    lt equal 3.21
variable        mgmass equal 24.30500000
###timestep 'ts',run many timesteps to deposit atom'rneq',
###dump every many timesteps equilibrium 'dseq' and deposit 'dsdp'
###dpinter is the deposite time interval

variable        ts equal 0.001

#variable       rndp equal 10
variable        dpinter equal 2000
variable        rndp equal "v_dpn*v_dpinter+v_rneq"
variable        dseq equal 20000
variable        dsdp equal "ceil(v_dpinter*50+1500)"
#deposit atom number 'dpn', and every many timesteps to deposit 'dpts'
#variable       dpn equal 4000
variable        dpn equal "ceil(v_xn*v_yn*v_zn*16/v_dpatomnum)"
#deposit atom velocity basic vertical to surface with angle of 0 degree
#deposit atom degree dag, deposit atom energy dae 
#for the symmetry system vx equal to vy so only one need to set daed is deposit energy deta 

shell mkdir Mg_twin${numvl}_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}
shell cd Mg_twin${numvl}_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}
log log.Mg_twin${numvl}_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}.lammps

# --------------- INITIALIZATION ------------------
units               metal
dimension           3
atom_style          atomic
boundary            p p p
# ------------------ ATOM DEFINITION -------------------
lattice             hcp ${lt}
variable        byl equal "ceil(v_bxl/(sqrt(3)))"
variable        byh equal "ceil(v_bxh/(sqrt(3)))"
variable        bzl equal "ceil(v_bxl/(sqrt(8/3)))"
variable        bzh equal "v_btk+v_vtk"
#region             box block ${bxl} ${bxh} ${byl} ${byh} ${bzl} ${bzh}
#create_box         4 box

read_data           ../Mgpoly${numvl}.lmp

region      bound block INF INF INF INF 0 0.6
region      contemp block INF INF INF INF 0.6 1.6
region      reltemp block INF INF INF INF 1.6 ${btk}
region      substrate union 3 bound contemp reltemp
#create_atoms   1 region substrate

#variable chgz equal "v_bzh*1.568/1.632993"
#change_box all z final 0.0 ${chgz} remap

group       bound region bound 
group       contemp region contemp
group       reltemp region reltemp
group       substrate region substrate
group       addatoms type 2
set group       bound type 3
set group       contemp type 4
# -------------------- ATOM DEFINITION----------------------
pair_style  eam/fs
pair_coeff  * * ../Mg.eam.fs Mg Mg Mg Mg

#mass       1 ${mgmass}
#mass       2 ${mgmass}
#mass       3 ${mgmass}
#mass       4 ${mgmass}

#---------------------------Settings-equilibrium-------------
velocity        all create ${tp} 28459

timestep            ${ts}

thermo_style        custom step elapsed atoms temp press ke pe etotal enthalpy vol density 
thermo              100
thermo_modify       lost ignore flush yes

velocity        bound set 0.0 0.0 0.0

fix             1 bound  setforce 0.0 0.0 0.0 
fix             2 reltemp  nve
#fix            3 contemp  npt temp ${tp} ${tp} 0.01 iso 0.0 0.0 0.1
#run            ${rneq}
#unfix          3

fix             3 contemp  npt temp ${tp} ${tp} 0.01 iso 0.0 0.0 0.1
shell           mkdir Mg_twin${numvl}eq_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}
shell           cd Mg_twin${numvl}eq_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}
dump            1 all custom 100 Mg_mini_twin${numvl}_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}.* id type x y z fx fy fz vx vy vz
min_style cg 
minimize 1e-25 1e-25 5000 10000 
undump          1

dump            1 all custom ${dseq} Mg_twin${numvl}_eq_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}.* id type x y z fx fy fz vx vy vz

run             ${rneq}
shell           cd ..
#unfix          3

#fix            3 contemp  npt temp ${tp} ${tp} 0.01 iso 0.0 0.0 0.1
#run            ${rneq}
undump          1
write_restart           restart.tem${tp}
#---------------------------deposit----------------------------
#compute        add addatoms temp
#compute_modify     add dynamic yes extra 

variable            x0 equal "xlo+0.01"
variable            x4 equal "xhi-0.01"
variable            y0 equal "ylo+0.01"
variable            y4 equal "yhi-0.01"
variable            z0 equal "zhi-v_lt*1.601*(v_vtk-9)"
variable            z1 equal "zhi-v_lt*1.601*(v_vtk-9)"
variable            x1 equal "v_x4/4"
variable            y1 equal "v_y4/4"
variable            x2 equal "v_x4/2"
variable            y2 equal "v_y4/2"
variable            x3 equal "v_x4*3/4"
variable            y3 equal "v_y4*3/4"

variable            x31 equal "v_x4/3"
variable            y31 equal "v_y4/3"
variable            x32 equal "v_x4*2/3"
variable            y32 equal "v_y4*2/3"

lattice             none 1.0
variable        pi equal 3.14159265358979323846
variable        dpvl equal "sqrt(2*v_dae*1.6021765314*10000/(v_mgmass*1.66053886))"
variable        dpvh equal "sqrt(2*(v_dae+v_daed)*1.6021765314*10000/(v_mgmass*1.66053886))"
variable        dpvzl equal "-v_dpvl*abs(cos(v_dag*v_pi/180))"
variable        dpvzh equal "-v_dpvh*abs(cos(v_dag*v_pi/180))" 
variable        dpvyl equal "-v_dpvl*abs(sin(v_dag*v_pi/180))"
variable        dpvyh equal "-v_dpvh*abs(sin(v_dag*v_pi/180))"
variable        dpts equal "floor((v_rndp-v_rneq)/v_dpn)"

variable            zdell equal "zhi-v_lt-0.5"
variable            zdelh equal "zhi-v_lt+0.5"
region              deletatom block ${x0} ${x4} ${y0} ${y4} ${zdell} ${zdelh}

fix                 5 addatoms nve
run                 0

compute             addtp addatoms temp
compute_modify      addtp dynamic yes extra 0
variable            addtpc equal "c_addtp"
compute             realtp reltemp temp
compute_modify      realtp dynamic yes extra 0
variable            realtpc equal "c_realtp"

compute             addke addatoms ke
compute_modify      addke dynamic yes extra 0
variable            addkec equal "c_addke"
compute             atallke all ke/atom
variable            atallkec equal "c_atallke"
compute             ctat all centro/atom fcc
variable            ctatc equal "c_ctat"
compute             atpe all pe/atom 
variable            atpec equal "c_atpe"
#compute            allpe all reduce sum c_adpe

compute             addpe addatoms pe/atom
compute_modify      addpe dynamic yes extra 0
variable            addpec equal "c_addpe"
compute             adallpe addatoms reduce sum c_addpe
variable            adallpec equal "c_adallpe"

variable            dppz equal xcm(addatoms,z) 
variable            dppx equal xcm(addatoms,x) 
variable            dppy equal xcm(addatoms,y) 
variable            dpatn equal count(addatoms) 

#fix            pr addatoms print 1 " ${dppx}   ${dppy} ${dppz} ${addtpc}   ${addkec}   ${adallpec} ${realtpc}" title "add_pos_x    add_pos_y   add_pos_z   addtemp add_ke  add_pe  realtemp" append ke${dae}ag${dag}temp${tp}.txt screen no
#label              loop
fix                 7 all evaporate 1 100 deletatom 49892

shell       mkdir Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}
shell       cd Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}_dpatom${dpatomnum}

if      "${dpatomnum} ==1" then "jump SELF dpatom1"
if      "${dpatomnum} ==4" then "jump SELF dpatom4"
if      "${dpatomnum} ==8" then "jump SELF dpatom8"
if      "${dpatomnum} ==9" then "jump SELF dpatom9"
if      "${dpatomnum} ==16" then "jump SELF dpatom16"

label       dpatom1
region              deposit1    block ${x0} ${x4} ${y0} ${y4} ${z0} ${z1} 
fix                 dp1  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit1  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
dump                1 all custom ${dsdp} Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}.* id type x y z fx fy fz vx vy vz
run                 ${rndp}
shell       cd ..
unfix                   dp1 
jump            SELF break

label       dpatom4
region              deposit1    block ${x0} ${x2} ${y0} ${y2} ${z0} ${z1} 
region              deposit2    block ${x2} ${x4} ${y0} ${y2} ${z0} ${z1}
region              deposit3    block ${x0} ${x2} ${y2} ${y4} ${z0} ${z1} 
region              deposit4    block ${x2} ${x4} ${y2} ${y4} ${z0} ${z1} 

fix                 dp1  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit1  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp2  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit2  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp3  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit3  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp4  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit4  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}

dump                1 all custom ${dsdp} Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}.* id type x y z fx fy fz vx vy vz
run                 ${rndp}
shell       cd ..
unfix                   dp1
unfix                   dp2
unfix                   dp3
unfix                   dp4
jump            SELF break

label       dpatom8
region              deposit1    block ${x0} ${x1} ${y0} ${y2} ${z0} ${z1} 
region              deposit2    block ${x1} ${x2} ${y0} ${y2} ${z0} ${z1}
region              deposit3    block ${x2} ${x3} ${y0} ${y2} ${z0} ${z1} 
region              deposit4    block ${x3} ${x4} ${y0} ${y2} ${z0} ${z1}
region              deposit5    block ${x0} ${x1} ${y2} ${y4} ${z0} ${z1} 
region              deposit6    block ${x1} ${x2} ${y2} ${y4} ${z0} ${z1}
region              deposit7    block ${x2} ${x3} ${y2} ${y4} ${z0} ${z1} 
region              deposit8    block ${x3} ${x4} ${y2} ${y4} ${z0} ${z1}

fix                 dp1  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit1  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp2  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit2  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp3  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit3  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp4  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit4  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp5  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit5  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp6  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit6  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp7  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit7  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp8  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit8  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}

dump                1 all custom ${dsdp} Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}.* id type x y z fx fy fz vx vy vz
run                 ${rndp}
shell       cd ..
unfix                   dp1
unfix                   dp2
unfix                   dp3
unfix                   dp4
unfix                   dp5
unfix                   dp6
unfix                   dp7
unfix                   dp8
jump            SELF break

label       dpatom9
region              deposit1    block ${x0} ${x31}  ${y0} ${y31} ${z0} ${z1} 
region              deposit2    block ${x31} ${x32} ${y0} ${y31} ${z0} ${z1}
region              deposit3    block ${x32} ${x4}  ${y0} ${y31} ${z0} ${z1} 
region              deposit4    block ${x0} ${x31}  ${y31} ${y32} ${z0} ${z1} 
region              deposit5    block ${x31} ${x32} ${y31} ${y32} ${z0} ${z1}
region              deposit6    block ${x32} ${x4}  ${y31} ${y32} ${z0} ${z1} 
region              deposit7    block ${x0} ${x31}  ${y32} ${y4} ${z0} ${z1} 
region              deposit8    block ${x31} ${x32} ${y32} ${y4} ${z0} ${z1}
region              deposit9    block ${x32} ${x4}  ${y32} ${y4} ${z0} ${z1} 

fix                 dp1  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit1  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp2  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit2  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp3  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit3  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp4  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit4  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp5  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit5  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp6  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit6  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp7  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit7  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp8  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit8  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp9  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit9  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}

dump                1 all custom ${dsdp} Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}.* id type x y z fx fy fz vx vy vz
run                 ${rndp}
shell       cd ..
unfix                   dp1
unfix                   dp2
unfix                   dp3
unfix                   dp4
unfix                   dp5
unfix                   dp6
unfix                   dp7
unfix                   dp8
unfix                   dp9
jump            SELF break

label       dpatom16
region              deposit1    block ${x0} ${x1} ${y0} ${y1} ${z0} ${z1} 
region              deposit2    block ${x1} ${x2} ${y0} ${y1} ${z0} ${z1} 
region              deposit3    block ${x2} ${x3} ${y0} ${y1} ${z0} ${z1} 
region              deposit4    block ${x3} ${x4} ${y0} ${y1} ${z0} ${z1}
region              deposit5    block ${x0} ${x1} ${y1} ${y2} ${z0} ${z1} 
region              deposit6    block ${x1} ${x2} ${y1} ${y2} ${z0} ${z1} 
region              deposit7    block ${x2} ${x3} ${y1} ${y2} ${z0} ${z1} 
region              deposit8    block ${x3} ${x4} ${y1} ${y2} ${z0} ${z1}
region              deposit9    block ${x0} ${x1} ${y2} ${y3} ${z0} ${z1} 
region              deposit10   block ${x1} ${x2} ${y2} ${y3} ${z0} ${z1} 
region              deposit11   block ${x2} ${x3} ${y2} ${y3} ${z0} ${z1} 
region              deposit12   block ${x3} ${x4} ${y2} ${y3} ${z0} ${z1}
region              deposit13   block ${x0} ${x1} ${y3} ${y4} ${z0} ${z1} 
region              deposit14   block ${x1} ${x2} ${y3} ${y4} ${z0} ${z1} 
region              deposit15   block ${x2} ${x3} ${y3} ${y4} ${z0} ${z1} 
region              deposit16   block ${x3} ${x4} ${y3} ${y4} ${z0} ${z1}

fix                 dp1  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit1  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp2  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit2  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp3  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit3  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp4  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit4  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp5  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit5  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp6  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit6  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp7  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit7  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp8  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit8  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp9  addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit9  near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp10 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit10 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp11 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit11 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp12 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit12 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp13 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit13 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp14 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit14 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp15 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit15 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}
fix                 dp16 addatoms deposit ${dpn} 2 ${dpts} 12345 region deposit16 near ${lt} vz ${dpvzl} ${dpvzh} vy ${dpvyl} ${dpvyh}

dump                1 all custom ${dsdp} Mg_twin${numvl}_dp_e${dae}_ag${dag}_temp${tp}.* id type x y z fx fy fz vx vy vz
#run                    20000
#unfix              pr
run                 ${rndp}
shell       cd ..
unfix                   dp1 
unfix                   dp2 
unfix                   dp3 
unfix                   dp4 
unfix                   dp5 
unfix                   dp6 
unfix                   dp7 
unfix                   dp8 
unfix                   dp9 
unfix                   dp10
unfix                   dp11
unfix                   dp12
unfix                   dp13
unfix                   dp14
unfix                   dp15
unfix                   dp16
jump            SELF break

label           break

#unfix              7
#if         "${dpatn} >= ${dpn}" then "jump SELF break"
#jump   SELF loop
#label  break
run             ${rneq}
write_restart       restart.tem300.deposit

undump              1
unfix               7

shell       cd ..
clear
next       tp
jump    SELF loop
clear
next       dag
jump    SELF loop
clear
next       dae
jump    SELF loop
clear
next       numvl
jump    SELF loop
clear
#next       dpatomnum
#jump   SELF loop
#clear

print               "All done"

简化版本的input,去掉变量,循环等

# exsample surface deposition script for atoms with fixed layer by xuegang emal xuegangzhu@qq.com 

# --------------- INITIALIZATION ------------------
units               metal
dimension           3
atom_style          atomic
boundary            p p p
# ------------------ ATOM DEFINITION -------------------
lattice             hcp 2.2856
read_data           /home/zxg/BeCu/STRU/Be/lmp_file/Be128_surface.lmp

region              bound block INF INF INF INF 0 0.6
region              contemp block INF INF INF INF 0.6 1.6
region              reltemp block INF INF INF INF 1.6 16.6
region              substrate union 3 bound contemp reltemp

group               bound region bound 
group               contemp region contemp
group               reltemp region reltemp
group               substrate region substrate
group               addatoms type 1

pair_style          deepmd /home/zxg/BeCu/dpgennew/dp_potential/inter09/000/frozen_model.pb
pair_coeff          * * 

mass                1 9.012182
mass                2 63.55
#---------------------------Settings-equilibrium-------------
velocity            all create 250 28459
timestep            0.001

thermo_style        custom step elapsed atoms temp press ke pe etotal
thermo              100
thermo_modify       lost ignore flush yes

velocity            bound set 0.0 0.0 0.0
fix                 1 bound  setforce 0.0 0.0 0.0 
fix                 2 reltemp  nve
fix                 3 contemp  npt temp 250 250 0.01 iso 0.0 0.0 0.1
shell               mkdir Be_equlibrum
shell               cd Be_equlibrum
dump                1 all custom 100 Be_mini.* id type x y z fx fy fz vx vy vz
min_style           cg 
minimize            1e-25 1e-25 5000 10000 
undump              1

dump                1 all custom 200 Be_equlibrum.* id type x y z fx fy fz vx vy vz
run                 200000
undump              1
shell               cd ..
write_restart       restart.temp250
#---------------------------deposit----------------------------
lattice             none 1.0
fix                 5 addatoms nve
run                 0

shell               mkdir Be_deposite
shell               cd Be_deposite

region              deposit1    block 2 6 2 6 40 41
fix                 dp1  addatoms deposit 2 1 500 12345 region deposit1  near 0.5 vz -1 -1 vy -1 -1
dump                1 all custom 100 Be_dp_growth.* id type x y z fx fy fz vx vy vz
run                 10000000
undump              1
shell               cd ..
unfix               dp1 

dump                1 all custom 100 Be_final.* id type x y z fx fy fz vx vy vz
run                 200000
undump              1

print               "All done"

结构文件,基底模型

  1. 结构文件准备

将Be的hcp晶体构型的LAMMPS文件进行修改,把z轴的最高值由16.6手动增加到46.6(相当于手动添加了真空层)

用ovitio打开可看到图片形式

  1. 运行LAMMPS

激活conda环境然后用dpmd版本的lmp运行

conda activate deepmd
lmp -in in.Be_dp_deposit

  1. 结果分析

运行完成后生成了对应的文件和文件夹如下

(deepmd) [root@87_gpu grwoth]# tree
.
├── Be_deposite
│   ├── Be_dp_growth.2100
│   ├── Be_dp_growth.2200
│   ├── Be_dp_growth.2300
│   ├── Be_dp_growth.2400
│   ├── Be_dp_growth.2500
│   ├── Be_dp_growth.2600
│   ├── Be_dp_growth.2700
│   ├── Be_dp_growth.2800
│   ├── Be_dp_growth.2900
│   └── Be_dp_growth.3000
├── Be_equlibrum
│   ├── Be_equlibrum.1000
│   ├── Be_equlibrum.1200
│   ├── Be_equlibrum.1400
│   ├── Be_equlibrum.1600
│   ├── Be_equlibrum.1800
│   ├── Be_equlibrum.200
│   ├── Be_equlibrum.2000
│   ├── Be_equlibrum.400
│   ├── Be_equlibrum.600
│   ├── Be_equlibrum.800
│   ├── Be_mini.0
│   └── Be_mini.26
├── Be_final.3100
├── Be_final.3200
├── in.Be_dp_deposit
├── in.Mg_deposit_9atom
├── log.lammps
└── restart.temp250

2 directories, 28 files

其中平衡结构在equlibrum文件夹中,生长结构在deposite文件夹中。

用ovitio对deposite文件夹下的LAMMPS输出进行薄膜生长可视化,以及其他分析等,可参考我以前发表的文章,分析晶界,表面等内容。

Symmetric tilt grain boundary evolution during the growth of copper thin films: Molecular dynamics simulation

Xuegang Zhu,Xinlu Cheng

论文

Physica B: Physics of Condensed Matter

2019.11

由于我是访问之后才接触python因此后续薄膜生长的python脚本待详细做薄膜生长时再补充。

注意:势函数不准问题 由于势函数拟合时并无表面,且只有平衡结构,并不适用于薄膜生长模拟,且在模拟过程中出现模拟原子散掉模拟盒子增大等势函数不准导致的情况出现,因此需要增加数据集提高势函数的准确性和适用性。


作者:朱雪刚 邮箱:xuegangzhu@qq.com; 工作单位:石家庄学院 理学院/北京科学智能研究院(AISI)访问学者2023.07-2024.09,访问导师北京大学陈默涵; 徐张满仓 邮箱: xuzhangmancang@dp.tech

截止2024.07.21录制视频教程已上传至Bohrium的课程《DeePMD应用案例讲解:铜原子掺杂铍晶体的机器学习势函数拟合过程演示》网址: https://bohrium.dp.tech/courses/1075495070?tab=courses 后续会在Bohrium平台更新

注意:后续的更新,大部分会在Bohrium课程平台进行,请看教程入门的同学加入课程进行学习;且录制的视频课程会把一些个人观点给加入,从个人观点来看比文字教程的内容更多

写教程内容讨论QQ群:143276924 DPGEN+ABACUS教程准备;

ABACUS软件的QQ群:759914681,群内有专职开发人员,目前ABACUS提问问题以github的issue为主,群内可作为辅助提问。

欢迎大家推广本教程,让更多的dp入门学习者有个参考,目前2024.09.16我联系的微信公众号推广是 lammps加油站的小马老师(我也报名了小马老师的一对一辅导)。当然也看到lammps爱好者在转发推广。感谢大家公众号的推广。


技术支持: CLOUD | 管理登录
seo seo