From 588b9b1687c2aae33c09aea348f977b576a5ac51 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 24 May 2010 16:49:35 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4190 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/compute_rdf.html | 9 ++++++++- doc/compute_rdf.txt | 9 ++++++++- doc/fix_ave_time.html | 36 ++++++++++++++++++++++++++---------- doc/fix_ave_time.txt | 36 ++++++++++++++++++++++++++---------- 4 files changed, 68 insertions(+), 22 deletions(-) diff --git a/doc/compute_rdf.html b/doc/compute_rdf.html index 9a589b4bb4..a6ded207ca 100644 --- a/doc/compute_rdf.html +++ b/doc/compute_rdf.html @@ -99,6 +99,13 @@ shell in 3d (or the area of the bin's thin ring in 2d).

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: +

+
compute myRDF all rdf 50
+fix 1 all ave/time 100 1 100 c_myRDF file tmp.rdf mode vector 
+

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:

-

fix ave/histo +

fix ave/time

Default: none

diff --git a/doc/compute_rdf.txt b/doc/compute_rdf.txt index 46d84d9730..595087af04 100644 --- a/doc/compute_rdf.txt +++ b/doc/compute_rdf.txt @@ -96,6 +96,13 @@ shell in 3d (or the area of the bin's thin ring in 2d). 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"_fix_ave_time.html command, for +example: + +compute myRDF all rdf 50 +fix 1 all ave/time 100 1 100 c_myRDF file tmp.rdf mode vector :pre + [Output info:] This compute calculates a global array with the number of rows = @@ -124,6 +131,6 @@ distances, you'll need to post-process a dump file. [Related commands:] -"fix ave/histo"_fix_ave_histo.html +"fix ave/time"_fix_ave_time.html [Default:] none diff --git a/doc/fix_ave_time.html b/doc/fix_ave_time.html index 8ba7ed7b2b..88849edd9b 100644 --- a/doc/fix_ave_time.html +++ b/doc/fix_ave_time.html @@ -100,14 +100,24 @@ 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 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.