2006-09-22 00:22:34 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
fix langevin command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
fix ID group-ID langevin Tstart Tstop damp seed keyword values ... :pre
|
|
|
|
|
|
|
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
|
|
|
langevin = style name of this fix command :l
|
|
|
|
Tstart,Tstop = desired temperature at start/end of run (temperature units) :l
|
|
|
|
damp = damping parameter (time units) :l
|
2008-12-05 00:15:03 +08:00
|
|
|
seed = random number seed to use for white noise (positive integer) :l
|
2007-07-03 04:04:44 +08:00
|
|
|
zero or more keyword/value pairs may be appended :l
|
2009-08-09 06:59:06 +08:00
|
|
|
keyword = {scale} or {tally}
|
2006-09-22 00:22:34 +08:00
|
|
|
{scale} values = type ratio
|
|
|
|
type = atom type (1-N)
|
2009-08-09 06:59:06 +08:00
|
|
|
ratio = factor by which to scale the damping coefficient
|
|
|
|
{tally} values = {no} or {yes}
|
|
|
|
{no} = do not tally the energy added/subtracted to atoms
|
2011-03-28 08:13:42 +08:00
|
|
|
{yes} = do tally the energy added/subtracted to atoms
|
2011-03-28 22:39:41 +08:00
|
|
|
{zero} values = {no} or {yes}
|
2011-03-28 08:13:42 +08:00
|
|
|
{no} = do not set total random force to zero
|
|
|
|
{yes} = set total random force to zero :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
fix 3 boundary langevin 1.0 1.0 1000.0 699483
|
2008-03-12 01:30:41 +08:00
|
|
|
fix 1 all langevin 1.0 1.1 100.0 48279 scale 3 1.5 :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2010-03-10 22:55:12 +08:00
|
|
|
Apply a Langevin thermostat as described in "(Schneider)"_#Schneider
|
|
|
|
to a group of atoms which models an interaction with a background
|
|
|
|
implicit solvent. Used with "fix nve"_fix_nve.html, this command
|
|
|
|
performs Brownian dynamics (BD), since the total force on each atom
|
|
|
|
will have the form:
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-04-17 06:15:33 +08:00
|
|
|
F = Fc + Ff + Fr
|
|
|
|
Ff = - (m / damp) v
|
|
|
|
Fr is proportional to sqrt(Kb T m / (dt damp)) :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Fc is the conservative force computed via the usual inter-particle
|
|
|
|
interactions ("pair_style"_pair_style.html,
|
|
|
|
"bond_style"_bond_style.html, etc).
|
|
|
|
|
2010-05-06 22:37:29 +08:00
|
|
|
The Ff and Fr terms are added by this fix on a per-particle basis.
|
|
|
|
See the "pair_style dpd/tstat"_pair_dpd.html command for a
|
|
|
|
thermostatting option that adds similar terms on a pairwise basis to
|
|
|
|
pairs of interacting particles.
|
2008-04-17 06:15:33 +08:00
|
|
|
|
|
|
|
Ff is a frictional drag or viscous damping term proportional to the
|
|
|
|
particle's velocity. The proportionality constant for each atom is
|
|
|
|
computed as m/damp, where m is the mass of the particle and damp is
|
|
|
|
the damping factor specified by the user.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Fr is a force due to solvent atoms at a temperature T randomly bumping
|
|
|
|
into the particle. As derived from the fluctuation/dissipation
|
2008-04-17 06:15:33 +08:00
|
|
|
theorem, its magnitude as shown above is proportional to sqrt(Kb T m /
|
|
|
|
dt damp), where Kb is the Boltzmann constant, T is the desired
|
|
|
|
temperature, m is the mass of the particle, dt is the timestep size,
|
|
|
|
and damp is the damping factor. Random numbers are used to randomize
|
|
|
|
the direction and magnitude of this force as described in
|
|
|
|
"(Dunweg)"_#Dunweg, where a uniform random number is used (instead of
|
|
|
|
a Gaussian random number) for speed.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-03-20 06:51:12 +08:00
|
|
|
Note that the thermostat effect of this fix is applied to only the
|
|
|
|
translational degrees of freedom for the particles, which is an
|
|
|
|
important consideration if extended spherical or aspherical particles
|
|
|
|
which have rotational degrees of freedom are being thermostatted with
|
|
|
|
this fix. The translational degrees of freedom can also have a bias
|
|
|
|
velocity removed from them before thermostatting takes place; see the
|
|
|
|
description below.
|
|
|
|
|
2010-04-03 00:51:06 +08:00
|
|
|
IMPORTANT NOTE: Unlike the "fix nvt"_fix_nh.html command which
|
2008-03-12 01:15:19 +08:00
|
|
|
performs Nose/Hoover thermostatting AND time integration, this fix
|
|
|
|
does NOT perform time integration. It only modifies forces to effect
|
|
|
|
thermostatting. Thus you must use a separate time integration fix,
|
|
|
|
like "fix nve"_fix_nve.html to actually update the velocities and
|
2008-03-18 04:49:34 +08:00
|
|
|
positions of atoms using the modified forces. Likewise, this fix
|
2008-03-12 01:15:19 +08:00
|
|
|
should not normally be used on atoms that also have their temperature
|
2010-04-03 00:51:06 +08:00
|
|
|
controlled by another fix - e.g. by "fix nvt"_fix_nh.html or "fix
|
2008-03-12 01:15:19 +08:00
|
|
|
temp/rescale"_fix_temp_rescale.html commands.
|
|
|
|
|
2008-04-05 05:15:50 +08:00
|
|
|
See "this howto section"_Section_howto.html#4_16 of the manual for a
|
|
|
|
discussion of different ways to compute temperature and perform
|
|
|
|
thermostatting.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
The desired temperature at each timestep is a ramped value during the
|
2007-06-26 08:03:39 +08:00
|
|
|
run from {Tstart} to {Tstop}.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-03-12 01:15:19 +08:00
|
|
|
Like other fixes that perform thermostatting, this fix can be used
|
2009-04-30 00:54:14 +08:00
|
|
|
with "compute commands"_compute.html that remove a "bias" from the
|
|
|
|
atom velocities. E.g. removing the center-of-mass velocity from a
|
|
|
|
group of atoms or removing the x-component of velocity from the
|
|
|
|
calculation. This is not done by default, but only if the
|
|
|
|
"fix_modify"_fix_modify.html command is used to assign a temperature
|
|
|
|
compute to this fix that includes such a bias term. See the doc pages
|
|
|
|
for individual "compute commands"_compute.html to determine which ones
|
|
|
|
include a bias. In this case, the thermostat works in the following
|
|
|
|
manner: bias is removed from each atom, thermostatting is performed on
|
|
|
|
the remaining thermal degrees of freedom, and the bias is added back
|
|
|
|
in.
|
2008-03-12 01:15:19 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
The {damp} parameter is specified in time units and determines how
|
|
|
|
rapidly the temperature is relaxed. For example, a value of 100.0
|
|
|
|
means to relax the temperature in a timespan of (roughly) 100 time
|
|
|
|
units (tau or fmsec or psec - see the "units"_units.html command).
|
|
|
|
The damp factor can be thought of as inversely related to the
|
|
|
|
viscosity of the solvent. I.e. a small relaxation time implies a
|
|
|
|
hi-viscosity solvent and vice versa. See the discussion about gamma
|
|
|
|
and viscosity in the documentation for the "fix
|
|
|
|
viscous"_fix_viscous.html command for more details.
|
|
|
|
|
2007-10-10 07:44:18 +08:00
|
|
|
The random # {seed} must be a positive integer. A Marsaglia random
|
|
|
|
number generator is used. Each processor uses the input seed to
|
|
|
|
generate its own unique seed and its own stream of random numbers.
|
|
|
|
Thus the dynamics of the system will not be identical on two runs on
|
|
|
|
different numbers of processors.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
The keyword {scale} allows the damp factor to be scaled up or down by
|
2008-03-11 01:48:22 +08:00
|
|
|
the specified factor for atoms of that type. This can be useful when
|
|
|
|
different atom types have different sizes or masses. It can be used
|
|
|
|
multiple times to adjust damp for several atom types. Note that
|
2008-03-19 04:18:54 +08:00
|
|
|
specifying a ratio of 2 increases the relaxation time which is
|
2008-05-22 06:45:59 +08:00
|
|
|
equivalent to the solvent's viscosity acting on particles with 1/2 the
|
|
|
|
diameter. This is the opposite effect of scale factors used by the
|
|
|
|
"fix viscous"_fix_viscous.html command, since the damp factor in fix
|
|
|
|
{langevin} is inversely related to the gamma factor in fix {viscous}.
|
|
|
|
Also note that the damping factor in fix {langevin} includes the
|
|
|
|
particle mass in Ff, unlike fix {viscous}. Thus the mass and size of
|
|
|
|
different atom types should be accounted for in the choice of ratio
|
|
|
|
values.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2011-03-28 08:13:42 +08:00
|
|
|
The keyword {tally} enables the calculation of the cumulative energy
|
2009-08-09 06:59:06 +08:00
|
|
|
added/subtracted to the atoms as they are thermostatted. Effectively
|
|
|
|
it is the energy exchanged between the infinite thermal reservoir and
|
|
|
|
the particles. As described below, this energy can then be printed
|
|
|
|
out or added to the potential energy of the system to monitor energy
|
|
|
|
conservation.
|
|
|
|
|
2011-03-28 22:39:41 +08:00
|
|
|
The keyword {zero} can be used to eliminate drift due to the
|
|
|
|
thermostat. Because the random forces on different atoms are
|
|
|
|
independent, they do not sum exactly to zero. As a result, this fix
|
|
|
|
applies a small random force to the entire system, and the
|
|
|
|
center-of-mass of the system undergoes a slow random walk. If the
|
|
|
|
keyword {zerosum} is set to {yes}, the total random force is set
|
|
|
|
exactly to zero by subtracting off an equal part of it from each atom
|
|
|
|
in the group. As a result, the center-of-mass of a system with zero
|
|
|
|
initial momentum will not drift over time.
|
2011-03-28 08:13:42 +08:00
|
|
|
|
2007-10-11 06:28:11 +08:00
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
No information about this fix is written to "binary restart
|
|
|
|
files"_restart.html. Because the state of the random number generator
|
|
|
|
is not saved in restart files, this means you cannot do "exact"
|
|
|
|
restarts with this fix, where the simulation continues on the same as
|
|
|
|
if no restart had taken place. However, in a statistical sense, a
|
|
|
|
restarted simulation should produce the same behavior.
|
|
|
|
|
2008-03-12 01:15:19 +08:00
|
|
|
The "fix_modify"_fix_modify.html {temp} option is supported by this
|
|
|
|
fix. You can use it to assign a temperature "compute"_compute.html
|
|
|
|
you have defined to this fix which will be used in its thermostatting
|
|
|
|
procedure, as described above. For consistency, the group used by
|
|
|
|
this fix and by the compute should be the same.
|
|
|
|
|
2009-08-09 06:59:06 +08:00
|
|
|
The "fix_modify"_fix_modify.html {energy} option is supported by this
|
|
|
|
fix to add the energy change induced by Langevin thermostatting to the
|
|
|
|
system's potential energy as part of "thermodynamic
|
|
|
|
output"_thermo_style.html. Note that use of this option requires
|
|
|
|
setting the {tally} keyword to {yes}.
|
|
|
|
|
2010-04-03 00:51:06 +08:00
|
|
|
This fix computes a global scalar which can be accessed by various
|
|
|
|
"output commands"_Section_howto.html#4_15. The scalar is the
|
|
|
|
cummulative energy change due to this fix. The scalar value
|
|
|
|
calculated by this fix is "extensive". Note that calculation of this
|
|
|
|
quantity requires setting the {tally} keyword to {yes}.
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
This fix can ramp its target temperature over multiple runs, using the
|
|
|
|
{start} and {stop} keywords of the "run"_run.html command. See the
|
|
|
|
"run"_run.html command for details of how to do this.
|
|
|
|
|
|
|
|
This fix is not invoked during "energy minimization"_minimize.html.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Restrictions:] none
|
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
2010-04-03 00:51:06 +08:00
|
|
|
"fix nvt"_fix_nh.html, "fix temp/rescale"_fix_temp_rescale.html, "fix
|
2010-05-06 22:37:29 +08:00
|
|
|
viscous"_fix_viscous.html, "fix nvt"_fix_nh.html, "pair_style
|
|
|
|
dpd/tstat"_pair_dpd.html
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-02-09 04:00:41 +08:00
|
|
|
[Default:]
|
|
|
|
|
2011-03-28 22:39:41 +08:00
|
|
|
The option defaults are scale = 1.0 for all types, tally = no, zero =
|
|
|
|
yes.
|
2007-11-15 23:29:14 +08:00
|
|
|
|
2008-04-10 01:29:51 +08:00
|
|
|
:line
|
|
|
|
|
2007-11-15 23:29:14 +08:00
|
|
|
:link(Dunweg)
|
|
|
|
[(Dunweg)] Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991).
|
2010-03-10 22:55:12 +08:00
|
|
|
|
|
|
|
:link(Schneider)
|
|
|
|
[(Schneider)] Schneider and Stoll, Phys Rev B, 17, 1302 (1978).
|