read_restart Si_500K.STA.76000000 variable T equal 500 variable V equal vol variable dt equal 0.001 variable p equal 100 # correlation length variable s equal 50 # sample interval variable d equal $p*$s # dump interval #convert from LAMMPS real units to SI variable kB equal 1.3806504e-23 # [J/K] Boltzmann variable eV2J equal 1.6e-19 variable A2m equal 1.0e-10 variable ps2s equal 1.0e-12 variable convert equal ${eV2J}*${eV2J}/${ps2s}/${A2m} # setup problem lattice diamond 5.43 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 region box block 0 6 0 6 0 6 mass 1 28.0855 pair_style sw pair_coeff * * Si.sw Si timestep ${dt} thermo $d # equilibration and thermalization compute perpe all pe/atom compute perke all ke/atom # fix nvt1 all nvt temp 500 500 0.01 run 10000 unfix nvt1 fix NVE all nve reset_timestep 0 compute myKE all ke/atom compute myPE all pe/atom compute myStress all stress/atom virial compute flux all heat/flux myKE myPE myStress variable Jx equal c_flux[1]/vol variable Jy equal c_flux[2]/vol variable Jz equal c_flux[3]/vol fix JJ all ave/correlate $s $p $d & c_flux[1] c_flux[2] c_flux[3] type auto file J0Jt.dat ave running variable scale equal ${convert}/${kB}/$T/$T/$V*$s*${dt} variable k11 equal trap(f_JJ[3])*${scale} variable k22 equal trap(f_JJ[4])*${scale} variable k33 equal trap(f_JJ[5])*${scale} thermo_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33 run 2000000 variable k equal (v_k11+v_k22+v_k33)/3.0 variable ndens equal count(all)/vol print "average conductivity: $k[W/mK] @ $T K, ${ndens} /A^3"