# 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 6.303511068224907*${_u_distance} variable latticeconst_converted equal 6.303511068224907*1 lattice diamond ${latticeconst_converted} lattice diamond 6.30351106822491 Lattice spacing in x,y,z = 6.3035111 6.3035111 6.3035111 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 (63.035111 63.035111 63.035111) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 8000 atoms create_atoms CPU = 0.008 seconds variable mass_converted equal 118.71*${_u_mass} variable mass_converted equal 118.71*1 kim_interactions Sn #=== BEGIN kim_interactions ================================== pair_style kim MEAM_LAMMPS_VellaChenStillinger_2017_Sn__MO_316045643888_000 pair_coeff * * Sn #=== END kim_interactions ==================================== mass 1 ${mass_converted} mass 1 118.71 # initial volume variable v equal vol # assign formula variable V0 equal ${v} # evaluate initial value variable V0 equal 250465.295928465 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 250465.295928465/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 250465.295928465/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 250465.295928465/(1*1*${_u_distance}) variable V0_metal equal 250465.295928465/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 250465.295928465*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 250465.295928465 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 253.15*${_u_temperature} variable temp_converted equal 253.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 253.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 253.15 ${temp_converted} ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 253.15 253.15 ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 253.15 253.15 0.1 iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 253.15 253.15 0.1 iso 0 ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 253.15 253.15 0.1 iso 0 0 ${Pdamp_converted} fix ensemble all npt temp 253.15 253.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 "253.15 - 0.2" variable T_up equal "253.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.8 ghost atom cutoff = 6.8 binsize = 3.4, bins = 19 19 19 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, cut 6.8 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 4.307 | 4.307 | 4.307 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -25494.717 -25494.717 -25756.462 -25756.462 253.15 253.15 250465.3 250465.3 1116.2193 1116.2193 1000 -25206.9 -25206.9 -25491.132 -25491.132 274.89831 274.89831 253317.66 253317.66 -546.10033 -546.10033 Loop time of 30.1333 on 1 procs for 1000 steps with 8000 atoms Performance: 2.867 ns/day, 8.370 hours/ns, 33.186 timesteps/s 82.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.566 | 29.566 | 29.566 | 0.0 | 98.12 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.091967 | 0.091967 | 0.091967 | 0.0 | 0.31 Output | 6.32e-05 | 6.32e-05 | 6.32e-05 | 0.0 | 0.00 Modify | 0.40099 | 0.40099 | 0.40099 | 0.0 | 1.33 Other | | 0.07462 | | | 0.25 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 272000.0 ave 272000 max 272000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 272000 Ave neighs/atom = 34.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.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -25206.9 -25206.9 -25491.132 -25491.132 274.89831 274.89831 253317.66 253317.66 -546.10033 -546.10033 2000 -25236.197 -25236.197 -25493.027 -25493.027 248.39704 248.39704 252941.49 252941.49 -88.280478 -88.280478 Loop time of 30.6587 on 1 procs for 1000 steps with 8000 atoms Performance: 2.818 ns/day, 8.516 hours/ns, 32.617 timesteps/s 86.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 | 30.15 | 30.15 | 30.15 | 0.0 | 98.34 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.054827 | 0.054827 | 0.054827 | 0.0 | 0.18 Output | 6.26e-05 | 6.26e-05 | 6.26e-05 | 0.0 | 0.00 Modify | 0.41957 | 0.41957 | 0.41957 | 0.0 | 1.37 Other | | 0.0343 | | | 0.11 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 286868.0 ave 286868 max 286868 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 286868 Ave neighs/atom = 35.858500 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.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -25236.197 -25236.197 -25493.027 -25493.027 248.39704 248.39704 252941.49 252941.49 -88.280478 -88.280478 3000 -25224.358 -25224.358 -25487.331 -25487.331 254.33763 254.33763 252950.61 252950.61 115.56654 115.56654 Loop time of 30.2958 on 1 procs for 1000 steps with 8000 atoms Performance: 2.852 ns/day, 8.416 hours/ns, 33.008 timesteps/s 87.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.818 | 29.818 | 29.818 | 0.0 | 98.42 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.053474 | 0.053474 | 0.053474 | 0.0 | 0.18 Output | 6.42e-05 | 6.42e-05 | 6.42e-05 | 0.0 | 0.00 Modify | 0.38948 | 0.38948 | 0.38948 | 0.0 | 1.29 Other | | 0.03436 | | | 0.11 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 287842.0 ave 287842 max 287842 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 287842 Ave neighs/atom = 35.980250 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.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -25224.358 -25224.358 -25487.331 -25487.331 254.33763 254.33763 252950.61 252950.61 115.56654 115.56654 4000 -25228.507 -25228.507 -25492.649 -25492.649 255.46772 255.46772 253133.65 253133.65 -250.94966 -250.94966 Loop time of 31.3699 on 1 procs for 1000 steps with 8000 atoms Performance: 2.754 ns/day, 8.714 hours/ns, 31.878 timesteps/s 84.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 | 30.903 | 30.903 | 30.903 | 0.0 | 98.51 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.051958 | 0.051958 | 0.051958 | 0.0 | 0.17 Output | 6.59e-05 | 6.59e-05 | 6.59e-05 | 0.0 | 0.00 Modify | 0.38064 | 0.38064 | 0.38064 | 0.0 | 1.21 Other | | 0.03429 | | | 0.11 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 287664.0 ave 287664 max 287664 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 287664 Ave neighs/atom = 35.958000 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.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -25228.507 -25228.507 -25492.649 -25492.649 255.46772 255.46772 253133.65 253133.65 -250.94966 -250.94966 5000 -25228.734 -25228.734 -25480.544 -25480.544 243.5408 243.5408 252838.22 252838.22 309.79986 309.79986 Loop time of 30.5342 on 1 procs for 1000 steps with 8000 atoms Performance: 2.830 ns/day, 8.482 hours/ns, 32.750 timesteps/s 87.4% 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.067 | 30.067 | 30.067 | 0.0 | 98.47 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.073614 | 0.073614 | 0.073614 | 0.0 | 0.24 Output | 4.43e-05 | 4.43e-05 | 4.43e-05 | 0.0 | 0.00 Modify | 0.35905 | 0.35905 | 0.35905 | 0.0 | 1.18 Other | | 0.03452 | | | 0.11 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 286920.0 ave 286920 max 286920 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 286920 Ave neighs/atom = 35.865000 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 = 254.615616559832, Press = -146.745409662227 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -25228.734 -25228.734 -25480.544 -25480.544 243.5408 243.5408 252838.22 252838.22 309.79986 309.79986 6000 -25228.247 -25228.247 -25489.207 -25489.207 252.3905 252.3905 253043.99 253043.99 -78.278248 -78.278248 Loop time of 33.0877 on 1 procs for 1000 steps with 8000 atoms Performance: 2.611 ns/day, 9.191 hours/ns, 30.223 timesteps/s 80.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.636 | 32.636 | 32.636 | 0.0 | 98.64 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.061951 | 0.061951 | 0.061951 | 0.0 | 0.19 Output | 4.61e-05 | 4.61e-05 | 4.61e-05 | 0.0 | 0.00 Modify | 0.35537 | 0.35537 | 0.35537 | 0.0 | 1.07 Other | | 0.03397 | | | 0.10 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 288298.0 ave 288298 max 288298 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 288298 Ave neighs/atom = 36.037250 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 = 253.150753712652, Press = 4.75151149567094 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -25228.247 -25228.247 -25489.207 -25489.207 252.3905 252.3905 253043.99 253043.99 -78.278248 -78.278248 7000 -25224.291 -25224.291 -25488.254 -25488.254 255.29463 255.29463 253081.71 253081.71 -74.04107 -74.04107 Loop time of 27.3633 on 1 procs for 1000 steps with 8000 atoms Performance: 3.158 ns/day, 7.601 hours/ns, 36.545 timesteps/s 96.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 | 26.943 | 26.943 | 26.943 | 0.0 | 98.46 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.051843 | 0.051843 | 0.051843 | 0.0 | 0.19 Output | 4.7e-05 | 4.7e-05 | 4.7e-05 | 0.0 | 0.00 Modify | 0.33452 | 0.33452 | 0.33452 | 0.0 | 1.22 Other | | 0.03371 | | | 0.12 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 287332.0 ave 287332 max 287332 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 287332 Ave neighs/atom = 35.916500 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 = 253.063684673396, Press = -8.12017744796206 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.309 | 4.309 | 4.309 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -25224.291 -25224.291 -25488.254 -25488.254 255.29463 255.29463 253081.71 253081.71 -74.04107 -74.04107 8000 -25228.545 -25228.545 -25486.329 -25486.329 249.31924 249.31924 252926.09 252926.09 101.3097 101.3097 Loop time of 28.262 on 1 procs for 1000 steps with 8000 atoms Performance: 3.057 ns/day, 7.851 hours/ns, 35.383 timesteps/s 93.4% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 27.817 | 27.817 | 27.817 | 0.0 | 98.43 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.071296 | 0.071296 | 0.071296 | 0.0 | 0.25 Output | 4.67e-05 | 4.67e-05 | 4.67e-05 | 0.0 | 0.00 Modify | 0.33983 | 0.33983 | 0.33983 | 0.0 | 1.20 Other | | 0.03383 | | | 0.12 Nlocal: 8000.00 ave 8000 max 8000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 6725.00 ave 6725 max 6725 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: 287118.0 ave 287118 max 287118 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 287118 Ave neighs/atom = 35.889750 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_T253.15.out" else "print 'not_converged' file output/vol_T253.15.out" print '${V}' file output/vol_T253.15.out 252987.700265493 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0