# 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 4.939586490392685*${_u_distance} variable latticeconst_converted equal 4.939586490392685*1 lattice fcc ${latticeconst_converted} lattice fcc 4.93958649039268 Lattice spacing in x,y,z = 4.93959 4.93959 4.93959 region simbox block 0 10 0 10 0 10 units lattice create_box 1 simbox Created orthogonal box = (0 0 0) to (49.3959 49.3959 49.3959) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms create_atoms CPU = 0.00049305 secs variable mass_converted equal 207.2*${_u_mass} variable mass_converted equal 207.2*1 kim_interactions Pb #=== BEGIN kim_interactions ================================== pair_style kim Morse_Shifted_GirifalcoWeizer_1959MedCutoff_Pb__MO_958424213898_004 pair_coeff * * Pb #=== END kim_interactions ==================================== mass 1 ${mass_converted} mass 1 207.2 # initial volume variable v equal vol # assign formula variable V0 equal ${v} # evaluate initial value variable V0 equal 120523.513164844 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 120523.513164844/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 120523.513164844/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 120523.513164844/(1*1*${_u_distance}) variable V0_metal equal 120523.513164844/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 120523.513164844*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 120523.513164844 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 = 12.1546 ghost atom cutoff = 12.1546 binsize = 6.0773, bins = 9 9 9 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, cut 12.1546 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 7.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -7936.7296 -7936.7296 -8067.5857 -8067.5857 253.15 253.15 120523.51 120523.51 1159.6866 1159.6866 1000 -7790.1109 -7790.1109 -7921.3048 -7921.3048 253.80343 253.80343 122075.7 122075.7 650.38916 650.38916 Loop time of 17.5242 on 1 procs for 1000 steps with 4000 atoms Performance: 4.930 ns/day, 4.868 hours/ns, 57.064 timesteps/s 98.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 | 17.317 | 17.317 | 17.317 | 0.0 | 98.82 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.046949 | 0.046949 | 0.046949 | 0.0 | 0.27 Output | 3.6001e-05 | 3.6001e-05 | 3.6001e-05 | 0.0 | 0.00 Modify | 0.14264 | 0.14264 | 0.14264 | 0.0 | 0.81 Other | | 0.01747 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8195 ave 8195 max 8195 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: 992000 ave 992000 max 992000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 992000 Ave neighs/atom = 248 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.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -7790.1109 -7790.1109 -7921.3048 -7921.3048 253.80343 253.80343 122075.7 122075.7 650.38916 650.38916 2000 -7813.5238 -7813.5238 -7938.3716 -7938.3716 241.52658 241.52658 122105.22 122105.22 -101.23658 -101.23658 Loop time of 17.2592 on 1 procs for 1000 steps with 4000 atoms Performance: 5.006 ns/day, 4.794 hours/ns, 57.940 timesteps/s 100.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 | 17.052 | 17.052 | 17.052 | 0.0 | 98.80 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.046998 | 0.046998 | 0.046998 | 0.0 | 0.27 Output | 5.1022e-05 | 5.1022e-05 | 5.1022e-05 | 0.0 | 0.00 Modify | 0.14238 | 0.14238 | 0.14238 | 0.0 | 0.82 Other | | 0.01766 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8224 ave 8224 max 8224 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: 944516 ave 944516 max 944516 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 944516 Ave neighs/atom = 236.129 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.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -7813.5238 -7813.5238 -7938.3716 -7938.3716 241.52658 241.52658 122105.22 122105.22 -101.23658 -101.23658 3000 -7798.686 -7798.686 -7932.8552 -7932.8552 259.55943 259.55943 122220.6 122220.6 -211.9287 -211.9287 Loop time of 16.5795 on 1 procs for 1000 steps with 4000 atoms Performance: 5.211 ns/day, 4.605 hours/ns, 60.316 timesteps/s 100.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 | 16.381 | 16.381 | 16.381 | 0.0 | 98.81 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.044539 | 0.044539 | 0.044539 | 0.0 | 0.27 Output | 5.6028e-05 | 5.6028e-05 | 5.6028e-05 | 0.0 | 0.00 Modify | 0.13722 | 0.13722 | 0.13722 | 0.0 | 0.83 Other | | 0.01619 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8199 ave 8199 max 8199 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: 944280 ave 944280 max 944280 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 944280 Ave neighs/atom = 236.07 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.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -7798.686 -7798.686 -7932.8552 -7932.8552 259.55943 259.55943 122220.6 122220.6 -211.9287 -211.9287 4000 -7803.8399 -7803.8399 -7933.5621 -7933.5621 250.95641 250.95641 122181.89 122181.89 -132.50722 -132.50722 Loop time of 16.1185 on 1 procs for 1000 steps with 4000 atoms Performance: 5.360 ns/day, 4.477 hours/ns, 62.041 timesteps/s 100.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 | 15.924 | 15.924 | 15.924 | 0.0 | 98.79 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.043718 | 0.043718 | 0.043718 | 0.0 | 0.27 Output | 3.8147e-05 | 3.8147e-05 | 3.8147e-05 | 0.0 | 0.00 Modify | 0.13489 | 0.13489 | 0.13489 | 0.0 | 0.84 Other | | 0.01575 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8209 ave 8209 max 8209 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: 943006 ave 943006 max 943006 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 943006 Ave neighs/atom = 235.751 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.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -7803.8399 -7803.8399 -7933.5621 -7933.5621 250.95641 250.95641 122181.89 122181.89 -132.50722 -132.50722 5000 -7801.2457 -7801.2457 -7934.4965 -7934.4965 257.78275 257.78275 122130.55 122130.55 41.0884 41.0884 Loop time of 16.5531 on 1 procs for 1000 steps with 4000 atoms Performance: 5.220 ns/day, 4.598 hours/ns, 60.412 timesteps/s 99.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 | 16.354 | 16.354 | 16.354 | 0.0 | 98.80 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.04437 | 0.04437 | 0.04437 | 0.0 | 0.27 Output | 2.6941e-05 | 2.6941e-05 | 2.6941e-05 | 0.0 | 0.00 Modify | 0.13856 | 0.13856 | 0.13856 | 0.0 | 0.84 Other | | 0.0164 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8203 ave 8203 max 8203 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: 943290 ave 943290 max 943290 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 943290 Ave neighs/atom = 235.822 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 = 255.627854983416, Press = 76.1301032615018 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -7801.2457 -7801.2457 -7934.4965 -7934.4965 257.78275 257.78275 122130.55 122130.55 41.0884 41.0884 6000 -7805.6978 -7805.6978 -7934.2116 -7934.2116 248.61863 248.61863 122075.97 122075.97 175.22739 175.22739 Loop time of 16.6938 on 1 procs for 1000 steps with 4000 atoms Performance: 5.176 ns/day, 4.637 hours/ns, 59.902 timesteps/s 100.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 | 16.491 | 16.491 | 16.491 | 0.0 | 98.79 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.044549 | 0.044549 | 0.044549 | 0.0 | 0.27 Output | 3.0994e-05 | 3.0994e-05 | 3.0994e-05 | 0.0 | 0.00 Modify | 0.14185 | 0.14185 | 0.14185 | 0.0 | 0.85 Other | | 0.01639 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8223 ave 8223 max 8223 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: 944040 ave 944040 max 944040 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 944040 Ave neighs/atom = 236.01 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 = 252.90548330033, Press = 12.8702937048217 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -7805.6978 -7805.6978 -7934.2116 -7934.2116 248.61863 248.61863 122075.97 122075.97 175.22739 175.22739 7000 -7806.5301 -7806.5301 -7934.4793 -7934.4793 247.52635 247.52635 122247.16 122247.16 -426.76251 -426.76251 Loop time of 15.9991 on 1 procs for 1000 steps with 4000 atoms Performance: 5.400 ns/day, 4.444 hours/ns, 62.503 timesteps/s 100.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 | 15.801 | 15.801 | 15.801 | 0.0 | 98.76 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.04342 | 0.04342 | 0.04342 | 0.0 | 0.27 Output | 3.2902e-05 | 3.2902e-05 | 3.2902e-05 | 0.0 | 0.00 Modify | 0.13863 | 0.13863 | 0.13863 | 0.0 | 0.87 Other | | 0.01581 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8196 ave 8196 max 8196 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: 944872 ave 944872 max 944872 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 944872 Ave neighs/atom = 236.218 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.353686742818, Press = 1.97937755917114 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 7.386 | 7.386 | 7.386 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -7806.5301 -7806.5301 -7934.4793 -7934.4793 247.52635 247.52635 122247.16 122247.16 -426.76251 -426.76251 8000 -7803.3005 -7803.3005 -7935.7841 -7935.7841 256.29836 256.29836 122136.02 122136.02 -32.166646 -32.166646 Loop time of 16.6458 on 1 procs for 1000 steps with 4000 atoms Performance: 5.190 ns/day, 4.624 hours/ns, 60.075 timesteps/s 100.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 | 16.444 | 16.444 | 16.444 | 0.0 | 98.79 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.044529 | 0.044529 | 0.044529 | 0.0 | 0.27 Output | 2.6941e-05 | 2.6941e-05 | 2.6941e-05 | 0.0 | 0.00 Modify | 0.14134 | 0.14134 | 0.14134 | 0.0 | 0.85 Other | | 0.01619 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8206 ave 8206 max 8206 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: 942896 ave 942896 max 942896 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 942896 Ave neighs/atom = 235.724 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 122142.73783856 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0