From 07c6376bcf80fd0183b9f1eb8b0b700f3b95863f Mon Sep 17 00:00:00 2001
From: sjplimp Examples:
@@ -71,9 +67,36 @@ used to randomize the direction and magnitude of this force as
described in (Dunweg), where a uniform random number is used
(instead of a Gaussian random number) for speed.
IMPORTANT NOTE: Unlike the fix nvt command which
+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 to actually update the velocities and
+positions of atoms using the the modified forces. Likewise, this fix
+should not normally be used on atoms that also have their temperature
+controlled by another fix - e.g. by fix nvt or fix
+temp/rescale commands.
+ The desired temperature at each timestep is a ramped value during the
run from Tstart to Tstop.
Like other fixes that perform thermostatting, this fix can be used
+with compute commands that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. This is not done by
+default, but only if the fix_modify 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 to determine which ones include a bias. In
+this case, the thermostat works in the following manner: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+ 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
@@ -108,17 +131,6 @@ 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.
The keyword region applies the fix only to atoms that are in the
-specified geometric region (and in the fix group). Since atoms can
-enter/leave a region, this test is performed each timestep.
- As noted above, fix langevin does not update the coordinates or
-velocities of its atoms, only the forces. It is normally used with a
-fix nve that does the time integration. Fix langevin
-should not normally be used on atoms that also have their temperature
-controlled by another fix - e.g. a nvt or
-temp/rescale fix.
- Restart, fix_modify, output, run start/stop, minimize info:
No information about this fix is written to binary restart
@@ -128,10 +140,14 @@ 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.
None of the fix_modify options are relevant to this
-fix. No global scalar or vector or per-atom quantities are stored by
-this fix for access by various output
-commands.
+ The fix_modify temp option is supported by this
+fix. You can use it to assign a temperature compute
+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.
+ No global scalar or vector or per-atom quantities are stored by this
+fix for access by various output commands.
This fix can ramp its target temperature over multiple runs, using the
start and stop keywords of the run command. See the
diff --git a/doc/fix_langevin.txt b/doc/fix_langevin.txt
index e18f8be14f..74a60aa637 100644
--- a/doc/fix_langevin.txt
+++ b/doc/fix_langevin.txt
@@ -18,14 +18,10 @@ Tstart,Tstop = desired temperature at start/end of run (temperature units) :l
damp = damping parameter (time units) :l
seed = random # seed to use for white noise (positive integer) :l
zero or more keyword/value pairs may be appended :l
-keyword = {axes} or {scale} or {region}
- {axes} values = xflag yflag zflag
- xflag,yflag,zflag = 0/1 to exclude/include a dimension in the thermostat
+keyword = {scale}
{scale} values = type ratio
type = atom type (1-N)
ratio = factor to scale the damping coefficient by
- {region} value = region-ID
- region-ID = ID of region to apply thermostat to
:ule
[Examples:]
@@ -62,9 +58,36 @@ 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.
+IMPORTANT NOTE: Unlike the "fix nvt"_fix_nvt.html command which
+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
+positions of atoms using the the modified forces. Likewise, this fix
+should not normally be used on atoms that also have their temperature
+controlled by another fix - e.g. by "fix nvt"_fix_nvt.html or "fix
+temp/rescale"_fix_temp_rescale.html commands.
+
+:line
+
The desired temperature at each timestep is a ramped value during the
run from {Tstart} to {Tstop}.
+Like other fixes that perform thermostatting, this fix can be used
+with "compute commands"_compute.html that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. 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: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+
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
@@ -99,17 +122,6 @@ 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.
-The keyword {region} applies the fix only to atoms that are in the
-specified geometric region (and in the fix group). Since atoms can
-enter/leave a region, this test is performed each timestep.
-
-As noted above, fix {langevin} does not update the coordinates or
-velocities of its atoms, only the forces. It is normally used with a
-"fix nve"_fix_nve.html that does the time integration. Fix {langevin}
-should not normally be used on atoms that also have their temperature
-controlled by another fix - e.g. a "nvt"_fix_nvt.html or
-"temp/rescale"_fix_temp_rescale.html fix.
-
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about this fix is written to "binary restart
@@ -119,10 +131,14 @@ 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.
-None of the "fix_modify"_fix_modify.html options are relevant to this
-fix. No global scalar or vector or per-atom quantities are stored by
-this fix for access by various "output
-commands"_Section_howto.html#4_15.
+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.
+
+No global scalar or vector or per-atom quantities are stored by this
+fix for access by various "output commands"_Section_howto.html#4_15.
This fix can ramp its target temperature over multiple runs, using the
{start} and {stop} keywords of the "run"_run.html command. See the
diff --git a/doc/fix_npt.html b/doc/fix_npt.html
index bbdca5c754..b806b95384 100644
--- a/doc/fix_npt.html
+++ b/doc/fix_npt.html
@@ -77,6 +77,16 @@ only the atoms in the fix group are re-scaled. The latter can be
useful for leaving the coordinates of atoms in a solid substrate
unchanged and controlling the pressure of a surrounding fluid.
IMPORTANT NOTE: Unlike the fix temp/berendsen
+command which performs thermostatting but NO time integration, this
+fix performs thermostatting/barostatting AND time integration. Thus
+you should not use any other time integration fix, such as fix
+nve on atoms to which this fix is applied. Likewise,
+this fix should not normally be used on atoms that also have their
+temperature controlled by another fix - e.g. by fix
+langevin or fix temp/rescale
+commands.
+ The pressure can be controlled in one of several styles, as specified
@@ -151,6 +161,21 @@ custom command using the appropriate compute-ID.
It also means that changing attributes of thermo_temp or
thermo_press will have no effect on this fix.
Like other fixes that perform thermostatting, this fix can be used
+with compute commands that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. This is not done by
+default, but only if the fix_modify 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 to determine which ones include a bias. In
+this case, the thermostat works in the following manner: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+ Restart, fix_modify, output, run start/stop, minimize info:
This fix writes the state of the Nose/Hoover thermostat and barostat
@@ -162,11 +187,11 @@ operation of the fix continues in an uninterrupted fashion.
The fix_modify temp and press options are
supported by this fix. You can use them to assign a
compute you have defined to this fix which will be used
-in its thermostatting or barostatting procedure. If you do this, note
-that the kinetic energy derived from the compute temperature should be
-consistent with the virial term computed using all atoms for the
-pressure. LAMMPS will warn you if you choose to compute temperature
-on a subset of atoms.
+in its thermostatting or barostatting procedure, as described above.
+If you do this, note that the kinetic energy derived from the compute
+temperature should be consistent with the virial term computed using
+all atoms for the pressure. LAMMPS will warn you if you choose to
+compute temperature on a subset of atoms.
IMPORTANT NOTE: If both the temp and press keywords are used in a
single thermo_modify command (or in two separate commands), then the
diff --git a/doc/fix_npt.txt b/doc/fix_npt.txt
index 40f50aa1b9..761c8e0d12 100644
--- a/doc/fix_npt.txt
+++ b/doc/fix_npt.txt
@@ -66,6 +66,16 @@ only the atoms in the fix group are re-scaled. The latter can be
useful for leaving the coordinates of atoms in a solid substrate
unchanged and controlling the pressure of a surrounding fluid.
+IMPORTANT NOTE: Unlike the "fix temp/berendsen"_fix_berendsen.html
+command which performs thermostatting but NO time integration, this
+fix performs thermostatting/barostatting AND time integration. Thus
+you should not use any other time integration fix, such as "fix
+nve"_fix_nve.html on atoms to which this fix is applied. Likewise,
+this fix should not normally be used on atoms that also have their
+temperature controlled by another fix - e.g. by "fix
+langevin"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html
+commands.
+
:line
The pressure can be controlled in one of several styles, as specified
@@ -140,6 +150,21 @@ custom"_thermo_style.html command using the appropriate compute-ID.
It also means that changing attributes of {thermo_temp} or
{thermo_press} will have no effect on this fix.
+Like other fixes that perform thermostatting, this fix can be used
+with "compute commands"_compute.html that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. 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: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+
[Restart, fix_modify, output, run start/stop, minimize info:]
This fix writes the state of the Nose/Hoover thermostat and barostat
@@ -151,11 +176,11 @@ operation of the fix continues in an uninterrupted fashion.
The "fix_modify"_fix_modify.html {temp} and {press} options are
supported by this fix. You can use them to assign a
"compute"_compute.html you have defined to this fix which will be used
-in its thermostatting or barostatting procedure. If you do this, note
-that the kinetic energy derived from the compute temperature should be
-consistent with the virial term computed using all atoms for the
-pressure. LAMMPS will warn you if you choose to compute temperature
-on a subset of atoms.
+in its thermostatting or barostatting procedure, as described above.
+If you do this, note that the kinetic energy derived from the compute
+temperature should be consistent with the virial term computed using
+all atoms for the pressure. LAMMPS will warn you if you choose to
+compute temperature on a subset of atoms.
IMPORTANT NOTE: If both the {temp} and {press} keywords are used in a
single thermo_modify command (or in two separate commands), then the
diff --git a/doc/fix_nvt.html b/doc/fix_nvt.html
index 07026a1033..d489430d06 100644
--- a/doc/fix_nvt.html
+++ b/doc/fix_nvt.html
@@ -60,6 +60,16 @@ Performing a short run and monitoring the temperature is the best way
to determine if the drag term is working. Typically a value between
0.2 to 2.0 is sufficient to damp oscillations after a few periods.
IMPORTANT NOTE: Unlike the fix temp/berendsen
+command which performs thermostatting but NO time integration, this
+fix performs thermostatting/barostatting AND time integration. Thus
+you should not use any other time integration fix, such as fix
+nve on atoms to which this fix is applied. Likewise,
+this fix should not normally be used on atoms that also have their
+temperature controlled by another fix - e.g. by fix
+langevin or fix temp/rescale
+commands.
+ This fix computes a temperature each timestep. To do this, the fix
creates its own compute of style "temp", as if this command had been
issued:
@@ -80,6 +90,21 @@ custom command using the appropriate compute-ID.
It also means that changing attributes of thermo_temp will have no
effect on this fix.
Like other fixes that perform thermostatting, this fix can be used
+with compute commands that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. This is not done by
+default, but only if the fix_modify 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 to determine which ones include a bias. In
+this case, the thermostat works in the following manner: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+ Restart, fix_modify, output, run start/stop, minimize info:
This fix writes the state of the Nose/Hoover thermostat to binary
@@ -89,9 +114,10 @@ reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
The fix_modify temp option is supported by this
-fix. You can use it to assign a compute you have
-defined to this fix which will be used in its thermostatting
-procedure.
+fix. You can use it to assign a temperature compute
+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.
The fix_modify energy option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
diff --git a/doc/fix_nvt.txt b/doc/fix_nvt.txt
index 1534ed89cb..9581d00218 100644
--- a/doc/fix_nvt.txt
+++ b/doc/fix_nvt.txt
@@ -51,6 +51,16 @@ Performing a short run and monitoring the temperature is the best way
to determine if the drag term is working. Typically a value between
0.2 to 2.0 is sufficient to damp oscillations after a few periods.
+IMPORTANT NOTE: Unlike the "fix temp/berendsen"_fix_berendsen.html
+command which performs thermostatting but NO time integration, this
+fix performs thermostatting/barostatting AND time integration. Thus
+you should not use any other time integration fix, such as "fix
+nve"_fix_nve.html on atoms to which this fix is applied. Likewise,
+this fix should not normally be used on atoms that also have their
+temperature controlled by another fix - e.g. by "fix
+langevin"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html
+commands.
+
This fix computes a temperature each timestep. To do this, the fix
creates its own compute of style "temp", as if this command had been
issued:
@@ -71,6 +81,21 @@ custom"_thermo_style.html command using the appropriate compute-ID.
It also means that changing attributes of {thermo_temp} will have no
effect on this fix.
+Like other fixes that perform thermostatting, this fix can be used
+with "compute commands"_compute.html that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. 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: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+
[Restart, fix_modify, output, run start/stop, minimize info:]
This fix writes the state of the Nose/Hoover thermostat to "binary
@@ -80,9 +105,10 @@ reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
The "fix_modify"_fix_modify.html {temp} option is supported by this
-fix. You can use it to assign a "compute"_compute.html you have
-defined to this fix which will be used in its thermostatting
-procedure.
+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.
The "fix_modify"_fix_modify.html {energy} option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
diff --git a/doc/fix_temp_berendsen.html b/doc/fix_temp_berendsen.html
new file mode 100644
index 0000000000..0d8a2bea2b
--- /dev/null
+++ b/doc/fix_temp_berendsen.html
@@ -0,0 +1,125 @@
+
+ Syntax:
+ Examples:
+ Description:
+ Reset the temperature of a group of atoms by using a Berendsen
+thermostat (Berendsen), which rescale their velocities
+every timestep.
+ The desired temperature at each timestep is a ramped value during the
+run from Tstart to Tstop. The Tdamp 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 command).
+ IMPORTANT NOTE: Unlike the fix nvt command which
+performs Nose/Hoover thermostatting AND time integration, this fix
+does NOT perform time integration. It only modifies velocities to
+effect thermostatting. Thus you must use a separate time integration
+fix, like fix nve to actually update the positions of
+atoms using the modified velocities. Likewise, this fix should not
+normally be used on atoms that also have their temperature controlled
+by another fix - e.g. by fix nvt or fix
+langevin commands.
+ This fix computes a temperature each timestep. To do this, the fix
+creates its own compute of style "temp", as if this command had been
+issued:
+ See the compute temp command for details. Note
+that the ID of the new compute is the fix-ID + underscore + "temp",
+and the group for the new compute is the same as the fix group.
+ Note that this is NOT the compute used by thermodynamic output (see
+the thermo_style command) with ID = thermo_temp.
+This means you can change the attributes of this fix's temperature
+(e.g. its degrees-of-freedom) via the
+compute_modify command or print this temperature
+during thermodynamic output via the thermo_style
+custom command using the appropriate compute-ID.
+It also means that changing attributes of thermo_temp will have no
+effect on this fix.
+ Like other fixes that perform thermostatting, this fix can be used
+with compute commands that calculate a temperature
+after removing a "bias" from the atom velocities. E.g. removing the
+center-of-mass velocity from a group of atoms or only calculating
+temperature on the x-component of velocity or only calculating
+temperature for atoms in a geometric region. This is not done by
+default, but only if the fix_modify 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 to determine which ones include a bias. In
+this case, the thermostat works in the following manner: the current
+temperature is calculated taking the bias into account, bias is
+removed from each atom, thermostatting is performed on the remaining
+thermal degrees of freedom, and the bias is added back in.
+ Restart, fix_modify, output, run start/stop, minimize info:
+ No information about this fix is written to binary restart
+files.
+ The fix_modify temp option is supported by this
+fix. You can use it to assign a temperature compute
+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.
+ No global scalar or vector or per-atom quantities are stored by this
+fix for access by various output commands.
+ This fix can ramp its target temperature over multiple runs, using the
+start and stop keywords of the run command. See the
+run command for details of how to do this.
+ This fix is not invoked during energy minimization.
+ Restrictions: none
+ Related commands:
+ fix nve, fix nvt, fix
+temp/rescale, fix langevin,
+fix_modify, compute temp
+ Default: none
+ (Berendsen) Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem
+Phys, 81, 3684 (1984).
+ Examples:
Description:
+
+
+fix temp/berendsen command
+
+fix ID group-ID temp/berendsen Tstart Tstop Tdamp
+
+
+fix 1 all nvt 300.0 300.0 100.0
+fix 1 all nvt 300.0 300.0 100.0 drag 0.2
+
+
+
+compute fix-ID_temp group-ID temp
+
+
+
+
+
+ region values = region-ID
- region-ID = ID of region to apply rescaling to
- partial values = xflag yflag zflag
- xflag,yflag,zflag = 0/1 if the velocity component should not or should be rescaled
-
fix 3 flow temp/rescale 100 1.0 1.1 0.02 0.5
-fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0 region edge
-fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0 partial 0 1 1
+fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0
+fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0
The keyword region applies the fix only to atoms that are in the -specified geometric region (and in the fix group). Since atoms can -enter/leave a region, this test is performed each timestep. -
-The keyword partial rescales only the specified velocity components. -A compute of style temp/partial is used to compute the current -temperature of just those components (see below). -
-The region and partial keywords cannot currently be used together. -
-A temp/rescale fix does not update the coordinates of its atoms. It -is normally used with a fix of style nve that does that. A -temp/rescale fix should not normally be used on atoms that also have -their temperature controlled by another fix - e.g. a -nvt or langevin fix. +
IMPORTANT NOTE: Unlike the fix nvt command which +performs Nose/Hoover thermostatting AND time integration, this fix +does NOT perform time integration. It only modifies velocities to +effect thermostatting. Thus you must use a separate time integration +fix, like fix nve to actually update the positions of +atoms using the modified velocities. Likewise, this fix should not +normally be used on atoms that also have their temperature controlled +by another fix - e.g. by fix nvt or fix +langevin commands.
+This fix computes a temperature each timestep. To do this, the fix -creates its own compute of style "temp" or "temp/region" or -"temp/partial", as if one of these commands had been issued: +creates its own compute of style "temp", as if one of this command had +been issued:
-compute fix-ID_temp group-ID temp -compute fix-ID_temp group-ID temp/region region-ID -compute fix-ID_temp group-ID temp/partial xflag yflag zflag +compute fix-ID_temp group-ID temp-Which is used depends on whether the region or partial keywords -were specified with the fix. See the compute -temp, compute -temp/region, and compute -temp/partial commands for details. Note -that the ID of the new compute is the fix-ID + underscore + "temp", -and the group for the new compute is the same as the fix group. +
See the compute temp for details. Note that the +ID of the new compute is the fix-ID + underscore + "temp", and the +group for the new compute is the same as the fix group.
Note that this is NOT the compute used by thermodynamic output (see the thermo_style command) with ID = thermo_temp. @@ -93,17 +76,31 @@ custom command using the appropriate compute-ID. It also means that changing attributes of thermo_temp will have no effect on this fix.
+Like other fixes that perform thermostatting, this fix can be used +with compute commands that calculate a temperature +after removing a "bias" from the atom velocities. E.g. removing the +center-of-mass velocity from a group of atoms or only calculating +temperature on the x-component of velocity or only calculating +temperature for atoms in a geometric region. This is not done by +default, but only if the fix_modify 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 to determine which ones include a bias. In +this case, the thermostat works in the following manner: the current +temperature is calculated taking the bias into account, bias is +removed from each atom, thermostatting is performed on the remaining +thermal degrees of freedom, and the bias is added back in. +
Restart, fix_modify, output, run start/stop, minimize info:
No information about this fix is written to binary restart files.
The fix_modify temp option is supported by this -fix. You can use it to assign a compute you have -defined to this fix which will be used in its thermostatting -procedure. For consistency, if using the keyword region, the -compute you assign should also be of style -temp/region. +fix. You can use it to assign a temperature compute +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.
The fix_modify energy option is supported by this fix to add the energy change implied by a velocity rescaling to the diff --git a/doc/fix_temp_rescale.txt b/doc/fix_temp_rescale.txt index 5d20c1d67b..d1cc203976 100644 --- a/doc/fix_temp_rescale.txt +++ b/doc/fix_temp_rescale.txt @@ -17,19 +17,13 @@ temp/rescale = style name of this fix command N = perform rescaling every N steps Tstart,Tstop = desired temperature at start/end of run (temperature units) window = only rescale if temperature is outside this window (temperature units) -fraction = rescale to target temperature by this fraction -zero or more keyword/value pairs may be appended -keyword = {region} or {partial} :ul - {region} values = region-ID - region-ID = ID of region to apply rescaling to - {partial} values = xflag yflag zflag - xflag,yflag,zflag = 0/1 if the velocity component should not or should be rescaled :pre +fraction = rescale to target temperature by this fraction :ul [Examples:] fix 3 flow temp/rescale 100 1.0 1.1 0.02 0.5 -fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0 region edge -fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0 partial 0 1 1 :pre +fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0 +fix 3 boundary temp/rescale 1 1.0 1.5 0.05 1.0 :pre [Description:] @@ -47,37 +41,27 @@ difference between the actual and desired temperature. E.g. if {fraction} = 1.0, the temperature is reset to exactly the desired value. -The keyword {region} applies the fix only to atoms that are in the -specified geometric region (and in the fix group). Since atoms can -enter/leave a region, this test is performed each timestep. +IMPORTANT NOTE: Unlike the "fix nvt"_fix_nvt.html command which +performs Nose/Hoover thermostatting AND time integration, this fix +does NOT perform time integration. It only modifies velocities to +effect thermostatting. Thus you must use a separate time integration +fix, like "fix nve"_fix_nve.html to actually update the positions of +atoms using the modified velocities. Likewise, this fix should not +normally be used on atoms that also have their temperature controlled +by another fix - e.g. by "fix nvt"_fix_nvt.html or "fix +langevin"_fix_langevin.html commands. -The keyword {partial} rescales only the specified velocity components. -A compute of style temp/partial is used to compute the current -temperature of just those components (see below). - -The {region} and {partial} keywords cannot currently be used together. - -A temp/rescale fix does not update the coordinates of its atoms. It -is normally used with a fix of style {nve} that does that. A -temp/rescale fix should not normally be used on atoms that also have -their temperature controlled by another fix - e.g. a -"nvt"_fix_nvt.html or "langevin"_fix_langevin.html fix. +:line This fix computes a temperature each timestep. To do this, the fix -creates its own compute of style "temp" or "temp/region" or -"temp/partial", as if one of these commands had been issued: +creates its own compute of style "temp", as if one of this command had +been issued: -compute fix-ID_temp group-ID temp -compute fix-ID_temp group-ID temp/region region-ID -compute fix-ID_temp group-ID temp/partial xflag yflag zflag :pre +compute fix-ID_temp group-ID temp :pre -Which is used depends on whether the {region} or {partial} keywords -were specified with the fix. See the "compute -temp"_compute_temp.html, "compute -temp/region"_compute_temp_region.html, and "compute -temp/partial"_compute_temp_partial.html commands for details. Note -that the ID of the new compute is the fix-ID + underscore + "temp", -and the group for the new compute is the same as the fix group. +See the "compute temp"_compute_temp.html for details. Note that the +ID of the new compute is the fix-ID + underscore + "temp", and the +group for the new compute is the same as the fix group. Note that this is NOT the compute used by thermodynamic output (see the "thermo_style"_thermo_style.html command) with ID = {thermo_temp}. @@ -89,17 +73,31 @@ custom"_thermo_style.html command using the appropriate compute-ID. It also means that changing attributes of {thermo_temp} will have no effect on this fix. +Like other fixes that perform thermostatting, this fix can be used +with "compute commands"_compute.html that calculate a temperature +after removing a "bias" from the atom velocities. E.g. removing the +center-of-mass velocity from a group of atoms or only calculating +temperature on the x-component of velocity or only calculating +temperature for atoms in a geometric region. 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: the current +temperature is calculated taking the bias into account, bias is +removed from each atom, thermostatting is performed on the remaining +thermal degrees of freedom, and the bias is added back in. + [Restart, fix_modify, output, run start/stop, minimize info:] No information about this fix is written to "binary restart files"_restart.html. The "fix_modify"_fix_modify.html {temp} option is supported by this -fix. You can use it to assign a "compute"_compute.html you have -defined to this fix which will be used in its thermostatting -procedure. For consistency, if using the keyword {region}, the -compute you assign should also be of style -"temp/region"_compute_temp_region.html. +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. The "fix_modify"_fix_modify.html {energy} option is supported by this fix to add the energy change implied by a velocity rescaling to the