# 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.334010653197765*${_u_distance} variable latticeconst_converted equal 5.334010653197765*1 lattice bcc ${latticeconst_converted} lattice bcc 5.33401065319777 Lattice spacing in x,y,z = 5.33401 5.33401 5.33401 region simbox block 0 10 0 10 0 10 units lattice create_box 1 simbox Created orthogonal box = (0 0 0) to (53.3401 53.3401 53.3401) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 2000 atoms create_atoms CPU = 0.000679016 secs variable mass_converted equal 39.0983*${_u_mass} variable mass_converted equal 39.0983*1 kim_interactions K #=== BEGIN kim_interactions ================================== pair_style kim Morse_Shifted_GirifalcoWeizer_1959LowCutoff_K__MO_749732139672_004 pair_coeff * * K #=== END kim_interactions ==================================== mass 1 ${mass_converted} mass 1 39.0983 # initial volume variable v equal vol # assign formula variable V0 equal ${v} # evaluate initial value variable V0 equal 151761.509005975 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 151761.509005975/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 151761.509005975/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 151761.509005975/(1*1*${_u_distance}) variable V0_metal equal 151761.509005975/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 151761.509005975*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 151761.509005975 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 293.15*${_u_temperature} variable temp_converted equal 293.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 293.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 293.15 ${temp_converted} ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 293.15 293.15 ${Tdamp_converted} iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 293.15 293.15 0.1 iso ${press_converted} ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 293.15 293.15 0.1 iso 0 ${press_converted} ${Pdamp_converted} fix ensemble all npt temp 293.15 293.15 0.1 iso 0 0 ${Pdamp_converted} fix ensemble all npt temp 293.15 293.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 "293.15 - 0.2" variable T_up equal "293.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 = 19.0102 ghost atom cutoff = 19.0102 binsize = 9.5051, bins = 6 6 6 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, cut 19.0102 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 5.896 | 5.896 | 5.896 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -1594.6546 -1594.6546 -1670.4019 -1670.4019 293.15 293.15 151761.51 151761.51 533.11944 533.11944 1000 -1499.6166 -1499.6166 -1579.6693 -1579.6693 309.81227 309.81227 161166.3 161166.3 48.880904 48.880904 Loop time of 35.0759 on 1 procs for 1000 steps with 2000 atoms Performance: 2.463 ns/day, 9.743 hours/ns, 28.510 timesteps/s 72.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 | 34.389 | 34.389 | 34.389 | 0.0 | 98.04 Neigh | 0.35984 | 0.35984 | 0.35984 | 0.0 | 1.03 Comm | 0.11553 | 0.11553 | 0.11553 | 0.0 | 0.33 Output | 4.4823e-05 | 4.4823e-05 | 4.4823e-05 | 0.0 | 0.00 Modify | 0.18172 | 0.18172 | 0.18172 | 0.0 | 0.52 Other | | 0.03007 | | | 0.09 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 7732 ave 7732 max 7732 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: 695522 ave 695522 max 695522 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 695522 Ave neighs/atom = 347.761 Neighbor list builds = 10 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) = 6.278 | 6.278 | 6.278 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -1499.6166 -1499.6166 -1579.6693 -1579.6693 309.81227 309.81227 161166.3 161166.3 48.880904 48.880904 2000 -1513.0483 -1513.0483 -1586.9487 -1586.9487 286.0022 286.0022 160216.06 160216.06 72.275122 72.275122 Loop time of 33.0372 on 1 procs for 1000 steps with 2000 atoms Performance: 2.615 ns/day, 9.177 hours/ns, 30.269 timesteps/s 75.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 | 32.342 | 32.342 | 32.342 | 0.0 | 97.89 Neigh | 0.41633 | 0.41633 | 0.41633 | 0.0 | 1.26 Comm | 0.10641 | 0.10641 | 0.10641 | 0.0 | 0.32 Output | 7.0095e-05 | 7.0095e-05 | 7.0095e-05 | 0.0 | 0.00 Modify | 0.14315 | 0.14315 | 0.14315 | 0.0 | 0.43 Other | | 0.02975 | | | 0.09 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 7802 ave 7802 max 7802 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: 700958 ave 700958 max 700958 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 700958 Ave neighs/atom = 350.479 Neighbor list builds = 10 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) = 6.278 | 6.278 | 6.278 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -1513.0483 -1513.0483 -1586.9487 -1586.9487 286.0022 286.0022 160216.06 160216.06 72.275122 72.275122 3000 -1512.0529 -1512.0529 -1587.1287 -1587.1287 290.55084 290.55084 160281.47 160281.47 65.641227 65.641227 Loop time of 34.7065 on 1 procs for 1000 steps with 2000 atoms Performance: 2.489 ns/day, 9.641 hours/ns, 28.813 timesteps/s 72.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 | 34.09 | 34.09 | 34.09 | 0.0 | 98.22 Neigh | 0.32042 | 0.32042 | 0.32042 | 0.0 | 0.92 Comm | 0.13396 | 0.13396 | 0.13396 | 0.0 | 0.39 Output | 4.6968e-05 | 4.6968e-05 | 4.6968e-05 | 0.0 | 0.00 Modify | 0.13224 | 0.13224 | 0.13224 | 0.0 | 0.38 Other | | 0.0298 | | | 0.09 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 7807 ave 7807 max 7807 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: 698064 ave 698064 max 698064 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 698064 Ave neighs/atom = 349.032 Neighbor list builds = 10 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) = 6.278 | 6.278 | 6.278 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -1512.0529 -1512.0529 -1587.1287 -1587.1287 290.55084 290.55084 160281.47 160281.47 65.641227 65.641227 4000 -1512.4559 -1512.4559 -1587.7824 -1587.7824 291.52135 291.52135 160287.97 160287.97 50.185629 50.185629 Loop time of 33.9967 on 1 procs for 1000 steps with 2000 atoms Performance: 2.541 ns/day, 9.444 hours/ns, 29.415 timesteps/s 73.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 | 33.329 | 33.329 | 33.329 | 0.0 | 98.04 Neigh | 0.36743 | 0.36743 | 0.36743 | 0.0 | 1.08 Comm | 0.10384 | 0.10384 | 0.10384 | 0.0 | 0.31 Output | 4.3869e-05 | 4.3869e-05 | 4.3869e-05 | 0.0 | 0.00 Modify | 0.16812 | 0.16812 | 0.16812 | 0.0 | 0.49 Other | | 0.02782 | | | 0.08 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 7750 ave 7750 max 7750 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: 696356 ave 696356 max 696356 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 696356 Ave neighs/atom = 348.178 Neighbor list builds = 10 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) = 6.278 | 6.278 | 6.278 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -1512.4559 -1512.4559 -1587.7824 -1587.7824 291.52135 291.52135 160287.97 160287.97 50.185629 50.185629 5000 -1509.2413 -1509.2413 -1585.1045 -1585.1045 293.59844 293.59844 160710.13 160710.13 17.384623 17.384623 Loop time of 34.5733 on 1 procs for 1000 steps with 2000 atoms Performance: 2.499 ns/day, 9.604 hours/ns, 28.924 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 | 33.884 | 33.884 | 33.884 | 0.0 | 98.01 Neigh | 0.41052 | 0.41052 | 0.41052 | 0.0 | 1.19 Comm | 0.067597 | 0.067597 | 0.067597 | 0.0 | 0.20 Output | 4.0054e-05 | 4.0054e-05 | 4.0054e-05 | 0.0 | 0.00 Modify | 0.18151 | 0.18151 | 0.18151 | 0.0 | 0.52 Other | | 0.02958 | | | 0.09 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 7817 ave 7817 max 7817 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: 697244 ave 697244 max 697244 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 697244 Ave neighs/atom = 348.622 Neighbor list builds = 10 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 = 295.014548875036, Press = -5.31499077797441 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 6.278 | 6.278 | 6.278 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -1509.2413 -1509.2413 -1585.1045 -1585.1045 293.59844 293.59844 160710.13 160710.13 17.384623 17.384623 6000 -1509.5198 -1509.5198 -1583.676 -1583.676 286.9921 286.9921 160565.12 160565.12 46.507024 46.507024 Loop time of 34.383 on 1 procs for 1000 steps with 2000 atoms Performance: 2.513 ns/day, 9.551 hours/ns, 29.084 timesteps/s 72.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 | 33.719 | 33.719 | 33.719 | 0.0 | 98.07 Neigh | 0.4009 | 0.4009 | 0.4009 | 0.0 | 1.17 Comm | 0.093346 | 0.093346 | 0.093346 | 0.0 | 0.27 Output | 4.0054e-05 | 4.0054e-05 | 4.0054e-05 | 0.0 | 0.00 Modify | 0.14775 | 0.14775 | 0.14775 | 0.0 | 0.43 Other | | 0.02153 | | | 0.06 Nlocal: 2000 ave 2000 max 2000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 7825 ave 7825 max 7825 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: 698956 ave 698956 max 698956 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 698956 Ave neighs/atom = 349.478 Neighbor list builds = 10 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_T293.15.out" else "print 'not_converged' file output/vol_T293.15.out" print '${V}' file output/vol_T293.15.out 160718.171476029 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0