Specifying Location in in.langevin example

Hello,

I was looking at the in.langevin example in the KAPPA folder and was wondering how you specify the region to apply the hot and cold areas when both fixes are for “all” atoms. Does calling the fix_modify reference the compute that then gives the region on which to act? If so, what is the benefit of doing this indirectly through a compute rather than just indicating the region in the langevin fix? Is it just more efficient?

Thanks,
Michael

heat layers

region hot block INF INF INF INF 0 1

region cold block INF INF INF INF 10 11

compute Thot all temp/region hot

compute Tcold all temp/region cold

1st equilibration run

fix 1 all nvt temp $t $t 0.5

thermo 100

run 1000

velocity all scale $t

unfix 1

2nd equilibration run

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

thermo 1000

run 10000

Please read up in the LAMMPS manual about thermostat biasing.

Also, how would you specify a region with the langevin fix?

Axel.