diff --git a/doc/Section_howto.html b/doc/Section_howto.html index 43a3ef5524..9234b922f7 100644 --- a/doc/Section_howto.html +++ b/doc/Section_howto.html @@ -2172,7 +2172,7 @@ commands, to calculate various properties of a system: overviewed. Then some examples are given of how to compute different properties with chunk commands.

-
Compute chunk/atom command +
Compute chunk/atom command:

This compute can assign atoms to chunks of various styles. Only atoms in the specified group and optional specified region are assigned to a @@ -2213,7 +2213,7 @@ do this. You can also define a per-atom variable the input script that uses a formula to generate a chunk ID for each atom.

-
Fix ave/chunk command +
Fix ave/chunk command:

This fix takes the ID of a compute chunk/atom command as input. For each chunk, @@ -2230,7 +2230,7 @@ values to be time-averaged in various ways, and output to a file. The fix produces a global array as output with one row of values per chunk.

-
Compute */chunk commands +
Compute */chunk commands:

Currently the following computes operate on chunks of atoms to produce per-chunk values. @@ -2279,42 +2279,40 @@ largest cluster or fastest diffusing molecule.

Here are eaxmples using chunk commands to calculate various properties:

-

(1) Mimic the deprecated fix ave/spatial command, to average atom -velocity in each spatial bin: +

(1) Average velocity in each of 1000 2d spatial bins:

-

Old command: +

compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.01 units reduced
+fix 1 all ave/chunk 100 10 1000 cc1 vx vy file tmp.out 
+
+

(2) Temperature in each spatial bin, after subtracting a flow +velocity:

-

fix ave/spatial +

compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.1 units reduced
+compute vbias all temp/profile 1 0 0 y 10
+fix 1 all ave/chunk 100 10 1000 cc1 temp bias vbias file tmp.out 
+
+

(3) Center of mass of each molecule:

-

New commands: +

compute cc1 all chunk/atom molecule
+compute myChunk all com/chunk cc1
+fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
+
+

(4) Total force on each molecule and ave/max across all molecules:

-

compute chunk/atom -fix ave/chunk -

-

(2) Mimincing the deprecated compute msd/molecule command -to compute the mean-squared displacement of each molecule: -

-

Old commands: -

-

compute molecule/msd -fix ave/time file msd.molecule -

-

New commands: -

-

compute chunk/atom style -compute molecule/chunk -fix ave/time file msd.molecule -

-

(3) print or time ave total force per molecule - average across molecules (variable special functions) -

-

(4) histogram of cluster sizes (use fix ave/histo) -

-

(5) count of # of atoms with each coord # - don't need chunking, just fix ave/histo on coord/atom -

-

(6) ave temperature per bin +

compute cc1 all chunk/atom molecule
+fix 1 all ave/chunk 1000 1 1000 cc1 fx fy fz file tmp.out
+variable xave equal ave(f_12)
+variable xmax equal max(f_12)
+thermo 1000
+thermo_style custom step temp v_xave v_xmax 
+
+

(5) Histogram of cluster sizes:

+
compute cluster all cluster/atom 1.0
+compute cc1 all chunk/atom c_cluster compress yes
+compute size all property/chunk cc1 count
+fix 1 all ave/histo 100 1 100 0 20 20 c_size mode vector ave running beyond ignore file tmp.histo 
+


diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index 4db7f4da7d..a6bfc513e6 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -2159,7 +2159,7 @@ Here, each of the 3 kinds of chunk-related commands is briefly overviewed. Then some examples are given of how to compute different properties with chunk commands. -"Compute chunk/atom"_compute_chunk_atom.html command :h5 +"Compute chunk/atom"_compute_chunk_atom.html command: :h5 This compute can assign atoms to chunks of various styles. Only atoms in the specified group and optional specified region are assigned to a @@ -2198,7 +2198,7 @@ do this. You can also define a "per-atom variable"_variable.html in the input script that uses a formula to generate a chunk ID for each atom. -"Fix ave/chunk"_fix_ave_chunk_atom.html command :h5 +"Fix ave/chunk"_fix_ave_chunk_atom.html command: :h5 This fix takes the ID of a "compute chunk/atom"_compute_chunk_atom.html command as input. For each chunk, @@ -2215,7 +2215,7 @@ values to be time-averaged in various ways, and output to a file. The fix produces a global array as output with one row of values per chunk. -Compute */chunk commands :h5 +Compute */chunk commands: :h5 Currently the following computes operate on chunks of atoms to produce per-chunk values. @@ -2264,41 +2264,39 @@ Example calculations with chunks :h5 Here are eaxmples using chunk commands to calculate various properties: -(1) Mimic the deprecated fix ave/spatial command, to average atom -velocity in each spatial bin: +(1) Average velocity in each of 1000 2d spatial bins: -Old command: +compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.01 units reduced +fix 1 all ave/chunk 100 10 1000 cc1 vx vy file tmp.out :pre -fix ave/spatial +(2) Temperature in each spatial bin, after subtracting a flow +velocity: -New commands: +compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.1 units reduced +compute vbias all temp/profile 1 0 0 y 10 +fix 1 all ave/chunk 100 10 1000 cc1 temp bias vbias file tmp.out :pre -compute chunk/atom -fix ave/chunk +(3) Center of mass of each molecule: -(2) Mimincing the deprecated compute msd/molecule command -to compute the mean-squared displacement of each molecule: +compute cc1 all chunk/atom molecule +compute myChunk all com/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre -Old commands: +(4) Total force on each molecule and ave/max across all molecules: -compute molecule/msd -fix ave/time file msd.molecule +compute cc1 all chunk/atom molecule +fix 1 all ave/chunk 1000 1 1000 cc1 fx fy fz file tmp.out +variable xave equal ave(f_1[2]) +variable xmax equal max(f_1[2]) +thermo 1000 +thermo_style custom step temp v_xave v_xmax :pre -New commands: +(5) Histogram of cluster sizes: -compute chunk/atom style -compute molecule/chunk -fix ave/time file msd.molecule - -(3) print or time ave total force per molecule - average across molecules (variable special functions) - -(4) histogram of cluster sizes (use fix ave/histo) - -(5) count of # of atoms with each coord # - don't need chunking, just fix ave/histo on coord/atom - -(6) ave temperature per bin +compute cluster all cluster/atom 1.0 +compute cc1 all chunk/atom c_cluster compress yes +compute size all property/chunk cc1 count +fix 1 all ave/histo 100 1 100 0 20 20 c_size mode vector ave running beyond ignore file tmp.histo :pre :line :line diff --git a/doc/compute_com_chunk.html b/doc/compute_com_chunk.html index 86f7880b48..a2ad970b71 100644 --- a/doc/compute_com_chunk.html +++ b/doc/compute_com_chunk.html @@ -63,7 +63,7 @@ image command. calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all com/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_com_chunk.txt b/doc/compute_com_chunk.txt index 1e9191996c..10e23b559e 100644 --- a/doc/compute_com_chunk.txt +++ b/doc/compute_com_chunk.txt @@ -60,7 +60,7 @@ The simplest way to output the results of the compute com/chunk calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all com/chunk cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/compute_gyration_chunk.html b/doc/compute_gyration_chunk.html index cf65951ffb..61f391f8ff 100644 --- a/doc/compute_gyration_chunk.html +++ b/doc/compute_gyration_chunk.html @@ -90,7 +90,7 @@ image command. calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all gyration/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_gyration_chunk.txt b/doc/compute_gyration_chunk.txt index f6b3ff8979..14b40353d6 100644 --- a/doc/compute_gyration_chunk.txt +++ b/doc/compute_gyration_chunk.txt @@ -81,7 +81,7 @@ The simplest way to output the results of the compute gyration/chunk calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all gyration/chunk cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/compute_inertia_chunk.html b/doc/compute_inertia_chunk.html index 5803968105..3dfb2e5e69 100644 --- a/doc/compute_inertia_chunk.html +++ b/doc/compute_inertia_chunk.html @@ -64,7 +64,7 @@ image command. calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all inertia/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_inertia_chunk.txt b/doc/compute_inertia_chunk.txt index f268ff3d75..5d482a5333 100644 --- a/doc/compute_inertia_chunk.txt +++ b/doc/compute_inertia_chunk.txt @@ -61,7 +61,7 @@ The simplest way to output the results of the compute inertia/chunk calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all inertia/chunk cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/compute_msd_chunk.html b/doc/compute_msd_chunk.html index 7338a41626..f0a5016b03 100644 --- a/doc/compute_msd_chunk.html +++ b/doc/compute_msd_chunk.html @@ -97,7 +97,7 @@ file. calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all com/msd cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_msd_chunk.txt b/doc/compute_msd_chunk.txt index 19cc2bddc6..45427ee7a2 100644 --- a/doc/compute_msd_chunk.txt +++ b/doc/compute_msd_chunk.txt @@ -94,7 +94,7 @@ The simplest way to output the results of the compute com/msd calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all com/msd cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/compute_property_chunk.html b/doc/compute_property_chunk.html index aac4407a87..cf4cc03019 100644 --- a/doc/compute_property_chunk.html +++ b/doc/compute_property_chunk.html @@ -92,7 +92,7 @@ will be in unitless reduced units (0-1). calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk1 all property/chunk cc1
 compute myChunk2 all com/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk1 c_myChunk2 file tmp.out mode vector 
