[lammps-users] NVT thermostat converging to the wrong temperature?

I have these lines in my LAMMPS file:

velocity all create 300.0 6942 mom yes
fix 1 all nvt 300.0 300.0 100

and I'm running for 20,000 runs. However, the mean
temperature, as output by

thermo_style custom step temp press etotal

is about 150 K, half of the intended temperature.

What am I doing wrong here?

____________________________________________________________________________________Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/

hi James,

I think that before you set the NVT integrator you have to stabilize the temperature to 300 by a velocity re-scaling. For instance, initialize the velocities like you’re doing but before the NVT integration use something like

fix 1 all nve
fix 2 all temp/rescale 1 300 300 0.01 0.01
run 10000

unfix 1
unfix 2

fix 1 all nvt 300 300 100
run 100

I don’t know how big your system is but if it is small then you should sample for a large number of timesteps if you want the outputs that you want to calculate to be statistically accurate.

Hope this helps
Jaime

The system is about 65,000 atoms.

Unfortunately, when I first attempted the simulation
using straight-up NVE integration, the temperature was
oscillating from about 175 to 235 K, almost in sine
wave fashion. However, I was using a uniform
distribution for the velocities rather than a Gaussian
one, and I'm simulating a solid. Looking back, that
may have been a bozo decision. I've seen a uniform
velocity distribution being used before to initialize
velocities, but that was for a fluid.

Please post your input script - probably something is amiss
with the degrees of freedom the temp is being computed
on.

Steve

If you do NVE without the velocity re-scaling you will see the temperature oscillate because nothing is controlling it. If you run the NVE with temp/rescale for some time and then unfix the temp/rescale you’ll see that the temperature does not oscillate anymore. the longer you re-scale the velocities in the equilibration run the better.

Here it is:

units metal
atom_style atomic

# Half the length and width of the square quantum wire
in lattice units:
variable qwrHalf equal 17

# Half the length and width of the simulation box in
lattice units:
variable boxHalf equal 32

# Half the thickness of the simulation box in lattice
units:
variable halfThick equal 1

# The lattice constant is that of the matrix (GaAs):
lattice diamond 5.6533

region box block -\{boxHalf\} {boxHalf} -\{halfThick\} {halfThick} &
-\{boxHalf\} {boxHalf} units lattice
create_box 3 box

region wire block -\{qwrHalf\} {qwrHalf} INF INF &
-\{qwrHalf\} {qwrHalf} units lattice

# Atom types:
# 1: Gallium
# 2: Indium
# 3: Arsenic
create_atoms 1 region box basis 5 3 basis 6 3 basis 7
3 basis 8 3
delete_atoms region wire
create_atoms 2 region wire basis 5 3 basis 6 3 basis 7
3 basis 8 3

mass 1 69.723 # Ga
mass 2 114.818 # In
mass 3 74.9216 # As

pair_style tersoff
pair_coeff * * GaInAs.tersoff Ga In As

dump 1 all custom 1 dump.qwr.*.gz tag type x y z vx
vy vz fx fy fz

minimize 1.0e-6 20000 40000

# This sets the velocities to random values that
correspond with a particular
# macroscopic temperature (in degrees Kelvin). The
linear momentum of the
# ensemble of atoms is zeroed.
velocity all create 300.0 6942 mom yes

thermo 1
thermo_style custom step temp press etotal
# Using the Nose-Hoover (NVT) thermostat
fix 1 all nvt 300.0 300.0 100
dump_modify 1 every 100

run 20000

James,

you have a dumping constant for the thermostat equal to 100 ps and your total simulation time is 20 ps (defaul timestep 1 fs)
so you have not sampled long enough to oscillate around the target temperature.

I suggest you to use a dumping constant ~100 times the timestep, 0.1 ps.

vale

--- Valeria Molinero <[email protected]...>
wrote:

James,

you have a dumping constant for the thermostat equal
to 100 ps and
your total simulation time is 20 ps (defaul timestep
1 fs)

Ahh. I didn't read the documentation carefully enough.
I was thinking of the time unit as being the default
spacing of the time step. I thought my dumping
constant was 100 fs, not 100 ps. Oops.