[lammps-users] temp/region

Steve,

I am using velocity scaling(fix/temp rescale) as an alternative to thermostat to create a temperature gradient by setting two ends of my structure to two different temperatures. But of those two fixes only one of them is working accurately and the other one is not. The following is the part of my program:

units metal
dimension 3
boundary s s s

atom_style atomic
pair_coeff * * CH.airebo C

#the regions left and right are fixed and temp/rescaling is done to low and high

region 3 block INF 0.1 INF INF INF INF units box
group left region 3

region 4 block 0.1 4.28 INF INF INF INF units box
group low region 4

region 5 block 4.28 97.0 INF INF INF INF units box
group middle region 5

region 6 block 97.0 101.4 INF INF INF INF units box
group high region 6

region 7 block 101.4 INF INF INF INF INF units box
group right region 7
fix 1 left setforce 0.0 0.0 0.0
fix 2 right setforce 0.0 0.0 0.0
velocity all create 300.0 873586443 dist gaussian
velocity left set 0.0 0.0 0.0 units box
velocity right set 0.0 0.0 0.0 units box

Your thermostats are applied to groups of atoms, while you
are printing out the temperature of regions of atoms. Those
are not the same thing. There is no guarantee that the atoms
in a group will remain in a region.

I think you want to assign a compute temp/region that computes
temperature of atoms in a region to the fix temp/rescale command
via fix_modify, to do what you want.

Steve