# bulk melting of aluminium read_restart restart.stage1 ########defining the loop########### label runloop region supercell sphere 0 0 0 100 units box region mysphere sphere 0 0 0 50 units box variable x loop 48 #50 variable y equal $x-1 if "${y}>0" then "read_restart stage2/restart.stage2.${y}" variable t_int equal (300+25*($x-1)) variable t_fin equal (300+25*$x) ###############defien the Varibles################# variable t equal 0.001 variable t_demp equal "100* v_t" variable p_demp equal "1000* v_t" ########potential################ pair_style eam/alloy pair_coeff * * Al.eam Al ##########TIMESTEP AND COMPUTE############ timestep 0.001 compute pe all pe/atom compute ke all ke/atom compute Al_msd all msd variable mass_g equal mass(all,mysphere)/6.022e27 variable vol_cm7 equal 527598.77*1.0e-24 variable density equal v_mass_g/v_vol_cm7 variable peatom equal pe/atoms variable vmsd equal c_Al_msd[4] variable vstep equal step variable vtemp equal temp variable vpress equal press variable te_atom atom temp compute dis all displace/atom ###############creting bins############################################ ######bins_pe################### #####inner_most_zone1################# ########potential_energy#################### variable inner_atoms_1 equal count(inner_bin_1) compute inner_pe_1 inner_bin_1 pe/atom compute inner_peatom_1 inner_bin_1 reduce ave c_inner_pe_1 variable inner_pebin_1 equal c_inner_peatom_1 ########kinetic_energy############################ compute inner_ke_1 inner_bin_1 ke/atom compute inner_keatom_1 inner_bin_1 reduce ave c_inner_ke_1 variable inner_kebin_1 equal c_inner_keatom_1 ###########msd################### compute inner_msd_1 inner_bin_1 msd com yes variable inner_msd_1 equal c_inner_msd_1[4] ######### Middle_layer_zone########################### ######potential_energy###################################### variable mid_atoms_1 equal count(mid_bin_1) compute mid_pe_1 mid_bin_1 pe/atom compute mid_peatom_1 mid_bin_1 reduce ave c_mid_pe_1 variable mid_pebin_1 equal c_mid_peatom_1 ############kinetic_energy################### compute mid_ke_1 mid_bin_1 ke/atom compute mid_keatom_1 mid_bin_1 reduce ave c_mid_ke_1 variable mid_kebin_1 equal c_mid_keatom_1 ####msd################### compute mid_msd_1 mid_bin_1 msd com yes variable mid_msd_1 equal c_mid_msd_1[4] ##########outer_most_zone7########################## variable atoms_3 equal count(bin_3) compute pe_3 bin_3 pe/atom compute peatom_3 bin_3 reduce ave c_pe_3 variable pebin_3 equal c_peatom_3 ##########bin_ke###################### compute ke_3 bin_3 ke/atom compute keatom_3 bin_3 reduce ave c_ke_3 variable kebin_3 equal c_keatom_3 ############bin msd ################## compute 19 all msd variable sph_msd equal c_19[4] compute 14 bin_3 msd variable msd_3 equal c_14[4] ###### print PEATOM in file############## #run 0 print "# vstep vtemp inner_pebin_1 inner_kebin_1 inner_msd_1 inner_atoms_1 inner_atoms_5" file stage2/stage2_inner_$x.txt fix inner all print 100 "${vstep} ${vtemp} ${inner_pebin_1} ${inner_kebin_1} ${inner_msd_1} ${inner_atoms_1}" append stage2/stage2_inner_$x.txt screen no print "# vstep vtemp mid_pebin_1 mid_kebin_1 mid_msd_1 mid_atoms_1 " file stage2/stage2_mid_$x.txt fix mid all print 100 "${vstep} ${vtemp} ${mid_pebin_1} ${mid_kebin_1} ${mid_msd_1} ${mid_atoms_1}" append stage2/stag2_mid_$x.txt screen no print "# vstep vtemp pebin_1 kebin_1 msd_1 atoms_1 " file stage2/stage2_outer_$x.txt fix mid all print 100 "${vstep} ${vtemp} ${pebin_3} ${kebin_3} ${msd_3} ${atoms_3} " append stage2/stage2_outer_$x.txt screen no ########therom and Dump ############################## reset_timestep 0 thermo 100 thermo_style custom step temp pe ke press pxx pyy pzz v_sph_msd dump 1 all custom 52500 stage1/stage2.$x.dump id type x y z vx vy vz c_pe c_ke v_te_atom c_dis[4] ##########FIX the ensemble and file gneration########## fix 5 all nvt temp ${t_int} ${t_fin} ${t_demp} fix 6 all recenter INIT INIT INIT units box run 2500 unfix 6 unfix 5 log stage2/log.$x.heat fix 7 all nvt temp ${t_fin} ${t_fin} ${t_demp} fix 8 all recenter INIT INIT INIT units box run 50000 unfix 8 unfix 7 ########### restart file #################################### write_restart stage2/restart.stage2.$x clear next x jump stage2.txt runloop ######## END ##########################