units metal variable T equal 300 variable tlo equal 270 variable thi equal 330 variable V equal vol variable dt equal 0.001 variable p equal 1000 # correlation length variable s equal 5 # sample interval variable d equal $p*$s # dump interval # setup problem dimension 3 boundary p p p atom_style atomic lattice diamond 5.43 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 region 1 block -20 30 -20 30 -20 150 region 2 block 0 10 0 10 0 60 create_box 1 2 create_atoms 1 region 2 mass 1 28.0855 pair_style sw pair_coeff * * Si.sw Si timestep ${dt} thermo $d velocity all create $T 4928459 # heat layers region hot block INF INF INF INF 0 5 region cold block INF INF INF INF 55 60 compute Thot all temp/region hot compute Tcold all temp/region cold # 1st equilibration run fix 1 all nvt temp $T $T 0.5 dump 1 all xyz 5000 silicon.xyz dump_modify 1 element Si run 10000 velocity all scale $T unfix 1 fix 1 all nve fix hot all langevin ${thi} ${thi} 1.0 59804 tally yes fix cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes fix_modify hot temp Thot fix_modify cold temp Tcold variable tdiff equal c_Thot-c_Tcold thermo_style custom step temp c_Thot c_Tcold f_hot f_cold v_tdiff run 200000 # thermal conductivity calculation # reset langevin thermostats to zero energy accumulation compute ke all ke/atom variable temp atom c_ke/1.5/8.617332478e-5 fix hot all langevin ${thi} ${thi} 1.0 59804 tally yes fix cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes fix_modify hot temp Thot fix_modify cold temp Tcold fix ave all ave/time 10 100 1000 v_tdiff ave running thermo_style custom step temp c_Thot c_Tcold f_hot f_cold v_tdiff f_ave fix 2 all ave/spatial 10 100 1000 z lower 0.05 v_temp & file profile.langevin units reduced run 200000