I followed the tutorial (https://github.com/lammps/lammps/blob/develop/examples/KAPPA/in.heat) to compute the thermal conductance of bilayer graphene sandwiched by Al2O3 on both sides along the z axis. Here is my input file.
variable x equal 47.59 variable y equal 41.214148966101 variable z equal 136.636 variable t equal 300.0 #Setup parameters units metal atom_style atomic read_data atomic_structure_atomic mass 1 16.0 mass 2 27.0 mass 3 12.0 mass 4 12.0 velocity all create $t 87287 pair_style hybrid/overlay lj/cut 12.0 morse 6.287 tersoff shift -0.0462 pair_coeff 1 1 lj/cut 0.00844 3.541 pair_coeff 1 2 lj/cut 0.0135951 4.02 pair_coeff 1 3 lj/cut 0.0 1.0 pair_coeff 1 4 lj/cut 0.0 1.0 pair_coeff 2 2 lj/cut 0.0218989 4.499 pair_coeff 2 3 morse 0.4691 1.738 2.246 pair_coeff 2 4 morse 0.4691 1.738 2.246 pair_coeff * * tersoff ./Copt.tersoff NULL NULL C C neighbor 0.3 bin neigh_modify delay 0 every 1 #energy minimization fix 5 all box/relax iso 0.0 vmax 0.001 minimize 1.0e-4 1.0e-6 1000 100000 unfix 5 #layers for heat flux region hot block INF INF INF INF 28.69356 42.12042884 region cold block INF INF INF INF 98.51465116 111.50565116 compute Thot all temp/region hot compute Tcold all temp/region cold #1st equilibirum run fix 1 all nvt temp $t $t 100.0 thermo 10 run 100000 velocity all scale $t unfix 1 #2nd equilibrium run fix 1 all nve fix hot all heat 1 1.0 region hot fix cold all heat 1 -1.0 region cold thermo_style custom step temp c_Thot c_Tcold thermo_modify colname c_Thot Temp_hot colname c_Tcold Temp_cold thermo 10 run 10000 #thermal conductivity calculation compute ke all ke/atom variable temp atom c_ke/1.5/8.617333262145e-5 compute layers all chunk/atom bin/1d z lower 0.02 units reduced fix 2 all ave/chunk 10 100 1000 layers v_temp file profile.heat variable tdiff equal f_2[20][3]-f_2[36][3] fix ave all ave/time 10 100 1000 v_tdiff ave running start 13000 variable kappa equal 1.0/(lx*ly)*lz/f_ave thermo_style custom step temp c_Thot c_Tcold v_tdiff f_ave thermo_modify colname c_Thot Temp_hot colname c_Tcold Temp_cold & colname v_tdiff dTemp_step colname f_ave dTemp run 200000 print "Running average thermal conductivity: $(v_kappa:%.4f)" I received the following error message after I launched the calculation.
LAMMPS (2 Aug 2023) variable x equal 47.59 variable y equal 41.214148966101 variable z equal 136.636 variable t equal 300.0 #Setup parameters units metal atom_style atomic read_data atomic_structure_atomic Reading data file ... triclinic box = (0 0 0) to (47.59 41.214149 136.636) with tilt (-23.795 0 0) WARNING: Triclinic box skew is large. LAMMPS will run inefficiently. (../domain.cpp:220) 1 by 1 by 1 MPI processor grid reading atoms ... 19600 atoms read_data CPU = 0.199 seconds mass 1 16.0 mass 2 27.0 mass 3 12.0 mass 4 12.0 velocity all create $t 87287 velocity all create 300 87287 #pair_style hybrid/overlay lj/cut 10.0 morse 6.287 tersoff shift -0.0462 kolmogorov/crespi/z 20.0 pair_style hybrid/overlay lj/cut 12.0 morse 6.287 tersoff shift -0.0462 pair_coeff 1 1 lj/cut 0.00844 3.541 pair_coeff 1 2 lj/cut 0.0135951 4.02 pair_coeff 1 3 lj/cut 0.0 1.0 pair_coeff 1 4 lj/cut 0.0 1.0 pair_coeff 2 2 lj/cut 0.0218989 4.499 pair_coeff 2 3 morse 0.4691 1.738 2.246 pair_coeff 2 4 morse 0.4691 1.738 2.246 pair_coeff * * tersoff ./Copt.tersoff NULL NULL C C neighbor 0.3 bin neigh_modify delay 0 every 1 #energy minimization fix 5 all box/relax iso 0.0 vmax 0.001 minimize 1.0e-4 1.0e-6 1000 100000 Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 12.3 ghost atom cutoff = 12.3 binsize = 6.15, bins = 12 7 23 6 neighbor lists, perpetual/occasional/extra = 6 0 0 (1) pair lj/cut, perpetual, skip from (4) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair morse, perpetual, skip from (5) attributes: half, newton on, cut 6.587 pair build: skip stencil: none bin: none (3) pair tersoff, perpetual, skip from (6) attributes: full, newton on, cut 2.4 pair build: skip stencil: none bin: none (4) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/newton/tri stencil: half/bin/3d/tri bin: standard (5) neighbor class addition, perpetual, trim from (4) attributes: half, newton on, cut 6.587 pair build: trim stencil: none bin: none (6) neighbor class addition, perpetual attributes: full, newton on, cut 2.4 pair build: full/bin/atomonly stencil: full/bin/3d bin: standard WARNING: Energy due to 1 extra global DOFs will be included in minimizer energies (../min.cpp:225) Per MPI rank memory allocation (min/avg/max) = 87.58 | 87.58 | 87.58 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300 18675574 0 18676334 4.5038706e+08 267995.3 1000 300 355.71228 0 1115.7232 7818.4545 2143962.4 Loop time of 192.986 on 1 procs for 1000 steps with 19600 atoms 99.8% CPU use with 1 MPI tasks x no OpenMP threads Minimization stats: Stopping criterion = max iterations Energy initial, next-to-last, final = 18675574.3392642 370.713719775112 355.712282174799 Force two-norm initial, final = 2.2600666e+08 14933.478 Force max component initial, final = 2.2600657e+08 14933.459 Final line search alpha, max atom move = 6.6359114e-08 0.00099097112 Iterations, force evaluations = 1000 1000 MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 81.011 | 81.011 | 81.011 | 0.0 | 41.98 Neigh | 109.55 | 109.55 | 109.55 | 0.0 | 56.77 Comm | 0.48548 | 0.48548 | 0.48548 | 0.0 | 0.25 Output | 0.00010763 | 0.00010763 | 0.00010763 | 0.0 | 0.00 Modify | 0 | 0 | 0 | 0.0 | 0.00 Other | | 1.938 | | | 1.00 Nlocal: 19600 ave 19600 max 19600 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 13422 ave 13422 max 13422 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 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 539 Dangerous builds = 78 unfix 5 #layers for heat flux region hot block INF INF INF INF 28.69356 42.12042884 region cold block INF INF INF INF 98.51465116 111.50565116 compute Thot all temp/region hot compute Tcold all temp/region cold #1st equilibirum run fix 1 all nvt temp $t $t 100.0 fix 1 all nvt temp 300 $t 100.0 fix 1 all nvt temp 300 300 100.0 thermo 10 run 100000 Per MPI rank memory allocation (min/avg/max) = 95.1 | 95.1 | 95.1 Mbytes Step Temp E_pair E_mol TotEng Press 1000 300 355.71228 0 1115.7232 7818.4545 1010 289.14242 383.22878 0 1115.7334 7898.4387 1020 262.83777 449.97678 0 1115.842 8094.8676 ...... 110980 1884.322 1864.0873 1986.5247 110990 1881.9124 1881.575 1937.1548 111000 1882.1765 1886.5183 1926.9182 Loop time of 490.656 on 1 procs for 10000 steps with 19600 atoms Performance: 1.761 ns/day, 13.629 hours/ns, 20.381 timesteps/s, 399.465 katom-step/s 100.0% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 119.07 | 119.07 | 119.07 | 0.0 | 24.27 Neigh | 350.79 | 350.79 | 350.79 | 0.0 | 71.49 Comm | 4.3024 | 4.3024 | 4.3024 | 0.0 | 0.88 Output | 0.41462 | 0.41462 | 0.41462 | 0.0 | 0.08 Modify | 13.986 | 13.986 | 13.986 | 0.0 | 2.85 Other | | 2.1 | | | 0.43 Nlocal: 19600 ave 19600 max 19600 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 16269 ave 16269 max 16269 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 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 4670 Dangerous builds = 2 #thermal conductivity calculation compute ke all ke/atom variable temp atom c_ke/1.5/8.617333262145e-5 compute layers all chunk/atom bin/1d z lower 1.0 units reduced fix 2 all ave/chunk 10 100 1000 layers v_temp file profile.heat variable tdiff equal f_2[20][3]-f_2[36][3] fix ave all ave/time 10 100 1000 v_tdiff ave running start 13000 variable kappa equal 1.0/(lx*ly)*lz/f_ave thermo_style custom step temp c_Thot c_Tcold v_tdiff f_ave WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:903) thermo_modify colname c_Thot Temp_hot colname c_Tcold Temp_cold colname v_tdiff dTemp_step colname f_ave dTemp run 3000000 ERROR: Thermo and fix ave not computed at compatible times (../thermo.cpp:301) Last command: run 3000000 I ran the tutorial and the calculation could be done successfully.
Would anyone please tell me why the 'Thermo' and 'fix ave' command conflicts in my case? Thank you in advance.
run 3000000, but there is no such command in the input above it. So I suspect there were some modifications to the input in between. $\endgroup$