forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@325 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
2dabff1657
commit
3dc0d9bf44
|
@ -0,0 +1,61 @@
|
|||
<HTML>
|
||||
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>compute variable/atom command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>compute ID group-ID variable/atom name
|
||||
</PRE>
|
||||
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
|
||||
<LI>variable/atom = style name of this compute command
|
||||
<LI>name = variable name to invoke for each atom
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>compute 1 flow variable/atom myVar
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Define a computation that calculates a formula for each atom in the
|
||||
group. The per-atom quantities can be output via the <A HREF = "dump.html">dump
|
||||
custom</A> command or spatially averaged via the <A HREF = "fix_ave_spatial.html">fix
|
||||
ave/spatial</A> command.
|
||||
</P>
|
||||
<P>The formula is defined by the <A HREF = "variable.html">variable atom</A> command.
|
||||
A variable of style <I>atom</I> can access properties of the system, such
|
||||
as volume or temperature, and also reference individual atom
|
||||
attributes, such as its coordinates or velocity.
|
||||
</P>
|
||||
<P>For example, these 3 commands would compute the xy kinectic energy of
|
||||
atoms in the flow group and include the values in dumped snapshots of
|
||||
the system.
|
||||
</P>
|
||||
<PRE>variable xy atom mult(0.5,add(mult(vx[],vx[]),mult(vy[],vy[])))
|
||||
compute ke flow variable/atom xy
|
||||
dump 1 flow custom 1000 dump.flow tag type x y z c_ke
|
||||
</PRE>
|
||||
<P>If the dump line were replaced by
|
||||
</P>
|
||||
<PRE>fix 1 flow ave/spatial 100 1000 z lower 2.0 ke.profile compute ke
|
||||
</PRE>
|
||||
<P>then the xy kinetic energy values would be averaged by z layer and the
|
||||
layer averages written periodically to the file ke.profile.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "dump.html">dump custom</A>, <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
</HTML>
|
|
@ -0,0 +1,56 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
compute variable/atom command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID variable/atom name :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command
|
||||
variable/atom = style name of this compute command
|
||||
name = variable name to invoke for each atom :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
compute 1 flow variable/atom myVar :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Define a computation that calculates a formula for each atom in the
|
||||
group. The per-atom quantities can be output via the "dump
|
||||
custom"_dump.html command or spatially averaged via the "fix
|
||||
ave/spatial"_fix_ave_spatial.html command.
|
||||
|
||||
The formula is defined by the "variable atom"_variable.html command.
|
||||
A variable of style {atom} can access properties of the system, such
|
||||
as volume or temperature, and also reference individual atom
|
||||
attributes, such as its coordinates or velocity.
|
||||
|
||||
For example, these 3 commands would compute the xy kinectic energy of
|
||||
atoms in the flow group and include the values in dumped snapshots of
|
||||
the system.
|
||||
|
||||
variable xy atom mult(0.5,add(mult(vx\[\],vx\[\]),mult(vy\[\],vy\[\])))
|
||||
compute ke flow variable/atom xy
|
||||
dump 1 flow custom 1000 dump.flow tag type x y z c_ke :pre
|
||||
|
||||
If the dump line were replaced by
|
||||
|
||||
fix 1 flow ave/spatial 100 1000 z lower 2.0 ke.profile compute ke :pre
|
||||
|
||||
then the xy kinetic energy values would be averaged by z layer and the
|
||||
layer averages written periodically to the file ke.profile.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"dump custom"_dump.html, "fix ave/spatial"_fix_ave_spatial.html
|
||||
|
||||
[Default:] none
|
|
@ -0,0 +1,120 @@
|
|||
<HTML>
|
||||
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>fix ave/spatial command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>fix ID group-ID ave/spatial Nevery Nfreq dim origin delta file keyword value ...
|
||||
</PRE>
|
||||
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
||||
<LI>ave/spatial = style name of this fix command
|
||||
<LI>Nevery = calculate property every this many timesteps
|
||||
<LI>Nfreq = write average property to file every this many steps
|
||||
<LI>dim = <I>x</I> or <I>y</I> or <I>z</I>
|
||||
<LI>origin = <I>lower</I> or <I>center</I> or <I>upper</I> or coordinate value
|
||||
<LI>delta = thickness of spatial layers in dim
|
||||
<LI>file = filename to write results to
|
||||
<LI>keyword = <I>density</I> or <I>atom</I> or <I>compute</I>
|
||||
</UL>
|
||||
<PRE> <I>density</I> value = none
|
||||
<I>atom</I> value = <I>vx</I> or <I>vy</I> or <I>vz</I> or <I>fx</I> or <I>fy</I> or <I>fz</I>
|
||||
<I>compute value</I> = compute-ID that calculates per-atom quantities
|
||||
</PRE>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>fix 1 all ave/time 10000 10000 z lower 2.0 centro.profile compute myCentro
|
||||
fix 1 flow ave/time 100 1000 y 0.0 1.0 vel.profile atom vx
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Calculate one or more instantaneous per-atom quantities every few
|
||||
timesteps, average them by layer in a chosen dimension and over a
|
||||
longer timescale, and print the results to a file. This can be used
|
||||
to spatially average per-atom properties such as velocity or energy or
|
||||
a quantity calculated by an equation you define; see the <A HREF = "variable.html">variable
|
||||
atom</A> command.
|
||||
</P>
|
||||
<P>The <I>density</I> keyword means to simply count the number of atoms in
|
||||
each layer. The <I>atom</I> keyword allows an atom property such as
|
||||
x-velocity to be specified. The <I>compute</I> keyword allows
|
||||
specification of a <A HREF = "compute.html">compute</A> which will be invoked to
|
||||
calculate the desired property. The compute can be previously defined
|
||||
in the input script. Note that the "compute variable/atom" style
|
||||
allows you to calculate any quantity for an atom that can be specified
|
||||
by a <A HREF = "variable.html">variable atom</A> equation. Users can also write
|
||||
code for their own compute styles and <A HREF = "Section_modify.html">add them to
|
||||
LAMMPS</A>. Note that the <A HREF = "dump.html">dump custom</A>
|
||||
command can also be used to output per-atom quantities calculated by a
|
||||
compute.
|
||||
</P>
|
||||
<P>For the <I>compute</I> keyword, the fix ave/spatial style uses the per-atom
|
||||
scalar or vector calculated by the compute. See the <A HREF = "fix_ave_time.html">fix
|
||||
ave/time</A> command if you wish to time-average a
|
||||
global quantity, e.g. via a compute that temperature or pressure.
|
||||
</P>
|
||||
<P>In all cases, the calculated property is averaged over atoms in each
|
||||
layer, where the layers are in a particular <I>dim</I> and have a thickness
|
||||
given by <I>delta</I>. Every Nfreq steps, when a property is calculated
|
||||
for the first time (after a previous write), the number of layers and
|
||||
the layer boundaries are computed. Thus if the simlation box changes
|
||||
size during a simulation, the number of layers and their boundaries
|
||||
may also change. Layers are defined relative to a specified <I>origin</I>,
|
||||
which may be the lower/upper edge of the box (in <I>dim</I>) or its center
|
||||
point, or a specified coordinate value. Starting at the origin,
|
||||
sufficient layers are created in both directions to completely cover
|
||||
the box. On subsequent timesteps every atom is mapped to one of the
|
||||
layers. Atoms beyond the lowermost/uppermost layer are counted in the
|
||||
first/last layer.
|
||||
</P>
|
||||
<P>The <I>Nevery</I> and <I>Nfreq</I> arguments specify how the property calculated
|
||||
for each layer is time-averaged. The property is calculated once each
|
||||
Nevery timesteps. It is averaged and output every Nfreq timesteps.
|
||||
Nfreq must be a multiple of Nevery. In the 2nd example above, the
|
||||
property is calculated every 100 steps. After 10 calculations, the
|
||||
average result is written to the file, once every 1000 steps.
|
||||
</P>
|
||||
<P>Each time info is written to the file, it is in the following format.
|
||||
A line with the timestep and number of layers is written. Then one
|
||||
line per layer is written, containing the layer ID (1-N), the
|
||||
coordinate of the center of the layer, the number of atoms in the
|
||||
layer, and one or more calculated values. The number of atoms and the
|
||||
value(s) are average quantities.
|
||||
</P>
|
||||
<P>If the <I>density</I> or <I>atom</I> keyword is used, or the <I>compute</I> keyword
|
||||
with a compute that calculates a single quantity per atom, then a
|
||||
single value will be printed for each layer. If the <I>compute</I> keyword
|
||||
is used with a compute that calculates N quantities per atom, then N
|
||||
values per line will be written, each of them averaged independently.
|
||||
</P>
|
||||
<P>Note that for the <I>density</I> keyword, the printed count of atoms in the
|
||||
layer is actually what you should use to infer a density. The
|
||||
calculated value is always 1.0, since it is normalized by the number
|
||||
of atoms in the layer.
|
||||
</P>
|
||||
<P>For the <I>compute</I> keyword, the calculation performed by the compute in
|
||||
on the group defined by the compute. However, only atoms in the fix
|
||||
group are included in the layer averaging. LAMMPS prints a warning if
|
||||
the fix group and compute group do not match.
|
||||
</P>
|
||||
<P>Note that some computes perform costly calculations, involving use of
|
||||
or creation of neighbor lists. If the compute is invoked too often by
|
||||
fix ave/spatial, it can slow down a simulation.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "compute.html">compute</A>, <A HREF = "fix_ave_time.html">fix ave/time</A>
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
</HTML>
|
|
@ -0,0 +1,114 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix ave/spatial command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID ave/spatial Nevery Nfreq dim origin delta file keyword value ... :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command
|
||||
ave/spatial = style name of this fix command
|
||||
Nevery = calculate property every this many timesteps
|
||||
Nfreq = write average property to file every this many steps
|
||||
dim = {x} or {y} or {z}
|
||||
origin = {lower} or {center} or {upper} or coordinate value
|
||||
delta = thickness of spatial layers in dim
|
||||
file = filename to write results to
|
||||
keyword = {density} or {atom} or {compute} :ul
|
||||
{density} value = none
|
||||
{atom} value = {vx} or {vy} or {vz} or {fx} or {fy} or {fz}
|
||||
{compute value} = compute-ID that calculates per-atom quantities :pre
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all ave/time 10000 10000 z lower 2.0 centro.profile compute myCentro
|
||||
fix 1 flow ave/time 100 1000 y 0.0 1.0 vel.profile atom vx :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Calculate one or more instantaneous per-atom quantities every few
|
||||
timesteps, average them by layer in a chosen dimension and over a
|
||||
longer timescale, and print the results to a file. This can be used
|
||||
to spatially average per-atom properties such as velocity or energy or
|
||||
a quantity calculated by an equation you define; see the "variable
|
||||
atom"_variable.html command.
|
||||
|
||||
The {density} keyword means to simply count the number of atoms in
|
||||
each layer. The {atom} keyword allows an atom property such as
|
||||
x-velocity to be specified. The {compute} keyword allows
|
||||
specification of a "compute"_compute.html which will be invoked to
|
||||
calculate the desired property. The compute can be previously defined
|
||||
in the input script. Note that the "compute variable/atom" style
|
||||
allows you to calculate any quantity for an atom that can be specified
|
||||
by a "variable atom"_variable.html equation. Users can also write
|
||||
code for their own compute styles and "add them to
|
||||
LAMMPS"_Section_modify.html. Note that the "dump custom"_dump.html
|
||||
command can also be used to output per-atom quantities calculated by a
|
||||
compute.
|
||||
|
||||
For the {compute} keyword, the fix ave/spatial style uses the per-atom
|
||||
scalar or vector calculated by the compute. See the "fix
|
||||
ave/time"_fix_ave_time.html command if you wish to time-average a
|
||||
global quantity, e.g. via a compute that temperature or pressure.
|
||||
|
||||
In all cases, the calculated property is averaged over atoms in each
|
||||
layer, where the layers are in a particular {dim} and have a thickness
|
||||
given by {delta}. Every Nfreq steps, when a property is calculated
|
||||
for the first time (after a previous write), the number of layers and
|
||||
the layer boundaries are computed. Thus if the simlation box changes
|
||||
size during a simulation, the number of layers and their boundaries
|
||||
may also change. Layers are defined relative to a specified {origin},
|
||||
which may be the lower/upper edge of the box (in {dim}) or its center
|
||||
point, or a specified coordinate value. Starting at the origin,
|
||||
sufficient layers are created in both directions to completely cover
|
||||
the box. On subsequent timesteps every atom is mapped to one of the
|
||||
layers. Atoms beyond the lowermost/uppermost layer are counted in the
|
||||
first/last layer.
|
||||
|
||||
The {Nevery} and {Nfreq} arguments specify how the property calculated
|
||||
for each layer is time-averaged. The property is calculated once each
|
||||
Nevery timesteps. It is averaged and output every Nfreq timesteps.
|
||||
Nfreq must be a multiple of Nevery. In the 2nd example above, the
|
||||
property is calculated every 100 steps. After 10 calculations, the
|
||||
average result is written to the file, once every 1000 steps.
|
||||
|
||||
Each time info is written to the file, it is in the following format.
|
||||
A line with the timestep and number of layers is written. Then one
|
||||
line per layer is written, containing the layer ID (1-N), the
|
||||
coordinate of the center of the layer, the number of atoms in the
|
||||
layer, and one or more calculated values. The number of atoms and the
|
||||
value(s) are average quantities.
|
||||
|
||||
If the {density} or {atom} keyword is used, or the {compute} keyword
|
||||
with a compute that calculates a single quantity per atom, then a
|
||||
single value will be printed for each layer. If the {compute} keyword
|
||||
is used with a compute that calculates N quantities per atom, then N
|
||||
values per line will be written, each of them averaged independently.
|
||||
|
||||
Note that for the {density} keyword, the printed count of atoms in the
|
||||
layer is actually what you should use to infer a density. The
|
||||
calculated value is always 1.0, since it is normalized by the number
|
||||
of atoms in the layer.
|
||||
|
||||
For the {compute} keyword, the calculation performed by the compute in
|
||||
on the group defined by the compute. However, only atoms in the fix
|
||||
group are included in the layer averaging. LAMMPS prints a warning if
|
||||
the fix group and compute group do not match.
|
||||
|
||||
Note that some computes perform costly calculations, involving use of
|
||||
or creation of neighbor lists. If the compute is invoked too often by
|
||||
fix ave/spatial, it can slow down a simulation.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"compute"_compute.html, "fix ave/time"_fix_ave_time.html
|
||||
|
||||
[Default:] none
|
|
@ -0,0 +1,85 @@
|
|||
<HTML>
|
||||
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>fix ave/time command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>fix ID group-ID ave/time Nevery Nfreq compute-ID flag file
|
||||
</PRE>
|
||||
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
||||
<LI>ave/time = style name of this fix command
|
||||
<LI>Nevery = calculate property every this many timesteps
|
||||
<LI>Nfreq = write average property to file every this many steps
|
||||
<LI>compute-ID = ID of compute that performs the calculation
|
||||
<LI>flag = 0 for scalar quantity, 1 for vector quantity, 2 for both
|
||||
<LI>file = filename to write results to
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>fix 1 all ave/time 100 1000 myTemp 0 temp.stats
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>Calculate one or more instantaneous quantities every few timesteps,
|
||||
average them over a longer timescale, and print the results to a file.
|
||||
This can be used to time-average any "compute" entity in LAMMPS such
|
||||
as a temperature or pressure.
|
||||
</P>
|
||||
<P>The <I>compute-ID</I> specifies a <A HREF = "compute.html">compute</A> which calculates
|
||||
the desired property. The compute can be previously defined in the
|
||||
input script. Or it can be a compute defined by <A HREF = "thermo_style.html">thermodynamic
|
||||
output</A> or other fixes such as <A HREF = "fix_nvt.html">fix
|
||||
nvt</A> or <A HREF = "fix_temp_rescale.html">fix temp/rescale</A>. Users
|
||||
can also write code for their own compute styles and <A HREF = "Section_modify.html">add them to
|
||||
LAMMPS</A>.
|
||||
</P>
|
||||
<P>In all these cases, the fix ave/time style uses the global scalar or
|
||||
vector calculated by the compute. See the <A HREF = "fix_ave_spatial.html">fix
|
||||
ave/spatial</A> command if you wish to average
|
||||
spatially, e.g. via a compute that calculates per-atom quantities.
|
||||
</P>
|
||||
<P>The <I>Nevery</I> and <I>Nfreq</I> arguments specify how the property will be
|
||||
averaged. The property is calculated once each Nevery timesteps. It
|
||||
is averaged and output every Nfreq timesteps. Nfreq must be a
|
||||
multiple of Nevery. In the example above, the property is calculated
|
||||
every 100 steps. After 10 calculations, the average result is written
|
||||
to the file, once every 1000 steps.
|
||||
</P>
|
||||
<P>The <I>flag</I> argument chooses whether the scalar and/or vector
|
||||
calculation of the compute is invoked. The former computes a single
|
||||
global value. The latter computes N global values, where N is defined
|
||||
by the compute, e.g. 6 pressure tensor components. In the vector
|
||||
case, each of the N values is averaged independently and N values are
|
||||
written to the file at each output.
|
||||
</P>
|
||||
<P>Since the calculation is performed by the compute which stores its own
|
||||
"group" definition, the group specified for the fix is ignored.
|
||||
LAMMPS prints a warning if the fix group and compute group do not
|
||||
match.
|
||||
</P>
|
||||
<P>If the compute calculates pressure, it will cause the force
|
||||
computations performed by LAMMPS (pair, bond, angle, etc) to calculate
|
||||
virial terms each Nevery timesteps. If this is more frequent than
|
||||
thermodynamic output, this adds extra cost to a simulation. However,
|
||||
if a constant pressure simulation is being run (<A HREF = "fix_npt.html">fix npt</A>
|
||||
or <A HREF = "fix_nph.html">fix nph</A>), LAMMPS is already calculating virial terms
|
||||
for the pressure every timestep.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "compute.html">compute</A>, <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
</HTML>
|
|
@ -0,0 +1,80 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix ave/time command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID ave/time Nevery Nfreq compute-ID flag file :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command
|
||||
ave/time = style name of this fix command
|
||||
Nevery = calculate property every this many timesteps
|
||||
Nfreq = write average property to file every this many steps
|
||||
compute-ID = ID of compute that performs the calculation
|
||||
flag = 0 for scalar quantity, 1 for vector quantity, 2 for both
|
||||
file = filename to write results to :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all ave/time 100 1000 myTemp 0 temp.stats :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Calculate one or more instantaneous quantities every few timesteps,
|
||||
average them over a longer timescale, and print the results to a file.
|
||||
This can be used to time-average any "compute" entity in LAMMPS such
|
||||
as a temperature or pressure.
|
||||
|
||||
The {compute-ID} specifies a "compute"_compute.html which calculates
|
||||
the desired property. The compute can be previously defined in the
|
||||
input script. Or it can be a compute defined by "thermodynamic
|
||||
output"_thermo_style.html or other fixes such as "fix
|
||||
nvt"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html. Users
|
||||
can also write code for their own compute styles and "add them to
|
||||
LAMMPS"_Section_modify.html.
|
||||
|
||||
In all these cases, the fix ave/time style uses the global scalar or
|
||||
vector calculated by the compute. See the "fix
|
||||
ave/spatial"_fix_ave_spatial.html command if you wish to average
|
||||
spatially, e.g. via a compute that calculates per-atom quantities.
|
||||
|
||||
The {Nevery} and {Nfreq} arguments specify how the property will be
|
||||
averaged. The property is calculated once each Nevery timesteps. It
|
||||
is averaged and output every Nfreq timesteps. Nfreq must be a
|
||||
multiple of Nevery. In the example above, the property is calculated
|
||||
every 100 steps. After 10 calculations, the average result is written
|
||||
to the file, once every 1000 steps.
|
||||
|
||||
The {flag} argument chooses whether the scalar and/or vector
|
||||
calculation of the compute is invoked. The former computes a single
|
||||
global value. The latter computes N global values, where N is defined
|
||||
by the compute, e.g. 6 pressure tensor components. In the vector
|
||||
case, each of the N values is averaged independently and N values are
|
||||
written to the file at each output.
|
||||
|
||||
Since the calculation is performed by the compute which stores its own
|
||||
"group" definition, the group specified for the fix is ignored.
|
||||
LAMMPS prints a warning if the fix group and compute group do not
|
||||
match.
|
||||
|
||||
If the compute calculates pressure, it will cause the force
|
||||
computations performed by LAMMPS (pair, bond, angle, etc) to calculate
|
||||
virial terms each Nevery timesteps. If this is more frequent than
|
||||
thermodynamic output, this adds extra cost to a simulation. However,
|
||||
if a constant pressure simulation is being run ("fix npt"_fix_npt.html
|
||||
or "fix nph"_fix_nph.html), LAMMPS is already calculating virial terms
|
||||
for the pressure every timestep.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"compute"_compute.html, "fix ave/spatial"_fix_ave_spatial.html
|
||||
|
||||
[Default:] none
|
Loading…
Reference in New Issue