diff --git a/doc/compute_property_chunk.txt b/doc/compute_property_chunk.txt
index 8ec160e9df..4fb14ba4d3 100644
--- a/doc/compute_property_chunk.txt
+++ b/doc/compute_property_chunk.txt
@@ -85,7 +85,7 @@ The simplest way to output the results of the compute property/chunk
 calculation to a file is to use the "fix ave/time"_fix_ave_time.html
 command, for example:
 
-compute cc1 chunk/atom molecule
+compute cc1 all chunk/atom molecule
 compute myChunk1 all property/chunk cc1
 compute myChunk2 all com/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk1 c_myChunk2 file tmp.out mode vector :pre
diff --git a/doc/compute_temp_chunk.html b/doc/compute_temp_chunk.html
index 26f227e880..a242277cb9 100644
--- a/doc/compute_temp_chunk.html
+++ b/doc/compute_temp_chunk.html
@@ -114,7 +114,7 @@ non-zero chunk IDs.
 calculation to a file is to use the fix ave/time
 command, for example:
 

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all temp/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_temp_chunk.txt b/doc/compute_temp_chunk.txt index 83ed0e41d5..cfb9e96933 100644 --- a/doc/compute_temp_chunk.txt +++ b/doc/compute_temp_chunk.txt @@ -104,7 +104,7 @@ The simplest way to output the results of the compute temp/chunk calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all temp/chunk cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/compute_torque_chunk.html b/doc/compute_torque_chunk.html index 133d4ac03a..495cad9526 100644 --- a/doc/compute_torque_chunk.html +++ b/doc/compute_torque_chunk.html @@ -64,7 +64,7 @@ image command. calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all torque/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_torque_chunk.txt b/doc/compute_torque_chunk.txt index df62deaf5c..ddd6914e06 100644 --- a/doc/compute_torque_chunk.txt +++ b/doc/compute_torque_chunk.txt @@ -61,7 +61,7 @@ The simplest way to output the results of the compute torque/chunk calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all torque/chunk cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/compute_vcm_chunk.html b/doc/compute_vcm_chunk.html index ef17b94ddd..8c23af9a58 100644 --- a/doc/compute_vcm_chunk.html +++ b/doc/compute_vcm_chunk.html @@ -55,7 +55,7 @@ non-zero chunk IDs. calculation to a file is to use the fix ave/time command, for example:

-
compute cc1 chunk/atom molecule
+
compute cc1 all chunk/atom molecule
 compute myChunk all vcm/chunk cc1
 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector 
 
diff --git a/doc/compute_vcm_chunk.txt b/doc/compute_vcm_chunk.txt index 5e7bbc0891..c507927c5d 100644 --- a/doc/compute_vcm_chunk.txt +++ b/doc/compute_vcm_chunk.txt @@ -52,7 +52,7 @@ The simplest way to output the results of the compute vcm/chunk calculation to a file is to use the "fix ave/time"_fix_ave_time.html command, for example: -compute cc1 chunk/atom molecule +compute cc1 all chunk/atom molecule compute myChunk all vcm/chunk cc1 fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre diff --git a/doc/fix_ave_chunk.html b/doc/fix_ave_chunk.html index ee10e43d5c..6d9d15da7b 100644 --- a/doc/fix_ave_chunk.html +++ b/doc/fix_ave_chunk.html @@ -72,7 +72,7 @@

Examples:

-
fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro ttle1 "My output values"
+
fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro title1 "My output values"
 fix 1 flow ave/chunk 100 10 1000 molchunk vx vz norm sample file vel.profile
 fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running
 fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running 
