[lammps-users] Langevin thermostat

Dear all,

I noticed the following problem. When using Langevin thermostat in LAMMPS and
trying to calculate Lindemann parameter (mean square displacement - fix msd)
I have obtained curious results: msd tremendously rises during thermostat's
work and even after. At the same time the system stays in a crystalline
phase. Analysing corresponding dump-files one may conclude that the entire
lattice 'moves' in periodic boundry conditions. The conclusion is evident
from the center-of-mass position (fix com) observation. System's center of
mass starts moving significantly at the moment langevin thermostat begin to

Using the input script below one may compare infuences of different
thermostates on msd and position of center of mass:

  Langevin fix 4 all langevin 0.735 0.735 1.0 55783 1 1 1
  rescaling fix 4 all temp/rescale 0.735 0.735 1000 0.01 1.0
  nvt fix 4 all nvt 0.735 0.735 1.0

Desired point (density = 1.031 and T=0.735, in LJ unit) corresponds to the
crystalline state of a LJ system.

I use lammps-3Jun05.
Is it a feature of Langevin thermostat or its realization?
Thank you for your comments.
Alexey Kuksin.

P.S. Input Script for LJ solid

log lj_0735_1031_langevin.txt

units lj
atom_style atomic
lattice fcc 1.031
region box block 0 5 0 5 0 5
create_box 1 box
create_atoms 1
mass 1 1.0
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify every 20 delay 0 check no

timestep 0.001
thermo 10

velocity all create 0.735 34334

fix 1 all nve
fix 2 all msd 10 lj_0735_1031_langevin.msd
fix 3 all com 10 lj_0735_1031_langevin.com
#dump id all atom 10000 lj_0735_1031_langevin.dump
run 10000

fix 4 all langevin 0.735 0.735 1.0 55783 1 1 1
# !!! try temp/rescale or nvt

run 20000
unfix 4
run 20000

The langevin thermostat is not momentum conserving (b/c you
are giving a random kick to every particle), unlike NVT and temp/rescale
which I believe do conserve total momentum. So a periodic system
could drift over long times.

You can subtract out the c-o-m drift in your MSD analysis. Or you
can attach a light spring to the entire system to anchor it to the
box center and keep it from drifting (fix spring) ...