# 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.431978940963745*${_u_distance} variable latticeconst_converted equal 5.431978940963745*1 lattice diamond ${latticeconst_converted} lattice diamond 5.43197894096375 Lattice spacing in x,y,z = 5.4319789 5.4319789 5.4319789 region simbox block 0 10 0 10 0 10 units lattice create_box 1 simbox Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (54.319789 54.319789 54.319789) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 8000 atoms create_atoms CPU = 0.001 seconds variable mass_converted equal 28.0855*${_u_mass} variable mass_converted equal 28.0855*1 kim_interactions Si #=== BEGIN kim_interactions ================================== pair_style kim Tersoff_LAMMPS_Tersoff_1988T3_Si__MO_186459956893_003 pair_coeff * * Si #=== END kim_interactions ==================================== 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 160278.117432034 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 160278.117432034/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 160278.117432034/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 160278.117432034/(1*1*${_u_distance}) variable V0_metal equal 160278.117432034/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 160278.117432034*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 160278.117432034 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 313.15*${_u_temperature} variable temp_converted equal 313.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 313.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 313.15 ${temp_converted} ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 313.15 313.15 ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 313.15 313.15 0.1 iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 313.15 313.15 0.1 iso 0 ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 313.15 313.15 0.1 iso 0 0 ${Pdamp_converted} fix ensemble all npt temp 313.15 313.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 "313.15 - 0.2" variable T_up equal "313.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 = 5 ghost atom cutoff = 5 binsize = 2.5, bins = 22 22 22 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, ghost, cut 5 pair build: full/bin/ghost stencil: full/ghost/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -36714.022 -36714.022 -37037.804 -37037.804 313.15 313.15 160278.12 160278.12 2157.7407 2157.7407 1000 -36359.5 -36359.5 -36681.013 -36681.013 310.9553 310.9553 161176.46 161176.46 705.58123 705.58123 Loop time of 68.2186 on 1 procs for 1000 steps with 8000 atoms Performance: 1.267 ns/day, 18.950 hours/ns, 14.659 timesteps/s 49.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 67.59 | 67.59 | 67.59 | 0.0 | 99.08 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.084304 | 0.084304 | 0.084304 | 0.0 | 0.12 Output | 5.5e-05 | 5.5e-05 | 5.5e-05 | 0.0 | 0.00 Modify | 0.49331 | 0.49331 | 0.49331 | 0.0 | 0.72 Other | | 0.05085 | | | 0.07 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -36359.5 -36359.5 -36681.013 -36681.013 310.9553 310.9553 161176.46 161176.46 705.58123 705.58123 2000 -36393.145 -36393.145 -36709.812 -36709.812 306.26776 306.26776 161250.18 161250.18 96.659122 96.659122 Loop time of 63.1623 on 1 procs for 1000 steps with 8000 atoms Performance: 1.368 ns/day, 17.545 hours/ns, 15.832 timesteps/s 54.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 | 62.514 | 62.514 | 62.514 | 0.0 | 98.97 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.078082 | 0.078082 | 0.078082 | 0.0 | 0.12 Output | 5.03e-05 | 5.03e-05 | 5.03e-05 | 0.0 | 0.00 Modify | 0.50098 | 0.50098 | 0.50098 | 0.0 | 0.79 Other | | 0.06954 | | | 0.11 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -36393.145 -36393.145 -36709.812 -36709.812 306.26776 306.26776 161250.18 161250.18 96.659122 96.659122 3000 -36376.176 -36376.176 -36703.879 -36703.879 316.94206 316.94206 161338.64 161338.64 -613.99669 -613.99669 Loop time of 60.9604 on 1 procs for 1000 steps with 8000 atoms Performance: 1.417 ns/day, 16.933 hours/ns, 16.404 timesteps/s 56.9% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 60.401 | 60.401 | 60.401 | 0.0 | 99.08 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.058181 | 0.058181 | 0.058181 | 0.0 | 0.10 Output | 4.12e-05 | 4.12e-05 | 4.12e-05 | 0.0 | 0.00 Modify | 0.45098 | 0.45098 | 0.45098 | 0.0 | 0.74 Other | | 0.05053 | | | 0.08 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -36376.176 -36376.176 -36703.879 -36703.879 316.94206 316.94206 161338.64 161338.64 -613.99669 -613.99669 4000 -36385.07 -36385.07 -36698.648 -36698.648 303.2814 303.2814 161247.02 161247.02 -0.27915451 -0.27915451 Loop time of 69.4127 on 1 procs for 1000 steps with 8000 atoms Performance: 1.245 ns/day, 19.281 hours/ns, 14.407 timesteps/s 50.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 | 68.705 | 68.705 | 68.705 | 0.0 | 98.98 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.099478 | 0.099478 | 0.099478 | 0.0 | 0.14 Output | 4.41e-05 | 4.41e-05 | 4.41e-05 | 0.0 | 0.00 Modify | 0.55691 | 0.55691 | 0.55691 | 0.0 | 0.80 Other | | 0.05086 | | | 0.07 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -36385.07 -36385.07 -36698.648 -36698.648 303.2814 303.2814 161247.02 161247.02 -0.27915451 -0.27915451 5000 -36382.892 -36382.892 -36705.288 -36705.288 311.80992 311.80992 161051.92 161051.92 1286.4893 1286.4893 Loop time of 66.0281 on 1 procs for 1000 steps with 8000 atoms Performance: 1.309 ns/day, 18.341 hours/ns, 15.145 timesteps/s 53.0% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 65.487 | 65.487 | 65.487 | 0.0 | 99.18 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.074262 | 0.074262 | 0.074262 | 0.0 | 0.11 Output | 3.51e-05 | 3.51e-05 | 3.51e-05 | 0.0 | 0.00 Modify | 0.39654 | 0.39654 | 0.39654 | 0.0 | 0.60 Other | | 0.07075 | | | 0.11 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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 = 314.309922789151, Press = -52.8541520156437 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -36382.892 -36382.892 -36705.288 -36705.288 311.80992 311.80992 161051.92 161051.92 1286.4893 1286.4893 6000 -36380.716 -36380.716 -36707.078 -36707.078 315.64576 315.64576 161177.38 161177.38 486.69629 486.69629 Loop time of 67.3518 on 1 procs for 1000 steps with 8000 atoms Performance: 1.283 ns/day, 18.709 hours/ns, 14.847 timesteps/s 51.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 | 66.713 | 66.713 | 66.713 | 0.0 | 99.05 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.058326 | 0.058326 | 0.058326 | 0.0 | 0.09 Output | 4.64e-05 | 4.64e-05 | 4.64e-05 | 0.0 | 0.00 Modify | 0.55064 | 0.55064 | 0.55064 | 0.0 | 0.82 Other | | 0.03029 | | | 0.04 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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 = 312.650924450335, Press = -24.3510137150427 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -36380.716 -36380.716 -36707.078 -36707.078 315.64576 315.64576 161177.38 161177.38 486.69629 486.69629 7000 -36387.155 -36387.155 -36694.577 -36694.577 297.32709 297.32709 161350.23 161350.23 -726.80678 -726.80678 Loop time of 61.0782 on 1 procs for 1000 steps with 8000 atoms Performance: 1.415 ns/day, 16.966 hours/ns, 16.372 timesteps/s 56.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 | 60.316 | 60.316 | 60.316 | 0.0 | 98.75 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.098316 | 0.098316 | 0.098316 | 0.0 | 0.16 Output | 4.47e-05 | 4.47e-05 | 4.47e-05 | 0.0 | 0.00 Modify | 0.63316 | 0.63316 | 0.63316 | 0.0 | 1.04 Other | | 0.03057 | | | 0.05 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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 = 313.144053410203, Press = -8.95736090861916 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.617 | 4.617 | 4.617 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -36387.155 -36387.155 -36694.577 -36694.577 297.32709 297.32709 161350.23 161350.23 -726.80678 -726.80678 8000 -36379.162 -36379.162 -36703.876 -36703.876 314.05119 314.05119 161307.24 161307.24 -337.25834 -337.25834 Loop time of 57.7709 on 1 procs for 1000 steps with 8000 atoms Performance: 1.496 ns/day, 16.047 hours/ns, 17.310 timesteps/s 60.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 | 57.172 | 57.172 | 57.172 | 0.0 | 98.96 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.078351 | 0.078351 | 0.078351 | 0.0 | 0.14 Output | 3.44e-05 | 3.44e-05 | 3.44e-05 | 0.0 | 0.00 Modify | 0.44944 | 0.44944 | 0.44944 | 0.0 | 0.78 Other | | 0.0707 | | | 0.12 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995.00 ave 4995 max 4995 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 224000.0 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28.000000 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_T313.15.out" else "print 'not_converged' file output/vol_T313.15.out" print '${V}' file output/vol_T313.15.out 161248.441814668 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0