# 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 4.210700303316116*${_u_distance} variable latticeconst_converted equal 4.210700303316116*1 lattice fcc ${latticeconst_converted} lattice fcc 4.21070030331612 Lattice spacing in x,y,z = 4.2107 4.2107 4.2107 region simbox block 0 10 0 10 0 10 units lattice create_box 1 simbox Created orthogonal box = (0 0 0) to (42.107 42.107 42.107) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms create_atoms CPU = 0.00048399 secs variable mass_converted equal 26.981538*${_u_mass} variable mass_converted equal 26.981538*1 # specify which KIM Model to use pair_style kim EAM_IMD_SchopfBrommerFrigan_2012_AlMnPd__MO_878712978062_003 WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1089) pair_coeff * * Al mass 1 ${mass_converted} mass 1 26.981538 # initial volume variable v equal vol # assign formula variable V0 equal ${v} # evaluate initial value variable V0 equal 74655.7039324236 variable V0_metal equal ${V0}/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 74655.7039324236/(${_u_distance}*${_u_distance}*${_u_distance}) variable V0_metal equal 74655.7039324236/(1*${_u_distance}*${_u_distance}) variable V0_metal equal 74655.7039324236/(1*1*${_u_distance}) variable V0_metal equal 74655.7039324236/(1*1*1) variable V0_metal_times1000 equal ${V0_metal}*1000 variable V0_metal_times1000 equal 74655.7039324236*1000 print "Initial system volume: ${V0_metal} Angstroms^3" Initial system volume: 74655.7039324236 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 = 9 ghost atom cutoff = 9 binsize = 4.5, bins = 10 10 10 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair kim, perpetual attributes: full, newton off, cut 9 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard Per MPI rank memory allocation (min/avg/max) = 6.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 0 -14732.914 -14732.914 -14905.123 -14905.123 333.15 333.15 74655.704 74655.704 2463.8287 2463.8287 1000 -14518.466 -14518.466 -14698.486 -14698.486 348.26037 348.26037 79335.691 79335.691 -528.1318 -528.1318 Loop time of 58.698 on 1 procs for 1000 steps with 4000 atoms Performance: 1.472 ns/day, 16.305 hours/ns, 17.036 timesteps/s 41.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 | 57.818 | 57.818 | 57.818 | 0.0 | 98.50 Neigh | 0.37411 | 0.37411 | 0.37411 | 0.0 | 0.64 Comm | 0.127 | 0.127 | 0.127 | 0.0 | 0.22 Output | 4.6968e-05 | 4.6968e-05 | 4.6968e-05 | 0.0 | 0.00 Modify | 0.31721 | 0.31721 | 0.31721 | 0.0 | 0.54 Other | | 0.06117 | | | 0.10 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8144 ave 8144 max 8144 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: 607882 ave 607882 max 607882 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 607882 Ave neighs/atom = 151.97 Neighbor list builds = 9 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.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 1000 -14518.466 -14518.466 -14698.486 -14698.486 348.26037 348.26037 79335.691 79335.691 -528.1318 -528.1318 2000 -14533.51 -14533.51 -14706.456 -14706.456 334.57673 334.57673 78974.78 78974.78 378.5435 378.5435 Loop time of 61.5892 on 1 procs for 1000 steps with 4000 atoms Performance: 1.403 ns/day, 17.108 hours/ns, 16.237 timesteps/s 40.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 | 60.519 | 60.519 | 60.519 | 0.0 | 98.26 Neigh | 0.47415 | 0.47415 | 0.47415 | 0.0 | 0.77 Comm | 0.19708 | 0.19708 | 0.19708 | 0.0 | 0.32 Output | 4.6015e-05 | 4.6015e-05 | 4.6015e-05 | 0.0 | 0.00 Modify | 0.35749 | 0.35749 | 0.35749 | 0.0 | 0.58 Other | | 0.04101 | | | 0.07 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8150 ave 8150 max 8150 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: 608342 ave 608342 max 608342 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 608342 Ave neighs/atom = 152.085 Neighbor list builds = 12 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.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 2000 -14533.51 -14533.51 -14706.456 -14706.456 334.57673 334.57673 78974.78 78974.78 378.5435 378.5435 3000 -14532.933 -14532.933 -14708.112 -14708.112 338.89653 338.89653 79150.359 79150.359 -628.06924 -628.06924 Loop time of 62.3636 on 1 procs for 1000 steps with 4000 atoms Performance: 1.385 ns/day, 17.323 hours/ns, 16.035 timesteps/s 39.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 | 61.205 | 61.205 | 61.205 | 0.0 | 98.14 Neigh | 0.5923 | 0.5923 | 0.5923 | 0.0 | 0.95 Comm | 0.097121 | 0.097121 | 0.097121 | 0.0 | 0.16 Output | 4.6015e-05 | 4.6015e-05 | 4.6015e-05 | 0.0 | 0.00 Modify | 0.44769 | 0.44769 | 0.44769 | 0.0 | 0.72 Other | | 0.02126 | | | 0.03 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8118 ave 8118 max 8118 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: 607582 ave 607582 max 607582 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 607582 Ave neighs/atom = 151.895 Neighbor list builds = 12 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.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 3000 -14532.933 -14532.933 -14708.112 -14708.112 338.89653 338.89653 79150.359 79150.359 -628.06924 -628.06924 4000 -14530.443 -14530.443 -14705.964 -14705.964 339.55741 339.55741 78989.486 78989.486 329.79487 329.79487 Loop time of 59.5081 on 1 procs for 1000 steps with 4000 atoms Performance: 1.452 ns/day, 16.530 hours/ns, 16.804 timesteps/s 41.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 | 58.326 | 58.326 | 58.326 | 0.0 | 98.01 Neigh | 0.50676 | 0.50676 | 0.50676 | 0.0 | 0.85 Comm | 0.19166 | 0.19166 | 0.19166 | 0.0 | 0.32 Output | 4.6968e-05 | 4.6968e-05 | 4.6968e-05 | 0.0 | 0.00 Modify | 0.46303 | 0.46303 | 0.46303 | 0.0 | 0.78 Other | | 0.02111 | | | 0.04 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8147 ave 8147 max 8147 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: 608392 ave 608392 max 608392 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 608392 Ave neighs/atom = 152.098 Neighbor list builds = 11 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.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 4000 -14530.443 -14530.443 -14705.964 -14705.964 339.55741 339.55741 78989.486 78989.486 329.79487 329.79487 5000 -14536.591 -14536.591 -14706.198 -14706.198 328.11507 328.11507 79006.317 79006.317 169.01091 169.01091 Loop time of 58.0276 on 1 procs for 1000 steps with 4000 atoms Performance: 1.489 ns/day, 16.119 hours/ns, 17.233 timesteps/s 42.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 | 57.006 | 57.006 | 57.006 | 0.0 | 98.24 Neigh | 0.45674 | 0.45674 | 0.45674 | 0.0 | 0.79 Comm | 0.077451 | 0.077451 | 0.077451 | 0.0 | 0.13 Output | 3.314e-05 | 3.314e-05 | 3.314e-05 | 0.0 | 0.00 Modify | 0.4264 | 0.4264 | 0.4264 | 0.0 | 0.73 Other | | 0.06128 | | | 0.11 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8148 ave 8148 max 8148 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: 608502 ave 608502 max 608502 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 608502 Ave neighs/atom = 152.125 Neighbor list builds = 11 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 = 330.592478908664, Press = -228.397246281103 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 6.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 5000 -14536.591 -14536.591 -14706.198 -14706.198 328.11507 328.11507 79006.317 79006.317 169.01091 169.01091 6000 -14535.656 -14535.656 -14708.851 -14708.851 335.05736 335.05736 79008.193 79008.193 -95.420462 -95.420462 Loop time of 53.6139 on 1 procs for 1000 steps with 4000 atoms Performance: 1.612 ns/day, 14.893 hours/ns, 18.652 timesteps/s 45.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 | 52.668 | 52.668 | 52.668 | 0.0 | 98.24 Neigh | 0.44512 | 0.44512 | 0.44512 | 0.0 | 0.83 Comm | 0.097499 | 0.097499 | 0.097499 | 0.0 | 0.18 Output | 3.3855e-05 | 3.3855e-05 | 3.3855e-05 | 0.0 | 0.00 Modify | 0.36217 | 0.36217 | 0.36217 | 0.0 | 0.68 Other | | 0.04102 | | | 0.08 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8104 ave 8104 max 8104 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: 608066 ave 608066 max 608066 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 608066 Ave neighs/atom = 152.017 Neighbor list builds = 12 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.897605504907, Press = -36.4705665606775 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 6.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 6000 -14535.656 -14535.656 -14708.851 -14708.851 335.05736 335.05736 79008.193 79008.193 -95.420462 -95.420462 7000 -14532.228 -14532.228 -14705.791 -14705.791 335.76859 335.76859 78988.791 78988.791 312.51438 312.51438 Loop time of 55.396 on 1 procs for 1000 steps with 4000 atoms Performance: 1.560 ns/day, 15.388 hours/ns, 18.052 timesteps/s 44.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 | 54.392 | 54.392 | 54.392 | 0.0 | 98.19 Neigh | 0.46295 | 0.46295 | 0.46295 | 0.0 | 0.84 Comm | 0.11599 | 0.11599 | 0.11599 | 0.0 | 0.21 Output | 3.3855e-05 | 3.3855e-05 | 3.3855e-05 | 0.0 | 0.00 Modify | 0.36354 | 0.36354 | 0.36354 | 0.0 | 0.66 Other | | 0.06145 | | | 0.11 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8141 ave 8141 max 8141 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: 609310 ave 609310 max 609310 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 609310 Ave neighs/atom = 152.327 Neighbor list builds = 12 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.205761074133, Press = 6.15978566280135 next a jump SELF top variable a loop 2000 run 1000 Per MPI rank memory allocation (min/avg/max) = 6.243 | 6.243 | 6.243 Mbytes Step TotEng v_etotal_metal PotEng v_pe_metal Temp v_T_metal Volume v_V_metal Press v_P_metal 7000 -14532.228 -14532.228 -14705.791 -14705.791 335.76859 335.76859 78988.791 78988.791 312.51438 312.51438 8000 -14535.847 -14535.847 -14707.867 -14707.867 332.78412 332.78412 79032.57 79032.57 -217.2874 -217.2874 Loop time of 51.9643 on 1 procs for 1000 steps with 4000 atoms Performance: 1.663 ns/day, 14.435 hours/ns, 19.244 timesteps/s 47.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 | 51.006 | 51.006 | 51.006 | 0.0 | 98.16 Neigh | 0.40829 | 0.40829 | 0.40829 | 0.0 | 0.79 Comm | 0.096838 | 0.096838 | 0.096838 | 0.0 | 0.19 Output | 3.2902e-05 | 3.2902e-05 | 3.2902e-05 | 0.0 | 0.00 Modify | 0.41208 | 0.41208 | 0.41208 | 0.0 | 0.79 Other | | 0.04094 | | | 0.08 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 8136 ave 8136 max 8136 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: 609118 ave 609118 max 609118 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 609118 Ave neighs/atom = 152.28 Neighbor list builds = 11 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 79033.5318775811 print "LAMMPS calculation completed" LAMMPS calculation completed quit 0