[lammps-users] Temperature scaling

I have a quick question about how LAMMPS calculates temperature. I am simulating a groups of particles where I am only time integrating a select region of the simulation box with the other particles being frozen in place. I want the non-frozen particles to have the same velocity profile as if I was integrating over the entire simulation box. Do I need to scale the temperature for the frozen system? Thanks.

Assuming the atoms you are integrating are in a group, just
define a compute temp for the atoms in that group, i.e. the
mobile ones. You have control over how temperature
is computed and how it is output. LAMMPS won't read your
mind. By default it just computes a temperature on all
the atoms.


I have placed the compute command right before the time integration but it
still seems to be computing temperature over the entire system. I have
attached the file so maybe you can see what I am doing wrong.

units lj
atom_style atomic

pair_style lj/cut 2.25

read_data data.mod

pair_coeff 1 1 1.0 1.0 2.25
pair_coeff 2 2 1.0 1.0 2.25
pair_coeff 3 3 1.0 1.0 2.25
pair_coeff 4 4 1.0 1.0 2.25

group sphere type 3 4

neighbor 2.0 bin
neigh_modify delay 10

timestep 0.005

thermo 100
thermo_style custom step temp evdwl ecoul pe ke etotal press

compute 1 sphere temp
fix 2 sphere npt temp 0.2 0.2 1.0 iso 1.0 1.0 10.0

dump 3 all atom 10000 dump.glass
restart 100000 restart.glass

run 200000000

in.glass (577 Bytes)

You need to use the thermo_modify or fix_modify commands
to assign the compute you have defined to the thermo output
or the thermostat. I suggest you read the doc pages for
those commands, including the thermostat and thermo_style
which explains all of this.