Finished edits on computes (whew!); builds with no errors or warnings
This commit is contained in:
@ -33,8 +33,8 @@ they are calculated from information about atoms on the current
|
||||
timestep or iteration, though a compute may internally store some
|
||||
information about a previous state of the system. Defining a compute
|
||||
does not perform a computation. Instead computes are invoked by other
|
||||
LAMMPS commands as needed, e.g. to calculate a temperature needed for
|
||||
a thermostat fix or to generate thermodynamic or dump file output.
|
||||
LAMMPS commands as needed (e.g., to calculate a temperature needed for
|
||||
a thermostat fix or to generate thermodynamic or dump file output).
|
||||
See the :doc:`Howto output <Howto_output>` page for a summary of
|
||||
various LAMMPS output options, many of which involve computes.
|
||||
|
||||
@ -45,15 +45,15 @@ underscores.
|
||||
|
||||
Computes calculate one of three styles of quantities: global,
|
||||
per-atom, or local. A global quantity is one or more system-wide
|
||||
values, e.g. the temperature of the system. A per-atom quantity is
|
||||
one or more values per atom, e.g. the kinetic energy of each atom.
|
||||
values (e.g., the temperature of the system). A per-atom quantity is
|
||||
one or more values per atom (e.g., the kinetic energy of each atom).
|
||||
Per-atom values are set to 0.0 for atoms not in the specified compute
|
||||
group. Local quantities are calculated by each processor based on the
|
||||
atoms it owns, but there may be zero or more per atom, e.g. a list of
|
||||
bond distances. Computes that produce per-atom quantities have the
|
||||
word "atom" in their style, e.g. *ke/atom*\ . Computes that produce
|
||||
local quantities have the word "local" in their style,
|
||||
e.g. *bond/local*\ . Styles with neither "atom" or "local" in their
|
||||
atoms it owns, but there may be zero or more per atom (e.g., a list of
|
||||
bond distances). Computes that produce per-atom quantities have the
|
||||
word "atom" in their style (e.g., *ke/atom*\ ). Computes that produce
|
||||
local quantities have the word "local" in their style
|
||||
(e.g., *bond/local*\ ). Styles with neither "atom" or "local" in their
|
||||
style produce global quantities.
|
||||
|
||||
Note that a single compute can produce either global or per-atom or
|
||||
@ -64,8 +64,8 @@ compute page will explain.
|
||||
Global, per-atom, and local quantities each come in three kinds: a
|
||||
single scalar value, a vector of values, or a 2d array of values. The
|
||||
doc page for each compute describes the style and kind of values it
|
||||
produces, e.g. a per-atom vector. Some computes produce more than one
|
||||
kind of a single style, e.g. a global scalar and a global vector.
|
||||
produces (e.g., a per-atom vector). Some computes produce more than one
|
||||
kind of a single style (e.g., a global scalar and a global vector).
|
||||
|
||||
When a compute quantity is accessed, as in many of the output commands
|
||||
discussed below, it can be referenced via the following bracket
|
||||
@ -80,14 +80,14 @@ notation, where ID is the ID of the compute:
|
||||
+-------------+--------------------------------------------+
|
||||
|
||||
In other words, using one bracket reduces the dimension of the
|
||||
quantity once (vector -> scalar, array -> vector). Using two brackets
|
||||
reduces the dimension twice (array -> scalar). Thus a command that
|
||||
uses scalar compute values as input can also process elements of a
|
||||
quantity once (vector :math:`\to` scalar, array :math:`\to` vector). Using two
|
||||
brackets reduces the dimension twice (array :math:`\to` scalar). Thus a
|
||||
command that uses scalar compute values as input can also process elements of a
|
||||
vector or array.
|
||||
|
||||
Note that commands and :doc:`variables <variable>` which use compute
|
||||
quantities typically do not allow for all kinds, e.g. a command may
|
||||
require a vector of values, not a scalar. This means there is no
|
||||
quantities typically do not allow for all kinds (e.g., a command may
|
||||
require a vector of values, not a scalar). This means there is no
|
||||
ambiguity about referring to a compute quantity as c_ID even if it
|
||||
produces, for example, both a scalar and vector. The doc pages for
|
||||
various commands explain the details.
|
||||
@ -111,14 +111,14 @@ ways:
|
||||
|
||||
The results of computes that calculate global quantities can be either
|
||||
"intensive" or "extensive" values. Intensive means the value is
|
||||
independent of the number of atoms in the simulation,
|
||||
e.g. temperature. Extensive means the value scales with the number of
|
||||
atoms in the simulation, e.g. total rotational kinetic energy.
|
||||
independent of the number of atoms in the simulation
|
||||
(e.g., temperature). Extensive means the value scales with the number of
|
||||
atoms in the simulation (e.g., total rotational kinetic energy).
|
||||
:doc:`Thermodynamic output <thermo_style>` will normalize extensive
|
||||
values by the number of atoms in the system, depending on the
|
||||
"thermo_modify norm" setting. It will not normalize intensive values.
|
||||
If a compute value is accessed in another way, e.g. by a
|
||||
:doc:`variable <variable>`, you may want to know whether it is an
|
||||
If a compute value is accessed in another way (e.g., by a
|
||||
:doc:`variable <variable>`), you may want to know whether it is an
|
||||
intensive or extensive value. See the page for individual
|
||||
computes for further info.
|
||||
|
||||
@ -187,8 +187,8 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`cluster/atom <compute_cluster_atom>` - cluster ID for each atom
|
||||
* :doc:`cna/atom <compute_cna_atom>` - common neighbor analysis (CNA) for each atom
|
||||
* :doc:`cnp/atom <compute_cnp_atom>` - common neighborhood parameter (CNP) for each atom
|
||||
* :doc:`com <compute_com>` - center-of-mass of group of atoms
|
||||
* :doc:`com/chunk <compute_com_chunk>` - center-of-mass for each chunk
|
||||
* :doc:`com <compute_com>` - center of mass of group of atoms
|
||||
* :doc:`com/chunk <compute_com_chunk>` - center of mass for each chunk
|
||||
* :doc:`contact/atom <compute_contact_atom>` - contact count for each spherical particle
|
||||
* :doc:`coord/atom <compute_coord_atom>` - coordination number for each atom
|
||||
* :doc:`damage/atom <compute_damage_atom>` - Peridynamic damage for each atom
|
||||
@ -232,7 +232,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`ke/atom/eff <compute_ke_atom_eff>` - per-atom translational and radial kinetic energy in the electron force field model
|
||||
* :doc:`ke/eff <compute_ke_eff>` - kinetic energy of a group of nuclei and electrons in the electron force field model
|
||||
* :doc:`ke/rigid <compute_ke_rigid>` - translational kinetic energy of rigid bodies
|
||||
* :doc:`mliap <compute_mliap>` - gradients of energy and forces w.r.t. model parameters and related quantities for training machine learning interatomic potentials
|
||||
* :doc:`mliap <compute_mliap>` - gradients of energy and forces with respect to model parameters and related quantities for training machine learning interatomic potentials
|
||||
* :doc:`momentum <compute_momentum>` - translational momentum
|
||||
* :doc:`msd <compute_msd>` - mean-squared displacement of group of atoms
|
||||
* :doc:`msd/chunk <compute_msd_chunk>` - mean-squared displacement for each chunk
|
||||
@ -254,7 +254,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`property/chunk <compute_property_chunk>` - extract various per-chunk attributes
|
||||
* :doc:`property/local <compute_property_local>` - convert local attributes to localvectors/arrays
|
||||
* :doc:`ptm/atom <compute_ptm_atom>` - determines the local lattice structure based on the Polyhedral Template Matching method
|
||||
* :doc:`rdf <compute_rdf>` - radial distribution function g(r) histogram of group of atoms
|
||||
* :doc:`rdf <compute_rdf>` - radial distribution function :math:`g(r)` histogram of group of atoms
|
||||
* :doc:`reduce <compute_reduce>` - combine per-atom quantities into a single global value
|
||||
* :doc:`reduce/chunk <compute_reduce_chunk>` - reduce per-atom quantities within each chunk
|
||||
* :doc:`reduce/region <compute_reduce>` - same as compute reduce, within a region
|
||||
@ -282,7 +282,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`smd/ulsph/strain/rate <compute_smd_ulsph_strain_rate>` - logarithmic strain rate for Smooth Mach Dynamics
|
||||
* :doc:`smd/ulsph/stress <compute_smd_ulsph_stress>` - per-particle Cauchy stress tensor and von Mises equivalent stress in Smooth Mach Dynamics
|
||||
* :doc:`smd/vol <compute_smd_vol>` - per-particle volumes and their sum in Smooth Mach Dynamics
|
||||
* :doc:`snap <compute_sna_atom>` - gradients of SNAP energy and forces w.r.t. linear coefficients and related quantities for fitting SNAP potentials
|
||||
* :doc:`snap <compute_sna_atom>` - gradients of SNAP energy and forces with respect to linear coefficients and related quantities for fitting SNAP potentials
|
||||
* :doc:`sna/atom <compute_sna_atom>` - bispectrum components for each atom
|
||||
* :doc:`sna/grid <compute_sna_atom>` - global array of bispectrum components on a regular grid
|
||||
* :doc:`sna/grid/local <compute_sna_atom>` - local array of bispectrum components on a regular grid
|
||||
@ -308,7 +308,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`temp/cs <compute_temp_cs>` - temperature based on the center-of-mass velocity of atom pairs that are bonded to each other
|
||||
* :doc:`temp/deform <compute_temp_deform>` - temperature excluding box deformation velocity
|
||||
* :doc:`temp/deform/eff <compute_temp_deform_eff>` - temperature excluding box deformation velocity in the electron force field model
|
||||
* :doc:`temp/drude <compute_temp_drude>` - temperature of Core-Drude pairs
|
||||
* :doc:`temp/drude <compute_temp_drude>` - temperature of Core--Drude pairs
|
||||
* :doc:`temp/eff <compute_temp_eff>` - temperature of a group of nuclei and electrons in the electron force field model
|
||||
* :doc:`temp/partial <compute_temp_partial>` - temperature excluding one or more dimensions of velocity
|
||||
* :doc:`temp/profile <compute_temp_profile>` - temperature excluding a binned velocity profile
|
||||
@ -324,7 +324,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`vcm/chunk <compute_vcm_chunk>` - velocity of center-of-mass for each chunk
|
||||
* :doc:`viscosity/cos <compute_viscosity_cos>` - velocity profile under cosine-shaped acceleration
|
||||
* :doc:`voronoi/atom <compute_voronoi_atom>` - Voronoi volume and neighbors for each atom
|
||||
* :doc:`xrd <compute_xrd>` - x-ray diffraction intensity on a mesh of reciprocal lattice nodes
|
||||
* :doc:`xrd <compute_xrd>` - X-ray diffraction intensity on a mesh of reciprocal lattice nodes
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
@ -333,7 +333,9 @@ Restrictions
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`uncompute <uncompute>`, :doc:`compute_modify <compute_modify>`, :doc:`fix ave/atom <fix_ave_atom>`, :doc:`fix ave/time <fix_ave_time>`, :doc:`fix ave/histo <fix_ave_histo>`
|
||||
:doc:`uncompute <uncompute>`, :doc:`compute_modify <compute_modify>`,
|
||||
:doc:`fix ave/atom <fix_ave_atom>`, :doc:`fix ave/time <fix_ave_time>`,
|
||||
:doc:`fix ave/histo <fix_ave_histo>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -602,7 +602,8 @@ be used. For non-orthogonal (triclinic) simulation boxes, only the
|
||||
*reduced* option may be used.
|
||||
|
||||
A *box* value selects standard distance units as defined by the
|
||||
:doc:`units <units>` command (e.g., Angstroms for units = *real* or *metal*).
|
||||
:doc:`units <units>` command (e.g., :math:`\mathrm{\mathring A}`
|
||||
for units = *real* or *metal*).
|
||||
A *lattice* value means the distance units are in lattice spacings.
|
||||
The :doc:`lattice <lattice>` command must have been previously used to
|
||||
define the lattice spacing. A *reduced* value means normalized
|
||||
|
||||
@ -95,11 +95,12 @@ something like the following commands:
|
||||
refresh c_dsp delay 100
|
||||
|
||||
The :doc:`dump_modify thresh <dump_modify>` command will only output
|
||||
atoms that have displaced more than 0.6 Angstroms on each snapshot
|
||||
(assuming metal units). The dump_modify *refresh* option triggers a
|
||||
atoms that have displaced more than :math:`0.6~\mathrm{\mathring A}` on each
|
||||
snapshot (assuming metal units). The dump_modify *refresh* option triggers a
|
||||
call to this compute at the end of every dump.
|
||||
|
||||
The *refresh* argument for this compute is the ID of an :doc:`atom-style variable <variable>` which calculates a Boolean value (0 or 1)
|
||||
The *refresh* argument for this compute is the ID of an
|
||||
:doc:`atom-style variable <variable>` which calculates a Boolean value (0 or 1)
|
||||
based on the same criterion used by dump_modify thresh. This compute
|
||||
evaluates the atom-style variable. For each atom that returns 1 (true),
|
||||
the original (reference) coordinates of the atom (stored by
|
||||
|
||||
@ -98,7 +98,7 @@ by the corresponding volume. This option can be useful when dealing with
|
||||
inhomogeneous systems such as those that have surfaces.
|
||||
|
||||
Here are typical input parameters for fcc aluminum (lattice
|
||||
constant 4.05 Angstroms),
|
||||
constant :math:`4.05~\mathrm{\mathring A}}`),
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
||||
@ -108,7 +108,8 @@ The *mass* attribute is the total mass of the rigid body.
|
||||
|
||||
There are two options for outputting the coordinates of the center of
|
||||
mass (COM) of the body. The *x*, *y*, *z* attributes write the COM
|
||||
"unscaled", in the appropriate distance :doc:`units <units>` (Angstroms,
|
||||
"unscaled", in the appropriate distance :doc:`units <units>`
|
||||
(:math:`\mathrm{\mathring A}}`,
|
||||
sigma, etc). Use *xu*, *yu*, *zu* if you want the COM "unwrapped" by
|
||||
the image flags for each body. Unwrapped means that if the body
|
||||
COM has passed through a periodic boundary one or more times, the value
|
||||
|
||||
@ -86,19 +86,20 @@ will defined using the *c* values for the spacing along each reciprocal
|
||||
lattice axis. Note that manual mapping of the reciprocal space mesh is
|
||||
good for comparing diffraction results from multiple simulations; however
|
||||
it can reduce the likelihood that Bragg reflections will be satisfied
|
||||
unless small spacing parameters <0.05 Angstrom\^(-1) are implemented.
|
||||
Meshes with manual spacing do not require a periodic boundary.
|
||||
unless small spacing parameters (:math:`<0.05~\mathrm{\mathring A}}^-1`)
|
||||
are implemented. Meshes with manual spacing do not require a periodic
|
||||
boundary.
|
||||
|
||||
The limits of the reciprocal lattice mesh are determined by the use of
|
||||
the *Kmax*, *Zone*, and *dR_Ewald* parameters. The rectilinear mesh
|
||||
created about the origin of reciprocal space is terminated at the
|
||||
boundary of a sphere of radius *Kmax* centered at the origin. If
|
||||
*Zone* parameters z1=z2=z3=0 are used, diffraction intensities are
|
||||
*Zone* parameters *z1* = *z2* = *z3* = 0 are used, diffraction intensities are
|
||||
computed throughout the entire spherical volume - note this can
|
||||
greatly increase the cost of computation. Otherwise, *Zone*
|
||||
parameters will denote the z1=h, z2=k, and z3=l (in a global since)
|
||||
zone axis of an intersecting Ewald sphere. Diffraction intensities
|
||||
will only be computed at the intersection of the reciprocal lattice
|
||||
parameters will denote the :math:`z1=h`, :math:`z2=k`, and :math:`z3=\ell`
|
||||
(in a global sense) zone axis of an intersecting Ewald sphere. Diffraction
|
||||
intensities will only be computed at the intersection of the reciprocal lattice
|
||||
mesh and a *dR_Ewald* thick surface of the Ewald sphere. See the
|
||||
example 3D intensity data and the intersection of a [010] zone axis
|
||||
in the below image.
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/cs command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/cs group1 group2
|
||||
|
||||
@ -29,14 +29,15 @@ Description
|
||||
Define a computation that calculates the temperature of a system based
|
||||
on the center-of-mass velocity of atom pairs that are bonded to each
|
||||
other. This compute is designed to be used with the adiabatic
|
||||
core/shell model of :ref:`(Mitchell and Finchham) <MitchellFinchham1>`. See
|
||||
the :doc:`Howto coreshell <Howto_coreshell>` page for an overview of
|
||||
core/shell model of :ref:`(Mitchell and Finchham) <MitchellFinchham1>`.
|
||||
See the :doc:`Howto coreshell <Howto_coreshell>` page for an overview of
|
||||
the model as implemented in LAMMPS. Specifically, this compute
|
||||
enables correct temperature calculation and thermostatting of
|
||||
core/shell pairs where it is desirable for the internal degrees of
|
||||
freedom of the core/shell pairs to not be influenced by a thermostat.
|
||||
A compute of this style can be used by any command that computes a
|
||||
temperature via :doc:`fix_modify <fix_modify>` e.g. :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
temperature via :doc:`fix_modify <fix_modify>`
|
||||
(e.g., :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
Note that this compute does not require all ions to be polarized,
|
||||
hence defined as core/shell pairs. One can mix core/shell pairs and
|
||||
@ -52,48 +53,56 @@ included in the treated system should not be included into either of
|
||||
these groups, they are taken into account by the *group-ID* (second
|
||||
argument) of the compute.
|
||||
|
||||
The temperature is calculated by the formula KE = dim/2 N k T, where
|
||||
KE = total kinetic energy of the group of atoms (sum of 1/2 m v\^2),
|
||||
dim = 2 or 3 = dimensionality of the simulation, N = number of atoms
|
||||
in the group, k = Boltzmann constant, and T = temperature. Note that
|
||||
The temperature is calculated by the formula
|
||||
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in the group, :math:`k` is the Boltzmann
|
||||
constant, and :math:`T` is the absolute temperature. Note that
|
||||
the velocity of each core or shell atom used in the KE calculation is
|
||||
the velocity of the center-of-mass (COM) of the core/shell pair the
|
||||
atom is part of.
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
calculated by this compute for use in the computation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz. In contrast to the temperature, the velocity of
|
||||
each core or shell atom is taken individually.
|
||||
A kinetic energy tensor, stored as a six-element vector, is also calculated by
|
||||
this compute for use in the computation of a pressure tensor. The formula for
|
||||
the components of the tensor is the same as the above formula, except that
|
||||
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and so
|
||||
on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
|
||||
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. In contrast to the temperature,
|
||||
the velocity of each core or shell atom is taken individually.
|
||||
|
||||
The change this fix makes to core/shell atom velocities is essentially
|
||||
computing the temperature after a "bias" has been removed from the
|
||||
velocity of the atoms. This "bias" is the velocity of the atom
|
||||
relative to the COM velocity of the core/shell pair. If this compute
|
||||
is used with a fix command that performs thermostatting then this bias
|
||||
will be subtracted from each atom, thermostatting of the remaining COM
|
||||
velocity will be performed, and the bias will be added back in. This
|
||||
means the thermostatting will effectively be performed on the
|
||||
core/shell pairs, instead of on the individual core and shell atoms.
|
||||
Thermostatting fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
computing the temperature after a "bias" has been removed from the velocity of
|
||||
the atoms. This "bias" is the velocity of the atom relative to the
|
||||
center-of-mass velocity of the core/shell pair. If this compute is used with a
|
||||
fix command that performs thermostatting then this bias will be subtracted from
|
||||
each atom, thermostatting of the remaining center-of-mass velocity will be
|
||||
performed, and the bias will be added back in. This means the thermostatting
|
||||
will effectively be performed on the core/shell pairs, instead of on the
|
||||
individual core and shell atoms. Thermostatting fixes that work in this way
|
||||
include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
The internal energy of core/shell pairs can be calculated by the
|
||||
:doc:`compute temp/chunk <compute_temp_chunk>` command, if chunks are
|
||||
defined as core/shell pairs. See the :doc:`Howto coreshell <Howto_coreshell>` page doc page for more discussion
|
||||
on how to do this.
|
||||
:doc:`compute temp/chunk <compute_temp_chunk>` command, if chunks are defined
|
||||
as core/shell pairs. See the :doc:`Howto coreshell <Howto_coreshell>` doc
|
||||
page for more discussion on how to do this.
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
@ -108,7 +117,8 @@ be used which generate new molecules or atoms during a simulation.
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`compute temp <compute_temp>`, :doc:`compute temp/chunk <compute_temp_chunk>`
|
||||
:doc:`compute temp <compute_temp>`,
|
||||
:doc:`compute temp/chunk <compute_temp_chunk>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -9,7 +9,7 @@ Accelerator Variants: *temp/deform/kk*
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/deform
|
||||
|
||||
@ -34,17 +34,17 @@ induced by use of the :doc:`fix deform <fix_deform>` command. A compute
|
||||
of this style is created by the :doc:`fix nvt/sllod <fix_nvt_sllod>`
|
||||
command to compute the thermal temperature of atoms for thermostatting
|
||||
purposes. A compute of this style can also be used by any command
|
||||
that computes a temperature, e.g. :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
that computes a temperature (e.g., :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
The deformation fix changes the box size and/or shape over time, so
|
||||
each atom in the simulation box can be thought of as having a
|
||||
"streaming" velocity. For example, if the box is being sheared in x,
|
||||
relative to y, then atoms at the bottom of the box (low y) have a
|
||||
small x velocity, while atoms at the top of the box (hi y) have a
|
||||
large x velocity. This position-dependent streaming velocity is
|
||||
"streaming" velocity. For example, if the box is being sheared in *x*,
|
||||
relative to *y*, then atoms at the bottom of the box (low *y*) have a
|
||||
small *x* velocity, while atoms at the top of the box (high *y*) have a
|
||||
large *x* velocity. This position-dependent streaming velocity is
|
||||
subtracted from each atom's actual velocity to yield a thermal
|
||||
velocity which is used to compute the temperature.
|
||||
velocity, which is then used to compute the temperature.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -52,7 +52,8 @@ velocity which is used to compute the temperature.
|
||||
atom coordinates or velocities to the changing simulation box. When
|
||||
using this compute in conjunction with a deforming box, fix deform
|
||||
should NOT remap atom positions, but rather should let atoms respond
|
||||
to the changing box by adjusting their own velocities (or let :doc:`fix deform <fix_deform>` remap the atom velocities, see it's remap
|
||||
to the changing box by adjusting their own velocities (or let
|
||||
:doc:`fix deform <fix_deform>` remap the atom velocities; see its remap
|
||||
option). If fix deform does remap atom positions, then they appear to
|
||||
move with the box but their velocity is not changed, and thus they do
|
||||
NOT have the streaming velocity assumed by this compute. LAMMPS will
|
||||
@ -60,18 +61,24 @@ velocity which is used to compute the temperature.
|
||||
consistent with this compute.
|
||||
|
||||
After the streaming velocity has been subtracted from each atom, the
|
||||
temperature is calculated by the formula KE = dim/2 N k T, where KE =
|
||||
total kinetic energy of the group of atoms (sum of 1/2 m v\^2), dim = 2
|
||||
or 3 = dimensionality of the simulation, N = number of atoms in the
|
||||
group, k = Boltzmann constant, and T = temperature. Note that v in
|
||||
the kinetic energy formula is the atom's thermal velocity.
|
||||
temperature is calculated by the formula
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`, dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in the group, :math:`k` is the Boltzmann
|
||||
constant, and :math:`T` is the temperature. Note that :math:`v` in the kinetic energy formula is the atom's velocity.
|
||||
|
||||
A kinetic energy tensor, stored as a six-element vector, is also
|
||||
calculated by this compute for use in the computation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz.
|
||||
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for
|
||||
the :math:`xy` component, and so on. The six components of the vector are
|
||||
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
|
||||
:math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
@ -83,7 +90,10 @@ from the velocity of the atoms. If this compute is used with a fix
|
||||
command that performs thermostatting then this bias will be subtracted
|
||||
from each atom, thermostatting of the remaining thermal velocity will
|
||||
be performed, and the bias will be added back in. Thermostatting
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -91,14 +101,16 @@ fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/resc
|
||||
the atoms are indeed moving with a stream velocity profile that
|
||||
matches the box deformation. If not, then the compute will subtract
|
||||
off an incorrect stream velocity, yielding a bogus thermal
|
||||
temperature. You should NOT assume that your atoms are streaming at
|
||||
temperature. You should **not** assume that your atoms are streaming at
|
||||
the same rate the box is deforming. Rather, you should monitor their
|
||||
velocity profile, e.g. via the :doc:`fix ave/chunk <fix_ave_chunk>`
|
||||
command. And you can compare the results of this compute to :doc:`compute temp/profile <compute_temp_profile>`, which actually calculates the
|
||||
stream profile before subtracting it. If the two computes do not give
|
||||
roughly the same temperature, then your atoms are not streaming
|
||||
consistent with the box deformation. See the :doc:`fix deform <fix_deform>` command for more details on ways to get atoms
|
||||
to stream consistently with the box deformation.
|
||||
velocity profiles (e.g., via the :doc:`fix ave/chunk <fix_ave_chunk>`
|
||||
command). You can also compare the results of this compute to
|
||||
:doc:`compute temp/profile <compute_temp_profile>`, which actually
|
||||
calculates the stream profile before subtracting it. If the two computes do
|
||||
not give roughly the same temperature, then your atoms are not streaming
|
||||
consistent with the box deformation. See the :doc:`fix deform <fix_deform>`
|
||||
command for more details on ways to get atoms to stream consistently with
|
||||
the box deformation.
|
||||
|
||||
This compute subtracts out degrees-of-freedom due to fixes that
|
||||
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
@ -115,16 +127,17 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive".
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
The scalar value will be in temperature :doc:`units <units>`.
|
||||
The vector values will be in energy :doc:`units <units>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
@ -133,7 +146,9 @@ Restrictions
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`compute temp/ramp <compute_temp_ramp>`, :doc:`compute temp/profile <compute_temp_profile>`, :doc:`fix deform <fix_deform>`,
|
||||
:doc:`compute temp/ramp <compute_temp_ramp>`,
|
||||
:doc:`compute temp/profile <compute_temp_profile>`,
|
||||
:doc:`fix deform <fix_deform>`,
|
||||
:doc:`fix nvt/sllod <fix_nvt_sllod>`
|
||||
|
||||
Default
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/deform/eff command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/deform/eff
|
||||
|
||||
@ -29,11 +29,11 @@ model, after subtracting out a streaming velocity induced by the
|
||||
simulation box changing size and/or shape, for example in a
|
||||
non-equilibrium MD (NEMD) simulation. The size/shape change is
|
||||
induced by use of the :doc:`fix deform <fix_deform>` command. A
|
||||
compute of this style is created by the :doc:`fix nvt/sllod/eff <fix_nvt_sllod_eff>` command to compute the thermal
|
||||
compute of this style is created by the
|
||||
:doc:`fix nvt/sllod/eff <fix_nvt_sllod_eff>` command to compute the thermal
|
||||
temperature of atoms for thermostatting purposes. A compute of this
|
||||
style can also be used by any command that computes a temperature,
|
||||
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt/eff <fix_nh_eff>`,
|
||||
etc.
|
||||
style can also be used by any command that computes a temperature
|
||||
(e.g., :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt/eff <fix_nh_eff>`).
|
||||
|
||||
The calculation performed by this compute is exactly like that
|
||||
described by the :doc:`compute temp/deform <compute_temp_deform>`
|
||||
@ -47,13 +47,14 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
@ -62,7 +63,8 @@ Restrictions
|
||||
""""""""""""
|
||||
|
||||
This compute is part of the EFF package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
LAMMPS was built with that package. See the
|
||||
:doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/drude command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/drude
|
||||
|
||||
@ -20,26 +20,28 @@ Examples
|
||||
|
||||
compute TDRUDE all temp/drude
|
||||
|
||||
Example input scripts available: examples/PACKAGES/drude
|
||||
Example input scripts available: :file:`examples/PACKAGES/drude`.
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Define a computation that calculates the temperatures of core-Drude
|
||||
pairs. This compute is designed to be used with the :doc:`thermalized Drude oscillator model <Howto_drude>`. Polarizable models in LAMMPS
|
||||
are described on the :doc:`Howto polarizable <Howto_polarizable>` doc
|
||||
page.
|
||||
Define a computation that calculates the temperatures of core--Drude
|
||||
pairs. This compute is designed to be used with the
|
||||
:doc:`thermalized Drude oscillator model <Howto_drude>`.
|
||||
Polarizable models in LAMMPS
|
||||
are described on the :doc:`Howto polarizable <Howto_polarizable>` doc page.
|
||||
|
||||
Drude oscillators consist of a core particle and a Drude particle
|
||||
connected by a harmonic bond, and the relative motion of these Drude
|
||||
oscillators is usually maintained cold by a specific thermostat that
|
||||
acts on the relative motion of the core-Drude particle
|
||||
acts on the relative motion of the core--Drude particle
|
||||
pairs. Therefore, because LAMMPS considers Drude particles as normal
|
||||
atoms in its default temperature compute (:doc:`compute temp <compute_temp>` command), the reduced temperature of the
|
||||
core-Drude particle pairs is not calculated correctly.
|
||||
atoms in its default temperature compute (:doc:`compute temp <compute_temp>`
|
||||
command), the reduced temperature of the core--Drude particle pairs is not
|
||||
calculated correctly.
|
||||
|
||||
By contrast, this compute calculates the temperature of the cores
|
||||
using center-of-mass velocities of the core-Drude pairs, and the
|
||||
using center-of-mass velocities of the core--Drude pairs, and the
|
||||
reduced temperature of the Drude particles using the relative
|
||||
velocities of the Drude particles with respect to their cores.
|
||||
Non-polarizable atoms are considered as cores. Their velocities
|
||||
@ -49,7 +51,7 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6, which can be accessed by indices 1-6, whose components
|
||||
vector of length 6, which can be accessed by indices 1--6, whose components
|
||||
are
|
||||
|
||||
1. temperature of the centers of mass (temperature units)
|
||||
@ -60,12 +62,13 @@ are
|
||||
6. kinetic energy of the dipoles (energy units)
|
||||
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
Both the scalar value and the first two values of the vector
|
||||
calculated by this compute are "intensive". The other 4 vector values
|
||||
are "extensive".
|
||||
calculated by this compute are "intensive." The other four vector values
|
||||
are "extensive."
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
@ -77,7 +80,9 @@ assumed to be constant for the duration of the run unless the
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix drude <fix_drude>`, :doc:`fix langevin/drude <fix_langevin_drude>`, :doc:`fix drude/transform <fix_drude_transform>`, :doc:`pair_style thole <pair_thole>`, :doc:`compute temp <compute_temp>`
|
||||
:doc:`fix drude <fix_drude>`, :doc:`fix langevin/drude <fix_langevin_drude>`,
|
||||
:doc:`fix drude/transform <fix_drude_transform>`,
|
||||
:doc:`pair_style thole <pair_thole>`, :doc:`compute temp <compute_temp>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/eff command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/eff
|
||||
|
||||
@ -27,20 +27,27 @@ Description
|
||||
Define a computation that calculates the temperature of a group of
|
||||
nuclei and electrons in the :doc:`electron force field <pair_eff>`
|
||||
model. A compute of this style can be used by commands that compute a
|
||||
temperature, e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt/eff <fix_nh_eff>`, etc.
|
||||
temperature (e.g., :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix npt/eff <fix_nh_eff>`).
|
||||
|
||||
The temperature is calculated by the formula KE = dim/2 N k T, where
|
||||
KE = total kinetic energy of the group of atoms (sum of 1/2 m v\^2 for
|
||||
nuclei and sum of 1/2 (m v\^2 + 3/4 m s\^2) for electrons, where s
|
||||
includes the radial electron velocity contributions), dim = 2 or 3 =
|
||||
dimensionality of the simulation, N = number of atoms (only total
|
||||
The temperature is calculated by the formula
|
||||
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2` for nuclei and sum of
|
||||
:math:`\frac12 (m v^2 + \frac34 m s^2`) for electrons, where :math:`s`
|
||||
includes the radial electron velocity contributions), dim = 2 or 3 is the
|
||||
dimensionality of the simulation, :math:`N` is the number of atoms (only total
|
||||
number of nuclei in the eFF (see the :doc:`pair_eff <pair_style>`
|
||||
command) in the group, k = Boltzmann constant, and T = temperature.
|
||||
This expression is summed over all nuclear and electronic degrees of
|
||||
freedom, essentially by setting the kinetic contribution to the heat
|
||||
capacity to 3/2k (where only nuclei contribute). This subtlety is
|
||||
valid for temperatures well below the Fermi temperature, which for
|
||||
densities two to five times the density of liquid H2 ranges from
|
||||
command) in the group, :math:`k` is the Boltzmann constant, and :math:`T` is
|
||||
the absolute temperature. This expression is summed over all nuclear and
|
||||
electronic degrees of freedom, essentially by setting the kinetic contribution
|
||||
to the heat capacity to :math:`\frac32 k` (where only nuclei contribute). This
|
||||
subtlety is valid for temperatures well below the Fermi temperature, which for
|
||||
densities two to five times the density of liquid hydrogen ranges from
|
||||
86,000 to 170,000 K.
|
||||
|
||||
.. note::
|
||||
@ -57,11 +64,11 @@ densities two to five times the density of liquid H2 ranges from
|
||||
thermo_style custom step etotal pe ke temp press
|
||||
thermo_modify temp effTemp
|
||||
|
||||
A 6-component kinetic energy tensor is also calculated by this compute
|
||||
A six-component kinetic energy tensor is also calculated by this compute
|
||||
for use in the computation of a pressure tensor. The formula for the
|
||||
components of the tensor is the same as the above formula, except that
|
||||
v\^2 is replaced by vx \* vy for the xy component, etc. For the eFF,
|
||||
again, the radial electronic velocities are also considered.
|
||||
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, etc.
|
||||
For the eFF, again, the radial electronic velocities are also considered.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
@ -81,9 +88,9 @@ thermostatting.
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
The scalar value calculated by this compute is "intensive", meaning it
|
||||
The scalar value calculated by this compute is "intensive," meaning it
|
||||
is independent of the number of atoms in the simulation. The vector
|
||||
values are "extensive", meaning they scale with the number of atoms in
|
||||
values are "extensive," meaning they scale with the number of atoms in
|
||||
the simulation.
|
||||
|
||||
Restrictions
|
||||
@ -95,7 +102,9 @@ LAMMPS was built with that package. See the :doc:`Build package <Build_package>
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`compute temp/partial <compute_temp_partial>`, :doc:`compute temp/region <compute_temp_region>`, :doc:`compute pressure <compute_pressure>`
|
||||
:doc:`compute temp/partial <compute_temp_partial>`,
|
||||
:doc:`compute temp/region <compute_temp_region>`,
|
||||
:doc:`compute pressure <compute_pressure>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/partial command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/partial xflag yflag zflag
|
||||
|
||||
@ -26,23 +26,31 @@ Description
|
||||
|
||||
Define a computation that calculates the temperature of a group of
|
||||
atoms, after excluding one or more velocity components. A compute of
|
||||
this style can be used by any command that computes a temperature,
|
||||
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
this style can be used by any command that computes a temperature
|
||||
(e.g. :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
The temperature is calculated by the formula KE = dim/2 N k T, where
|
||||
KE = total kinetic energy of the group of atoms (sum of 1/2 m v\^2),
|
||||
dim = dimensionality of the simulation, N = number of atoms in the
|
||||
group, k = Boltzmann constant, and T = temperature. The calculation
|
||||
of KE excludes the x, y, or z dimensions if xflag, yflag, or zflag =
|
||||
0. The dim parameter is adjusted to give the correct number of
|
||||
The temperature is calculated by the formula
|
||||
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in the group, :math:`k` is the Boltzmann
|
||||
constant, and :math:`T` = temperature. The calculation of KE excludes the
|
||||
:math:`x`, :math:`y`, or :math:`z` dimensions if *xflag*, *yflag*, or *zflag*
|
||||
is 0. The dim parameter is adjusted to give the correct number of
|
||||
degrees of freedom.
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
A kinetic energy tensor, stored as a six-element vector, is also
|
||||
calculated by this compute for use in the calculation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz.
|
||||
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for
|
||||
the :math:`xy` component, and so on. The six components of the vector are
|
||||
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
|
||||
:math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
@ -54,7 +62,10 @@ velocity of the atoms. If this compute is used with a fix command
|
||||
that performs thermostatting then this bias will be subtracted from
|
||||
each atom, thermostatting of the remaining thermal velocity will be
|
||||
performed, and the bias will be added back in. Thermostatting fixes
|
||||
that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
that work in this way include :doc:`fix nvt <fix_nh>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
This compute subtracts out degrees-of-freedom due to fixes that
|
||||
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
@ -77,13 +88,14 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
vector values from a compute as input.
|
||||
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
|
||||
output options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/profile command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/profile xflag yflag zflag binstyle args
|
||||
|
||||
@ -24,7 +24,7 @@ Syntax
|
||||
*yz* args = Ny Nz
|
||||
*xz* args = Nx Nz
|
||||
*xyz* args = Nx Ny Nz
|
||||
Nx,Ny,Nz = number of velocity bins in x,y,z dimensions
|
||||
Nx, Ny, Nz = number of velocity bins in *x*, *y*, *z* dimensions
|
||||
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *out*
|
||||
@ -49,24 +49,24 @@ Define a computation that calculates the temperature of a group of
|
||||
atoms, after subtracting out a spatially-averaged center-of-mass
|
||||
velocity field, before computing the kinetic energy. This can be
|
||||
useful for thermostatting a collection of atoms undergoing a complex
|
||||
flow, e.g. via a profile-unbiased thermostat (PUT) as described in
|
||||
:ref:`(Evans) <Evans1>`. A compute of this style can be used by any command
|
||||
that computes a temperature, e.g. :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
flow (e.g. via a profile-unbiased thermostat (PUT) as described in
|
||||
:ref:`(Evans) <Evans1>`). A compute of this style can be used by any command
|
||||
that computes a temperature (e.g. :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
The *xflag*, *yflag*, *zflag* settings determine which components of
|
||||
average velocity are subtracted out.
|
||||
|
||||
The *binstyle* setting and its *Nx*, *Ny*, *Nz* arguments determine
|
||||
how bins are setup to perform spatial averaging. "Bins" can be 1d
|
||||
slabs, 2d pencils, or 3d bricks depending on which *binstyle* is used.
|
||||
The simulation box is partitioned conceptually into *Nx* by *Ny* by
|
||||
*Nz* bins. Depending on the *binstyle*, you may only specify one or
|
||||
two of these values; the others are effectively set to 1 (no binning
|
||||
in that dimension). For non-orthogonal (triclinic) simulation boxes,
|
||||
the bins are "tilted" slabs or pencils or bricks that are parallel to
|
||||
the tilted faces of the box. See the :doc:`region prism <region>`
|
||||
command for a discussion of the geometry of tilted boxes in LAMMPS.
|
||||
The *binstyle* setting and its *Nx*, *Ny*, *Nz* arguments determine how bins
|
||||
are setup to perform spatial averaging. "Bins" can be 1d slabs, 2d pencils,
|
||||
or 3d bricks depending on which *binstyle* is used. The simulation box is
|
||||
partitioned conceptually into *Nx* :math:`\times` *Ny* :math:`\times` *Nz*
|
||||
bins. Depending on the *binstyle*, you may only specify one or two of these
|
||||
values; the others are effectively set to 1 (no binning in that dimension).
|
||||
For non-orthogonal (triclinic) simulation boxes, the bins are "tilted" slabs or
|
||||
pencils or bricks that are parallel to the tilted faces of the box. See the
|
||||
:doc:`region prism <region>` command for a discussion of the geometry of tilted
|
||||
boxes in LAMMPS.
|
||||
|
||||
When a temperature is computed, the center-of-mass velocity for the
|
||||
set of atoms that are both in the compute group and in the same
|
||||
@ -77,36 +77,41 @@ bin, its thermal velocity will thus be 0.0.
|
||||
|
||||
After the spatially-averaged velocity field has been subtracted from
|
||||
each atom, the temperature is calculated by the formula
|
||||
*KE* = (*dim\*N* - *Ns\*Nx\*Ny\*Nz* - *extra* ) *k* *T*/2, where *KE* = total
|
||||
kinetic energy of the group of atoms (sum of 1/2 *m* *v*\^2), *dim* = 2
|
||||
or 3 = dimensionality of the simulation, *Ns* = 0, 1, 2 or 3 for
|
||||
streaming velocity subtracted in 0, 1, 2 or 3 dimensions, *extra* = extra
|
||||
degrees-of-freedom, *N* = number of atoms in the group, *k* = Boltzmann
|
||||
constant, and *T* = temperature. The *Ns\*Nx\*Ny\*Nz* term is degrees
|
||||
of freedom subtracted to adjust for the removal of the center-of-mass
|
||||
velocity in each direction of the *Nx\*Ny\*Nz* bins, as discussed in the
|
||||
:ref:`(Evans) <Evans1>` paper. The extra term defaults to (*dim* - *Ns*)
|
||||
and accounts for overall conservation of center-of-mass velocity across
|
||||
the group in directions where streaming velocity is *not* subtracted. This
|
||||
can be altered using the *extra* option of the
|
||||
|
||||
.. math::
|
||||
|
||||
\text{KE} = \left( \frac{\text{dim}}{N} - N_s N_x N_y N_z
|
||||
- \text{extra} \right) \frac{k T}{2},
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`; dim = 2 or 3 is the dimensionality of the simulation;
|
||||
:math:`N_s =` 0, 1, 2, or 3 for streaming velocity subtracted in 0, 1, 2, or 3
|
||||
dimensions, respectively; *extra* is the number of extra degrees of freedom;
|
||||
*N* is the number of atoms in the group; *k* is the Boltzmann constant, and
|
||||
*T* is the absolute temperature. The :math:`N_s N_x N_y N_z` term is the
|
||||
number of degrees of freedom subtracted to adjust for the removal of the
|
||||
center-of-mass velocity in each direction of the *Nx\*Ny\*Nz* bins, as
|
||||
discussed in the :ref:`(Evans) <Evans1>` paper. The extra term defaults to
|
||||
:math:`\text{dim} - N_s` and accounts for overall conservation of
|
||||
center-of-mass velocity across the group in directions where streaming velocity
|
||||
is *not* subtracted. This can be altered using the *extra* option of the
|
||||
:doc:`compute_modify <compute_modify>` command.
|
||||
|
||||
If the *out* keyword is used with a *tensor* value, which is the
|
||||
default, a kinetic energy tensor, stored as a 6-element vector, is
|
||||
also calculated by this compute for use in the computation of a
|
||||
pressure tensor. The formula for the components of the tensor is the
|
||||
same as the above formula, except that *v*\^2 is replaced by *vx\*vy* for
|
||||
the xy component, etc. The 6 components of the vector are ordered *xx,
|
||||
yy, zz, xy, xz, yz.*
|
||||
If the *out* keyword is used with a *tensor* value, which is the default,
|
||||
a kinetic energy tensor, stored as a six-element vector, is also calculated by
|
||||
this compute for use in the computation of a pressure tensor. The formula for
|
||||
the components of the tensor is the same as the above formula, except that
|
||||
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and
|
||||
so on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
|
||||
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
|
||||
|
||||
If the *out* keyword is used with a *bin* value, the count of atoms
|
||||
and computed temperature for each bin are stored for output, as an
|
||||
array of values, as described below. The temperature of each bin is
|
||||
calculated as described above, where the bias velocity is subtracted
|
||||
and only the remaining thermal velocity of atoms in the bin
|
||||
contributes to the temperature. See the note below for how the
|
||||
temperature is normalized by the degrees-of-freedom of atoms in the
|
||||
bin.
|
||||
If the *out* keyword is used with a *bin* value, the count of atoms and
|
||||
computed temperature for each bin are stored for output, as an array of values,
|
||||
as described below. The temperature of each bin is calculated as described
|
||||
above, where the bias velocity is subtracted and only the remaining thermal
|
||||
velocity of atoms in the bin contributes to the temperature. See the note
|
||||
below for how the temperature is normalized by the degrees-of-freedom of atoms
|
||||
in the bin.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
@ -118,14 +123,17 @@ from the velocity of the atoms. If this compute is used with a fix
|
||||
command that performs thermostatting then this bias will be subtracted
|
||||
from each atom, thermostatting of the remaining thermal velocity will
|
||||
be performed, and the bias will be added back in. Thermostatting
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`,
|
||||
and :doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
This compute subtracts out degrees-of-freedom due to fixes that
|
||||
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
:doc:`fix rigid <fix_rigid>`. This means the temperature of groups of
|
||||
atoms that include these constraints will be computed correctly. If
|
||||
needed, the subtracted degrees-of-freedom can be altered using the
|
||||
*extra* option of the :doc:`compute_modify <compute_modify>` command.
|
||||
This compute subtracts out degrees-of-freedom due to fixes that constrain
|
||||
molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
:doc:`fix rigid <fix_rigid>`. This means the temperature of groups of atoms
|
||||
that include these constraints will be computed correctly. If needed, the
|
||||
subtracted degrees-of-freedom can be altered using the *extra* option of the
|
||||
:doc:`compute_modify <compute_modify>` command.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -137,11 +145,12 @@ needed, the subtracted degrees-of-freedom can be altered using the
|
||||
by fractionally applying them based on the fraction of atoms in each
|
||||
bin. As a result, the bin degrees-of-freedom summed over all bins exactly
|
||||
equals the degrees-of-freedom used in the scalar temperature calculation,
|
||||
:math:`\Sigma N_{DOF_i} = N_{DOF}` and the corresponding relation for temperature
|
||||
is also satisfied :math:`\Sigma N_{DOF_i} T_i = N_{DOF} T`.
|
||||
These relations will breakdown in cases where the adjustment
|
||||
exceeds the actual number of degrees-of-freedom in a bin. This could happen
|
||||
if a bin is empty or in situations where rigid molecules
|
||||
:math:`\Sigma N_{\text{DOF}_i} = N_\text{DOF}` and the corresponding
|
||||
relation for temperature is also satisfied
|
||||
(:math:`\Sigma N_{\text{DOF}_i} T_i = N_\text{DOF} T`).
|
||||
These relations will break down in cases for which the adjustment
|
||||
exceeds the actual number of degrees of freedom in a bin. This could happen
|
||||
if a bin is empty or in situations in which rigid molecules
|
||||
are non-uniformly distributed, in which case the reported
|
||||
temperature within a bin may not be accurate.
|
||||
|
||||
@ -157,23 +166,25 @@ Output info
|
||||
This compute calculates a global scalar (the temperature). Depending
|
||||
on the setting of the *out* keyword, it also calculates a global
|
||||
vector or array. For *out* = *tensor*, it calculates a vector of
|
||||
length 6 (KE tensor), which can be accessed by indices 1-6. For *out*
|
||||
= *bin* it calculates a global array which has 2 columns and N rows,
|
||||
where N is the number of bins. The first column contains the number
|
||||
length 6 (KE tensor), which can be accessed by indices 1--6. For *out*
|
||||
= *bin* it calculates a global array which has 2 columns and :math:`N` rows,
|
||||
where :math:`N` is the number of bins. The first column contains the number
|
||||
of atoms in that bin. The second contains the temperature of that
|
||||
bin, calculated as described above. The ordering of rows in the array
|
||||
is as follows. Bins in x vary fastest, then y, then z. Thus for a
|
||||
10x10x10 3d array of bins, there will be 1000 rows. The bin with
|
||||
indices ix,iy,iz = 2,3,4 would map to row M = (iz-1)\*10\*10 + (iy-1)\*10
|
||||
+ ix = 322, where the rows are numbered from 1 to 1000 and the bin
|
||||
indices are numbered from 1 to 10 in each dimension.
|
||||
is as follows. Bins in :math:`x` vary fastest, then :math:`y`, then
|
||||
:math:`z`. Thus for a :math:`10\times 10\times 10` 3d array of bins, there
|
||||
will be 1000 rows. The bin with indices :math:`(i_x,i_y,i_z) = (2,3,4)` would
|
||||
map to row :math:`M = 10^2(i_z-1) + 10(i_y-1) + i_x = 322`, where the rows are
|
||||
numbered from 1 to 1000 and the bin indices are numbered from 1 to 10 in each
|
||||
dimension.
|
||||
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector or array values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector or array values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive". The array values are "intensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive." The array values are "intensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`. The first column
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/ramp command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/ramp vdim vlo vhi dim clo chi keyword value ...
|
||||
|
||||
@ -33,11 +33,11 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Define a computation that calculates the temperature of a group of
|
||||
atoms, after subtracting out an ramped velocity profile before
|
||||
computing the kinetic energy. A compute of this style can be used by
|
||||
any command that computes a temperature,
|
||||
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
Define a computation that calculates the temperature of a group of atoms,
|
||||
after subtracting out an ramped velocity profile before computing the kinetic
|
||||
energy. A compute of this style can be used by any command that computes a
|
||||
temperature (e.g. :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
The meaning of the arguments for this command which define the
|
||||
velocity ramp are the same as for the :doc:`velocity ramp <velocity>`
|
||||
@ -45,28 +45,33 @@ command which was presumably used to impose the velocity.
|
||||
|
||||
After the ramp velocity has been subtracted from the specified
|
||||
dimension for each atom, the temperature is calculated by the formula
|
||||
KE = dim/2 N k T, where KE = total kinetic energy of the group of
|
||||
atoms (sum of 1/2 m v\^2), dim = 2 or 3 = dimensionality of the
|
||||
simulation, N = number of atoms in the group, k = Boltzmann constant,
|
||||
and T = temperature.
|
||||
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in the group, :math:`k` is the Boltzmann
|
||||
constant, and :math:`T` is the absolute temperature.
|
||||
|
||||
The *units* keyword determines the meaning of the distance units used
|
||||
for coordinates (c1,c2) and velocities (vlo,vhi). A *box* value
|
||||
for coordinates (*clo*, *chi*) and velocities (*vlo*, *vhi*). A *box* value
|
||||
selects standard distance units as defined by the :doc:`units <units>`
|
||||
command, e.g. Angstroms for units = real or metal. A *lattice* value
|
||||
means the distance units are in lattice spacings; e.g. velocity =
|
||||
lattice spacings / tau. The :doc:`lattice <lattice>` command must have
|
||||
been previously used to define the lattice spacing.
|
||||
command (e.g., :math:`\mathrm{\mathring A}` for units = real or metal). A
|
||||
*lattice* value means the distance units are in lattice spacings (i.e.,
|
||||
velocity in lattice spacings per unit time). The :doc:`lattice <lattice>`
|
||||
command must have been previously used to define the lattice spacing.
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
calculated by this compute for use in the computation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz.
|
||||
A kinetic energy tensor, stored as a six-element vector, is also calculated by
|
||||
this compute for use in the computation of a pressure tensor. The formula for
|
||||
the components of the tensor is the same as the above formula, except that
|
||||
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and
|
||||
so on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
|
||||
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
The number of atoms contributing to the temperature is assumed to be constant
|
||||
for the duration of the run; use the *dynamic* option of the
|
||||
:doc:`compute_modify <compute_modify>` command if this is not the case.
|
||||
|
||||
The removal of the ramped velocity component by this fix is
|
||||
@ -75,7 +80,10 @@ from the velocity of the atoms. If this compute is used with a fix
|
||||
command that performs thermostatting then this bias will be subtracted
|
||||
from each atom, thermostatting of the remaining thermal velocity will
|
||||
be performed, and the bias will be added back in. Thermostatting
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
This compute subtracts out degrees-of-freedom due to fixes that
|
||||
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
@ -92,13 +100,14 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/region command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/region region-ID
|
||||
|
||||
@ -24,30 +24,37 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Define a computation that calculates the temperature of a group of
|
||||
atoms in a geometric region. This can be useful for thermostatting
|
||||
one portion of the simulation box. E.g. a McDLT simulation where one
|
||||
side is cooled, and the other side is heated. A compute of this style
|
||||
can be used by any command that computes a temperature,
|
||||
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix temp/rescale <fix_temp_rescale>`, etc.
|
||||
Define a computation that calculates the temperature of a group of atoms in a
|
||||
geometric region. This can be useful for thermostatting one portion of the
|
||||
simulation box. For example, a McDLT simulation where one side is cooled, and
|
||||
the other side is heated. A compute of this style can be used by any command
|
||||
that computes a temperature (e.g., :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`).
|
||||
|
||||
Note that a *region*\ -style temperature can be used to thermostat with
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>` or :doc:`fix langevin <fix_langevin>`, but should probably not be used with
|
||||
Nose/Hoover style fixes (:doc:`fix nvt <fix_nh>`, :doc:`fix npt <fix_nh>`, or :doc:`fix nph <fix_nh>`), if the
|
||||
degrees-of-freedom included in the computed T varies with time.
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>` or
|
||||
:doc:`fix langevin <fix_langevin>`, but should probably not be used with
|
||||
Nose--Hoover style fixes (:doc:`fix nvt <fix_nh>`, :doc:`fix npt <fix_nh>`,
|
||||
or :doc:`fix nph <fix_nh>`) if the degrees of freedom included in the computed
|
||||
temperature vary with time.
|
||||
|
||||
The temperature is calculated by the formula KE = dim/2 N k T, where
|
||||
KE = total kinetic energy of the group of atoms (sum of 1/2 m v\^2),
|
||||
dim = 2 or 3 = dimensionality of the simulation, N = number of atoms
|
||||
in both the group and region, k = Boltzmann constant, and T =
|
||||
temperature.
|
||||
The temperature is calculated by the formula
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE = is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in both the group and region, :math:`k` is
|
||||
the Boltzmann constant, and :math:`T` temperature.
|
||||
|
||||
A kinetic energy tensor, stored as a six-element vector, is also
|
||||
calculated by this compute for use in the computation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz.
|
||||
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y`
|
||||
for the :math:`xy` component, and so on. The six components of the vector are
|
||||
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is calculated each
|
||||
time the temperature is evaluated since it is assumed atoms can
|
||||
@ -62,18 +69,19 @@ compute is used with a fix command that performs thermostatting then
|
||||
this bias will be subtracted from each atom, thermostatting of the
|
||||
remaining thermal velocity will be performed, and the bias will be
|
||||
added back in. Thermostatting fixes that work in this way include
|
||||
:doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`. This means that when this compute
|
||||
:doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`. This means that when this compute
|
||||
is used to calculate the temperature for any of the thermostatting
|
||||
fixes via the :doc:`fix modify temp <fix_modify>` command, the thermostat
|
||||
will operate only on atoms that are currently in the geometric
|
||||
region.
|
||||
will operate only on atoms that are currently in the geometric region.
|
||||
|
||||
Unlike other compute styles that calculate temperature, this compute
|
||||
does not subtract out degrees-of-freedom due to fixes that constrain
|
||||
motion, such as :doc:`fix shake <fix_shake>` and :doc:`fix rigid <fix_rigid>`. This is because those degrees of freedom
|
||||
(e.g. a constrained bond) could apply to sets of atoms that straddle
|
||||
(e.g., a constrained bond) could apply to sets of atoms that straddle
|
||||
the region boundary, and hence the concept is somewhat ill-defined.
|
||||
If needed the number of subtracted degrees-of-freedom can be set
|
||||
If needed the number of subtracted degrees of freedom can be set
|
||||
explicitly using the *extra* option of the
|
||||
:doc:`compute_modify <compute_modify>` command.
|
||||
|
||||
@ -85,16 +93,17 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
The scalar value will be in temperature :doc:`units <units>`.
|
||||
The vector values will be in energy :doc:`units <units>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/region/eff command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/region/eff region-ID
|
||||
|
||||
@ -26,26 +26,28 @@ Description
|
||||
|
||||
Define a computation that calculates the temperature of a group of
|
||||
nuclei and electrons in the :doc:`electron force field <pair_eff>`
|
||||
model, within a geometric region using the electron force field. A
|
||||
compute of this style can be used by commands that compute a
|
||||
temperature, e.g. :doc:`thermo_modify <thermo_modify>`.
|
||||
model, within a geometric region using the electron force field.
|
||||
A compute of this style can be used by commands that compute a
|
||||
temperature (e.g., :doc:`thermo_modify <thermo_modify>`).
|
||||
|
||||
The operation of this compute is exactly like that described by the
|
||||
:doc:`compute temp/region <compute_temp_region>` command, except that
|
||||
the formula for the temperature itself includes the radial electron
|
||||
velocity contributions, as discussed by the :doc:`compute temp/eff <compute_temp_eff>` command.
|
||||
velocity contributions, as discussed by the
|
||||
:doc:`compute temp/eff <compute_temp_eff>` command.
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
@ -54,12 +56,15 @@ Restrictions
|
||||
""""""""""""
|
||||
|
||||
This compute is part of the EFF package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
LAMMPS was built with that package.
|
||||
See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`compute temp/region <compute_temp_region>`, :doc:`compute temp/eff <compute_temp_eff>`, :doc:`compute pressure <compute_pressure>`
|
||||
:doc:`compute temp/region <compute_temp_region>`,
|
||||
:doc:`compute temp/eff <compute_temp_eff>`,
|
||||
:doc:`compute pressure <compute_pressure>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/rotate command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/rotate
|
||||
|
||||
@ -24,36 +24,46 @@ Description
|
||||
"""""""""""
|
||||
|
||||
Define a computation that calculates the temperature of a group of
|
||||
atoms, after subtracting out the center-of-mass velocity and angular velocity of the group.
|
||||
This is useful if the group is expected to have a non-zero net
|
||||
velocity and/or global rotation motion for some reason. A compute of this style can be used by any
|
||||
command that computes a temperature,
|
||||
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
atoms, after subtracting out the center-of-mass velocity and angular velocity
|
||||
of the group. This is useful if the group is expected to have a non-zero net
|
||||
velocity and/or global rotation motion for some reason. A compute of this
|
||||
style can be used by any command that computes a temperature
|
||||
(e.g., :doc:`thermo_modify <thermo_modify>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
After the center-of-mass velocity and angular velocity has been subtracted from each atom,
|
||||
the temperature is calculated by the formula KE = dim/2 N k T, where
|
||||
KE = total kinetic energy of the group of atoms (sum of 1/2 m v\^2),
|
||||
dim = 2 or 3 = dimensionality of the simulation, N = number of atoms
|
||||
in the group, k = Boltzmann constant, and T = temperature.
|
||||
After the center-of-mass velocity and angular velocity has been subtracted from
|
||||
each atom, the temperature is calculated by the formula
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
calculated by this compute for use in the computation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz.
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in the group, :math:`k` is the Boltzmann
|
||||
constant, and :math:`T` is the absolute temperature.
|
||||
|
||||
A kinetic energy tensor, stored as a six-element vector, is also calculated by
|
||||
this compute for use in the computation of a pressure tensor. The formula for
|
||||
the components of the tensor is the same as the above formula, except that
|
||||
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and
|
||||
so on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
|
||||
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
:doc:`compute_modify <compute_modify>` command if this is not the case.
|
||||
|
||||
The removal of the center-of-mass velocity and angular velocity by this fix is essentially
|
||||
computing the temperature after a "bias" has been removed from the
|
||||
The removal of the center-of-mass velocity and angular velocity by this fix is
|
||||
essentially computing the temperature after a "bias" has been removed from the
|
||||
velocity of the atoms. If this compute is used with a fix command
|
||||
that performs thermostatting then this bias will be subtracted from
|
||||
each atom, thermostatting of the remaining thermal velocity will be
|
||||
performed, and the bias will be added back in. Thermostatting fixes
|
||||
that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
that work in this way include :doc:`fix nvt <fix_nh>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
This compute subtracts out degrees-of-freedom due to fixes that
|
||||
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
@ -72,11 +82,12 @@ Output info
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
vector values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
@ -85,7 +96,8 @@ Restrictions
|
||||
""""""""""""
|
||||
|
||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
LAMMPS was built with that package.
|
||||
See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/sphere command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/sphere keyword value ...
|
||||
|
||||
@ -42,10 +42,10 @@ usual :doc:`compute temp <compute_temp>` command, which assumes point
|
||||
particles with only translational kinetic energy.
|
||||
|
||||
Both point and finite-size particles can be included in the group.
|
||||
Point particles do not rotate, so they have only 3 translational
|
||||
degrees of freedom. For 3d spherical particles, each has 6 degrees of
|
||||
freedom (3 translational, 3 rotational). For 2d spherical particles,
|
||||
each has 3 degrees of freedom (2 translational, 1 rotational).
|
||||
Point particles do not rotate, so they have only three translational
|
||||
degrees of freedom. For 3d spherical particles, each has six degrees of
|
||||
freedom (three translational, three rotational). For 2d spherical particles,
|
||||
each has three degrees of freedom (two translational, one rotational).
|
||||
|
||||
.. note::
|
||||
|
||||
@ -60,8 +60,9 @@ each has 3 degrees of freedom (2 translational, 1 rotational).
|
||||
|
||||
The translational kinetic energy is computed the same as is described
|
||||
by the :doc:`compute temp <compute_temp>` command. The rotational
|
||||
kinetic energy is computed as 1/2 I w\^2, where I is the moment of
|
||||
inertia for a sphere and w is the particle's angular velocity.
|
||||
kinetic energy is computed as :math:`\frac12 I \omega^2`, where :math:`I` is
|
||||
the moment of inertia for a sphere and :math:`\omega` is the particle's angular
|
||||
velocity.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -69,11 +70,12 @@ inertia for a sphere and w is the particle's angular velocity.
|
||||
spheres, not disks, meaning their moment of inertia will be the same
|
||||
as in 3d.
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
A kinetic energy tensor, stored as a six-element vector, is also
|
||||
calculated by this compute. The formula for the components of the
|
||||
tensor is the same as the above formulas, except that v\^2 and w\^2 are
|
||||
replaced by vx\*vy and wx\*wy for the xy component. The 6 components of
|
||||
the vector are ordered xx, yy, zz, xy, xz, yz.
|
||||
tensor is the same as the above formulas, except that :math:`v^2` and
|
||||
:math:`\omega^2` are replaced by :math:`v_x v_y` and :math:`\omega_x \omega_y`
|
||||
for the :math:`xy` component. The six components of the vector are ordered
|
||||
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
@ -82,7 +84,7 @@ constant for the duration of the run; use the *dynamic* option of the
|
||||
This compute subtracts out translational degrees-of-freedom due to
|
||||
fixes that constrain molecular motion, such as :doc:`fix shake <fix_shake>` and :doc:`fix rigid <fix_rigid>`. This means the
|
||||
temperature of groups of atoms that include these constraints will be
|
||||
computed correctly. If needed, the subtracted degrees-of-freedom can
|
||||
computed correctly. If needed, the subtracted degrees of freedom can
|
||||
be altered using the *extra* option of the
|
||||
:doc:`compute_modify <compute_modify>` command.
|
||||
|
||||
@ -98,14 +100,14 @@ For the *bias* keyword, *bias-ID* refers to the ID of a temperature
|
||||
compute that removes a "bias" velocity from each atom. This allows
|
||||
compute temp/sphere to compute its thermal temperature after the
|
||||
translational kinetic energy components have been altered in a
|
||||
prescribed way, e.g. to remove a flow velocity profile. Thermostats
|
||||
prescribed way (e.g., to remove a flow velocity profile). Thermostats
|
||||
that use this compute will work with this bias term. See the doc
|
||||
pages for individual computes that calculate a temperature and the doc
|
||||
pages for fixes that perform thermostatting for more details.
|
||||
|
||||
For the *dof* keyword, a setting of *all* calculates a temperature
|
||||
that includes both translational and rotational degrees of freedom. A
|
||||
setting of *rotate* calculates a temperature that includes only
|
||||
that includes both translational and rotational degrees of freedom.
|
||||
A setting of *rotate* calculates a temperature that includes only
|
||||
rotational degrees of freedom.
|
||||
|
||||
----------
|
||||
@ -114,13 +116,14 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
|
||||
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
vector values from a compute as input.
|
||||
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
|
||||
output options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
vector values are "extensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
vector values are "extensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
vector values will be in energy :doc:`units <units>`.
|
||||
|
||||
@ -6,7 +6,7 @@ compute temp/uef command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID temp/uef
|
||||
|
||||
@ -38,8 +38,9 @@ documentation for :doc:`compute temp <compute_temp>`.
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix is part of the UEF package. It is only enabled if LAMMPS
|
||||
was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
This fix is part of the UEF package. It is only enabled if LAMMPS was built
|
||||
with that package. See the :doc:`Build package <Build_package>` page for more
|
||||
info.
|
||||
|
||||
This command can only be used when :doc:`fix nvt/uef <fix_nh_uef>`
|
||||
or :doc:`fix npt/uef <fix_nh_uef>` is active.
|
||||
|
||||
@ -6,14 +6,14 @@ compute ti command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group ti keyword args ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||
* ti = style name of this compute command
|
||||
* one or more attribute/arg pairs may be appended
|
||||
* keyword = pair style (lj/cut, gauss, born, etc) or *tail* or *kspace*
|
||||
* keyword = pair style (lj/cut, gauss, born, etc.) or *tail* or *kspace*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -47,81 +47,85 @@ thermodynamic integration. This derivative can be used to infer a
|
||||
free energy difference resulting from an alchemical simulation, as
|
||||
described in :ref:`Eike <Eike>`.
|
||||
|
||||
Typically this compute will be used in conjunction with the :doc:`fix adapt <fix_adapt>` command which can perform alchemical
|
||||
Typically this compute will be used in conjunction with the
|
||||
:doc:`fix adapt <fix_adapt>` command which can perform alchemical
|
||||
transformations by adjusting the strength of an interaction potential
|
||||
as a simulation runs, as defined by one or more
|
||||
:doc:`pair_style <pair_style>` or :doc:`kspace_style <kspace_style>`
|
||||
commands. This scaling is done via a prefactor on the energy, forces,
|
||||
virial calculated by the pair or K-Space style. The prefactor is
|
||||
often a function of a *lambda* parameter which may be adjusted from 0
|
||||
to 1 (or vice versa) over the course of a :doc:`run <run>`. The
|
||||
time-dependent adjustment is what the :doc:`fix adapt <fix_adapt>`
|
||||
virial calculated by the pair or :math:`k`-space style. The prefactor is
|
||||
often a function of a *lambda* parameter which may be adjusted from 0 to 1
|
||||
(or vice versa) over the course of a :doc:`run <run>`.
|
||||
The time-dependent adjustment is what the :doc:`fix adapt <fix_adapt>`
|
||||
command does.
|
||||
|
||||
Assume that the unscaled energy of a pair_style or kspace_style is
|
||||
given by U. Then the scaled energy is
|
||||
given by :math:`U`. Then the scaled energy is
|
||||
|
||||
.. parsed-literal::
|
||||
.. math::
|
||||
|
||||
Us = f(lambda) U
|
||||
U_s = f(\lambda) U
|
||||
|
||||
where f() is some function of lambda. What this compute calculates is
|
||||
where :math:`f` is some function of :math:`\lambda`. What this compute
|
||||
calculates is
|
||||
|
||||
.. parsed-literal::
|
||||
.. math::
|
||||
|
||||
dUs / d(lambda) = U df(lambda)/dlambda = Us / f(lambda) df(lambda)/dlambda
|
||||
\frac{dU_s}{d\lambda} = U \frac{df(\lambda)}{d\lambda}
|
||||
= \frac{U_s}{f(\lambda)} \frac{df(\lambda)}{d\lambda},
|
||||
|
||||
which is the derivative of the system's scaled potential energy Us
|
||||
with respect to *lambda*\ .
|
||||
which is the derivative of the system's scaled potential energy :math:`U_s`
|
||||
with respect to :math:`\lambda`.
|
||||
|
||||
To perform this calculation, you provide one or more atom types as
|
||||
*atype*\ . *Atype* can be specified in one of two ways. An explicit
|
||||
numeric values can be used, as in the first example above. Or a
|
||||
*atype*\ . The variable *atype* can be specified in one of two ways.
|
||||
An explicit numeric value can be used, as in the first example above, or a
|
||||
wildcard asterisk can be used in place of or in conjunction with the
|
||||
*atype* argument to select multiple atom types. This takes the form
|
||||
"\*" or "\*n" or "n\*" or "m\*n". If N = the number of atom types, then
|
||||
an asterisk with no numeric values means all types from 1 to N. A
|
||||
leading asterisk means all types from 1 to n (inclusive). A trailing
|
||||
asterisk means all types from n to N (inclusive). A middle asterisk
|
||||
"\*" or "\*n" or "m\*" or "m\*n". If :math:`N` is the number of atom types,
|
||||
then an asterisk with no numeric values means all types from 1 to :math:`N`.
|
||||
A leading asterisk means all types from 1 to n (inclusive). A trailing
|
||||
asterisk means all types from m to N (inclusive). A middle asterisk
|
||||
means all types from m to n (inclusive).
|
||||
|
||||
You also specify two functions, as :doc:`equal-style variables <variable>`. The first is specified as *v_name1*, where
|
||||
*name1* is the name of the variable, and is f(lambda) in the notation
|
||||
above. The second is specified as *v_name2*, where *name2* is the
|
||||
name of the variable, and is df(lambda) / dlambda in the notation
|
||||
above. I.e. it is the analytic derivative of f() with respect to
|
||||
lambda. Note that the *name1* variable is also typically given as an
|
||||
You also specify two functions, as :doc:`equal-style variables <variable>`.
|
||||
The first is specified as *v_name1*, where *name1* is the name of the
|
||||
variable, and is :math:`f(\lambda)` in the notation above. The second is
|
||||
specified as *v_name2*, where *name2* is the name of the variable, and is
|
||||
:math:`df(\lambda)/d\lambda` in the notation above (i.e., it is the analytic
|
||||
derivative of :math:`f` with respect to :math:`\lambda`).
|
||||
Note that the *name1* variable is also typically given as an
|
||||
argument to the :doc:`fix adapt <fix_adapt>` command.
|
||||
|
||||
An alchemical simulation may use several pair potentials together,
|
||||
invoked via the :doc:`pair_style hybrid or hybrid/overlay <pair_hybrid>`
|
||||
command. The total dUs/dlambda for the overall system is calculated
|
||||
command. The total :math:`dU_s/d\lambda` for the overall system is calculated
|
||||
as the sum of each contributing term as listed by the keywords in the
|
||||
compute ti command. Individual pair potentials can be listed, which
|
||||
will be sub-styles in the hybrid case. You can also include a K-space
|
||||
term via the *kspace* keyword. You can also include a pairwise
|
||||
:doc:`compute ti <compute_ti>` command. Individual pair potentials can be
|
||||
listed, which will be sub-styles in the hybrid case. You can also include a
|
||||
:math:`k`-space term via the *kspace* keyword. You can also include a pairwise
|
||||
long-range tail correction to the energy via the *tail* keyword.
|
||||
|
||||
For each term you can specify a different (or the same) scale factor
|
||||
For each term, you can specify a different (or the same) scale factor
|
||||
by the two variables that you list. Again, these will typically
|
||||
correspond toe the scale factors applied to these various potentials
|
||||
and the K-Space contribution via the :doc:`fix adapt <fix_adapt>`
|
||||
and the :math:`k`-space contribution via the :doc:`fix adapt <fix_adapt>`
|
||||
command.
|
||||
|
||||
More details about the exact functional forms for the computation of
|
||||
du/dl can be found in the paper by :ref:`Eike <Eike>`.
|
||||
:math:`du/dl` can be found in the paper by :ref:`Eike <Eike>`.
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar, namely dUs/dlambda. This
|
||||
This compute calculates a global scalar, namely :math:`dU_s/d\lambda`. This
|
||||
value can be used by any command that uses a global scalar value from
|
||||
a compute as input. See the :doc:`Howto output <Howto_output>` doc page
|
||||
for an overview of LAMMPS output options.
|
||||
|
||||
The scalar value calculated by this compute is "extensive".
|
||||
The scalar value calculated by this compute is "extensive."
|
||||
|
||||
The scalar value will be in energy :doc:`units <units>`.
|
||||
|
||||
@ -129,7 +133,8 @@ Restrictions
|
||||
""""""""""""
|
||||
|
||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
LAMMPS was built with that package. See the
|
||||
:doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute torque/chunk command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID torque/chunk chunkID
|
||||
|
||||
@ -27,14 +27,17 @@ Description
|
||||
Define a computation that calculates the torque on multiple chunks of
|
||||
atoms.
|
||||
|
||||
In LAMMPS, chunks are collections of atoms defined by a :doc:`compute chunk/atom <compute_chunk_atom>` command, which assigns each atom
|
||||
In LAMMPS, chunks are collections of atoms defined by a
|
||||
:doc:`compute chunk/atom <compute_chunk_atom>` command, which assigns each atom
|
||||
to a single chunk (or no chunk). The ID for this command is specified
|
||||
as chunkID. For example, a single chunk could be the atoms in a
|
||||
molecule or atoms in a spatial bin. See the :doc:`compute chunk/atom <compute_chunk_atom>` and :doc:`Howto chunk <Howto_chunk>`
|
||||
molecule or atoms in a spatial bin. See the
|
||||
:doc:`compute chunk/atom <compute_chunk_atom>` and
|
||||
:doc:`Howto chunk <Howto_chunk>`
|
||||
doc pages for details of how chunks can be defined and examples of how
|
||||
they can be used to measure properties of a system.
|
||||
|
||||
This compute calculates the 3 components of the torque vector for eqch
|
||||
This compute calculates the three components of the torque vector for eqch
|
||||
chunk, due to the forces on the individual atoms in the chunk around
|
||||
the center-of-mass of the chunk. The calculation includes all effects
|
||||
due to atoms passing through periodic boundaries.
|
||||
@ -55,7 +58,8 @@ non-zero chunk IDs.
|
||||
"unwrapped" coordinates. See the Atoms section of the
|
||||
:doc:`read_data <read_data>` command for a discussion of image flags and
|
||||
how they are set for each atom. You can reset the image flags
|
||||
(e.g. to 0) before invoking this compute by using the :doc:`set image <set>` command.
|
||||
(e.g., to 0) before invoking this compute by using the
|
||||
:doc:`set image <set>` command.
|
||||
|
||||
The simplest way to output the results of the compute torque/chunk
|
||||
calculation to a file is to use the :doc:`fix ave/time <fix_ave_time>`
|
||||
@ -70,14 +74,16 @@ command, for example:
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global array where the number of rows = the
|
||||
number of chunks *Nchunk* as calculated by the specified :doc:`compute chunk/atom <compute_chunk_atom>` command. The number of columns =
|
||||
3 for the 3 xyz components of the torque for each chunk. These values
|
||||
can be accessed by any command that uses global array values from a
|
||||
compute as input. See the :doc:`Howto output <Howto_output>` doc page
|
||||
This compute calculates a global array where the number of rows is equal to the
|
||||
number of chunks *Nchunk* as calculated by the specified
|
||||
:doc:`compute chunk/atom <compute_chunk_atom>` command. The number of columns
|
||||
is three for the :math:`x`, :math:`y`, and :math:`z` components of the torque
|
||||
for each chunk. These values can be accessed by any command that uses global
|
||||
array values from a compute as input.
|
||||
See the :doc:`Howto output <Howto_output>` doc page
|
||||
for an overview of LAMMPS output options.
|
||||
|
||||
The array values are "intensive". The array values will be in
|
||||
The array values are "intensive." The array values will be in
|
||||
force-distance :doc:`units <units>`.
|
||||
|
||||
Restrictions
|
||||
|
||||
@ -6,7 +6,7 @@ compute vacf command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID vacf
|
||||
|
||||
@ -29,13 +29,14 @@ function (VACF), averaged over a group of atoms. Each atom's
|
||||
contribution to the VACF is its current velocity vector dotted into
|
||||
its initial velocity vector at the time the compute was specified.
|
||||
|
||||
A vector of four quantities is calculated by this compute. The first 3
|
||||
elements of the vector are vx \* vx0 (and similarly for the y and z
|
||||
components), summed and averaged over atoms in the group. Vx is the
|
||||
current x-component of velocity for the atom, vx0 is the initial
|
||||
x-component of velocity for the atom. The fourth element of the vector
|
||||
is the total VACF, i.e. (vx\*vx0 + vy\*vy0 + vz\*vz0), summed and
|
||||
averaged over atoms in the group.
|
||||
A vector of four quantities is calculated by this compute. The first three
|
||||
elements of the vector are :math:`v_x v_{x,0}` (and similar for the
|
||||
:math:`y` and :math:`z` components), summed and averaged over atoms in the
|
||||
group, where :math:`v_x` is the current :math:`x`-component of the velocity of
|
||||
the atom and :math:`v_{x,0}` is the initial :math:`x`-component of the velocity
|
||||
of the atom. The fourth element of the vector is the total VACF
|
||||
(i.e., :math:`(v_x v_{x,0} + v_y v_{y,0} + v_z v_{z,0})`),
|
||||
summed and averaged over atoms in the group.
|
||||
|
||||
The integral of the VACF versus time is proportional to the diffusion
|
||||
coefficient of the diffusing atoms. This can be computed in the
|
||||
@ -61,12 +62,12 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global vector of length 4, which can be
|
||||
accessed by indices 1-4 by any command that uses global vector values
|
||||
accessed by indices 1--4 by any command that uses global vector values
|
||||
from a compute as input. See the :doc:`Howto output <Howto_output>` doc
|
||||
page for an overview of LAMMPS output options.
|
||||
|
||||
The vector values are "intensive". The vector values will be in
|
||||
velocity\^2 :doc:`units <units>`.
|
||||
The vector values are "intensive." The vector values will be in
|
||||
velocity\ :math:`^2` :doc:`units <units>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
@ -6,7 +6,7 @@ compute vcm/chunk command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID vcm/chunk chunkID
|
||||
|
||||
@ -27,14 +27,15 @@ Description
|
||||
Define a computation that calculates the center-of-mass velocity for
|
||||
multiple chunks of atoms.
|
||||
|
||||
In LAMMPS, chunks are collections of atoms defined by a :doc:`compute chunk/atom <compute_chunk_atom>` command, which assigns each atom
|
||||
to a single chunk (or no chunk). The ID for this command is specified
|
||||
as chunkID. For example, a single chunk could be the atoms in a
|
||||
molecule or atoms in a spatial bin. See the :doc:`compute chunk/atom <compute_chunk_atom>` and :doc:`Howto chunk <Howto_chunk>`
|
||||
doc pages for details of how chunks can be defined and examples of how
|
||||
they can be used to measure properties of a system.
|
||||
In LAMMPS, chunks are collections of atoms defined by a
|
||||
:doc:`compute chunk/atom <compute_chunk_atom>` command, which assigns each atom
|
||||
to a single chunk (or no chunk). The ID for this command is specified as
|
||||
chunkID. For example, a single chunk could be the atoms in a molecule or atoms
|
||||
in a spatial bin. See the :doc:`compute chunk/atom <compute_chunk_atom>` and
|
||||
:doc:`Howto chunk <Howto_chunk>` doc pages for details of how chunks can be
|
||||
defined and examples of how they can be used to measure properties of a system.
|
||||
|
||||
This compute calculates the x,y,z components of the center-of-mass
|
||||
This compute calculates the :math:`(x,y,z)` components of the center-of-mass
|
||||
velocity for each chunk. This is done by summing mass\*velocity for
|
||||
each atom in the chunk and dividing the sum by the total mass of the
|
||||
chunk.
|
||||
@ -60,14 +61,15 @@ command, for example:
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global array where the number of rows = the
|
||||
number of chunks *Nchunk* as calculated by the specified :doc:`compute chunk/atom <compute_chunk_atom>` command. The number of columns =
|
||||
3 for the x,y,z center-of-mass velocity coordinates of each chunk.
|
||||
These values can be accessed by any command that uses global array
|
||||
values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
This compute calculates a global array where the number of rows is the
|
||||
number of chunks *Nchunk* as calculated by the specified
|
||||
:doc:`compute chunk/atom <compute_chunk_atom>` command. The number of
|
||||
columns is 3 for the :math:`(x,y,z)` center-of-mass velocity coordinates of
|
||||
each chunk. These values can be accessed by any command that uses global array
|
||||
values from a compute as input. See the :doc:`Howto output <Howto_output>`
|
||||
page for an overview of LAMMPS output options.
|
||||
|
||||
The array values are "intensive". The array values will be in
|
||||
The array values are "intensive." The array values will be in
|
||||
velocity :doc:`units <units>`.
|
||||
|
||||
Restrictions
|
||||
|
||||
@ -7,7 +7,7 @@ Syntax
|
||||
""""""
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID viscosity/cos
|
||||
|
||||
@ -35,64 +35,69 @@ Description
|
||||
Define a computation that calculates the velocity amplitude of a group of atoms
|
||||
with an cosine-shaped velocity profile and the temperature of them
|
||||
after subtracting out the velocity profile before computing the kinetic energy.
|
||||
A compute of this style can be used by any command that computes a temperature,
|
||||
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt <fix_nh>`, etc.
|
||||
A compute of this style can be used by any command that computes a temperature
|
||||
(e.g., :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt <fix_nh>`).
|
||||
|
||||
This command together with :doc:`fix_accelerate/cos<fix_accelerate_cos>`
|
||||
enables viscosity calculation with periodic perturbation method,
|
||||
as described by :ref:`Hess<Hess1>`.
|
||||
An acceleration along the x-direction is applied to the simulation system
|
||||
by using :doc:`fix_accelerate/cos<fix_accelerate_cos>` command.
|
||||
The acceleration is a periodic function along the z-direction:
|
||||
An acceleration along the :math:`x`-direction is applied to the simulation
|
||||
system by using :doc:`fix_accelerate/cos<fix_accelerate_cos>` command.
|
||||
The acceleration is a periodic function along the :math:`z`-direction:
|
||||
|
||||
.. math::
|
||||
|
||||
a_{x}(z) = A \cos \left(\frac{2 \pi z}{l_{z}}\right)
|
||||
|
||||
where :math:`A` is the acceleration amplitude, :math:`l_z` is the z-length
|
||||
of the simulation box. At steady state, the acceleration generates
|
||||
a velocity profile:
|
||||
where :math:`A` is the acceleration amplitude, :math:`l_z` is the
|
||||
:math:`z`-length of the simulation box. At steady state, the acceleration
|
||||
generates a velocity profile:
|
||||
|
||||
.. math::
|
||||
|
||||
v_{x}(z) = V \cos \left(\frac{2 \pi z}{l_{z}}\right)
|
||||
|
||||
The generated velocity amplitude :math:`V` is related to the
|
||||
shear viscosity :math:`\eta` by:
|
||||
shear viscosity :math:`\eta` by
|
||||
|
||||
.. math::
|
||||
|
||||
V = \frac{A \rho}{\eta}\left(\frac{l_{z}}{2 \pi}\right)^{2}
|
||||
V = \frac{A \rho}{\eta}\left(\frac{l_{z}}{2 \pi}\right)^{2},
|
||||
|
||||
|
||||
and it can be obtained from ensemble average of the velocity profile:
|
||||
and it can be obtained from ensemble average of the velocity profile via
|
||||
|
||||
.. math::
|
||||
|
||||
V = \frac{\sum_i 2 m_{i} v_{i, x} \cos \left(\frac{2 \pi z_i}{l_{z}}\right)}{\sum_i m_{i}}
|
||||
|
||||
V = \frac{\sum\limits_i 2 m_{i} v_{i, x} \cos \left(\frac{2 \pi z_i}{l_{z}}\right)}{\sum\limits_i m_{i}}
|
||||
|
||||
where :math:`m_i`, :math:`v_{i,x}` and :math:`z_i` are the mass,
|
||||
x-component velocity and z coordinate of a particle.
|
||||
:math:`x`-component velocity, and :math:`z`-coordinate of a particle,
|
||||
respectively.
|
||||
|
||||
After the cosine-shaped collective velocity in :math:`x` direction
|
||||
has been subtracted for each atom, the temperature is calculated by the formula
|
||||
KE = dim/2 N k T, where KE = total kinetic energy of the group of
|
||||
atoms (sum of 1/2 m v\^2), dim = 2 or 3 = dimensionality of the
|
||||
simulation, N = number of atoms in the group, k = Boltzmann constant,
|
||||
and T = temperature.
|
||||
After the cosine-shaped collective velocity in the :math:`x`-direction has been
|
||||
subtracted for each atom, the temperature is calculated by the formula
|
||||
|
||||
A kinetic energy tensor, stored as a 6-element vector, is also
|
||||
.. math::
|
||||
|
||||
\text{KE} = \frac{\text{dim}}{2} N k T,
|
||||
|
||||
where KE is the total kinetic energy of the group of atoms (sum of
|
||||
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
|
||||
:math:`N` is the number of atoms in the group, :math:`k` is the Boltzmann
|
||||
constant, and :math:`T` is the absolute temperature.
|
||||
|
||||
A kinetic energy tensor, stored as a six-element vector, is also
|
||||
calculated by this compute for use in the computation of a pressure
|
||||
tensor. The formula for the components of the tensor is the same as
|
||||
the above formula, except that v\^2 is replaced by vx\*vy for the xy
|
||||
component, etc. The 6 components of the vector are ordered xx, yy,
|
||||
zz, xy, xz, yz.
|
||||
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for
|
||||
the :math:`xy` component, and so on. The six components of the vector are
|
||||
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
|
||||
|
||||
The number of atoms contributing to the temperature is assumed to be
|
||||
constant for the duration of the run; use the *dynamic* option of the
|
||||
:doc:`compute_modify <compute_modify>` command if this is not the case.
|
||||
However, in order to get meaningful result, the group ID of this compute should be all.
|
||||
However, in order to get meaningful result, the group ID of this compute should
|
||||
be all.
|
||||
|
||||
The removal of the cosine-shaped velocity component by this command is
|
||||
essentially computing the temperature after a "bias" has been removed
|
||||
@ -100,18 +105,20 @@ from the velocity of the atoms. If this compute is used with a fix
|
||||
command that performs thermostatting then this bias will be subtracted
|
||||
from each atom, thermostatting of the remaining thermal velocity will
|
||||
be performed, and the bias will be added back in. Thermostatting
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
|
||||
fixes that work in this way include :doc:`fix nvt <fix_nh>`,
|
||||
:doc:`fix temp/rescale <fix_temp_rescale>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
|
||||
:doc:`fix langevin <fix_langevin>`.
|
||||
|
||||
This compute subtracts out degrees-of-freedom due to fixes that
|
||||
This compute subtracts out degrees of freedom due to fixes that
|
||||
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
|
||||
:doc:`fix rigid <fix_rigid>`. This means the temperature of groups of
|
||||
:doc:`fix rigid <fix_rigid>`. This means that the temperature of groups of
|
||||
atoms that include these constraints will be computed correctly. If
|
||||
needed, the subtracted degrees-of-freedom can be altered using the
|
||||
needed, the subtracted degrees of freedom can be altered using the
|
||||
*extra* option of the :doc:`compute_modify <compute_modify>` command.
|
||||
|
||||
See the :doc:`Howto thermostat <Howto_thermostat>` page for a
|
||||
discussion of different ways to compute temperature and perform
|
||||
thermostatting.
|
||||
See the :doc:`Howto thermostat <Howto_thermostat>` page for a discussion of
|
||||
different ways to compute temperature and perform thermostatting.
|
||||
|
||||
----------
|
||||
|
||||
@ -119,28 +126,28 @@ Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a global scalar (the temperature) and a global
|
||||
vector of length 7, which can be accessed by indices 1-7.
|
||||
The first 6 elements of the vector are the KE tensor,
|
||||
and the 7-th is the cosine-shaped velocity amplitude :math:`V`,
|
||||
vector of length 7, which can be accessed by indices 1--7.
|
||||
The first six elements of the vector are the KE tensor,
|
||||
and the seventh is the cosine-shaped velocity amplitude :math:`V`,
|
||||
which can be used to calculate the reciprocal viscosity, as shown in the example.
|
||||
These values can be used by any command that uses global scalar or
|
||||
vector values from a compute as input.
|
||||
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output options.
|
||||
|
||||
The scalar value calculated by this compute is "intensive". The
|
||||
first 6 elements of vector values are "extensive",
|
||||
and the 7-th element of vector values is "intensive".
|
||||
The scalar value calculated by this compute is "intensive." The
|
||||
first six elements of vector values are "extensive,"
|
||||
and the seventh element of vector values is "intensive."
|
||||
|
||||
The scalar value will be in temperature :doc:`units <units>`. The
|
||||
first 6 elements of vector values will be in energy :doc:`units <units>`.
|
||||
The 7-th element of vector value will be in velocity :doc:`units <units>`.
|
||||
The scalar value will be in temperature :doc:`units <units>`.
|
||||
The first six elements of vector values will be in energy :doc:`units <units>`.
|
||||
The seventh element of vector value will be in velocity :doc:`units <units>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This command is only available when LAMMPS was built with the MISC package.
|
||||
Since this compute depends on :doc:`fix accelerate/cos <fix_accelerate_cos>` which can
|
||||
only work for 3d systems, it cannot be used for 2d systems.
|
||||
Since this compute depends on :doc:`fix accelerate/cos <fix_accelerate_cos>`
|
||||
which can only work for 3d systems, it cannot be used for 2d systems.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -6,15 +6,14 @@ compute voronoi/atom command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID voronoi/atom keyword arg ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||
* voronoi/atom = style name of this compute command
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *only_group* or *surface* or *radius* or *edge_histo* or *edge_threshold*
|
||||
or *face_threshold* or *neighbors* or *peratom*
|
||||
* keyword = *only_group* or *surface* or *radius* or *edge_histo* or *edge_threshold* or *face_threshold* or *neighbors* or *peratom*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -80,7 +79,7 @@ In the example above, a precipitate embedded in a matrix, only atoms
|
||||
at the surface of the precipitate will have non-zero surface area, and
|
||||
only the outward facing facets of the Voronoi cells are counted (the
|
||||
hull of the precipitate). The total surface area of the precipitate
|
||||
can be obtained by running a "reduce sum" compute on c_2[3]
|
||||
can be obtained by running a "reduce sum" compute on c_2[3].
|
||||
|
||||
If the *radius* keyword is specified with an atom style variable as
|
||||
the argument, a poly-disperse Voronoi tessellation is
|
||||
@ -149,7 +148,8 @@ with areas greater than the threshold are stored.
|
||||
|
||||
----------
|
||||
|
||||
The Voronoi calculation is performed by the freely available `Voro++ package <voronoi_>`_, written by Chris Rycroft at UC Berkeley and LBL,
|
||||
The Voronoi calculation is performed by the freely available
|
||||
`Voro++ package <voronoi_>`_, written by Chris Rycroft at UC Berkeley and LBL,
|
||||
which must be installed on your system when building LAMMPS for use
|
||||
with this compute. See instructions on obtaining and installing the
|
||||
Voro++ software in the src/VORONOI/README file.
|
||||
@ -169,49 +169,51 @@ Voro++ software in the src/VORONOI/README file.
|
||||
:doc:`pair_style <pair_style>` interactions. The cutoff can be set
|
||||
explicitly via the :doc:`comm_modify cutoff <comm_modify>` command. The
|
||||
Voronoi cells for atoms adjacent to empty regions will extend into
|
||||
those regions up to the communication cutoff in x, y, or z. In that
|
||||
situation, an exterior face is created at the cutoff distance normal
|
||||
to the x, y, or z direction. For triclinic systems, the exterior face
|
||||
is parallel to the corresponding reciprocal lattice vector.
|
||||
those regions up to the communication cutoff in :math:`x`, :math:`y`, or
|
||||
:math:`z`. In that situation, an exterior face is created at the cutoff
|
||||
distance normal to the :math:`x`, :math:`y`, or :math:`z` direction.
|
||||
For triclinic systems, the exterior face is parallel to the corresponding
|
||||
reciprocal lattice vector.
|
||||
|
||||
.. note::
|
||||
|
||||
The Voro++ package performs its calculation in 3d. This will
|
||||
still work for a 2d LAMMPS simulation, provided all the atoms have the
|
||||
same z coordinate. The Voronoi cell of each atom will be a columnar
|
||||
polyhedron with constant cross-sectional area along the z direction
|
||||
same :math:`z`-coordinate. The Voronoi cell of each atom will be a columnar
|
||||
polyhedron with constant cross-sectional area along the :math:`z`-direction
|
||||
and two exterior faces at the top and bottom of the simulation box. If
|
||||
the atoms do not all have the same z coordinate, then the columnar
|
||||
the atoms do not all have the same :math:`z`-coordinate, then the columnar
|
||||
cells will be accordingly distorted. The cross-sectional area of each
|
||||
Voronoi cell can be obtained by dividing its volume by the z extent of
|
||||
the simulation box. Note that you define the z extent of the
|
||||
Voronoi cell can be obtained by dividing its volume by the :math:`z` extent
|
||||
of the simulation box. Note that you define the :math:`z` extent of the
|
||||
simulation box for 2d simulations when using the
|
||||
:doc:`create_box <create_box>` or :doc:`read_data <read_data>` commands.
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
By default, this compute calculates a per-atom array with 2
|
||||
By default, this compute calculates a per-atom array with two
|
||||
columns. In regular dynamic tessellation mode the first column is the
|
||||
Voronoi volume, the second is the neighbor count, as described above
|
||||
(read above for the output data in case the *occupation* keyword is
|
||||
specified). These values can be accessed by any command that uses
|
||||
per-atom values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options. If the *peratom* keyword is set to "no", the per-atom array
|
||||
options. If the *peratom* keyword is set to "no," the per-atom array
|
||||
is still created, but it is not accessible.
|
||||
|
||||
If the *edge_histo* keyword is used, then this compute generates a
|
||||
global vector of length *maxedge*\ +1, containing a histogram of the
|
||||
number of edges per face.
|
||||
|
||||
If the *neighbors* value is set to yes, then this compute calculates a
|
||||
local array with 3 columns. There is one row for each face of each
|
||||
If the *neighbors* value is set to *yes*, then this compute calculates a
|
||||
local array with three columns. There is one row for each face of each
|
||||
Voronoi cell.
|
||||
|
||||
.. note::
|
||||
|
||||
Some LAMMPS commands such as the :doc:`compute reduce <compute_reduce>` command can accept either a per-atom or
|
||||
local quantity. If this compute produces both quantities, the command
|
||||
Some LAMMPS commands such as the :doc:`compute reduce <compute_reduce>`
|
||||
command can accept either a per-atom or local quantity. If this compute
|
||||
produces both quantities, the command
|
||||
may access the per-atom quantity, even if you want to access the local
|
||||
quantity. This effect can be eliminated by using the *peratom*
|
||||
keyword to turn off the production of the per-atom quantities. For
|
||||
|
||||
@ -6,7 +6,7 @@ compute xrd command
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID xrd lambda type1 type2 ... typeN keyword value ...
|
||||
|
||||
@ -45,30 +45,31 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Define a computation that calculates x-ray diffraction intensity as described
|
||||
Define a computation that calculates X-ray diffraction intensity as described
|
||||
in :ref:`(Coleman) <xrd-Coleman>` on a mesh of reciprocal lattice nodes defined
|
||||
by the entire simulation domain (or manually) using a simulated radiation
|
||||
of wavelength lambda.
|
||||
of wavelength *lambda*.
|
||||
|
||||
The x-ray diffraction intensity, I, at each reciprocal lattice point, k,
|
||||
is computed from the structure factor, F, using the equations:
|
||||
The X-ray diffraction intensity, :math:`I`, at each reciprocal lattice point,
|
||||
:math:`k`, is computed from the structure factor, :math:`F`, using the
|
||||
equations:
|
||||
|
||||
.. math::
|
||||
|
||||
I = & Lp(\theta)\frac{F^{*}F}{N} \\
|
||||
F(\mathbf{k}) = & \sum_{j=1}^{N}f_j(\theta)exp(2\pi i \mathbf{k}\cdot \mathbf{r}_j) \\
|
||||
Lp(\theta) = & \frac{1+cos^{2}(2\theta)}{cos(\theta)sin^{2}(\theta)} \\
|
||||
\frac{sin(\theta)}{\lambda} = & \frac{\left | \mathbf{k} \right |}{2}
|
||||
I &= L_p(\theta)\frac{F^{*}F}{N} \\
|
||||
F(\mathbf{k}) &= \sum_{j=1}^{N}f_j(\theta)exp(2\pi i \mathbf{k}\cdot \mathbf{r}_j) \\
|
||||
L_p(\theta) &= \frac{1+\cos^2(2\theta)}{\cos(\theta)\sin^2(\theta)} \\
|
||||
\frac{\sin(\theta)}{\lambda} &= \frac{\left\lVert\mathbf{k}\right\rVert}{2}
|
||||
|
||||
Here, K is the location of the reciprocal lattice node, :math:`r_j` is the
|
||||
position of each atom, :math:`f_j` are atomic scattering factors, *Lp* is the
|
||||
Lorentz-polarization factor, and :math:`\theta` is the scattering angle of
|
||||
diffraction. The Lorentz-polarization factor can be turned off using
|
||||
the optional *LP* keyword.
|
||||
Here, :math:`\mathbf{k}` is the location of the reciprocal lattice node,
|
||||
:math:`r_j` is the position of each atom, :math:`f_j` are atomic scattering
|
||||
factors, *Lp* is the Lorentz-polarization factor, and :math:`\theta` is the
|
||||
scattering angle of diffraction. The Lorentz-polarization factor can be turned
|
||||
off using the optional *LP* keyword.
|
||||
|
||||
Diffraction intensities are calculated on a three-dimensional mesh of
|
||||
reciprocal lattice nodes. The mesh spacing is defined either (a)
|
||||
by the entire simulation domain or (b) manually using selected values as
|
||||
reciprocal lattice nodes. The mesh spacing is defined either (a) by the entire
|
||||
simulation domain or (b) manually using selected values as
|
||||
shown in the 2D diagram below.
|
||||
|
||||
.. image:: img/xrd_mesh.jpg
|
||||
@ -76,29 +77,29 @@ shown in the 2D diagram below.
|
||||
:align: center
|
||||
|
||||
For a mesh defined by the simulation domain, a rectilinear grid is
|
||||
constructed with spacing *c*\ \*inv(A) along each reciprocal lattice
|
||||
axis. Where A are the vectors corresponding to the edges of the
|
||||
simulation cell. If one or two directions has non-periodic boundary
|
||||
conditions, then the spacing in these directions is defined from the
|
||||
constructed with spacing :math:`c A^{-1}` along each reciprocal lattice
|
||||
axis, where :math:`A` is a matrix containing the vectors corresponding to the
|
||||
edges of the simulation cell. If one or two directions has non-periodic
|
||||
boundary conditions, then the spacing in these directions is defined from the
|
||||
average of the (inversed) box lengths with periodic boundary conditions.
|
||||
Meshes defined by the simulation domain must contain at least one periodic
|
||||
boundary.
|
||||
|
||||
If the *manual* flag is included, the mesh of reciprocal lattice nodes
|
||||
will defined using the *c* values for the spacing along each
|
||||
will be defined using the *c* values for the spacing along each
|
||||
reciprocal lattice axis. Note that manual mapping of the reciprocal
|
||||
space mesh is good for comparing diffraction results from multiple
|
||||
simulations; however it can reduce the likelihood that Bragg
|
||||
reflections will be satisfied unless small spacing parameters (< 0.05
|
||||
Angstrom\^(-1)) are implemented. Meshes with manual spacing do not
|
||||
require a periodic boundary.
|
||||
simulations; however, it can reduce the likelihood that Bragg
|
||||
reflections will be satisfied unless small spacing parameters
|
||||
(:math:`< 0.05~\mathrm{\mathring{A}}^{-1}`) are implemented.
|
||||
Meshes with manual spacing do not require a periodic boundary.
|
||||
|
||||
The limits of the reciprocal lattice mesh are determined by range of
|
||||
scattering angles explored. The *2Theta* parameters allows the user
|
||||
scattering angles explored. The *2Theta* parameter allows the user
|
||||
to reduce the scattering angle range to only the region of interest
|
||||
which reduces the cost of the computation.
|
||||
|
||||
The atomic scattering factors, fj, accounts for the reduction in
|
||||
The atomic scattering factor, :math:`f_j`, accounts for the reduction in
|
||||
diffraction intensity due to Compton scattering. Compute xrd uses
|
||||
analytical approximations of the atomic scattering factors that vary
|
||||
for each atom type (type1 type2 ... typeN) and angle of diffraction.
|
||||
@ -107,8 +108,8 @@ The analytic approximation is computed using the formula
|
||||
|
||||
.. math::
|
||||
|
||||
f_j\left ( \frac{sin(\theta)}{\lambda} \right )=\sum_{i}^{4}
|
||||
a_i exp\left ( -b_i \frac{sin^{2}(\theta)}{\lambda^{2}} \right )+c
|
||||
f_j\left ( \frac{\sin(\theta)}{\lambda} \right )=\sum_{i=1}^{4}
|
||||
a_i \exp\left ( -b_i \frac{\sin^{2}(\theta)}{\lambda^{2}} \right )+c
|
||||
|
||||
Coefficients parameterized by :ref:`(Peng) <Peng>` are assigned for each
|
||||
atom type designating the chemical symbol and charge of each atom
|
||||
@ -208,7 +209,7 @@ Output info
|
||||
|
||||
This compute calculates a global array. The number of rows in the
|
||||
array is the number of reciprocal lattice nodes that are explored
|
||||
which by the mesh. The global array has 2 columns.
|
||||
which by the mesh. The global array has two columns.
|
||||
|
||||
The first column contains the diffraction angle in the units (radians
|
||||
or degrees) provided with the *2Theta* values. The second column contains
|
||||
@ -218,7 +219,7 @@ The array can be accessed by any command that uses global values from
|
||||
a compute as input. See the :doc:`Howto output <Howto_output>` doc page
|
||||
for an overview of LAMMPS output options.
|
||||
|
||||
All array values calculated by this compute are "intensive".
|
||||
All array values calculated by this compute are "intensive."
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
@ -237,7 +238,7 @@ Related commands
|
||||
Default
|
||||
"""""""
|
||||
|
||||
The option defaults are 2Theta = 1 179 (degrees), c = 1 1 1, LP = 1,
|
||||
The option defaults are *2Theta* = 1 179 (degrees), *c* = 1 1 1, *LP* = 1,
|
||||
no manual flag, no echo flag.
|
||||
|
||||
----------
|
||||
|
||||
Reference in New Issue
Block a user