#-------------Initial Variable--------------# variable sigma equal 11 variable h equal 1 variable k equal 1 variable l equal 0 variable latC equal 3.615 variable E_o equal -3.54 variable X_n equal 1 variable Y_n equal 2 variable Z_n equal 1 variable etol equal 1e-15 variable ftol equal 1e-15 variable maxiter equal 5000 variable maxeval equal 1e4 variable GBname index Cu_110STGB variable CSL_X equal sqrt(${sigma})/sqrt(${h}^2+${k}^2+${l}^2)*${latC} variable CSL_Y equal sqrt(${sigma})*${latC} variable CSL_Z equal ${latC}/sqrt(${h}^2+${k}^2+${l}^2) variable UPP_Y equal ${Y_n}*${CSL_Y} variable MID_Y equal 3*${Y_n}*${CSL_Y} variable MOD_X equal ${X_n}*${CSL_X} variable MOD_Y equal 4*${Y_n}*${CSL_Y} variable MOD_Z equal ${Z_n}*${CSL_Z} units metal boundary p p p atom_style atomic lattice fcc ${latC} region total block 0 ${MOD_X} 0 ${MOD_Y} 0 ${MOD_Z} units box create_box 2 total lattice fcc ${latC} orient x -3 3 2 orient y 1 -1 3 orient z 1 1 0 region upper block INF INF 0 ${UPP_Y} INF INF units box create_atoms 1 region upper lattice fcc ${latC} orient x -3 3 -2 orient y -1 1 3 orient z 1 1 0 region middle block INF INF ${UPP_Y} ${MID_Y} INF INF units box create_atoms 2 region middle lattice fcc ${latC} orient x -3 3 2 orient y 1 -1 3 orient z 1 1 0 region lowwer block INF INF ${MID_Y} ${MOD_Y} INF INF units box create_atoms 1 region lowwer replicate 56 1 1 group upp_tem region upper group middle type 2 group low_tem region lowwer group upper subtract upp_tem middle group lowwer subtract low_tem middle pair_style meam pair_coeff * * library.meam Cu Cu.meam Cu Cu displace_atoms middle move 0 0 0 units box displace_atoms lowwer move 0 0 0 units box delete_atoms overlap 0.3 upper middle delete_atoms overlap 0.3 middle lowwer dump 1 all custom 1 TK_Cu110_113 id type x y z run 0 #-----------------Compute------------------# compute csym all centro/atom fcc compute E_atom all pe/atom compute E_all all reduce sum c_E_atom #---------Run minimize for tx and tz-------# reset_timestep 0 thermo 100 thermo_style custom step pe lx ly lz press pxx pyy pzz c_E_all min_style cg minimize ${etol} ${ftol} ${maxiter} ${maxeval} #--------Run minimize for expand GB--------# reset_timestep 0 thermo 100 thermo_style custom step pe lx ly lz press pxx pyy pzz c_E_all fix 1 all box/relax y 0 vmax 0.0001 min_style cg minimize ${etol} ${ftol} ${maxiter} ${maxeval} #-----------Calculate GB Energy------------# variable E_oall equal ${E_o}*count(all) variable GBarea equal lx*lz*4 variable E_GB equal (c_E_all-${E_oall})/${GBarea} variable E_GB_mjm2 equal ${E_GB}*16021.7733 variable E_GB_In equal round(${E_GB_mjm2}) dump 2 all custom 1 TK_Cu110_113_result id type xs ys zs c_E_atom run 0 print "---After third minization:" print "---GB energy is ${E_GB_mjm2} mj/m^2"