From 588b9b1687c2aae33c09aea348f977b576a5ac51 Mon Sep 17 00:00:00 2001
From: sjplimp A coordination number coord(r) is also calculated, which is the sum of
g(r) values for all bins up to and including the current bin.
The simplest way to output the results of the compute rdf calculation
+to a file is to use the fix ave/time command, for
+example:
+ Output info:
This compute calculates a global array with the number of rows =
@@ -127,7 +134,7 @@ distances, you'll need to post-process a dump file.
Related commands:
Default: none
compute myRDF all rdf 50
+fix 1 all ave/time 100 1 100 c_myRDF file tmp.rdf mode vector
+
The listed values must either be all scalars or all vectors, depending -on the setting of the mode option. In both cases, the averaging is -performed independently on each input value. I.e. each input scalar -or the elements of each input vector is averaged independently. +
The listed values must either be all scalars or all vectors (or +arrays), depending on the setting of the mode option. In both +cases, the averaging is performed independently on each input value. +I.e. each input scalar is averaged independently and each element of +each input vector (or array) is averaged independently.
-If mode = vector, then all the input vectors must be the same -length. +
If mode = vector, then the listed values may either be vectors or +arrays and all must be the same "length", which is the length of the +vector or number of rows in the array. If a global array is listed, +then it is the same as if the individual columns of the array had been +listed one by one. E.g. these 2 fix ave/time commands are equivalent, +since the compute rdf command creates (in this +case) a global array with 3 columns, each of length 50.
+compute myRDF all rdf 50 1 2 +fix 1 all ave/time 100 1 100 c_myRDF file tmp1.rdf mode vector +fix 2 all ave/time 100 1 100 c_myRDF[1] c_myRDF[2] c_myRDF[3] file tmp2.rdf mode vector +
The Nevery, Nrepeat, and Nfreq arguments specify on what @@ -134,8 +144,11 @@ 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. +calculated by the compute is used. Or if the compute calculates a +global array, all of the columns of the global array are used as if +they had been specified as individual vectors (see description above). +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 command which can sum per-atom quantities into a global scalar or vector which @@ -153,8 +166,11 @@ 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. +fix is used. Or if the fix calculates a global array, all of the +columns of the global array are used as if they had been specified as +individual vectors (see description above). 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. diff --git a/doc/fix_ave_time.txt b/doc/fix_ave_time.txt index d2eccc8464..e4bc4a9748 100644 --- a/doc/fix_ave_time.txt +++ b/doc/fix_ave_time.txt @@ -88,13 +88,23 @@ 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 scalars or all vectors, depending -on the setting of the {mode} option. In both cases, the averaging is -performed independently on each input value. I.e. each input scalar -or the elements of each input vector is averaged independently. +The listed values must either be all scalars or all vectors (or +arrays), depending on the setting of the {mode} option. In both +cases, the averaging is performed independently on each input value. +I.e. each input scalar is averaged independently and each element of +each input vector (or array) is averaged independently. -If {mode} = vector, then all the input vectors must be the same -length. +If {mode} = vector, then the listed values may either be vectors or +arrays and all must be the same "length", which is the length of the +vector or number of rows in the array. If a global array is listed, +then it is the same as if the individual columns of the array had been +listed one by one. E.g. these 2 fix ave/time commands are equivalent, +since the "compute rdf"_compute.rdf.html command creates (in this +case) a global array with 3 columns, each of length 50. + +compute myRDF all rdf 50 1 2 +fix 1 all ave/time 100 1 100 c_myRDF file tmp1.rdf mode vector +fix 2 all ave/time 100 1 100 c_myRDF\[1\] c_myRDF\[2\] c_myRDF\[3\] file tmp2.rdf mode vector :pre :line @@ -122,8 +132,11 @@ 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. +calculated by the compute is used. Or if the compute calculates a +global array, all of the columns of the global array are used as if +they had been specified as individual vectors (see description above). +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 @@ -141,8 +154,11 @@ 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. +fix is used. Or if the fix calculates a global array, all of the +columns of the global array are used as if they had been specified as +individual vectors (see description above). 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.