forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3526 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
d654bb622e
commit
113ca39027
|
@ -1068,14 +1068,17 @@ files: <A HREF = "fix_ave_time.html">fix ave/time</A>, <A HREF = "fix_ave_spatia
|
|||
ave/spatial</A>, and <A HREF = "fix_print.html">fix print</A>.
|
||||
</P>
|
||||
<P>The <A HREF = "fix_ave_time.html">fix ave/time</A> command enables direct output to
|
||||
a file and/or time-averaging of any global quantity. The user
|
||||
a file and/or time-averaging of global scalars or vectors. The user
|
||||
specifies one or more quantities as input. These can be global
|
||||
<A HREF = "compute.html">compute</A> values, global <A HREF = "fix.html">fix</A> values, or
|
||||
<A HREF = "variable.html">variables</A> of any style except the atom style which
|
||||
produces per-atom values. Since a variable can refer to keywords used
|
||||
by the <A HREF = "thermo_style.html">thermo_style custom</A> command (like temp or
|
||||
press) and individual per-atom values, a wide variety of quantities
|
||||
can be time averaged and/or output in this way. The time-averaged
|
||||
can be time averaged and/or output in this way. If the inputs are one
|
||||
or more scalar values, then the fix generate a global scalar or vector
|
||||
of output. If the inputs are one or more vector values, then the fix
|
||||
generates a global vector or array of output. The time-averaged
|
||||
output of this fix can also be used as input to other output commands.
|
||||
</P>
|
||||
<P>The <A HREF = "fix_ave_spatial.html">fix ave/spatial</A> command enables direct
|
||||
|
@ -1161,7 +1164,7 @@ vector input could be a column of an array.
|
|||
<TR><TD ><A HREF = "fix.html">fixes</A></TD><TD > N/A</TD><TD > global/per-atom/local scalar/vector/array</TD><TD ></TD></TR>
|
||||
<TR><TD ><A HREF = "variable.html">variables</A></TD><TD > global scalars, per-atom vectors</TD><TD > global scalar, per-atom vector</TD><TD ></TD></TR>
|
||||
<TR><TD ><A HREF = "compute_reduce.html">compute reduce</A></TD><TD > global/per-atom/local vectors</TD><TD > global scalar/vector</TD><TD ></TD></TR>
|
||||
<TR><TD ><A HREF = "fix_ave_time.html">fix ave/time</A></TD><TD > global scalars</TD><TD > global scalar/vector, file</TD><TD ></TD></TR>
|
||||
<TR><TD ><A HREF = "fix_ave_time.html">fix ave/time</A></TD><TD > global scalars/vectors</TD><TD > global scalar/vector/array, file</TD><TD ></TD></TR>
|
||||
<TR><TD ><A HREF = "fix_ave_spatial.html">fix ave/spatial</A></TD><TD > per-atom vectors</TD><TD > global array, file</TD><TD ></TD></TR>
|
||||
<TR><TD ><A HREF = "fix_ave_atom.html">fix ave/atom</A></TD><TD > per-atom vectors</TD><TD > per-atom vector/array</TD><TD ></TD></TR>
|
||||
<TR><TD >
|
||||
|
|
|
@ -1059,14 +1059,17 @@ files: "fix ave/time"_fix_ave_time.html, "fix
|
|||
ave/spatial"_fix_ave_spatial.html, and "fix print"_fix_print.html.
|
||||
|
||||
The "fix ave/time"_fix_ave_time.html command enables direct output to
|
||||
a file and/or time-averaging of any global quantity. The user
|
||||
a file and/or time-averaging of global scalars or vectors. The user
|
||||
specifies one or more quantities as input. These can be global
|
||||
"compute"_compute.html values, global "fix"_fix.html values, or
|
||||
"variables"_variable.html of any style except the atom style which
|
||||
produces per-atom values. Since a variable can refer to keywords used
|
||||
by the "thermo_style custom"_thermo_style.html command (like temp or
|
||||
press) and individual per-atom values, a wide variety of quantities
|
||||
can be time averaged and/or output in this way. The time-averaged
|
||||
can be time averaged and/or output in this way. If the inputs are one
|
||||
or more scalar values, then the fix generate a global scalar or vector
|
||||
of output. If the inputs are one or more vector values, then the fix
|
||||
generates a global vector or array of output. The time-averaged
|
||||
output of this fix can also be used as input to other output commands.
|
||||
|
||||
The "fix ave/spatial"_fix_ave_spatial.html command enables direct
|
||||
|
@ -1151,7 +1154,7 @@ Command: Input: Output:
|
|||
"fixes"_fix.html: N/A: global/per-atom/local scalar/vector/array:
|
||||
"variables"_variable.html: global scalars, per-atom vectors: global scalar, per-atom vector:
|
||||
"compute reduce"_compute_reduce.html: global/per-atom/local vectors: global scalar/vector:
|
||||
"fix ave/time"_fix_ave_time.html: global scalars: global scalar/vector, file:
|
||||
"fix ave/time"_fix_ave_time.html: global scalars/vectors: global scalar/vector/array, file:
|
||||
"fix ave/spatial"_fix_ave_spatial.html: per-atom vectors: global array, file:
|
||||
"fix ave/atom"_fix_ave_atom.html: per-atom vectors: per-atom vector/array:
|
||||
:tb(s=:)
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<I>title2</I> arg = string
|
||||
string = text to print as 2nd line of output file = timestep, # of layers
|
||||
<I>title3</I> arg = string
|
||||
string = text to print as 3rd line of output file = values
|
||||
string = text to print as 3rd line of output file = column headings for values
|
||||
</PRE>
|
||||
|
||||
</UL>
|
||||
|
@ -224,19 +224,6 @@ computed, i.e. Sample-quantity / Sample-count. The printed value for
|
|||
the layer is the average of the <I>Nrepeat</I> "average sample values", In
|
||||
other words it is an average of an average.
|
||||
</P>
|
||||
<P>The <I>file</I> keyword allows a filename to be specified. Every <I>Nfreq</I>
|
||||
timesteps, layer info will be written to a text file 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 values in
|
||||
each line corresponds to the number of values specified in the fix
|
||||
ave/spatial command. The number of atoms and the value(s) are average
|
||||
quantities. If the value of the <I>units</I> keyword is <I>box</I> or
|
||||
<I>lattice</I>, the "coord" is printed in box units. If the value of the
|
||||
<I>units</I> keyword is <I>reduced</I>, the "coord" is printed in reduced units
|
||||
(0-1).
|
||||
</P>
|
||||
<P>The <I>ave</I> keyword determines how the layer values produced every
|
||||
<I>Nfreq</I> steps are averaged with layer values produced on previous
|
||||
steps that were multiples of <I>Nfreq</I>, before they are accessed by
|
||||
|
@ -263,23 +250,34 @@ then the output on step 10000 will be the average of the individual
|
|||
layer values on steps 8000,9000,10000. Outputs on early steps will
|
||||
average over less than M values if they are not available.
|
||||
</P>
|
||||
<P>The <I>file</I> keyword allows a filename to be specified. Every <I>Nfreq</I>
|
||||
timesteps, a section of layer info will be written to a text file 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
|
||||
values in each line corresponds to the number of values specified in
|
||||
the fix ave/spatial command. The number of atoms and the value(s) are
|
||||
average quantities. If the value of the <I>units</I> keyword is <I>box</I> or
|
||||
<I>lattice</I>, the "coord" is printed in box units. If the value of the
|
||||
<I>units</I> keyword is <I>reduced</I>, the "coord" is printed in reduced units
|
||||
(0-1).
|
||||
</P>
|
||||
<P>The <I>title1</I> and <I>title2</I> and <I>title3</I> keywords allow specification of
|
||||
the strings that will be printed as the first 3 lines of the output
|
||||
file, assuming the <I>file</I> keyword was used. LAMMPS uses default
|
||||
values for each of these, so they do not need to be specified. By
|
||||
default, theses lines are as follows:
|
||||
values for each of these, so they do not need to be specified.
|
||||
</P>
|
||||
<P>By default, these header lines are as follows:
|
||||
</P>
|
||||
<PRE># Spatial-averaged data for fix ID and group name
|
||||
# Timestep Number-of-layers
|
||||
# Layer Coord Ncount value1 value2 ...
|
||||
</PRE>
|
||||
<P>In the first line, ID and name are replaced with the fix-ID and group
|
||||
name. In the last line the values are replaced with the appropriate
|
||||
fields from the fix ave/spatial command. Note the first line is
|
||||
essentially a title for the file. The second line describes the
|
||||
header line that appears at the first of each section of output. The
|
||||
third line describes the columns of each layer line within a section
|
||||
of output.
|
||||
name. The second line describes the two values that are printed at
|
||||
the first of each section of output. In the third line the values are
|
||||
replaced with the appropriate fields from the fix ave/spatial command.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
|
@ -292,12 +290,12 @@ are relevant to this fix.
|
|||
<P>This fix computes a global array of values which can be accessed by
|
||||
various <A HREF = "Section_howto.html#4_15">output commands</A>. The values can
|
||||
only be accessed on timesteps that are multiples of <I>Nfreq</I> since that
|
||||
is when averaging is performed. The global array has Nlayers rows and
|
||||
Nvalues+2 columns. The first column has the layer coordinate, the 2nd
|
||||
column has the count of atoms in that layer, and the remaining columns
|
||||
are the Nvalue quantities. When the array is accessed with an I that
|
||||
exceeds the current number of layers, than a 0.0 is returned by the
|
||||
fix instead of an error, since the number of layers can vary as a
|
||||
is when averaging is performed. The global array has rows = Nlayers
|
||||
and columns = Nvalues+2. The first column has the layer coordinate,
|
||||
the 2nd column has the count of atoms in that layer, and the remaining
|
||||
columns are the Nvalue quantities. When the array is accessed with an
|
||||
I that exceeds the current number of layers, than a 0.0 is returned by
|
||||
the fix instead of an error, since the number of layers can vary as a
|
||||
simulation runs, depending on the simulation box size. The array
|
||||
values calculated by this fix are "intensive", meaning they are
|
||||
independent of the number of atoms in the simulation, since they are
|
||||
|
|
|
@ -45,7 +45,7 @@ keyword = {norm} or {units} or {file} or {ave} or {title1} or {title2} or {title
|
|||
{title2} arg = string
|
||||
string = text to print as 2nd line of output file = timestep, # of layers
|
||||
{title3} arg = string
|
||||
string = text to print as 3rd line of output file = values :pre
|
||||
string = text to print as 3rd line of output file = column headings for values :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
@ -208,19 +208,6 @@ computed, i.e. Sample-quantity / Sample-count. The printed value for
|
|||
the layer is the average of the {Nrepeat} "average sample values", In
|
||||
other words it is an average of an average.
|
||||
|
||||
The {file} keyword allows a filename to be specified. Every {Nfreq}
|
||||
timesteps, layer info will be written to a text file 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 values in
|
||||
each line corresponds to the number of values specified in the fix
|
||||
ave/spatial command. The number of atoms and the value(s) are average
|
||||
quantities. If the value of the {units} keyword is {box} or
|
||||
{lattice}, the "coord" is printed in box units. If the value of the
|
||||
{units} keyword is {reduced}, the "coord" is printed in reduced units
|
||||
(0-1).
|
||||
|
||||
The {ave} keyword determines how the layer values produced every
|
||||
{Nfreq} steps are averaged with layer values produced on previous
|
||||
steps that were multiples of {Nfreq}, before they are accessed by
|
||||
|
@ -247,23 +234,34 @@ then the output on step 10000 will be the average of the individual
|
|||
layer values on steps 8000,9000,10000. Outputs on early steps will
|
||||
average over less than M values if they are not available.
|
||||
|
||||
The {file} keyword allows a filename to be specified. Every {Nfreq}
|
||||
timesteps, a section of layer info will be written to a text file 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
|
||||
values in each line corresponds to the number of values specified in
|
||||
the fix ave/spatial command. The number of atoms and the value(s) are
|
||||
average quantities. If the value of the {units} keyword is {box} or
|
||||
{lattice}, the "coord" is printed in box units. If the value of the
|
||||
{units} keyword is {reduced}, the "coord" is printed in reduced units
|
||||
(0-1).
|
||||
|
||||
The {title1} and {title2} and {title3} keywords allow specification of
|
||||
the strings that will be printed as the first 3 lines of the output
|
||||
file, assuming the {file} keyword was used. LAMMPS uses default
|
||||
values for each of these, so they do not need to be specified. By
|
||||
default, theses lines are as follows:
|
||||
values for each of these, so they do not need to be specified.
|
||||
|
||||
By default, these header lines are as follows:
|
||||
|
||||
# Spatial-averaged data for fix ID and group name
|
||||
# Timestep Number-of-layers
|
||||
# Layer Coord Ncount value1 value2 ... :pre
|
||||
|
||||
In the first line, ID and name are replaced with the fix-ID and group
|
||||
name. In the last line the values are replaced with the appropriate
|
||||
fields from the fix ave/spatial command. Note the first line is
|
||||
essentially a title for the file. The second line describes the
|
||||
header line that appears at the first of each section of output. The
|
||||
third line describes the columns of each layer line within a section
|
||||
of output.
|
||||
name. The second line describes the two values that are printed at
|
||||
the first of each section of output. In the third line the values are
|
||||
replaced with the appropriate fields from the fix ave/spatial command.
|
||||
|
||||
:line
|
||||
|
||||
|
@ -276,12 +274,12 @@ are relevant to this fix.
|
|||
This fix computes a global array of values which can be accessed by
|
||||
various "output commands"_Section_howto.html#4_15. The values can
|
||||
only be accessed on timesteps that are multiples of {Nfreq} since that
|
||||
is when averaging is performed. The global array has Nlayers rows and
|
||||
Nvalues+2 columns. The first column has the layer coordinate, the 2nd
|
||||
column has the count of atoms in that layer, and the remaining columns
|
||||
are the Nvalue quantities. When the array is accessed with an I that
|
||||
exceeds the current number of layers, than a 0.0 is returned by the
|
||||
fix instead of an error, since the number of layers can vary as a
|
||||
is when averaging is performed. The global array has rows = Nlayers
|
||||
and columns = Nvalues+2. The first column has the layer coordinate,
|
||||
the 2nd column has the count of atoms in that layer, and the remaining
|
||||
columns are the Nvalue quantities. When the array is accessed with an
|
||||
I that exceeds the current number of layers, than a 0.0 is returned by
|
||||
the fix instead of an error, since the number of layers can vary as a
|
||||
simulation runs, depending on the simulation box size. The array
|
||||
values calculated by this fix are "intensive", meaning they are
|
||||
independent of the number of atoms in the simulation, since they are
|
||||
|
@ -307,4 +305,3 @@ simulation box size doesn't change or if the {units} keyword is set to
|
|||
|
||||
The option defaults are units = lattice, norm = all, no file output,
|
||||
and ave = one, title 1,2,3 = strings as described above.
|
||||
|
||||
|
|
|
@ -29,17 +29,20 @@
|
|||
|
||||
<LI>value = c_ID, c_ID[N], f_ID, f_ID[N], v_name
|
||||
|
||||
<PRE> c_ID = global scalar value calculated by a compute with ID
|
||||
c_ID[N] = Nth component of global vector calculated by a compute with ID
|
||||
f_ID = global scalar value calculated by a fix with ID
|
||||
f_ID[N] = Nth component of global vector calculated by a fix with ID
|
||||
<PRE> c_ID = global scalar or vector calculated by a compute with ID
|
||||
c_ID[I] = Ith component of global vector or Ith column of global array calculated by a compute with ID
|
||||
f_ID = global scalar or vector calculated by a fix with ID
|
||||
f_ID[I] = Ith component of global vector or Ith column of global array calculated by a fix with ID
|
||||
v_name = global value calculated by an equal-style variable with name
|
||||
</PRE>
|
||||
<LI>zero or more keyword/arg pairs may be appended
|
||||
|
||||
<LI>keyword = <I>file</I> or <I>ave</I> or <I>start</I>
|
||||
<LI>keyword = <I>mode</I> or <I>file</I> or <I>ave</I> or <I>start</I> or <I>off</I> or <I>title1</I> or <I>title2</I> or <I>title3</I>
|
||||
|
||||
<PRE> <I>file</I> arg = filename
|
||||
<PRE> <I>mode</I> arg = <I>scalar</I> or <I>vector</I>
|
||||
scalar = all input values are global scalars
|
||||
vector = all input values are global vectors
|
||||
<I>file</I> arg = filename
|
||||
filename = name of file to output time averages to
|
||||
<I>ave</I> args = <I>one</I> or <I>running</I> or <I>window M</I>
|
||||
one = output a new average value every Nfreq steps
|
||||
|
@ -47,14 +50,23 @@
|
|||
window M = output average of M most recent Nfreq steps
|
||||
<I>start</I> args = Nstart
|
||||
Nstart = start averaging on this timestep
|
||||
<I>off</I> arg = M = do not average this value
|
||||
M = value # from 1 to Nvalues
|
||||
<I>title1</I> arg = string
|
||||
string = text to print as 1st line of output file = title
|
||||
<I>title2</I> arg = string
|
||||
string = text to print as 2nd line of output file
|
||||
<I>title3</I> arg = string
|
||||
string = text to print as 3rd line of output file, only for vector mode
|
||||
</PRE>
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>fix 1 all ave/time 100 5 1000 c_myTemp c_thermo_temp file temp.profile
|
||||
fix 1 all ave/time 100 5 1000 c_thermo_press[2] ave window 20
|
||||
fix 1 all ave/time 1 100 1000 f_indent f_indent[1] file temp.indent
|
||||
fix 1 all ave/time 100 5 1000 c_thermo_press[2] ave window 20 &
|
||||
title1 "My output values"
|
||||
fix 1 all ave/time 1 100 1000 f_indent f_indent[1] file temp.indent off 1
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
|
@ -62,14 +74,13 @@ fix 1 all ave/time 1 100 1000 f_indent f_indent[1] file temp.indent
|
|||
timesteps, and average them over longer timescales. The resulting
|
||||
averages can be used by other <A HREF = "Section_howto.html#4_15">output
|
||||
commands</A> such as <A HREF = "thermo_style.html">thermo_style
|
||||
custom</A>, and can also be written to a file. If no
|
||||
averaging is done, this command is a convenient way to simply write
|
||||
one or more desired quantities to a separate file.
|
||||
custom</A>, and can also be written to a file. Note
|
||||
that if no time averaging is done, this command can simply be used as
|
||||
a convenient way to output one or more desired quantities to a
|
||||
separate file.
|
||||
</P>
|
||||
<P>Each listed value is averaged independently. If written to a file,
|
||||
then over time, one column of numbers is produced for each value. The
|
||||
group specified with the command is ignored, since calculations are
|
||||
performed by computes and fixes which store their own "group"
|
||||
<P>The group specified with this command is ignored, since calculations
|
||||
are performed by computes and fixes which store their own "group"
|
||||
definition,
|
||||
</P>
|
||||
<P>Each listed value can be the result of a <A HREF = "compute.html">compute</A> or
|
||||
|
@ -90,6 +101,15 @@ individual fixes for info on which ones produce such values.
|
|||
be used with this fix. Variables of style <I>atom</I> cannot be used,
|
||||
since they produce per-atom values.
|
||||
</P>
|
||||
<P>The listed values must either be all global scalars or all global
|
||||
vectors, depending on the setting of the <I>mode</I> option. In both
|
||||
cases, the averaging is performed independently on every input
|
||||
quantity. I.e. each input value and the elements of each input value
|
||||
(if it is a vector) are averaged independently.
|
||||
</P>
|
||||
<P>If <I>mode</I> = vector, then all the input values must be vectors of the
|
||||
same length.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>The <I>Nevery</I>, <I>Nrepeat</I>, and <I>Nfreq</I> arguments specify on what
|
||||
|
@ -111,49 +131,56 @@ averaging is done; values are simply generated on timesteps
|
|||
<HR>
|
||||
|
||||
<P>If a value begins with "c_", a compute ID must follow which has been
|
||||
previously defined in the input script. If no bracketed term is
|
||||
appended, the global scalar calculated by the compute is used. If a
|
||||
bracketed term is appended, the Nth vector value calculated by the
|
||||
compute is used. Note that there is a <A HREF = "compute_reduce.html">compute
|
||||
reduce</A> command which can sum per-atom quantities
|
||||
into a global scalar or vector which can thus be accessed by fix
|
||||
ave/time. Or it can be a compute defined not in your input script,
|
||||
but 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>.
|
||||
See the doc pages for these commands which give the IDs of these
|
||||
computes. Users can also write code for their own compute styles and
|
||||
<A HREF = "Section_modify.html">add them to LAMMPS</A>.
|
||||
previously defined in the input script. If <I>mode</I> = scalar, then if
|
||||
no bracketed term is appended, the global scalar calculated by the
|
||||
compute is used. If a bracketed term is appended, the Ith element of
|
||||
the global vector calculated by the compute is used. If <I>mode</I> =
|
||||
vector, then if no bracketed term is appended, the global vector
|
||||
calculated by the compute is used. If a bracketed term is appended,
|
||||
the Ith column of the global array calculated by the compute is used.
|
||||
</P>
|
||||
<P>Note that there is a <A HREF = "compute_reduce.html">compute reduce</A> command
|
||||
which can sum per-atom quantities into a global scalar or vector which
|
||||
can thus be accessed by fix ave/time. Or it can be a compute defined
|
||||
not in your input script, but 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>. See
|
||||
the doc pages for these commands which give the IDs of these computes.
|
||||
Users can also write code for their own compute styles and <A HREF = "Section_modify.html">add them
|
||||
to LAMMPS</A>.
|
||||
</P>
|
||||
<P>If a value begins with "f_", a fix ID must follow which has been
|
||||
previously defined in the input script. If no bracketed term is
|
||||
appended, the global scalar calculated by the fix is used. If a
|
||||
bracketed term is appended, the Nth vector value calculated by the fix
|
||||
is used. Note that some fixes only produce their values on certain
|
||||
timesteps, which must be compatible with <I>Nevery</I>, else an error will
|
||||
result. Users can also write code for their own fix styles and <A HREF = "Section_modify.html">add
|
||||
them to LAMMPS</A>.
|
||||
previously defined in the input script. If <I>mode</I> = scalar, then if
|
||||
no bracketed term is appended, the global scalar calculated by the fix
|
||||
is used. If a bracketed term is appended, the Ith element of the
|
||||
global vector calculated by the fix is used. If <I>mode</I> = vector, then
|
||||
if no bracketed term is appended, the global vector calculated by the
|
||||
fix is used. If a bracketed term is appended, the Ith column of the
|
||||
global array calculated by the fix is used.
|
||||
</P>
|
||||
<P>Note that some fixes only produce their values on certain timesteps,
|
||||
which must be compatible with <I>Nevery</I>, else an error will result.
|
||||
Users can also write code for their own fix styles and <A HREF = "Section_modify.html">add them to
|
||||
LAMMPS</A>.
|
||||
</P>
|
||||
<P>If a value begins with "v_", a variable name must follow which has
|
||||
been previously defined in the input script. Only equal-style
|
||||
variables can be referenced. See the <A HREF = "variable.html">variable</A> command
|
||||
for details. Variables of style <I>equal</I> define a formula which can
|
||||
been previously defined in the input script. Variables can only be
|
||||
used as input for <I>mode</I> = scalar. Only equal-style variables can be
|
||||
referenced. See the <A HREF = "variable.html">variable</A> command for details.
|
||||
Note that variables of style <I>equal</I> define a formula which can
|
||||
reference individual atom properties or thermodynamic keywords, or
|
||||
they can invoke other computes, fixes, or variables when they are
|
||||
evaluated, so this is a very general means of generating quantities to
|
||||
evaluated, so this is a very general means of specifying quantities to
|
||||
time average.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>Additional optional keywords also affect the operation of this fix.
|
||||
</P>
|
||||
<P>The <I>file</I> keyword allows a filename to be specified. Each timestamp,
|
||||
one quantity is written to the file for each value specified in the
|
||||
fix ave/time command. The file is in a self-explanatory text format.
|
||||
</P>
|
||||
<P>The <I>ave</I> keyword determines how the scalar and/or vector values
|
||||
produced every <I>Nfreq</I> steps are averaged with values produced on
|
||||
previous steps that were multiples of <I>Nfreq</I>, before they are
|
||||
accessed by another output command or written to a file.
|
||||
<P>The <I>ave</I> keyword determines how the values produced every <I>Nfreq</I>
|
||||
steps are averaged with values produced on previous steps that were
|
||||
multiples of <I>Nfreq</I>, before they are accessed by another output
|
||||
command or written to a file.
|
||||
</P>
|
||||
<P>If the <I>ave</I> setting is <I>one</I>, then the values produced on timesteps
|
||||
that are multiples of <I>Nfreq</I> are independent of each other; they are
|
||||
|
@ -176,9 +203,54 @@ on step 10000 will be the average of the individual values on steps
|
|||
values if they are not available.
|
||||
</P>
|
||||
<P>The <I>start</I> keyword specifies what timestep averaging will begin on.
|
||||
The default is step 0. Often this value is 0.0, so setting <I>start</I> to
|
||||
a larger value can avoid including a 0.0 in a running or windowed
|
||||
average.
|
||||
The default is step 0. Often input values can be 0.0 at time 0, so
|
||||
setting <I>start</I> to a larger value can avoid including a 0.0 in a
|
||||
running or windowed average.
|
||||
</P>
|
||||
<P>The <I>off</I> keyword can be used to flag any of the input values. If a
|
||||
value is flagged, it will not be time averaged. Instead the most
|
||||
recent input value will always be stored and output. This is useful
|
||||
if one of more of the inputs produced by a compute or fix or variable
|
||||
are effectively constant or are simply current values. E.g. they are
|
||||
being written to a file with other time-averaged values for purposes
|
||||
of creating well-formatted output.
|
||||
</P>
|
||||
<P>The <I>file</I> keyword allows a filename to be specified. Every <I>Nfreq</I>
|
||||
steps, one quantity or vector of quantities is written to the file for
|
||||
each input value specified in the fix ave/time command. For <I>mode</I> =
|
||||
scalar, this means a single line is written each time output is
|
||||
performed. Thus the file ends up to be a series of lines, i.e. one
|
||||
column of numbers for each input value. For <I>mode</I> = vector, an array
|
||||
of numbers is written each time output is performed. The number of
|
||||
rows is the length of the input vectors, and the number of columns is
|
||||
the number of values. Thus the file ends up to be a series of these
|
||||
array sections.
|
||||
</P>
|
||||
<P>The <I>title1</I> and <I>title2</I> and <I>title3</I> keywords allow specification of
|
||||
the strings that will be printed as the first 2 or 3 lines of the
|
||||
output file, assuming the <I>file</I> keyword was used. LAMMPS uses
|
||||
default values for each of these, so they do not need to be specified.
|
||||
</P>
|
||||
<P>By default, these header lines are as follows for <I>mode</I> = scalar:
|
||||
</P>
|
||||
<PRE># Time-averaged data for fix ID
|
||||
# TimeStep value1 value2 ...
|
||||
</PRE>
|
||||
<P>In the first line, ID is replaced with the fix-ID. In the second line
|
||||
the values are replaced with the appropriate fields from the fix
|
||||
ave/time command. There is no third line in the header of the file,
|
||||
so the <I>title3</I> setting is ignored when <I>mode</I> = scalar.
|
||||
</P>
|
||||
<P>By default, these header lines are as follows for <I>mode</I> = vector:
|
||||
</P>
|
||||
<PRE># Time-averaged data for fix ID
|
||||
# TimeStep Number-of-rows
|
||||
# Row value1 value2 ...
|
||||
</PRE>
|
||||
<P>In the first line, ID is replaced with the fix-ID. The second line
|
||||
describes the two values that are printed at the first of each section
|
||||
of output. In the third line the values are replaced with the
|
||||
appropriate fields from the fix ave/time command.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
|
@ -188,20 +260,30 @@ average.
|
|||
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
||||
are relevant to this fix.
|
||||
</P>
|
||||
<P>This fix produces a global scalar or vector which can be accessed by
|
||||
various <A HREF = "Section_howto.html#4_15">output commands</A>. A scalar is
|
||||
produced if only a single quantity is averaged by this fix. If two or
|
||||
more quantities are averaged, then a vector of values is produced.
|
||||
The global values can only be accessed on timesteps that are multiples
|
||||
of <I>Nfreq</I> since that is when averaging is performed. Each value
|
||||
(scalar or vector component) calculated by this fix may be either
|
||||
"intensive" or "extensive". Intensive means the value is independent
|
||||
of the number of atoms in the simulation. Extensive means the value
|
||||
scales with the number of atoms in the simulation. If a compute or
|
||||
fix provides the value being time averaged, then the compute or fix
|
||||
determines whether the value is intensive or extensive; see the doc
|
||||
page for that compute or fix for further info. Values produced by a
|
||||
variable are whatever the variable calculates.
|
||||
<P>This fix produces a global scalar or vector or array which can be
|
||||
accessed by various <A HREF = "Section_howto.html#4_15">output commands</A>. The
|
||||
values can only be accessed on timesteps that are multiples of <I>Nfreq</I>
|
||||
since that is when averaging is performed.
|
||||
</P>
|
||||
<P>A scalar is produced if only a single input value is averaged and
|
||||
<I>mode</I> = scalar. A vector is produced if multiple input values are
|
||||
averaged for <I>mode</I> = scalar, or a single input value for <I>mode</I> =
|
||||
vector. In the first case, the length of the vector is the number of
|
||||
inputs. In the second case, the length of the vector is the same as
|
||||
the length of the input vector. An array is produced if multiple
|
||||
input values are averaged and <I>mode</I> = vector. The global array has
|
||||
rows = length of the input vectors and columns = number of inputs.
|
||||
</P>
|
||||
<P>If the fix prouduces a scalar or vector, then the scalar and each
|
||||
element of the vector may be either "intensive" or "extensive". If
|
||||
the fix produces an array, then all elements in the array will be
|
||||
either "intensive" or "extensive". Intensive means the value is
|
||||
independent of the number of atoms in the simulation. Extensive means
|
||||
the value scales with the number of atoms in the simulation. If a
|
||||
compute or fix provides the value being time averaged, then the
|
||||
compute or fix determines whether the value is intensive or extensive;
|
||||
see the doc page for that compute or fix for further info. Values
|
||||
produced by a variable are whatever the variable calculates.
|
||||
</P>
|
||||
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
|
||||
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
|
||||
|
@ -217,6 +299,8 @@ ave/atom</A>
|
|||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
<P>The option defaults no file output, ave = one, and start = 0.
|
||||
<P>The option defaults are mode = scalar, ave = one, start = 0, no file
|
||||
output, title 1,2,3 = strings as described above, and no off settings
|
||||
for any input values.
|
||||
</P>
|
||||
</HTML>
|
||||
|
|
|
@ -19,14 +19,17 @@ Nrepeat = # of times to repeat the Nevery calculation before averaging :l
|
|||
Nfreq = timestep frequency at which averages are computed :l
|
||||
one or more values can be listed :l
|
||||
value = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
|
||||
c_ID = global scalar value calculated by a compute with ID
|
||||
c_ID\[N\] = Nth component of global vector calculated by a compute with ID
|
||||
f_ID = global scalar value calculated by a fix with ID
|
||||
f_ID\[N\] = Nth component of global vector calculated by a fix with ID
|
||||
c_ID = global scalar or vector calculated by a compute with ID
|
||||
c_ID\[I\] = Ith component of global vector or Ith column of global array calculated by a compute with ID
|
||||
f_ID = global scalar or vector calculated by a fix with ID
|
||||
f_ID\[I\] = Ith component of global vector or Ith column of global array calculated by a fix with ID
|
||||
v_name = global value calculated by an equal-style variable with name :pre
|
||||
|
||||
zero or more keyword/arg pairs may be appended :l
|
||||
keyword = {file} or {ave} or {start} :l
|
||||
keyword = {mode} or {file} or {ave} or {start} or {off} or {title1} or {title2} or {title3} :l
|
||||
{mode} arg = {scalar} or {vector}
|
||||
scalar = all input values are global scalars
|
||||
vector = all input values are global vectors
|
||||
{file} arg = filename
|
||||
filename = name of file to output time averages to
|
||||
{ave} args = {one} or {running} or {window M}
|
||||
|
@ -34,14 +37,23 @@ keyword = {file} or {ave} or {start} :l
|
|||
running = output cumulative average of all previous Nfreq steps
|
||||
window M = output average of M most recent Nfreq steps
|
||||
{start} args = Nstart
|
||||
Nstart = start averaging on this timestep :pre
|
||||
Nstart = start averaging on this timestep
|
||||
{off} arg = M = do not average this value
|
||||
M = value # from 1 to Nvalues
|
||||
{title1} arg = string
|
||||
string = text to print as 1st line of output file = title
|
||||
{title2} arg = string
|
||||
string = text to print as 2nd line of output file
|
||||
{title3} arg = string
|
||||
string = text to print as 3rd line of output file, only for vector mode :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all ave/time 100 5 1000 c_myTemp c_thermo_temp file temp.profile
|
||||
fix 1 all ave/time 100 5 1000 c_thermo_press\[2\] ave window 20
|
||||
fix 1 all ave/time 1 100 1000 f_indent f_indent\[1\] file temp.indent :pre
|
||||
fix 1 all ave/time 100 5 1000 c_thermo_press\[2\] ave window 20 &
|
||||
title1 "My output values"
|
||||
fix 1 all ave/time 1 100 1000 f_indent f_indent\[1\] file temp.indent off 1 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
@ -49,14 +61,13 @@ Calculate one or more instantaneous global quantities every few
|
|||
timesteps, and average them over longer timescales. The resulting
|
||||
averages can be used by other "output
|
||||
commands"_Section_howto.html#4_15 such as "thermo_style
|
||||
custom"_thermo_style.html, and can also be written to a file. If no
|
||||
averaging is done, this command is a convenient way to simply write
|
||||
one or more desired quantities to a separate file.
|
||||
custom"_thermo_style.html, and can also be written to a file. Note
|
||||
that if no time averaging is done, this command can simply be used as
|
||||
a convenient way to output one or more desired quantities to a
|
||||
separate file.
|
||||
|
||||
Each listed value is averaged independently. If written to a file,
|
||||
then over time, one column of numbers is produced for each value. The
|
||||
group specified with the command is ignored, since calculations are
|
||||
performed by computes and fixes which store their own "group"
|
||||
The group specified with this command is ignored, since calculations
|
||||
are performed by computes and fixes which store their own "group"
|
||||
definition,
|
||||
|
||||
Each listed value can be the result of a "compute"_compute.html or
|
||||
|
@ -77,6 +88,15 @@ individual fixes for info on which ones produce such values.
|
|||
be used with this fix. Variables of style {atom} cannot be used,
|
||||
since they produce per-atom values.
|
||||
|
||||
The listed values must either be all global scalars or all global
|
||||
vectors, depending on the setting of the {mode} option. In both
|
||||
cases, the averaging is performed independently on every input
|
||||
quantity. I.e. each input value and the elements of each input value
|
||||
(if it is a vector) are averaged independently.
|
||||
|
||||
If {mode} = vector, then all the input values must be vectors of the
|
||||
same length.
|
||||
|
||||
:line
|
||||
|
||||
The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify on what
|
||||
|
@ -98,49 +118,56 @@ averaging is done; values are simply generated on timesteps
|
|||
:line
|
||||
|
||||
If a value begins with "c_", a compute ID must follow which has been
|
||||
previously defined in the input script. If no bracketed term is
|
||||
appended, the global scalar calculated by the compute is used. If a
|
||||
bracketed term is appended, the Nth vector value calculated by the
|
||||
compute is used. Note that there is a "compute
|
||||
reduce"_compute_reduce.html command which can sum per-atom quantities
|
||||
into a global scalar or vector which can thus be accessed by fix
|
||||
ave/time. Or it can be a compute defined not in your input script,
|
||||
but by "thermodynamic output"_thermo_style.html or other fixes such as
|
||||
"fix nvt"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html.
|
||||
See the doc pages for these commands which give the IDs of these
|
||||
computes. Users can also write code for their own compute styles and
|
||||
"add them to LAMMPS"_Section_modify.html.
|
||||
previously defined in the input script. If {mode} = scalar, then if
|
||||
no bracketed term is appended, the global scalar calculated by the
|
||||
compute is used. If a bracketed term is appended, the Ith element of
|
||||
the global vector calculated by the compute is used. If {mode} =
|
||||
vector, then if no bracketed term is appended, the global vector
|
||||
calculated by the compute is used. If a bracketed term is appended,
|
||||
the Ith column of the global array calculated by the compute is used.
|
||||
|
||||
Note that there is a "compute reduce"_compute_reduce.html command
|
||||
which can sum per-atom quantities into a global scalar or vector which
|
||||
can thus be accessed by fix ave/time. Or it can be a compute defined
|
||||
not in your input script, but by "thermodynamic
|
||||
output"_thermo_style.html or other fixes such as "fix
|
||||
nvt"_fix_nvt.html or "fix temp/rescale"_fix_temp_rescale.html. See
|
||||
the doc pages for these commands which give the IDs of these computes.
|
||||
Users can also write code for their own compute styles and "add them
|
||||
to LAMMPS"_Section_modify.html.
|
||||
|
||||
If a value begins with "f_", a fix ID must follow which has been
|
||||
previously defined in the input script. If no bracketed term is
|
||||
appended, the global scalar calculated by the fix is used. If a
|
||||
bracketed term is appended, the Nth vector value calculated by the fix
|
||||
is used. Note that some fixes only produce their values on certain
|
||||
timesteps, which must be compatible with {Nevery}, else an error will
|
||||
result. Users can also write code for their own fix styles and "add
|
||||
them to LAMMPS"_Section_modify.html.
|
||||
previously defined in the input script. If {mode} = scalar, then if
|
||||
no bracketed term is appended, the global scalar calculated by the fix
|
||||
is used. If a bracketed term is appended, the Ith element of the
|
||||
global vector calculated by the fix is used. If {mode} = vector, then
|
||||
if no bracketed term is appended, the global vector calculated by the
|
||||
fix is used. If a bracketed term is appended, the Ith column of the
|
||||
global array calculated by the fix is used.
|
||||
|
||||
Note that some fixes only produce their values on certain timesteps,
|
||||
which must be compatible with {Nevery}, else an error will result.
|
||||
Users can also write code for their own fix styles and "add them to
|
||||
LAMMPS"_Section_modify.html.
|
||||
|
||||
If a value begins with "v_", a variable name must follow which has
|
||||
been previously defined in the input script. Only equal-style
|
||||
variables can be referenced. See the "variable"_variable.html command
|
||||
for details. Variables of style {equal} define a formula which can
|
||||
been previously defined in the input script. Variables can only be
|
||||
used as input for {mode} = scalar. Only equal-style variables can be
|
||||
referenced. See the "variable"_variable.html command for details.
|
||||
Note that variables of style {equal} define a formula which can
|
||||
reference individual atom properties or thermodynamic keywords, or
|
||||
they can invoke other computes, fixes, or variables when they are
|
||||
evaluated, so this is a very general means of generating quantities to
|
||||
evaluated, so this is a very general means of specifying quantities to
|
||||
time average.
|
||||
|
||||
:line
|
||||
|
||||
Additional optional keywords also affect the operation of this fix.
|
||||
|
||||
The {file} keyword allows a filename to be specified. Each timestamp,
|
||||
one quantity is written to the file for each value specified in the
|
||||
fix ave/time command. The file is in a self-explanatory text format.
|
||||
|
||||
The {ave} keyword determines how the scalar and/or vector values
|
||||
produced every {Nfreq} steps are averaged with values produced on
|
||||
previous steps that were multiples of {Nfreq}, before they are
|
||||
accessed by another output command or written to a file.
|
||||
The {ave} keyword determines how the values produced every {Nfreq}
|
||||
steps are averaged with values produced on previous steps that were
|
||||
multiples of {Nfreq}, before they are accessed by another output
|
||||
command or written to a file.
|
||||
|
||||
If the {ave} setting is {one}, then the values produced on timesteps
|
||||
that are multiples of {Nfreq} are independent of each other; they are
|
||||
|
@ -163,9 +190,54 @@ on step 10000 will be the average of the individual values on steps
|
|||
values if they are not available.
|
||||
|
||||
The {start} keyword specifies what timestep averaging will begin on.
|
||||
The default is step 0. Often this value is 0.0, so setting {start} to
|
||||
a larger value can avoid including a 0.0 in a running or windowed
|
||||
average.
|
||||
The default is step 0. Often input values can be 0.0 at time 0, so
|
||||
setting {start} to a larger value can avoid including a 0.0 in a
|
||||
running or windowed average.
|
||||
|
||||
The {off} keyword can be used to flag any of the input values. If a
|
||||
value is flagged, it will not be time averaged. Instead the most
|
||||
recent input value will always be stored and output. This is useful
|
||||
if one of more of the inputs produced by a compute or fix or variable
|
||||
are effectively constant or are simply current values. E.g. they are
|
||||
being written to a file with other time-averaged values for purposes
|
||||
of creating well-formatted output.
|
||||
|
||||
The {file} keyword allows a filename to be specified. Every {Nfreq}
|
||||
steps, one quantity or vector of quantities is written to the file for
|
||||
each input value specified in the fix ave/time command. For {mode} =
|
||||
scalar, this means a single line is written each time output is
|
||||
performed. Thus the file ends up to be a series of lines, i.e. one
|
||||
column of numbers for each input value. For {mode} = vector, an array
|
||||
of numbers is written each time output is performed. The number of
|
||||
rows is the length of the input vectors, and the number of columns is
|
||||
the number of values. Thus the file ends up to be a series of these
|
||||
array sections.
|
||||
|
||||
The {title1} and {title2} and {title3} keywords allow specification of
|
||||
the strings that will be printed as the first 2 or 3 lines of the
|
||||
output file, assuming the {file} keyword was used. LAMMPS uses
|
||||
default values for each of these, so they do not need to be specified.
|
||||
|
||||
By default, these header lines are as follows for {mode} = scalar:
|
||||
|
||||
# Time-averaged data for fix ID
|
||||
# TimeStep value1 value2 ... :pre
|
||||
|
||||
In the first line, ID is replaced with the fix-ID. In the second line
|
||||
the values are replaced with the appropriate fields from the fix
|
||||
ave/time command. There is no third line in the header of the file,
|
||||
so the {title3} setting is ignored when {mode} = scalar.
|
||||
|
||||
By default, these header lines are as follows for {mode} = vector:
|
||||
|
||||
# Time-averaged data for fix ID
|
||||
# TimeStep Number-of-rows
|
||||
# Row value1 value2 ... :pre
|
||||
|
||||
In the first line, ID is replaced with the fix-ID. The second line
|
||||
describes the two values that are printed at the first of each section
|
||||
of output. In the third line the values are replaced with the
|
||||
appropriate fields from the fix ave/time command.
|
||||
|
||||
:line
|
||||
|
||||
|
@ -175,20 +247,30 @@ No information about this fix is written to "binary restart
|
|||
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
||||
are relevant to this fix.
|
||||
|
||||
This fix produces a global scalar or vector which can be accessed by
|
||||
various "output commands"_Section_howto.html#4_15. A scalar is
|
||||
produced if only a single quantity is averaged by this fix. If two or
|
||||
more quantities are averaged, then a vector of values is produced.
|
||||
The global values can only be accessed on timesteps that are multiples
|
||||
of {Nfreq} since that is when averaging is performed. Each value
|
||||
(scalar or vector component) calculated by this fix may be either
|
||||
"intensive" or "extensive". Intensive means the value is independent
|
||||
of the number of atoms in the simulation. Extensive means the value
|
||||
scales with the number of atoms in the simulation. If a compute or
|
||||
fix provides the value being time averaged, then the compute or fix
|
||||
determines whether the value is intensive or extensive; see the doc
|
||||
page for that compute or fix for further info. Values produced by a
|
||||
variable are whatever the variable calculates.
|
||||
This fix produces a global scalar or vector or array which can be
|
||||
accessed by various "output commands"_Section_howto.html#4_15. The
|
||||
values can only be accessed on timesteps that are multiples of {Nfreq}
|
||||
since that is when averaging is performed.
|
||||
|
||||
A scalar is produced if only a single input value is averaged and
|
||||
{mode} = scalar. A vector is produced if multiple input values are
|
||||
averaged for {mode} = scalar, or a single input value for {mode} =
|
||||
vector. In the first case, the length of the vector is the number of
|
||||
inputs. In the second case, the length of the vector is the same as
|
||||
the length of the input vector. An array is produced if multiple
|
||||
input values are averaged and {mode} = vector. The global array has
|
||||
rows = length of the input vectors and columns = number of inputs.
|
||||
|
||||
If the fix prouduces a scalar or vector, then the scalar and each
|
||||
element of the vector may be either "intensive" or "extensive". If
|
||||
the fix produces an array, then all elements in the array will be
|
||||
either "intensive" or "extensive". Intensive means the value is
|
||||
independent of the number of atoms in the simulation. Extensive means
|
||||
the value scales with the number of atoms in the simulation. If a
|
||||
compute or fix provides the value being time averaged, then the
|
||||
compute or fix determines whether the value is intensive or extensive;
|
||||
see the doc page for that compute or fix for further info. Values
|
||||
produced by a variable are whatever the variable calculates.
|
||||
|
||||
No parameter of this fix can be used with the {start/stop} keywords of
|
||||
the "run"_run.html command. This fix is not invoked during "energy
|
||||
|
@ -204,4 +286,6 @@ ave/atom"_fix_ave_atom.html
|
|||
|
||||
[Default:] none
|
||||
|
||||
The option defaults no file output, ave = one, and start = 0.
|
||||
The option defaults are mode = scalar, ave = one, start = 0, no file
|
||||
output, title 1,2,3 = strings as described above, and no off settings
|
||||
for any input values.
|
||||
|
|
Loading…
Reference in New Issue