@@ -95,11 +95,11 @@ fix 1 flow ave/chunk 100 10 1000 cc1 vx vz norm sample file vel.profile
 

Description:

Use one or more per-atom vectors as inputs every few timesteps, sum -their values for multiple chunks of atoms, and average the values for -each chunk over longer timescales. The resulting chunk averages can -be used by other output commands such as -thermo_style custom, and can also be written to a -file. +the values over the atoms in each chunk at each timestep, then average +the per-chunk values over longer timescales. The resulting chunk +averages can be used by other output +commands such as thermo_style +custom, and can also be written to a file.

In LAMMPS, chunks are collections of atoms defined by a compute chunk/atom command, which assigns each atom @@ -195,15 +195,14 @@ property/atom command and then specifying an input value from that compute.

The density/number value means the number density is computed for -each chunk, i.e. a weighting of 1 for each atom. The density/mass -value means the mass density is computed for each , i.e. each atom is -weighted by its mass. The resulting density is normalized by the -volume of the chunk so that units of number/volume or density are -output. See the units command doc page for the -definition of density for each choice of units, e.g. gram/cm^3. If -the chunks defined by the compute chunk/atom -command are spatial bins, the volume is the bin volume. Otherwise it -is the volume of the entire simulation box. +each chunk, i.e. number/volume. The density/mass value means the +mass density is computed for each chunk, i.e. total-mass/volume. The +output values are in units of 1/volume or density (mass/volume). See +the units command doc page for the definition of density +for each choice of units, e.g. gram/cm^3. If the chunks defined by +the compute chunk/atom command are spatial +bins, the volume is the bin volume. Otherwise it is the volume of the +entire simulation box.

The temp value means the temperature is computed for each chunk, by the formula KE = DOF/2 k T, where KE = total kinetic energy of the diff --git a/doc/fix_ave_chunk.txt b/doc/fix_ave_chunk.txt index cf57948b36..bc845a0270 100644 --- a/doc/fix_ave_chunk.txt +++ b/doc/fix_ave_chunk.txt @@ -58,7 +58,7 @@ keyword = {norm} or {ave} or {bias} or {adof} or {cdof} or {file} or {overwrite} [Examples:] -fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro ttle1 "My output values" +fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro title1 "My output values" fix 1 flow ave/chunk 100 10 1000 molchunk vx vz norm sample file vel.profile fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running :pre @@ -81,11 +81,11 @@ fix 1 flow ave/chunk 100 10 1000 cc1 vx vz norm sample file vel.profile :pre [Description:] Use one or more per-atom vectors as inputs every few timesteps, sum -their values for multiple chunks of atoms, and average the values for -each chunk over longer timescales. The resulting chunk averages can -be used by other "output commands"_Section_howto.html#howto_15 such as -"thermo_style custom"_thermo_style.html, and can also be written to a -file. +the values over the atoms in each chunk at each timestep, then average +the per-chunk values over longer timescales. The resulting chunk +averages can be used by other "output +commands"_Section_howto.html#howto_15 such as "thermo_style +custom"_thermo_style.html, and can also be written to a file. In LAMMPS, chunks are collections of atoms defined by a "compute chunk/atom"_compute_chunk_atom.html command, which assigns each atom @@ -181,15 +181,14 @@ property/atom"_compute_property_atom.html command and then specifying an input value from that compute. The {density/number} value means the number density is computed for -each chunk, i.e. a weighting of 1 for each atom. The {density/mass} -value means the mass density is computed for each , i.e. each atom is -weighted by its mass. The resulting density is normalized by the -volume of the chunk so that units of number/volume or density are -output. See the "units"_units.html command doc page for the -definition of density for each choice of units, e.g. gram/cm^3. If -the chunks defined by the "compute chunk/atom"_compute_chunk_atom.html -command are spatial bins, the volume is the bin volume. Otherwise it -is the volume of the entire simulation box. +each chunk, i.e. number/volume. The {density/mass} value means the +mass density is computed for each chunk, i.e. total-mass/volume. The +output values are in units of 1/volume or density (mass/volume). See +the "units"_units.html command doc page for the definition of density +for each choice of units, e.g. gram/cm^3. If the chunks defined by +the "compute chunk/atom"_compute_chunk_atom.html command are spatial +bins, the volume is the bin volume. Otherwise it is the volume of the +entire simulation box. The {temp} value means the temperature is computed for each chunk, by the formula KE = DOF/2 k T, where KE = total kinetic energy of the