# Variables that can be adjusted by kim-lammps-preprocessor to switch unit sets for # Simulator Models variable _u_distance equal 1.0 variable _u_energy equal 1.0 variable _u_mass equal 1.0 variable _u_time equal 1.0 variable _u_pressure equal 1.0 variable _u_temperature equal 1.0 # This line may be swapped out by kim-lammps-preprocessor if running against a Simulator # Model whose atom_style is not 'atomic' atom_style atomic # periodic boundary conditions along all three dimensions boundary p p p # Set neighbor skin variable neigh_skin equal 2.0*${_u_distance} variable neigh_skin equal 2.0*1 neighbor ${neigh_skin} bin neighbor 2 bin # create a supercell with cubic lattice (fcc, bcc, sc, or diamond) # using 10*10*10 conventional (orthogonal) unit cells variable latticeconst_converted equal 5.474051356315613*${_u_distance} variable latticeconst_converted equal 5.474051356315613*1 lattice diamond ${latticeconst_converted} lattice diamond 5.47405135631561 Lattice spacing in x,y,z = 5.47405 5.47405 5.47405 region simbox block 0 10 0 10 0 10 units lattice create_box 1 simbox Created orthogonal box = (0 0 0) to (54.7405 54.7405 54.7405) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 8000 atoms create_atoms CPU = 0.000775099 secs variable mass_converted equal 28.0855*${_u_mass} variable mass_converted equal 28.0855*1 # specify which KIM Model to use pair_style kim SNAP_ZuoChenLi_2019_Si__MO_869330304805_000 pair_coeff * * Si mass 1 ${mass_converted} mass 1 28.0855 # initial volume variable v equal vol # assign formula variable V0 equal ${v} # evaluate initial value variable V0 equal 164031.253093386 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 164031.253093386/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 164031.253093386/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 164031.253093386/(1*1*${_u_distance}) variable V0_metal equal 164031.253093386/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 164031.253093386*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 164031.253093386 Angstroms^3 # set the time step to 0.001 picoseconds variable timestep_converted equal 0.001*${_u_time} variable timestep_converted equal 0.001*1 timestep ${timestep_converted} timestep 0.001 variable temp_converted equal 333.15*${_u_temperature} variable temp_converted equal 333.15*1 variable Tdamp_converted equal 0.1*${_u_time} variable Tdamp_converted equal 0.1*1 variable press_converted equal 0.0*${_u_pressure} variable press_converted equal 0.0*1 variable Pdamp_converted equal 1*${_u_time} variable Pdamp_converted equal 1*1 # create initial velocities consistent with the chosen temperature velocity all create ${temp_converted} 17 mom yes rot yes velocity all create 333.15 17 mom yes rot yes # set NPT ensemble for all atoms fix ensemble all npt temp ${temp_converted} ${temp_converted} ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 333.15 ${temp_converted} ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 333.15 333.15 ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 333.15 333.15 0.1 iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 333.15 333.15 0.1 iso 0 ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 333.15 333.15 0.1 iso 0 0 ${Pdamp_converted} fix ensemble all npt temp 333.15 333.15 0.1 iso 0 0 1 # compute the time averages of pressure, temperature, and volume, respectively # ignore the first 5000 timesteps variable etotal_metal equal etotal/${_u_energy} variable etotal_metal equal etotal/1 variable pe_metal equal pe/${_u_energy} variable pe_metal equal pe/1 variable T_metal equal temp/${_u_temperature} variable T_metal equal temp/1 variable V_metal equal vol/(${_u_distance}*${_u_distance}*${_u_distance}) variable V_metal equal vol/(1*${_u_distance}*${_u_distance}) variable V_metal equal vol/(1*1*${_u_distance}) variable V_metal equal vol/(1*1*1) variable P_metal equal press/${_u_pressure} variable P_metal equal press/1 fix avgmyTemp all ave/time 5 20 100 v_T_metal ave running start 5000 fix avgmyPress all ave/time 5 20 100 v_P_metal ave running start 5000 fix avgmyVol all ave/time 5 20 100 v_V_metal ave running start 5000 # extract fix quantities into variables so they can be used in if-else logic later. variable T equal f_avgmyTemp variable P equal f_avgmyPress variable V equal f_avgmyVol # set error bounds for temperature and pressure in original metal units (K and bar) variable T_low equal "333.15 - 0.2" variable T_up equal "333.15 + 0.2" variable P_low equal "0.0 - 0.2" variable P_up equal "0.0 + 0.2" # print to logfile every 1000 timesteps thermo_style custom step etotal v_etotal_metal pe v_pe_metal temp v_T_metal vol v_V_metal press v_P_metal thermo 1000 # Run a simulation for at most 2000*1000 timesteps. At each 1000th time step, check # whether the temperature and pressure have converged. If yes, break. label top variable a loop 2000 run 1000 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 6.9 ghost atom cutoff = 6.9 binsize = 3.45, bins = 16 16 16 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, cut 6.9 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 7.894 | 7.894 | 7.894 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -43002.449 -43002.449 -43346.91 -43346.91 333.15 333.15 164031.25 164031.25 2242.9896 2242.9896 1000 -42625.191 -42625.191 -42967.662 -42967.662 331.22503 331.22503 164465.76 164465.76 -444.22515 -444.22515 Loop time of 6383.21 on 1 procs for 1000 steps with 8000 atoms Performance: 0.014 ns/day, 1773.113 hours/ns, 0.157 timesteps/s 62.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 6382.6 | 6382.6 | 6382.6 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.098557 | 0.098557 | 0.098557 | 0.0 | 0.00 Output | 4.5061e-05 | 4.5061e-05 | 4.5061e-05 | 0.0 | 0.00 Modify | 0.51194 | 0.51194 | 0.51194 | 0.0 | 0.01 Other | | 0.03215 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8601 ave 8601 max 8601 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 560000 ave 560000 max 560000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 560000 Ave neighs/atom = 70 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 0, Press = 0 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -42625.191 -42625.191 -42967.662 -42967.662 331.22503 331.22503 164465.76 164465.76 -444.22515 -444.22515 2000 -42661.964 -42661.964 -43006.47 -43006.47 333.19335 333.19335 164326.47 164326.47 43.210226 43.210226 Loop time of 6389.01 on 1 procs for 1000 steps with 8000 atoms Performance: 0.014 ns/day, 1774.726 hours/ns, 0.157 timesteps/s 62.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 6388.4 | 6388.4 | 6388.4 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.055528 | 0.055528 | 0.055528 | 0.0 | 0.00 Output | 5.1975e-05 | 5.1975e-05 | 5.1975e-05 | 0.0 | 0.00 Modify | 0.44148 | 0.44148 | 0.44148 | 0.0 | 0.01 Other | | 0.09157 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8107 ave 8107 max 8107 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 555226 ave 555226 max 555226 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 555226 Ave neighs/atom = 69.4032 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 0, Press = 0 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -42661.964 -42661.964 -43006.47 -43006.47 333.19335 333.19335 164326.47 164326.47 43.210226 43.210226 3000 -42642.27 -42642.27 -42998.017 -42998.017 344.06505 344.06505 164357.19 164357.19 160.54841 160.54841 Loop time of 6010.48 on 1 procs for 1000 steps with 8000 atoms Performance: 0.014 ns/day, 1669.578 hours/ns, 0.166 timesteps/s 66.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 6009.8 | 6009.8 | 6009.8 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.11567 | 0.11567 | 0.11567 | 0.0 | 0.00 Output | 5.3167e-05 | 5.3167e-05 | 5.3167e-05 | 0.0 | 0.00 Modify | 0.47082 | 0.47082 | 0.47082 | 0.0 | 0.01 Other | | 0.0519 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8095 ave 8095 max 8095 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 556366 ave 556366 max 556366 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 556366 Ave neighs/atom = 69.5457 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 0, Press = 0 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -42642.27 -42642.27 -42998.017 -42998.017 344.06505 344.06505 164357.19 164357.19 160.54841 160.54841 4000 -42652.71 -42652.71 -42996.353 -42996.353 332.35889 332.35889 164406.64 164406.64 -327.59496 -327.59496 Loop time of 5620.8 on 1 procs for 1000 steps with 8000 atoms Performance: 0.015 ns/day, 1561.334 hours/ns, 0.178 timesteps/s 71.2% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 5620.3 | 5620.3 | 5620.3 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.055975 | 0.055975 | 0.055975 | 0.0 | 0.00 Output | 5.1022e-05 | 5.1022e-05 | 5.1022e-05 | 0.0 | 0.00 Modify | 0.43752 | 0.43752 | 0.43752 | 0.0 | 0.01 Other | | 0.03152 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8113 ave 8113 max 8113 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 556028 ave 556028 max 556028 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 556028 Ave neighs/atom = 69.5035 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 0, Press = 0 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -42652.71 -42652.71 -42996.353 -42996.353 332.35889 332.35889 164406.64 164406.64 -327.59496 -327.59496 5000 -42650.231 -42650.231 -42996.146 -42996.146 334.55643 334.55643 164168.31 164168.31 1039.0601 1039.0601 Loop time of 5590.67 on 1 procs for 1000 steps with 8000 atoms Performance: 0.015 ns/day, 1552.964 hours/ns, 0.179 timesteps/s 71.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 5590 | 5590 | 5590 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.13552 | 0.13552 | 0.13552 | 0.0 | 0.00 Output | 4.1962e-05 | 4.1962e-05 | 4.1962e-05 | 0.0 | 0.00 Modify | 0.44982 | 0.44982 | 0.44982 | 0.0 | 0.01 Other | | 0.05158 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8038 ave 8038 max 8038 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 555698 ave 555698 max 555698 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 555698 Ave neighs/atom = 69.4622 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 332.257515714887, Press = 123.363672974064 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -42650.231 -42650.231 -42996.146 -42996.146 334.55643 334.55643 164168.31 164168.31 1039.0601 1039.0601 6000 -42649.168 -42649.168 -42992.352 -42992.352 331.91511 331.91511 164483 164483 -637.63766 -637.63766 Loop time of 5607.04 on 1 procs for 1000 steps with 8000 atoms Performance: 0.015 ns/day, 1557.511 hours/ns, 0.178 timesteps/s 71.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 5606.5 | 5606.5 | 5606.5 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.11648 | 0.11648 | 0.11648 | 0.0 | 0.00 Output | 4.22e-05 | 4.22e-05 | 4.22e-05 | 0.0 | 0.00 Modify | 0.39721 | 0.39721 | 0.39721 | 0.0 | 0.01 Other | | 0.0319 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8100 ave 8100 max 8100 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 556306 ave 556306 max 556306 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 556306 Ave neighs/atom = 69.5383 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 332.745454185227, Press = 8.69262256741514 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -42649.168 -42649.168 -42992.352 -42992.352 331.91511 331.91511 164483 164483 -637.63766 -637.63766 7000 -42653.605 -42653.605 -43002.021 -43002.021 336.97484 336.97484 164210.52 164210.52 864.70806 864.70806 Loop time of 5595.16 on 1 procs for 1000 steps with 8000 atoms Performance: 0.015 ns/day, 1554.212 hours/ns, 0.179 timesteps/s 71.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 5594.7 | 5594.7 | 5594.7 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.076802 | 0.076802 | 0.076802 | 0.0 | 0.00 Output | 4.1962e-05 | 4.1962e-05 | 4.1962e-05 | 0.0 | 0.00 Modify | 0.39839 | 0.39839 | 0.39839 | 0.0 | 0.01 Other | | 0.032 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8142 ave 8142 max 8142 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 555602 ave 555602 max 555602 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 555602 Ave neighs/atom = 69.4502 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" print "flag: Temp = ${T}, Press = ${P}" flag: Temp = 333.095880069709, Press = 3.48597836788919 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.896 | 7.896 | 7.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -42653.605 -42653.605 -43002.021 -43002.021 336.97484 336.97484 164210.52 164210.52 864.70806 864.70806 8000 -42646.77 -42646.77 -42982.927 -42982.927 325.11864 325.11864 164507.93 164507.93 -1012.6876 -1012.6876 Loop time of 5629.24 on 1 procs for 1000 steps with 8000 atoms Performance: 0.015 ns/day, 1563.677 hours/ns, 0.178 timesteps/s 71.1% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 5628.7 | 5628.7 | 5628.7 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.095829 | 0.095829 | 0.095829 | 0.0 | 0.00 Output | 4.1962e-05 | 4.1962e-05 | 4.1962e-05 | 0.0 | 0.00 Modify | 0.43748 | 0.43748 | 0.43748 | 0.0 | 0.01 Other | | 0.03186 | | | 0.00 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8110 ave 8110 max 8110 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 556528 ave 556528 max 556528 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 556528 Ave neighs/atom = 69.566 Neighbor list builds = 0 Dangerous builds = 0 if "${V_metal}>${V0_metal_times1000}" then "jump SELF unstable" if "${T}>${T_low} && ${T}<${T_up} && ${P}>${P_low} && ${P}<${P_up}" then "jump SELF break" jump SELF break # Write final averaged volume to file if temperature and volume have converged; otherwise wirte a # flag to indicate non-convergence. variable myStep equal step if "${myStep} < 2000000" then "print '${V}' file output/vol_T333.15.out" else "print 'not_converged' file output/vol_T333.15.out" print '${V}' file output/vol_T333.15.out 164351.185703247 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0