# 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 3.917371571063995*${_u_distance} variable latticeconst_converted equal 3.917371571063995*1 lattice fcc ${latticeconst_converted} lattice fcc 3.91737157106399 Lattice spacing in x,y,z = 3.9173716 3.9173716 3.9173716 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 (39.173716 39.173716 39.173716) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms create_atoms CPU = 0.001 seconds variable mass_converted equal 58.6934*${_u_mass} variable mass_converted equal 58.6934*1 kim_interactions Ni #=== BEGIN kim_interactions ================================== pair_style kim MEAM_LAMMPS_KimSeolJi_2017_PtNi__MO_020840179467_000 pair_coeff * * Ni #=== END kim_interactions ==================================== mass 1 ${mass_converted} mass 1 58.6934 # initial volume variable v equal vol # assign formula variable V0 equal ${v} # evaluate initial value variable V0 equal 60115.200756225 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 60115.200756225/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 60115.200756225/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 60115.200756225/(1*1*${_u_distance}) variable V0_metal equal 60115.200756225/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 60115.200756225*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 60115.200756225 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 = 6.5 ghost atom cutoff = 6.5 binsize = 3.25, bins = 13 13 13 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, cut 6.5 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 4.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -22928.467 -22928.467 -23080 -23080 293.15 293.15 60115.201 60115.201 2692.3915 2692.3915 1000 -22769.503 -22769.503 -22927 -22927 304.6874 304.6874 60535.233 60535.233 2162.7588 2162.7588 Loop time of 60.0705 on 1 procs for 1000 steps with 4000 atoms Performance: 1.438 ns/day, 16.686 hours/ns, 16.647 timesteps/s 62.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 | 59.786 | 59.786 | 59.786 | 0.0 | 99.53 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.075401 | 0.075401 | 0.075401 | 0.0 | 0.13 Output | 5.27e-05 | 5.27e-05 | 5.27e-05 | 0.0 | 0.00 Modify | 0.19003 | 0.19003 | 0.19003 | 0.0 | 0.32 Other | | 0.01907 | | | 0.03 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 312000.0 ave 312000 max 312000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 312000 Ave neighs/atom = 78.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.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -22769.503 -22769.503 -22927 -22927 304.6874 304.6874 60535.233 60535.233 2162.7588 2162.7588 2000 -22777.086 -22777.086 -22928.426 -22928.426 292.77763 292.77763 60584.509 60584.509 487.69527 487.69527 Loop time of 64.4449 on 1 procs for 1000 steps with 4000 atoms Performance: 1.341 ns/day, 17.901 hours/ns, 15.517 timesteps/s 62.3% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 64.028 | 64.028 | 64.028 | 0.0 | 99.35 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.089406 | 0.089406 | 0.089406 | 0.0 | 0.14 Output | 4.06e-05 | 4.06e-05 | 4.06e-05 | 0.0 | 0.00 Modify | 0.28846 | 0.28846 | 0.28846 | 0.0 | 0.45 Other | | 0.03906 | | | 0.06 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 311982.0 ave 311982 max 311982 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 311982 Ave neighs/atom = 77.995500 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.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -22777.086 -22777.086 -22928.426 -22928.426 292.77763 292.77763 60584.509 60584.509 487.69527 487.69527 3000 -22778.222 -22778.222 -22930.613 -22930.613 294.80938 294.80938 60591.343 60591.343 113.29729 113.29729 Loop time of 67.9903 on 1 procs for 1000 steps with 4000 atoms Performance: 1.271 ns/day, 18.886 hours/ns, 14.708 timesteps/s 59.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 | 67.572 | 67.572 | 67.572 | 0.0 | 99.38 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.059355 | 0.059355 | 0.059355 | 0.0 | 0.09 Output | 4.97e-05 | 4.97e-05 | 4.97e-05 | 0.0 | 0.00 Modify | 0.3199 | 0.3199 | 0.3199 | 0.0 | 0.47 Other | | 0.03934 | | | 0.06 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 311986.0 ave 311986 max 311986 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 311986 Ave neighs/atom = 77.996500 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.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -22778.222 -22778.222 -22930.613 -22930.613 294.80938 294.80938 60591.343 60591.343 113.29729 113.29729 4000 -22772.99 -22772.99 -22925.684 -22925.684 295.39665 295.39665 60589.317 60589.317 568.39858 568.39858 Loop time of 61.1195 on 1 procs for 1000 steps with 4000 atoms Performance: 1.414 ns/day, 16.978 hours/ns, 16.361 timesteps/s 65.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 | 60.727 | 60.727 | 60.727 | 0.0 | 99.36 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.081274 | 0.081274 | 0.081274 | 0.0 | 0.13 Output | 4.82e-05 | 4.82e-05 | 4.82e-05 | 0.0 | 0.00 Modify | 0.26205 | 0.26205 | 0.26205 | 0.0 | 0.43 Other | | 0.04965 | | | 0.08 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 311986.0 ave 311986 max 311986 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 311986 Ave neighs/atom = 77.996500 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.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -22772.99 -22772.99 -22925.684 -22925.684 295.39665 295.39665 60589.317 60589.317 568.39858 568.39858 5000 -22779.821 -22779.821 -22928.913 -22928.913 288.42876 288.42876 60559.783 60559.783 1166.0814 1166.0814 Loop time of 67.4916 on 1 procs for 1000 steps with 4000 atoms Performance: 1.280 ns/day, 18.748 hours/ns, 14.817 timesteps/s 59.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 | 67.133 | 67.133 | 67.133 | 0.0 | 99.47 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.078902 | 0.078902 | 0.078902 | 0.0 | 0.12 Output | 3.71e-05 | 3.71e-05 | 3.71e-05 | 0.0 | 0.00 Modify | 0.23973 | 0.23973 | 0.23973 | 0.0 | 0.36 Other | | 0.03968 | | | 0.06 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 312000.0 ave 312000 max 312000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 312000 Ave neighs/atom = 78.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 = 289.898411728595, Press = 151.049528990339 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -22779.821 -22779.821 -22928.913 -22928.913 288.42876 288.42876 60559.783 60559.783 1166.0814 1166.0814 6000 -22773.604 -22773.604 -22926.092 -22926.092 294.99673 294.99673 60550.658 60550.658 1548.3137 1548.3137 Loop time of 67.3519 on 1 procs for 1000 steps with 4000 atoms Performance: 1.283 ns/day, 18.709 hours/ns, 14.847 timesteps/s 60.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 | 67.046 | 67.046 | 67.046 | 0.0 | 99.55 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.074913 | 0.074913 | 0.074913 | 0.0 | 0.11 Output | 3.71e-05 | 3.71e-05 | 3.71e-05 | 0.0 | 0.00 Modify | 0.21109 | 0.21109 | 0.21109 | 0.0 | 0.31 Other | | 0.01993 | | | 0.03 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 311982.0 ave 311982 max 311982 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 311982 Ave neighs/atom = 77.995500 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 = 292.939045702085, Press = 26.316739908215 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -22773.604 -22773.604 -22926.092 -22926.092 294.99673 294.99673 60550.658 60550.658 1548.3137 1548.3137 7000 -22779.565 -22779.565 -22926.866 -22926.866 284.96438 284.96438 60535.615 60535.615 1901.4972 1901.4972 Loop time of 68.7541 on 1 procs for 1000 steps with 4000 atoms Performance: 1.257 ns/day, 19.098 hours/ns, 14.545 timesteps/s 58.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 | 68.388 | 68.388 | 68.388 | 0.0 | 99.47 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.079439 | 0.079439 | 0.079439 | 0.0 | 0.12 Output | 3.72e-05 | 3.72e-05 | 3.72e-05 | 0.0 | 0.00 Modify | 0.26686 | 0.26686 | 0.26686 | 0.0 | 0.39 Other | | 0.01956 | | | 0.03 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 311988.0 ave 311988 max 311988 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 311988 Ave neighs/atom = 77.997000 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 = 292.834441597214, Press = 9.54547806902892 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.613 | 4.613 | 4.613 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -22779.565 -22779.565 -22926.866 -22926.866 284.96438 284.96438 60535.615 60535.615 1901.4972 1901.4972 8000 -22776.207 -22776.207 -22930.394 -22930.394 298.28472 298.28472 60583.466 60583.466 419.47302 419.47302 Loop time of 64.7286 on 1 procs for 1000 steps with 4000 atoms Performance: 1.335 ns/day, 17.980 hours/ns, 15.449 timesteps/s 62.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 | 64.476 | 64.476 | 64.476 | 0.0 | 99.61 Neigh | 0 | 0 | 0 | 0.0 | 0.00 Comm | 0.058739 | 0.058739 | 0.058739 | 0.0 | 0.09 Output | 3.64e-05 | 3.64e-05 | 3.64e-05 | 0.0 | 0.00 Modify | 0.17465 | 0.17465 | 0.17465 | 0.0 | 0.27 Other | | 0.01936 | | | 0.03 Nlocal: 4000.00 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841.00 ave 5841 max 5841 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: 311996.0 ave 311996 max 311996 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 311996 Ave neighs/atom = 77.999000 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_T293.15.out" else "print 'not_converged' file output/vol_T293.15.out" print '${V}' file output/vol_T293.15.out 60602.4293720611 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0