git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@16053 f3b2605a-c512-4ea7-a41b...
[lammps.git] / doc / src / fix_temp_berendsen.txt
blob177591d8e7478a09d4d60351c34d9144e319eba1
1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
4 :link(ld,Manual.html)
5 :link(lc,Section_commands.html#comm)
7 :line
9 fix temp/berendsen command :h3
11 [Syntax:]
13 fix ID group-ID temp/berendsen Tstart Tstop Tdamp :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 temp/berendsen = style name of this fix command :l
17 Tstart,Tstop = desired temperature at start/end of run :l
18   Tstart can be a variable (see below) :pre
19 Tdamp = temperature damping parameter (time units) :l
20 :ule
22 [Examples:]
24 fix 1 all temp/berendsen 300.0 300.0 100.0 :pre
26 [Description:]
28 Reset the temperature of a group of atoms by using a Berendsen
29 thermostat "(Berendsen)"_#Berendsen, which rescales their velocities
30 every timestep.
32 The thermostat is applied to only the translational degrees of freedom
33 for the particles, which is an important consideration for finite-size
34 particles which have rotational degrees of freedom are being
35 thermostatted with this fix.  The translational degrees of freedom can
36 also have a bias velocity removed from them before thermostatting
37 takes place; see the description below.
39 The desired temperature at each timestep is a ramped value during the
40 run from {Tstart} to {Tstop}.  The {Tdamp} parameter is specified in
41 time units and determines how rapidly the temperature is relaxed.  For
42 example, a value of 100.0 means to relax the temperature in a timespan
43 of (roughly) 100 time units (tau or fmsec or psec - see the
44 "units"_units.html command).
46 {Tstart} can be specified as an equal-style "variable"_variable.html.
47 In this case, the {Tstop} setting is ignored.  If the value is a
48 variable, it should be specified as v_name, where name is the variable
49 name.  In this case, the variable will be evaluated each timestep, and
50 its value used to determine the target temperature.
52 NOTE: This thermostat will generate an error if the current
53 temperature is zero at the end of a timestep.  It cannot rescale a
54 zero temperature.
56 Equal-style variables can specify formulas with various mathematical
57 functions, and include "thermo_style"_thermo_style.html command
58 keywords for the simulation box parameters and timestep and elapsed
59 time.  Thus it is easy to specify a time-dependent temperature.
61 NOTE: Unlike the "fix nvt"_fix_nh.html command which performs
62 Nose/Hoover thermostatting AND time integration, this fix does NOT
63 perform time integration.  It only modifies velocities to effect
64 thermostatting.  Thus you must use a separate time integration fix,
65 like "fix nve"_fix_nve.html to actually update the positions of atoms
66 using the modified velocities.  Likewise, this fix should not normally
67 be used on atoms that also have their temperature controlled by
68 another fix - e.g. by "fix nvt"_fix_nh.html or "fix
69 langevin"_fix_langevin.html commands.
71 See "this howto section"_Section_howto.html#howto_16 of the manual for
72 a discussion of different ways to compute temperature and perform
73 thermostatting.
75 This fix computes a temperature each timestep.  To do this, the fix
76 creates its own compute of style "temp", as if this command had been
77 issued:
79 compute fix-ID_temp group-ID temp :pre
81 See the "compute temp"_compute_temp.html command for details.  Note
82 that the ID of the new compute is the fix-ID + underscore + "temp",
83 and the group for the new compute is the same as the fix group.
85 Note that this is NOT the compute used by thermodynamic output (see
86 the "thermo_style"_thermo_style.html command) with ID = {thermo_temp}.
87 This means you can change the attributes of this fix's temperature
88 (e.g. its degrees-of-freedom) via the
89 "compute_modify"_compute_modify.html command or print this temperature
90 during thermodynamic output via the "thermo_style
91 custom"_thermo_style.html command using the appropriate compute-ID.
92 It also means that changing attributes of {thermo_temp} will have no
93 effect on this fix.
95 Like other fixes that perform thermostatting, this fix can be used
96 with "compute commands"_compute.html that calculate a temperature
97 after removing a "bias" from the atom velocities.  E.g. removing the
98 center-of-mass velocity from a group of atoms or only calculating
99 temperature on the x-component of velocity or only calculating
100 temperature for atoms in a geometric region.  This is not done by
101 default, but only if the "fix_modify"_fix_modify.html command is used
102 to assign a temperature compute to this fix that includes such a bias
103 term.  See the doc pages for individual "compute
104 commands"_compute.html to determine which ones include a bias.  In
105 this case, the thermostat works in the following manner: the current
106 temperature is calculated taking the bias into account, bias is
107 removed from each atom, thermostatting is performed on the remaining
108 thermal degrees of freedom, and the bias is added back in.
110 :line
112 [Restart, fix_modify, output, run start/stop, minimize info:]
114 No information about this fix is written to "binary restart
115 files"_restart.html.
117 The "fix_modify"_fix_modify.html {temp} option is supported by this
118 fix.  You can use it to assign a temperature "compute"_compute.html
119 you have defined to this fix which will be used in its thermostatting
120 procedure, as described above.  For consistency, the group used by
121 this fix and by the compute should be the same.
123 The "fix_modify"_fix_modify.html {energy} option is supported by this
124 fix to add the energy change implied by a velocity rescaling to the
125 system's potential energy as part of "thermodynamic
126 output"_thermo_style.html.
128 This fix computes a global scalar which can be accessed by various
129 "output commands"_Section_howto.html#howto_15.  The scalar is the
130 cummulative energy change due to this fix.  The scalar value
131 calculated by this fix is "extensive".
133 This fix can ramp its target temperature over multiple runs, using the
134 {start} and {stop} keywords of the "run"_run.html command.  See the
135 "run"_run.html command for details of how to do this.
137 This fix is not invoked during "energy minimization"_minimize.html.
139 [Restrictions:]
141 This fix can be used with dynamic groups as defined by the
142 "group"_group.html command.  Likewise it can be used with groups to
143 which atoms are added or deleted over time, e.g. a deposition
144 simulation.  However, the conservation properties of the thermostat
145 and barostat are defined for systems with a static set of atoms.  You
146 may observe odd behavior if the atoms in a group vary dramatically
147 over time or the atom count becomes very small.
149 [Related commands:]
151 "fix nve"_fix_nve.html, "fix nvt"_fix_nh.html, "fix
152 temp/rescale"_fix_temp_rescale.html, "fix langevin"_fix_langevin.html,
153 "fix_modify"_fix_modify.html, "compute temp"_compute_temp.html,
154 "fix press/berendsen"_fix_press_berendsen.html
156 [Default:] none
158 :line
160 :link(Berendsen)
162 [(Berendsen)] Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem
163 Phys, 81, 3684 (1984).