# 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.425452426075935*${_u_distance} variable latticeconst_converted equal 5.425452426075935*1 lattice diamond ${latticeconst_converted} lattice diamond 5.42545242607594 Lattice spacing in x,y,z = 5.42545 5.42545 5.42545 region simbox block 0 10 0 10 0 10 units lattice create_box 1 simbox Created orthogonal box = (0 0 0) to (54.2545 54.2545 54.2545) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 8000 atoms create_atoms CPU = 0.000822067 secs variable mass_converted equal 28.0855*${_u_mass} variable mass_converted equal 28.0855*1 # specify which KIM Model to use pair_style edip/multi pair_coeff * * ./SM_435704953434_000-files/b'SiC.edip' Si Reading potential file ./SM_435704953434_000-files/b'SiC.edip' with DATE: 2017-05-16 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 159701.089502955 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 159701.089502955/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 159701.089502955/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 159701.089502955/(1*1*${_u_distance}) variable V0_metal equal 159701.089502955/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 159701.089502955*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 159701.089502955 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 = 4.94159 ghost atom cutoff = 4.94159 binsize = 2.47079, bins = 22 22 22 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair edip/multi, perpetual attributes: full, newton on pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 4.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -36833.326 -36833.326 -37177.787 -37177.787 333.15 333.15 159701.09 159701.09 2303.8278 2303.8278 1000 -36454.558 -36454.558 -36815.838 -36815.838 349.41638 349.41638 159846.18 159846.18 492.98162 492.98162 Loop time of 30.0605 on 1 procs for 1000 steps with 8000 atoms Performance: 2.874 ns/day, 8.350 hours/ns, 33.266 timesteps/s 57.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 | 29.171 | 29.171 | 29.171 | 0.0 | 97.04 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.067528 | 0.067528 | 0.067528 | 0.0 | 0.22 Output | 5.7936e-05 | 5.7936e-05 | 5.7936e-05 | 0.0 | 0.00 Modify | 0.76417 | 0.76417 | 0.76417 | 0.0 | 2.54 Other | | 0.05755 | | | 0.19 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -36454.558 -36454.558 -36815.838 -36815.838 349.41638 349.41638 159846.18 159846.18 492.98162 492.98162 2000 -36491.977 -36491.977 -36833.796 -36833.796 330.59446 330.59446 159900.28 159900.28 129.93155 129.93155 Loop time of 33.0361 on 1 procs for 1000 steps with 8000 atoms Performance: 2.615 ns/day, 9.177 hours/ns, 30.270 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 | 32.316 | 32.316 | 32.316 | 0.0 | 97.82 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.096193 | 0.096193 | 0.096193 | 0.0 | 0.29 Output | 5.3883e-05 | 5.3883e-05 | 5.3883e-05 | 0.0 | 0.00 Modify | 0.58667 | 0.58667 | 0.58667 | 0.0 | 1.78 Other | | 0.03721 | | | 0.11 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -36491.977 -36491.977 -36833.796 -36833.796 330.59446 330.59446 159900.28 159900.28 129.93155 129.93155 3000 -36474.956 -36474.956 -36820.408 -36820.408 334.1076 334.1076 159953.2 159953.2 -215.57114 -215.57114 Loop time of 32.2981 on 1 procs for 1000 steps with 8000 atoms Performance: 2.675 ns/day, 8.972 hours/ns, 30.962 timesteps/s 53.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 | 31.54 | 31.54 | 31.54 | 0.0 | 97.65 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.12552 | 0.12552 | 0.12552 | 0.0 | 0.39 Output | 5.4121e-05 | 5.4121e-05 | 5.4121e-05 | 0.0 | 0.00 Modify | 0.53786 | 0.53786 | 0.53786 | 0.0 | 1.67 Other | | 0.09483 | | | 0.29 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -36474.956 -36474.956 -36820.408 -36820.408 334.1076 334.1076 159953.2 159953.2 -215.57114 -215.57114 4000 -36481.793 -36481.793 -36823.87 -36823.87 330.84479 330.84479 159952.99 159952.99 -74.816261 -74.816261 Loop time of 31.4297 on 1 procs for 1000 steps with 8000 atoms Performance: 2.749 ns/day, 8.730 hours/ns, 31.817 timesteps/s 55.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 | 30.767 | 30.767 | 30.767 | 0.0 | 97.89 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.06457 | 0.06457 | 0.06457 | 0.0 | 0.21 Output | 5.2929e-05 | 5.2929e-05 | 5.2929e-05 | 0.0 | 0.00 Modify | 0.54277 | 0.54277 | 0.54277 | 0.0 | 1.73 Other | | 0.05557 | | | 0.18 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 223998 ave 223998 max 223998 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 223998 Ave neighs/atom = 27.9997 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.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -36481.793 -36481.793 -36823.87 -36823.87 330.84479 330.84479 159952.99 159952.99 -74.816261 -74.816261 5000 -36478.769 -36478.769 -36825.149 -36825.149 335.00596 335.00596 159978.24 159978.24 -93.77864 -93.77864 Loop time of 31.5631 on 1 procs for 1000 steps with 8000 atoms Performance: 2.737 ns/day, 8.768 hours/ns, 31.683 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 | 30.866 | 30.866 | 30.866 | 0.0 | 97.79 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.064103 | 0.064103 | 0.064103 | 0.0 | 0.20 Output | 4.3869e-05 | 4.3869e-05 | 4.3869e-05 | 0.0 | 0.00 Modify | 0.59813 | 0.59813 | 0.59813 | 0.0 | 1.90 Other | | 0.03518 | | | 0.11 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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 = 336.164645149898, Press = -167.885149438646 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -36478.769 -36478.769 -36825.149 -36825.149 335.00596 335.00596 159978.24 159978.24 -93.77864 -93.77864 6000 -36478.449 -36478.449 -36823.448 -36823.448 333.67073 333.67073 160063.91 160063.91 -781.03469 -781.03469 Loop time of 30.8999 on 1 procs for 1000 steps with 8000 atoms Performance: 2.796 ns/day, 8.583 hours/ns, 32.363 timesteps/s 56.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 | 30.191 | 30.191 | 30.191 | 0.0 | 97.70 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.10535 | 0.10535 | 0.10535 | 0.0 | 0.34 Output | 4.3154e-05 | 4.3154e-05 | 4.3154e-05 | 0.0 | 0.00 Modify | 0.52716 | 0.52716 | 0.52716 | 0.0 | 1.71 Other | | 0.07678 | | | 0.25 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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.715368980319, Press = -25.2777343799277 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -36478.449 -36478.449 -36823.448 -36823.448 333.67073 333.67073 160063.91 160063.91 -781.03469 -781.03469 7000 -36485.121 -36485.121 -36824.997 -36824.997 328.71555 328.71555 160145.43 160145.43 -1363.0381 -1363.0381 Loop time of 34.3158 on 1 procs for 1000 steps with 8000 atoms Performance: 2.518 ns/day, 9.532 hours/ns, 29.141 timesteps/s 50.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 | 33.564 | 33.564 | 33.564 | 0.0 | 97.81 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.12659 | 0.12659 | 0.12659 | 0.0 | 0.37 Output | 3.6001e-05 | 3.6001e-05 | 3.6001e-05 | 0.0 | 0.00 Modify | 0.58797 | 0.58797 | 0.58797 | 0.0 | 1.71 Other | | 0.03762 | | | 0.11 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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.189350242943, Press = -4.56155617780162 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.11 | 4.11 | 4.11 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -36485.121 -36485.121 -36824.997 -36824.997 328.71555 328.71555 160145.43 160145.43 -1363.0381 -1363.0381 8000 -36474.961 -36474.961 -36818.498 -36818.498 332.25629 332.25629 159985.09 159985.09 -279.04919 -279.04919 Loop time of 34.7315 on 1 procs for 1000 steps with 8000 atoms Performance: 2.488 ns/day, 9.648 hours/ns, 28.792 timesteps/s 50.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 | 33.808 | 33.808 | 33.808 | 0.0 | 97.34 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.10726 | 0.10726 | 0.10726 | 0.0 | 0.31 Output | 3.6001e-05 | 3.6001e-05 | 3.6001e-05 | 0.0 | 0.00 Modify | 0.7396 | 0.7396 | 0.7396 | 0.0 | 2.13 Other | | 0.07711 | | | 0.22 Nlocal: 8000 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 4995 ave 4995 max 4995 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: 224000 ave 224000 max 224000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 224000 Ave neighs/atom = 28 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 159945.215640476 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0