From 2fbdda55e0ecd4e45d828837ddd78bc682429b1c Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Wed, 13 Oct 2010 15:00:13 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5033
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/variable.html | 25 +++++++++++++++++++------
doc/variable.txt | 25 +++++++++++++++++++------
2 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/doc/variable.html b/doc/variable.html
index 4a96d4ec2f..05d4b9cb5e 100644
--- a/doc/variable.html
+++ b/doc/variable.html
@@ -57,7 +57,7 @@
xcm(group,dim,region), vcm(group,dim,region), fcm(group,dim,region),
bound(group,xmin,region), gyration(group,region), ke(group,reigon),
angmom(group,dim,region), inertia(group,dimdim,region),omega(group,dim,region)
- special functions = sum(x), min(x), max(x), ave(x), trap(x)
+ special functions = sum(x), min(x), max(x), ave(x), trap(x), gmask(x), rmask(x), grmask(x,y)
atom value = mass[i], type[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i]
atom vector = mass, type, x, y, z, vx, vy, vz, fx, fy, fz
compute references = c_ID, c_ID[i], c_ID[i][j]
@@ -276,7 +276,7 @@ references to other variables.
| Math functions | sqrt(x), exp(x), ln(x), log(x), sin(x), cos(x), tan(x), asin(x), acos(x), atan(x), atan2(y,x), random(x,y,z), normal(x,y,z), ceil(x), floor(x), round(x), ramp(x,y), stagger(x,y), logfreq(x,y,z), vdisplace(x,y), swiggle(x,y,z), cwiggle(x,y,z) |
| Group functions | count(ID), mass(ID), charge(ID), xcm(ID,dim), vcm(ID,dim), fcm(ID,dim), bound(ID,dir), gyration(ID), ke(ID), angmom(ID,dim), inertia(ID,dimdim), omega(ID,dim) |
| Region functions | count(ID,IDR), mass(ID,IDR), charge(ID,IDR), xcm(ID,dim,IDR), vcm(ID,dim,IDR), fcm(ID,dim,IDR), bound(ID,dir,IDR), gyration(ID,IDR), ke(ID,IDR), angmom(ID,dim,IDR), inertia(ID,dimdim,IDR), omega(ID,dim,IDR) |
-| Special functions | sum(x), min(x), max(x), ave(x), trap(x) |
+| Special functions | sum(x), min(x), max(x), ave(x), trap(x), gmask(x), rmask(x), grmask(x,y) |
| Atom values | mass[i], type[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i] |
| Atom vectors | mass, type, x, y, z, vx, vy, vz, fx, fy, fz |
| Compute references | c_ID, c_ID[i], c_ID[i][j] |
@@ -499,10 +499,10 @@ produces a global array, then the notation with "[N]" should be
used, when N is an integer, to specify which column of the global
array is being referenced.
-All of these functions operate on the global vector of inputs and
-reduce it to a single scalar value. This is analagous to the
-operation of the compute reduce command, which
-invokes the same functions on per-atom and local vectors.
+
These functions operate on the global vector of inputs and reduce it
+to a single scalar value. This is analagous to the operation of the
+compute reduce command, which invokes the same
+functions on per-atom and local vectors.
The sum() function calculates the sum of all the vector elements. The
min() and max() functions find the minimum and maximum element
@@ -519,6 +519,19 @@ timestep size, this function is useful for calculating integrals of
time-series data, like that generated by the fix
ave/correlate command.
+The gmask(x) function takes 1 argument which is a group ID. It
+can only be used in atom-style variables. It returns a 1 for
+atoms that are in the group, and a 0 for atoms that are not.
+
+The rmask(x) function takes 1 argument which is a region ID. It can
+only be used in atom-style variables. It returns a 1 for atoms that
+are in the geometric region, and a 0 for atoms that are not.
+
+The grmask(x,y) function takes 2 arguments. The first is a group ID,
+and the second is a region ID. It can only be used in atom-style
+variables. It returns a 1 for atoms that are in both the group and
+region, and a 0 for atoms that are not in both.
+
Atom Values and Vectors
diff --git a/doc/variable.txt b/doc/variable.txt
index bb5d9b7805..de31b92218 100644
--- a/doc/variable.txt
+++ b/doc/variable.txt
@@ -52,7 +52,7 @@ style = {delete} or {index} or {loop} or {world} or {universe} or {uloop} or {st
xcm(group,dim,region), vcm(group,dim,region), fcm(group,dim,region),
bound(group,xmin,region), gyration(group,region), ke(group,reigon),
angmom(group,dim,region), inertia(group,dimdim,region),omega(group,dim,region)
- special functions = sum(x), min(x), max(x), ave(x), trap(x)
+ special functions = sum(x), min(x), max(x), ave(x), trap(x), gmask(x), rmask(x), grmask(x,y)
atom value = mass\[i\], type\[i\], x\[i\], y\[i\], z\[i\], vx\[i\], vy\[i\], vz\[i\], fx\[i\], fy\[i\], fz\[i\]
atom vector = mass, type, x, y, z, vx, vy, vz, fx, fy, fz
compute references = c_ID, c_ID\[i\], c_ID\[i\]\[j\]
@@ -275,7 +275,7 @@ Region functions: count(ID,IDR), mass(ID,IDR), charge(ID,IDR), \
xcm(ID,dim,IDR), vcm(ID,dim,IDR), fcm(ID,dim,IDR), \
bound(ID,dir,IDR), gyration(ID,IDR), ke(ID,IDR), \
angmom(ID,dim,IDR), inertia(ID,dimdim,IDR), omega(ID,dim,IDR)
-Special functions: sum(x), min(x), max(x), ave(x), trap(x)
+Special functions: sum(x), min(x), max(x), ave(x), trap(x), gmask(x), rmask(x), grmask(x,y)
Atom values: mass\[i\], type\[i\], x\[i\], y\[i\], z\[i\], \
vx\[i\], vy\[i\], vz\[i\], fx\[i\], fy\[i\], fz\[i\]
Atom vectors: mass, type, x, y, z, vx, vy, vz, fx, fy, fz
@@ -498,10 +498,10 @@ produces a global array, then the notation with "\[N\]" should be
used, when N is an integer, to specify which column of the global
array is being referenced.
-All of these functions operate on the global vector of inputs and
-reduce it to a single scalar value. This is analagous to the
-operation of the "compute reduce"_compute_reduce.html command, which
-invokes the same functions on per-atom and local vectors.
+These functions operate on the global vector of inputs and reduce it
+to a single scalar value. This is analagous to the operation of the
+"compute reduce"_compute_reduce.html command, which invokes the same
+functions on per-atom and local vectors.
The sum() function calculates the sum of all the vector elements. The
min() and max() functions find the minimum and maximum element
@@ -518,6 +518,19 @@ timestep size, this function is useful for calculating integrals of
time-series data, like that generated by the "fix
ave/correlate"_fix_ave_correlate.html command.
+The gmask(x) function takes 1 argument which is a group ID. It
+can only be used in atom-style variables. It returns a 1 for
+atoms that are in the group, and a 0 for atoms that are not.
+
+The rmask(x) function takes 1 argument which is a region ID. It can
+only be used in atom-style variables. It returns a 1 for atoms that
+are in the geometric region, and a 0 for atoms that are not.
+
+The grmask(x,y) function takes 2 arguments. The first is a group ID,
+and the second is a region ID. It can only be used in atom-style
+variables. It returns a 1 for atoms that are in both the group and
+region, and a 0 for atoms that are not in both.
+
:line
Atom Values and Vectors :h4