diff --git a/doc/Section_commands.html b/doc/Section_commands.html index ee477a76da..88d551c9db 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -399,20 +399,20 @@ This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
These are additional fix styles in USER packages, which can be used if @@ -441,17 +441,17 @@ letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
These are additional compute styles in USER packages, which can be diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index d86bf57177..3f319e16b3 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -472,6 +472,7 @@ g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "atom/swap"_fix_atom_swap.html, "aveforce (c)"_fix_aveforce.html, "ave/atom"_fix_ave_atom.html, +"ave/chunk"_fix_ave_chunk.html, "ave/correlate"_fix_ave_correlate.html, "ave/histo"_fix_ave_histo.html, "ave/spatial"_fix_ave_spatial.html, @@ -627,14 +628,14 @@ letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "angle/local"_compute_angle_local.html, -"atom/molecule"_compute_atom_molecule.html, "body/local"_compute_body_local.html, "bond/local"_compute_bond_local.html, "centro/atom"_compute_centro_atom.html, +"chunk/atom"_compute_chunk_atom.html, "cluster/atom"_compute_cluster_atom.html, "cna/atom"_compute_cna_atom.html, "com"_compute_com.html, -"com/molecule"_compute_com_molecule.html, +"com/chunk"_compute_com_chunk.html, "contact/atom"_compute_contact_atom.html, "coord/atom"_compute_coord_atom.html, "damage/atom"_compute_damage_atom.html, @@ -648,15 +649,15 @@ KOKKOS, o = USER-OMP, t = OPT. "event/displace"_compute_event_displace.html, "group/group"_compute_group_group.html, "gyration"_compute_gyration.html, -"gyration/molecule"_compute_gyration_molecule.html, +"gyration/chunk"_compute_gyration_chunk.html, "heat/flux"_compute_heat_flux.html, "improper/local"_compute_improper_local.html, -"inertia/molecule"_compute_inertia_molecule.html, +"inertia/chunk"_compute_inertia_chunk.html, "ke"_compute_ke.html, "ke/atom"_compute_ke_atom.html, "ke/rigid"_compute_ke_rigid.html, "msd"_compute_msd.html, -"msd/molecule"_compute_msd_molecule.html, +"msd/chunk"_compute_msd_chunk.html, "msd/nongauss"_compute_msd_nongauss.html, "pair"_compute_pair.html, "pair/local"_compute_pair_local.html, @@ -666,7 +667,7 @@ KOKKOS, o = USER-OMP, t = OPT. "pressure (c)"_compute_pressure.html, "property/atom"_compute_property_atom.html, "property/local"_compute_property_local.html, -"property/molecule"_compute_property_molecule.html, +"property/chunk"_compute_property_chunk.html, "rdf"_compute_rdf.html, "reduce"_compute_reduce.html, "reduce/region"_compute_reduce.html, @@ -678,6 +679,7 @@ KOKKOS, o = USER-OMP, t = OPT. "temp (c)"_compute_temp.html, "temp/asphere"_compute_temp_asphere.html, "temp/com"_compute_temp_com.html, +"temp/chunk"_compute_temp_chunk.html, "temp/deform"_compute_temp_deform.html, "temp/partial (c)"_compute_temp_partial.html, "temp/profile"_compute_temp_profile.html, @@ -685,8 +687,9 @@ KOKKOS, o = USER-OMP, t = OPT. "temp/region"_compute_temp_region.html, "temp/sphere"_compute_temp_sphere.html, "ti"_compute_ti.html, +"torque/chunk"_compute_torque_chunk.html, "vacf"_compute_vacf.html, -"vcm/molecule"_compute_vcm_molecule.html, +"vcm/chunk"_compute_vcm_chunk.html, "voronoi/atom"_compute_voronoi_atom.html :tb(c=6,ea=c) These are additional compute styles in USER packages, which can be diff --git a/doc/Section_howto.html b/doc/Section_howto.html index 1729fabea6..43a3ef5524 100644 --- a/doc/Section_howto.html +++ b/doc/Section_howto.html @@ -2155,39 +2155,49 @@ and thus extract D.
In LAMMPS, chunks are collections of atoms defined by a compute -chunk/atom command, which assigns each atom -to a chunk (or to no chunk at all). The per-atom chunk assignments -can be used as input to two other kinds of commands, to calculate -various properties of a system: +
In LAMMS, "chunks" are collections of atoms, as defined by the +compute chunk/atom command, which assigns +each atom to a chunk ID (or to no chunk at all). The number of chunks +and the assignment of chunk IDs to atoms can be static or change over +time. Examples of "chunks" are molecules or spatial bins or atoms +with similar values (e.g. coordination number or potential energy). +
+The per-atom chunk IDs can be used as input to two other kinds of +commands, to calculate various properties of a system:
Here, each of the 3 kinds of chunk-related commands is briefly -overviewed, and some examples given of how to compute -different properties with chunk commands. +overviewed. Then some examples are given of how to compute different +properties with chunk commands.
This compute assigns atoms to chunks of various styles. Only atoms in -the specified group and optional specified region are assigned to a -chunk. Here is a list of possible chunk definitions: +
This compute can assign atoms to chunks of various styles. Only atoms +in the specified group and optional specified region are assigned to a +chunk. Here are some possible chunk definitions:
| atoms in same molecule | chunk ID = molecule ID |
| atoms with same atom type - | chunk ID = atom type |
| atoms of same atom type | chunk ID = atom type |
| all atoms with same atom property (charge, radius, etc) | chunk ID = output of compute property/atom |
| atoms in same cluster | chunk ID = output of compute cluster/atom command |
| atoms in same cluster | chunk ID = output of compute cluster/atom command |
| atoms in same spatial bin | chunk ID = bin ID |
| atoms in same rigid body | chunk ID = ID of an atom in the body |
| all atoms with same local defect structure | chunk ID = output of compute centro/atom or coord/atom command + |
| atoms in same rigid body | chunk ID = molecule ID used to define rigid bodies |
| atoms with similar potential energy | chunk ID = output of compute pe/atom |
| atoms with same local defect structure | chunk ID = output of compute centro/atom or compute coord/atom command |
Note that chunk IDs are integer values, so for atom properties or +computes that produce a floating point value, they will be truncated +to an integer. You could also use the compute in a variable that +scales the floating point value to spread it across multiple intergers. +
Spatial bins can be of various kinds, e.g. 1d bins = slabs, 2d bins = pencils, 3d bins = boxes, spherical bins, cylindrical bins.
-This compute also calculates the number of chunks Nchunk which is +
This compute also calculates the number of chunks Nchunk, which is used by other commands to tally per-chunk data. Nchunk can be a static value or change over time (e.g. the number of clusters). The chunk ID for an individual atom can also be static (e.g. a molecule @@ -2197,7 +2207,7 @@ ID), or dynamic (e.g. what spatial bin an atom is in as it moves). computes, fixes, and variables to be used to define chunk IDs for each atom. This means you can write your own compute or fix to output a -per-atom quantity to use as chunk ID; See +per-atom quantity to use as chunk ID. See Section_modify of the documentation for how to do this. You can also define a per-atom variable in the input script that uses a formula to generate a chunk ID for each @@ -2206,55 +2216,55 @@ atom.
This fix takes the ID of a compute -chunk/atom command as input. For each chunk +chunk/atom command as input. For each chunk, it then sums one or more specified per-atom values over the atoms in each chunk. The per-atom values can be any atom property, such as -force, charge, potential energy, kinetic energy, stress. Additional -keywords are allowed for per-chunk properties like density and -temperature. More generally any per-atom value generated by other -computes, fixes, and per-atom +velocity, force, charge, potential energy, kinetic energy, stress, +etc. Additional keywords are defined for per-chunk properties like +density and temperature. More generally any per-atom value generated +by other computes, fixes, and per-atom variables, can be summed over atoms in each chunk.
Similar to other averaging fixes, this fix allows the summed per-chunk 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. Global arrays or columns thereof can be used as input for -other commands, as described in the following section. +chunk.
Currently the following computes operate on chunks: +
Currently the following computes operate on chunks of atoms to produce +per-chunk values.
They each take the ID of a compute chunk/atom command as input. As their names indicate, they calculate the center-of-mass, radius of gyration, -moments of inertia, mean-squared displacement, and velocity of -center-of-mass for each chunk of atoms. The compute -property/chunk command can be tally the +moments of inertia, mean-squared displacement, temperature, torque, +and velocity of center-of-mass for each chunk of atoms. The compute +property/chunk command can tally the count of atoms in each chunk and extract other per-chunk properties.
The reason these various calculations are not part of the fix ave/chunk command, is that each requires a more complicated operation than simply summing and averaging over per-atom -values in each chunk. Most of them require calculation of a center of -mass, which requires summing mass*position over the atoms and dividing -by summed mass. +values in each chunk. For example, many of them require calculation +of a center of mass, which requires summing mass*position over the +atoms and then dividing by summed mass.
All of these computes produce a global vector or global array as -output, wih one or more values per chunk. Global vectors or arrays -can be used as input for other commands, e.g. +output, wih one or more values per chunk. They can be used +in various ways:
-Here are chunk commands that can be used to calculate various +
Here are eaxmples using chunk commands to calculate various properties:
(1) Mimic the deprecated fix ave/spatial command, to average atom diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index 13274c2fe5..4db7f4da7d 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -2142,37 +2142,47 @@ and thus extract D. 6.23 Using chunks to calculate system properties :link(howto_23),h4 -In LAMMPS, chunks are collections of atoms defined by a "compute -chunk/atom"_compute_chunk_atom.html command, which assigns each atom -to a chunk (or to no chunk at all). The per-atom chunk assignments -can be used as input to two other kinds of commands, to calculate -various properties of a system: +In LAMMS, "chunks" are collections of atoms, as defined by the +"compute chunk/atom"_compute_chunk_atom.html command, which assigns +each atom to a chunk ID (or to no chunk at all). The number of chunks +and the assignment of chunk IDs to atoms can be static or change over +time. Examples of "chunks" are molecules or spatial bins or atoms +with similar values (e.g. coordination number or potential energy). + +The per-atom chunk IDs can be used as input to two other kinds of +commands, to calculate various properties of a system: "fix ave/chunk"_fix_ave_chunk.html -a variety of "compute */chunk"_compute.html commands :ul +any of the "compute */chunk"_compute.html commands :ul Here, each of the 3 kinds of chunk-related commands is briefly -overviewed, and some examples given of how to compute -different properties with chunk commands. +overviewed. Then some examples are given of how to compute different +properties with chunk commands. "Compute chunk/atom"_compute_chunk_atom.html command :h5 -This compute assigns atoms to chunks of various styles. Only atoms in -the specified group and optional specified region are assigned to a -chunk. Here is a list of possible chunk definitions: +This compute can assign atoms to chunks of various styles. Only atoms +in the specified group and optional specified region are assigned to a +chunk. Here are some possible chunk definitions: atoms in same molecule | chunk ID = molecule ID | -atoms with same atom type -| chunk ID = atom type | +atoms of same atom type | chunk ID = atom type | all atoms with same atom property (charge, radius, etc) | chunk ID = output of compute property/atom | -atoms in same cluster | chunk ID = output of compute cluster/atom command | +atoms in same cluster | chunk ID = output of "compute cluster/atom"_compute_cluster_atom.html command | atoms in same spatial bin | chunk ID = bin ID | -atoms in same rigid body | chunk ID = ID of an atom in the body | -all atoms with same local defect structure | chunk ID = output of compute centro/atom or coord/atom command :tb(s=|,c=2) +atoms in same rigid body | chunk ID = molecule ID used to define rigid bodies | +atoms with similar potential energy | chunk ID = output of "compute pe/atom"_compute_pe_atom.html | +atoms with same local defect structure | chunk ID = output of "compute centro/atom"_compute_centro_atom.html or "compute coord/atom"_compute_coord_atom.html command :tb(s=|,c=2) + +Note that chunk IDs are integer values, so for atom properties or +computes that produce a floating point value, they will be truncated +to an integer. You could also use the compute in a variable that +scales the floating point value to spread it across multiple intergers. Spatial bins can be of various kinds, e.g. 1d bins = slabs, 2d bins = pencils, 3d bins = boxes, spherical bins, cylindrical bins. -This compute also calculates the number of chunks {Nchunk} which is +This compute also calculates the number of chunks {Nchunk}, which is used by other commands to tally per-chunk data. {Nchunk} can be a static value or change over time (e.g. the number of clusters). The chunk ID for an individual atom can also be static (e.g. a molecule @@ -2182,7 +2192,7 @@ Note that this compute allows the per-atom output of other "computes"_compute.html, "fixes"_fix.html, and "variables"_variable.html to be used to define chunk IDs for each atom. This means you can write your own compute or fix to output a -per-atom quantity to use as chunk ID; See +per-atom quantity to use as chunk ID. See "Section_modify"_Section_modify.html of the documentation for how to 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 @@ -2191,55 +2201,55 @@ atom. "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 +chunk/atom"_compute_chunk_atom.html command as input. For each chunk, it then sums one or more specified per-atom values over the atoms in each chunk. The per-atom values can be any atom property, such as -force, charge, potential energy, kinetic energy, stress. Additional -keywords are allowed for per-chunk properties like density and -temperature. More generally any per-atom value generated by other -"computes"_compute.html, "fixes"_fix.html, and "per-atom +velocity, force, charge, potential energy, kinetic energy, stress, +etc. Additional keywords are defined for per-chunk properties like +density and temperature. More generally any per-atom value generated +by other "computes"_compute.html, "fixes"_fix.html, and "per-atom variables"_variable.html, can be summed over atoms in each chunk. Similar to other averaging fixes, this fix allows the summed per-chunk 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. Global arrays or columns thereof can be used as input for -other commands, as described in the following section. +chunk. Compute */chunk commands :h5 -Currently the following computes operate on chunks: +Currently the following computes operate on chunks of atoms to produce +per-chunk values. "compute com/chunk"_compute_com_chunk.html "compute gyration/chunk"_compute_gyration_chunk.html "compute inertia/chunk"_compute_inertia_chunk.html "compute msd/chunk"_compute_msd_chunk.html "compute property/chunk"_compute_property_chunk.html +"compute temp/chunk"_compute_temp_chunk.html +"compute torque/chunk"_compute_vcm_chunk.html "compute vcm/chunk"_compute_vcm_chunk.html :ul They each take the ID of a "compute chunk/atom"_compute_chunk_atom.html command as input. As their names indicate, they calculate the center-of-mass, radius of gyration, -moments of inertia, mean-squared displacement, and velocity of -center-of-mass for each chunk of atoms. The "compute -property/chunk"_compute_property_chunk.html command can be tally the +moments of inertia, mean-squared displacement, temperature, torque, +and velocity of center-of-mass for each chunk of atoms. The "compute +property/chunk"_compute_property_chunk.html command can tally the count of atoms in each chunk and extract other per-chunk properties. The reason these various calculations are not part of the "fix ave/chunk command"_fix_ave_chunk.html, is that each requires a more complicated operation than simply summing and averaging over per-atom -values in each chunk. Most of them require calculation of a center of -mass, which requires summing mass*position over the atoms and dividing -by summed mass. +values in each chunk. For example, many of them require calculation +of a center of mass, which requires summing mass*position over the +atoms and then dividing by summed mass. All of these computes produce a global vector or global array as -output, wih one or more values per chunk. Global vectors or arrays -can be used as input for other commands, e.g. +output, wih one or more values per chunk. They can be used +in various ways: -As input to the "fix ave/time"_fix_ave_time.html command, so the -per-chunk values output to a file it creates. The "fix -ave/time"_fix_ave_time.html command can also average the values for -each chunk over time if desired. :ulb,l +As input to the "fix ave/time"_fix_ave_time.html command, which can +write the values to a file and optionally time average them. :ulb,l As input to the "fix ave/histo"_fix_ave_histo.html command to histogram values across chunks. E.g. a histogram of cluster sizes or @@ -2251,7 +2261,7 @@ largest cluster or fastest diffusing molecule. :l,ule Example calculations with chunks :h5 -Here are chunk commands that can be used to calculate various +Here are eaxmples using chunk commands to calculate various properties: (1) Mimic the deprecated fix ave/spatial command, to average atom diff --git a/doc/compute.html b/doc/compute.html index 4b8bd2d51b..c6a3030e53 100644 --- a/doc/compute.html +++ b/doc/compute.html @@ -180,14 +180,13 @@ are given in the compute section of this page.
There are also additional compute styles submitted by users which are diff --git a/doc/compute.txt b/doc/compute.txt index c69317808c..0872ded4ae 100644 --- a/doc/compute.txt +++ b/doc/compute.txt @@ -175,14 +175,13 @@ are given in the compute section of "this page"_Section_commands.html#cmd_5. "angle/local"_compute_bond_local.html - theta and energy of each angle -"atom/molecule"_compute_atom_molecule.html - sum per-atom properties for each molecule "body/local"_compute_body_local.html - attributes of body sub-particles "bond/local"_compute_bond_local.html - distance and energy of each bond "centro/atom"_compute_centro_atom.html - centro-symmetry parameter for each atom "cluster/atom"_compute_cluster_atom.html - cluster ID for each atom "cna/atom"_compute_cna_atom.html - common neighbor analysis (CNA) for each atom "com"_compute_com.html - center-of-mass of group of atoms -"com/molecule"_compute_com_molecule.html - center-of-mass for each molecule +"com/chunk"_compute_com_chunk.html - center-of-mass for each chunk "contact/atom"_compute_contact_atom.html - contact count for each spherical particle "coord/atom"_compute_coord_atom.html - coordination number for each atom "damage/atom"_compute_damage_atom.html - Peridynamic damage for each atom @@ -196,15 +195,15 @@ page"_Section_commands.html#cmd_5. "event/displace"_compute_event_displace.html - detect event on atom displacement "group/group"_compute_group_group.html - energy/force between two groups of atoms "gyration"_compute_gyration.html - radius of gyration of group of atoms -"gyration/molecule"_compute_gyration_molecule.html - radius of gyration for each molecule +"gyration/chunk"_compute_gyration_chunk.html - radius of gyration for each chunk "heat/flux"_compute_heat_flux.html - heat flux through a group of atoms "improper/local"_compute_improper_local.html - angle of each improper -"inertia/molecule"_compute_inertia_molecule.html - inertia tensor for each molecule +"inertia/chunk"_compute_inertia_chunk.html - inertia tensor for each chunk "ke"_compute_ke.html - translational kinetic energy "ke/atom"_compute_ke_atom.html - kinetic energy for each atom "ke/rigid"_compute_ke_rigid.html - translational kinetic energy of rigid bodies "msd"_compute_msd.html - mean-squared displacement of group of atoms -"msd/molecule"_compute_msd_molecule.html - mean-squared displacement for each molecule +"msd/chunk"_compute_msd_chunk.html - mean-squared displacement for each chunk "msd/nongauss"_compute_msd_nongauss.html - MSD and non-Gaussian parameter of group of atoms "pair"_compute_pair.html - values computed by a pair style "pair/local"_compute_pair_local.html - distance/energy/force of each pairwise interaction @@ -214,7 +213,7 @@ page"_Section_commands.html#cmd_5. "pressure"_compute_pressure.html - total pressure and pressure tensor "property/atom"_compute_property_atom.html - convert atom attributes to per-atom vectors/arrays "property/local"_compute_property_local.html - convert local attributes to localvectors/arrays -"property/molecule"_compute_property_molecule.html - convert molecule attributes to localvectors/arrays +"property/chunk"_compute_property_chunk.html - extract various per-chunk attributes "rdf"_compute_rdf.html - radial distribution function g(r) histogram of group of atoms "reduce"_compute_reduce.html - combine per-atom quantities into a single global value "reduce/region"_compute_reduce.html - same as compute reduce, within a region @@ -225,6 +224,7 @@ page"_Section_commands.html#cmd_5. "stress/atom"_compute_stress_atom.html - stress tensor for each atom "temp"_compute_temp.html - temperature of group of atoms "temp/asphere"_compute_temp_asphere.html - temperature of aspherical particles +"temp/chunk"_compute_temp_chunk.html - temperature of each chunk "temp/com"_compute_temp_com.html - temperature after subtracting center-of-mass velocity "temp/deform"_compute_temp_deform.html - temperature excluding box deformation velocity "temp/partial"_compute_temp_partial.html - temperature excluding one or more dimensions of velocity @@ -233,7 +233,9 @@ page"_Section_commands.html#cmd_5. "temp/region"_compute_temp_region.html - temperature of a region of atoms "temp/sphere"_compute_temp_sphere.html - temperature of spherical particles "ti"_compute_ti.html - thermodyanmic integration free energy values +"torque/chunk"_compute_torque_chunk.html - torque applied on each chunk "vacf"_compute_vacf.html - velocity-autocorrelation function of group of atoms +"vcm/chunk"_compute_vcm_chunk.html - velocity of center-of-mass for each chunk "voronoi/atom"_compute_voronoi_atom.html - Voronoi volume and neighbors for each atom :ul There are also additional compute styles submitted by users which are diff --git a/doc/compute_atom_molecule.html b/doc/compute_atom_molecule.html deleted file mode 100644 index 419c065285..0000000000 --- a/doc/compute_atom_molecule.html +++ /dev/null @@ -1,128 +0,0 @@ - -
Syntax: -
-compute ID group-ID atom/molecule input1 input2 ... --
c_ID = per-atom vector calculated by a compute with ID - c_ID[I] = Ith column of per-atom array calculated by a compute with ID - f_ID = per-atom vector calculated by a fix with ID - f_ID[I] = Ith column of per-atom array calculated by a fix with ID - v_name = per-atom vector calculated by an atom-style variable with name -- -
Examples: -
-compute 1 all atom/molecule c_ke c_pe -compute 1 top atom/molecule v_myFormula c_stress[3] --
Description: -
-Define a calculation that sums per-atom values on a per-molecule -basis, one per listed input. The inputs can computes, -fixes, or variables that generate per-atom -quantities. Note that attributes stored by atoms, such as mass or -force, can also be summed on a per-molecule basis, by accessing these -quantities via the compute property/atom -command. -
-Each listed input is operated on independently. Only atoms within the -specified group contribute to the per-molecule sum. Note that compute -or fix inputs define their own group which may affect the quantities -they return. For example, if a compute is used as an input which -generates a per-atom vector, it will generate values of 0.0 for atoms -that are not in the group specified for that compute. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-If an input begins with "c_", a compute ID must follow which has been -previously defined in the input script and which generates per-atom -quantities. See the individual compute doc page for -details. If no bracketed integer is appended, the vector calculated -by the compute is used. If a bracketed integer is appended, the Ith -column of the array calculated by the compute is used. Users can also -write code for their own compute styles and add them to -LAMMPS. -
-If an input begins with "f_", a fix ID must follow which has been -previously defined in the input script and which generates per-atom -quantities. See the individual fix doc page for details. -Note that some fixes only produce their values on certain timesteps, -which must be compatible with when compute atom/molecule references -the values, else an error results. If no bracketed integer is -appended, the vector calculated by the fix is used. If a bracketed -integer is appended, the Ith column of the array calculated by the fix -is used. Users can also write code for their own fix style and add -them to LAMMPS. -
-If an input begins with "v_", a variable name must follow which has -been previously defined in the input script. It must be an -atom-style variable. Atom-style variables can -reference thermodynamic keywords and various per-atom attributes, or -invoke other computes, fixes, or variables when they are evaluated, so -this is a very general means of generating per-atom quantities to sum -on a per-molecule basis. -
-Here is an example of using this command to sum up the components of -total force on each molecule and print them to a file every 1000 -timesteps. The printed values could also be time-averaged by the fix -ave/time command if desired, by changing "1000 1 1000" to "10 100 -1000" (for example): -
-compute 1 all property/atom fx fy fz -compute 2 all atom/molecule c_1[1] c_1[2] c_1[3] -fix 1 all ave/time 1000 1 1000 c_2 mode vector file tmp.molecule.force --
Output info: -
-This compute calculates a global vector or global array depending on -the number of input values. The length of the vector or number of -rows in the array is the number of molecules. If a single input is -specified, a global vector is produced. If two or more inputs are -specified, a global array is produced where the number of columns = -the number of inputs. The vector or array can be accessed by any -command that uses global values from a compute as input. See this -section for an overview of LAMMPS output -options. -
-All the vector or array values calculated by this compute are -"extensive". -
-The vector or array values will be in whatever units the -input quantities are in. -
-Restrictions: none -
-Related commands: -
- -Default: none -
- diff --git a/doc/compute_atom_molecule.txt b/doc/compute_atom_molecule.txt deleted file mode 100644 index 88e8c9eb6d..0000000000 --- a/doc/compute_atom_molecule.txt +++ /dev/null @@ -1,118 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute atom/molecule command :h3 - -[Syntax:] - -compute ID group-ID atom/molecule input1 input2 ... :pre - -ID, group-ID are documented in "compute"_compute.html command :ulb,l -atom/molecule = style name of this compute command :l -one or more inputs can be listed :l -input = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l - c_ID = per-atom vector calculated by a compute with ID - c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID - f_ID = per-atom vector calculated by a fix with ID - f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID - v_name = per-atom vector calculated by an atom-style variable with name :pre -:ule - -[Examples:] - -compute 1 all atom/molecule c_ke c_pe -compute 1 top atom/molecule v_myFormula c_stress\[3\] :pre - -[Description:] - -Define a calculation that sums per-atom values on a per-molecule -basis, one per listed input. The inputs can "computes"_compute.html, -"fixes"_fix.html, or "variables"_variable.html that generate per-atom -quantities. Note that attributes stored by atoms, such as mass or -force, can also be summed on a per-molecule basis, by accessing these -quantities via the "compute property/atom"_compute_property_atom.html -command. - -Each listed input is operated on independently. Only atoms within the -specified group contribute to the per-molecule sum. Note that compute -or fix inputs define their own group which may affect the quantities -they return. For example, if a compute is used as an input which -generates a per-atom vector, it will generate values of 0.0 for atoms -that are not in the group specified for that compute. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -If an input begins with "c_", a compute ID must follow which has been -previously defined in the input script and which generates per-atom -quantities. See the individual "compute"_compute.html doc page for -details. If no bracketed integer is appended, the vector calculated -by the compute is used. If a bracketed integer is appended, the Ith -column of the array calculated by the compute is used. Users can also -write code for their own compute styles and "add them to -LAMMPS"_Section_modify.html. - -If an input begins with "f_", a fix ID must follow which has been -previously defined in the input script and which generates per-atom -quantities. See the individual "fix"_fix.html doc page for details. -Note that some fixes only produce their values on certain timesteps, -which must be compatible with when compute atom/molecule references -the values, else an error results. If no bracketed integer is -appended, the vector calculated by the fix is used. If a bracketed -integer is appended, the Ith column of the array calculated by the fix -is used. Users can also write code for their own fix style and "add -them to LAMMPS"_Section_modify.html. - -If an input begins with "v_", a variable name must follow which has -been previously defined in the input script. It must be an -"atom-style variable"_variable.html. Atom-style variables can -reference thermodynamic keywords and various per-atom attributes, or -invoke other computes, fixes, or variables when they are evaluated, so -this is a very general means of generating per-atom quantities to sum -on a per-molecule basis. - -Here is an example of using this command to sum up the components of -total force on each molecule and print them to a file every 1000 -timesteps. The printed values could also be time-averaged by the fix -ave/time command if desired, by changing "1000 1 1000" to "10 100 -1000" (for example): - -compute 1 all property/atom fx fy fz -compute 2 all atom/molecule c_1\[1\] c_1\[2\] c_1\[3\] -fix 1 all ave/time 1000 1 1000 c_2 mode vector file tmp.molecule.force :pre - -:line - -[Output info:] - -This compute calculates a global vector or global array depending on -the number of input values. The length of the vector or number of -rows in the array is the number of molecules. If a single input is -specified, a global vector is produced. If two or more inputs are -specified, a global array is produced where the number of columns = -the number of inputs. The vector or array can be accessed by any -command that uses global values from a compute as input. See "this -section"_Section_howto.html#howto_15 for an overview of LAMMPS output -options. - -All the vector or array values calculated by this compute are -"extensive". - -The vector or array values will be in whatever "units"_units.html the -input quantities are in. - -[Restrictions:] none - -[Related commands:] - -"compute"_compute.html, "fix"_fix.html, "variable"_variable.html - -[Default:] none diff --git a/doc/compute_chunk_atom.html b/doc/compute_chunk_atom.html new file mode 100644 index 0000000000..24d4598c62 --- /dev/null +++ b/doc/compute_chunk_atom.html @@ -0,0 +1,568 @@ + +Syntax: +
+compute ID group-ID chunk/atom style args keyword values ... ++
style = bin/1d or bin/2d or bin/3d or type or molecule or compute/fix/variable + bin/1d args = dim origin delta + dim = x or y or z + origin = lower or center or upper or coordinate value (distance units) + delta = thickness of spatial bins in dim (distance units) + bin/2d args = dim origin delta dim origin delta + dim = x or y or z + origin = lower or center or upper or coordinate value (distance units) + delta = thickness of spatial bins in dim (distance units) + bin/3d args = dim origin delta dim origin delta dim origin delta + dim = x or y or z + origin = lower or center or upper or coordinate value (distance units) + delta = thickness of spatial bins in dim (distance units) + type args = none + molecule args = none + compute/fix/variable = c_ID, c_ID[I], f_ID, f_ID[I], v_name with no args + c_ID = per-atom vector calculated by a compute with ID + c_ID[I] = Ith column of per-atom array calculated by a compute with ID + f_ID = per-atom vector calculated by a fix with ID + f_ID[I] = Ith column of per-atom array calculated by a fix with ID + v_name = per-atom vector calculated by an atom-style variable with name ++
region value = region-ID + region-ID = ID of region atoms must be in to be part of a chunk + nchunk value = once or every + once = only compute the number of chunks once + every = re-compute the number of chunks whenever invoked + limit values = 0 or Nc max or Nc exact + 0 = no limit on the number of chunks + Nc max = limit number of chunks to be <= Nc + Nc exact = set number of chunks to exactly Nc + ids value = once or nfreq or every + once = assign chunk IDs to atoms only once, they persist thereafter + nfreq = assign chunk IDs to atoms only once every Nfreq steps (if invoked by fix ave/chunk which sets Nfreq) + every = assign chunk IDs to atoms whenever invoked + compress value = yes or no + yes = compress chunk IDs to eliminate IDs with no atoms + no = do not compress chunk IDs even if some IDs have no atoms + discard value = yes or no or mixed + yes = discard atoms with out-of-range chunk IDs by assigning a chunk ID = 0 + no = keep atoms with out-of-range chunk IDs by assigning a valid chunk ID + mixed = keep or discard such atoms according to spatial binning rule + bound values = x/y/z lo hi + x/y/z = x or y or z to bound sptial bins in this dimension + lo = lower or coordinate value (distance units) + hi = upper or coordinate value (distance units) + units value = box or lattice or reduced ++ +
Examples: +
+compute 1 all chunk/atom type +compute 1 all chunk/atom bin/1d z lower 0.02 units reduced +compute 1 all chunk/atom bin/2d z lower 1.0 y 0.0 2.5 +compute 1 all chunk/atom molecule region sphere nchunk once ids once compress yes ++
Description: +
+Define a computation that calculates an integer chunk ID from 1 to +Nchunk for each atom in the group. Values of chunk IDs are determined +by the style of chunk, which can be based on atom type or molecule +ID or spatial binning or a per-atom property or value calculated by +another compute, fix, or atom-style +variable. Per-atom chunk IDs can be used by other +computes with "chunk" in their style name, such as compute +com/chunk or compute +msd/chunk. Or they can be used by the fix +ave/chunk command to sum and time average a +variety of per-atom properties over the atoms in each chunk. Or they +can simply be accessed by any command that uses per-atom values from a +compute as input, as discussed in Section_howto +15. +
+See Section_howto 23 for an overview of +how this compute can be used with a variety of other commands to +tabulate properties of a simulation. The howto section gives several +examples of input script commands that can be used to calculate +interesting properties. +
+Conceptually it is important to realize that this compute does two +simple things. First, it sets the value of Nchunk = the number of +chunks, which can be a constant value or change over time. Second, it +assigns each atom to a chunk via a chunk ID. Chunk IDs range from 1 +to Nchunk inclusive; some chunks may have no atoms assigned to them. +Atoms that do not belong to any chunk are assigned a value of 0. Note +that the two operations are not always performed together. For +example, spatial bins can be setup once (which sets Nchunk), and +atoms assigned to those bins many times thereafter (setting their +chunk IDs). +
+All other commands in LAMMPS that use chunk IDs assume there are +Nchunk number of chunks, and that every atom is assigned to one of +those chunks, or not assigned to any chunk. +
+There are many options for specifying for how and when Nchunk is +calculated, and how and when chunk IDs are assigned to atoms. The +details depend on the chunk style and its args, as well as +optional keyword settings. They can also depend on whether a fix +ave/chunk command is using this compute, since +that command requires Nchunk to remain static across windows of +timesteps it specifies, while it accumulates per-chunk averages. +
+The details are described below. +
+The different chunk styles operate as follows. For each style, how it +calculates Nchunk and assigns chunk IDs to atoms is explained. Note +that using the optional keywords can change both of those actions, as +described further below where the keywords are discussed. +
+The binning styles perform a spatial binning of atoms, and assign an +atom the chunk ID corresponding to the bin number it is in. Nchunk +is set to the number of bins, which can change if the simulation box +size changes. +
+The bin/1d, bin/2d, and bin/3d styles define bins as 1d layers +(slabs), 2d pencils, or 3d boxes. The dim, origin, and delta +settings are specified 1, 2, or 3 times. For 2d or 3d bins, there is +no restriction on specifying dim = x before dim = y or z, or dim = y +before dim = z. Bins in a particular dim have a bin size in that +dimension given by delta. In each dimension, bins are defined +relative to a specified origin, which may be the lower/upper edge of +the simulation box (in that dimension), or its center point, or a +specified coordinate value. Starting at the origin, sufficient bins +are created in both directions to completely span the simulation box +or the bounds specified by the optional bounds keyword. +
+For orthogonal simulation boxes, the bins are layers, pencils, or +boxes aligned with the xyz coordinate axes. For triclinic +(non-orthogonal) simulation boxes, the bin faces are parallel to the +tilted faces of the simulation box. See this +section of the manual for a discussion of +the geometry of triclinic boxes in LAMMPS. As described there, a +tilted simulation box has edge vectors a,b,c. In that nomenclature, +bins in the x dimension have faces with normals in the "b" cross "c" +direction. Bins in y have faces normal to the "a" cross "c" +direction. And bins in z have faces normal to the "a" cross "b" +direction. Note that in order to define the size and position of +these bins in an unambiguous fashion, the units option must be set +to reduced when using a triclinic simulation box, as noted below. +
+The meaning of origin and delta for triclinic boxes is as follows. +Consider a triclinic box with bins that are 1d layers or slabs in the +x dimension. No matter how the box is tilted, an origin of 0.0 +means start layers at the lower "b" cross "c" plane of the simulation +box and an origin of 1.0 means to start layers at the upper "b" +cross "c" face of the box. A delta value of 0.1 in reduced units +means there will be 10 layers from 0.0 to 1.0, regardless of the +current size or shape of the simulation box. +
+The created bins (and hence the chunk IDs) are numbered consecutively +from 1 to the number of bins = Nchunk. For 2d and 3d bins, the +numbering varies most rapidly in the first dimension (which could be +x, y, or z), next rapidly in the 2nd dimension, and most slowly in the +3rd dimension. +
+Each time this compute is invoked, each atom is mapped to a bin based +on its current position. Note that between reneighboring timesteps, +atoms can move outside the current simulation box. If the box is +periodic (in that dimension) the atom is remapping into the periodic +box for purposes of binning. If the box in not periodic, the atom may +have moved outside the bounds of all bins. If an atom is not inside +any bin, the discard keyword is used to determine how a chunk ID is +assigned to the atom. +
+The type style uses the atom type as the chunk ID. Nchunk is set +to the number of atom types defined for the simulation, e.g. via the +create_box or read_data commands. +
+The molecule style uses the molecule ID of each atom as its chunk +ID. Nchunk is set to the largest chunk ID. Note that this excludes +molecule IDs for atoms which are not in the specified group or +optional region. +
+There is no requirement that all atoms in a particular molecule are +assigned the same chunk ID (zero or non-zero), though you probably +want that to be the case, if you wish to compute a per-molecule +property. LAMMPS will issue a warning if that is not the case, but +only the first time that Nchunk is calculated. +
+Note that atoms with a molecule ID = 0, which may be non-molecular +solvent atoms, have an out-of-range chunk ID. These atoms are +discarded (not assigned to any chunk) or assigned to Nchunk, +depending on the value of the discard keyword. +
+The compute/fix/variable styles set the chunk ID of each atom based +on a quantity calculated and stored by a compute, fix, or variable. +In each case, it must be a per-atom quantity. In each case the +referenced floating point values are converted to an integer chunk ID +as follows. The floating point value is truncated (rounded down) to +an integer value. If the integer value is <= 0, then a chunk ID of 0 +is assigned to the atom. If the integer value is > 0, it becomes the +chunk ID to the atom. Nchunk is set to the largest chunk ID. Note +that this excludes atoms which are not in the specified group or +optional region. +
+If the style begins with "c_", a compute ID must follow which has been +previously defined in the input script. If no bracketed integer is +appended, the per-atom vector calculated by the compute is used. If a +bracketed integer is appended, the Ith column of the per-atom array +calculated by the compute is used. Users can also write code for +their own compute styles and add them to LAMMPS. +
+If the style begins with "f_", a fix ID must follow which has been +previously defined in the input script. If no bracketed integer is +appended, the per-atom vector calculated by the fix is used. If a +bracketed integer is appended, the Ith column of the per-atom array +calculated by the fix is used. Note that some fixes only produce +their values on certain timesteps, which must be compatible with the +timestep on which this compute accesses the fix, else an error +results. Users can also write code for their own fix styles and add +them to LAMMPS. +
+If a value begins with "v_", a variable name for an atom or +atomfile style variable must follow which has been +previously defined in the input script. Variables of style atom can +reference thermodynamic keywords and various per-atom attributes, or +invoke other computes, fixes, or variables when they are evaluated, so +this is a very general means of generating per-atom quantities to +treat as a chunk ID. +
+Normally, Nchunk = the number of chunks, is re-calculated every time +this fix is invoked, though the value may or may not change. As +explained below, the nchunk keyword can be set to once which means +Nchunk will never change. +
+If a fix ave/chunk command uses this compute, it +can also turn off the re-calculation of Nchunk for one or more +windows of timesteps. The extent of the windows, during which Nchunk +is held constant, are determined by the Nevery, Nrepeat, Nfreq +values and the ave keyword setting that are used by the fix +ave/chunk command. +
+Specifically, if ave = one, then for each span of Nfreq +timesteps, Nchunk is held constant between the first timestep when +averaging is done (within the Nfreq-length window), and the last +timestep when averaging is done (multiple of Nfreq). If ave = +running or window, then Nchunk is held constant forever, +starting on the first timestep when the fix +ave/chunk command invokes this compute. +
+Note that multiple fix ave/chunk commands can use +the same compute chunk/atom compute. However, the time windows they +induce for holding Nchunk constant must be identical, else an error +will be generated. +
+The various optional keywords operate as follows. Note that some of +them function differently or are ignored by different chunk styles. +Some of them also have different default values, depending on +the chunk style, as listed below. +
+The region keyword applies to all chunk styles. If used, an atom +must be in both the specified group and the specified geometric +region to be assigned to a chunk. +
+The nchunk keyword applies to all chunk styles. It specifies how +often Nchunk is recalculated, which in turn can affect the chunk IDs +assigned to individual atoms. +
+If nchunk is set to once, then Nchunk is only calculated once, +the first time this compute is invoked. If nchunk is set to +every, then Nchunk is re-calculated every time the compute is +invoked. Note that, as described above, the use of this compute +by the fix ave/chunk command can override +the every setting. +
+The default values for nchunk are listed below and depend on the +chunk style and other system and keyword settings. They attempt to +represent typical use cases for the various chunk styles. The +nchunk value can always be set explicitly if desired. +
+The limit keyword can be used to limit the calculated value of +Nchunk = the number of chunks. The limit is applied each time +Nchunk is calculated, which also limits the chunk IDs assigned to +any atom. The limit keyword is used by all chunk styles except the +binning styles, which ignore it. This is because the number of bins +can be tailored using the bound keyword (described below) which +effectively limits the size of Nchunk. +
+If limit is set to Nc = 0, then no limit is imposed on Nchunk, +though the compress keyword can still be used to reduce Nchunk, as +described below. +
+If Nc > 0, then the effect of the limit keyword depends on whether +the compress keyword is also used with a setting of yes, and +whether the compress keyword is specified before the limit keyword +or after. +
+In all cases, Nchunk is first calculated in the usual way for each +chunk style, as described above. +
+First, here is what occurs if compress yes is not set. If limit +is set to Nc max, then Nchunk is reset to the smaller of Nchunk +and Nc. If limit is set to Nc exact, then Nchunk is reset to +Nc, whether the original Nchunk was larger or smaller than Nc. +If Nchunk shrank due to the limit setting, then atom chunk IDs > +Nchunk will be reset to 0 or Nchunk, depending on the setting of +the discard keyword. If Nchunk grew, there will simply be some +chunks with no atoms assigned to them. +
+If compress yes is set, and the compress keyword comes before the +limit keyword, the compression operation is performed first, as +described below, which resets Nchunk. The limit keyword is then +applied to the new Nchunk value, exactly as described in the +preceeding paragraph. Note that in this case, all atoms will end up +with chunk IDs <= Nc, but their original values (e.g. molecule ID or +compute/fix/variable value) may have been > Nc, because of the +compression operation. +
+If compress yes is set, and the compress keyword comes after the +limit keyword, then the limit value of Nc is applied first to +the uncompressed value of Nchunk, but only if Nc < Nchunk +(whether Nc max or Nc exact is used). This effectively means all +atoms with chunk IDs > Nc have their chunk IDs reset to 0 or Nc, +depending on the setting of the discard keyword. The compression +operation is then performed, which may shrink Nchunk further. If +the new Nchunk < Nc and limit = Nc exact is specified, then +Nchunk is reset to Nc, which results in extra chunks with no atoms +assigned to them. Note that in this case, all atoms will end up with +chunk IDs <= Nc, and their original values (e.g. molecule ID or +compute/fix/variable value) will also have been <= Nc. +
+The ids keyword applies to all chunk styles. If the setting is +once then the chunk IDs assigned to atoms the first time this +compute is invoked will be permanent, and never be re-computed. +
+If the setting is nfreq and if a fix ave/chunk +command is using this compute, then in each of the Nchunk = constant +time windows (discussed above), the chunk ID's assigned to atoms on +the first step of the time window will persist until the end of the +time window. +
+If the setting is every, which is the default, then chunk IDs are +re-calculated on any timestep this compute is invoked. +
+IMPORTANT NOTE: If you want the persistent chunk-IDs calculated by +this compute to be continuous when running from a restart +file, then you should use the same ID for this +compute, as in the original run. This is so that the fix this compute +creates to store per-atom quantities will also have the same ID, and +thus be initialized correctly with chunk IDs from the restart file. +
+The compress keyword applies to all chunk styles and affects how +Nchunk is calculated, which in turn affects the chunk IDs assigned +to each atom. It is useful for converting a "sparse" set of chunk IDs +(with many IDs that have no atoms assigned to them), into a "dense" +set of IDs, where every chunk has one or more atoms assigned to it. +
+Two possible use cases are as follows. If a large simulation box is +mostly empty space, then the binning style may produce many bins +with no atoms. If compress is set to yes, only bins with atoms +will be contribute to Nchunk. Likewise, the molecule or +compute/fix/variable styles may produce large Nchunk values. For +example, the compute cluster/atom command +assigns every atom an atom ID for one of the atoms it is clustered +with. For a million-atom system with 5 clusters, there would only be +5 unique chunk IDs, but the largest chunk ID might be 1 million, +resulting in Nchunk = 1 million. If compress is set to yes, +Nchunk will be reset to 5. +
+If compress is set to no, which is the default, no compression is +done. If it is set to yes, all chunk IDs with no atoms are removed +from the list of chunk IDs, and the list is sorted. The remaining +chunk IDs are renumbered from 1 to Nchunk where Nchunk is the new +length of the list. The chunk IDs assigned to each atom reflect +the new renumbering from 1 to Nchunk. +
+The original chunk IDs (before renumbering) can be accessed by the +compute property/chunk command and its +id keyword, or by the fix ave/chunk command +which outputs the original IDs as one of the columns in its global +output array. For example, using the "compute cluster/atom" command +discussed above, the original 5 unique chunk IDs might be atom IDs +(27,4982,58374,857838,1000000). After compresion, these will be +renumbered to (1,2,3,4,5). The original values (27,...,1000000) can +be output to a file by the fix ave/chunk command, +or by using the fix ave/time command in +conjunction with the compute +property/chunk command. +
+IMPORTANT NOTE: The compression operation requires global +communication across all processors to share their chunk ID values. +It can require large memory on every processor to store them, even +after they are compressed, if there are are a large number of unique +chunk IDs with atoms assigned to them. It uses a STL map to find +unique chunk IDs and store them in sorted order. Each time an atom is +assigned a compressed chunk ID, it must access the STL map. All of +this means that compression can be expensive, both in memory and CPU +time. The use of the limit keyword in conjunction with the +compress keyword can affect these costs, depending on which keyword +is used first. So use this option with care. +
+The discard keyword applies to all chunk styles. It affects what +chunk IDs are assigned to atoms that do not match one of the valid +chunk IDs from 1 to Nchunk. Note that it does not apply to atoms +that are not in the specified group or optionally specified region. +Those atoms are always assigned a chunk ID = 0. +
+If the calculated chunk ID for an atom is not within the range 1 to +Nchunk then it is a "discard" atom. Note that Nchunk may have +been shrunk by the limit keyword. Or the compress keyword may +have eliminated chunk IDs that were valid before the compression took +place, and are now not in the compressed list. Also note that for the +molecule chunk style, if new molecules are added to the system, +their chunk IDs may exceed a previously calculated Nchunk. +Likewise, evaluation of a compute/fix/variable on a later timestep may +return chunk IDs that are invalid for the previously calculated +Nchunk. +
+All the chunk styles except the binning styles, must use discard +set to either yes or no. If discard is set to yes, which is +the default, then every "discard" atom has its chunk ID set to 0. If +discard is set to no, every "discard" atom has its chunk ID set to +Nchunk. I.e. it becomes part of the last chunk. +
+The binning styles use the discard keyword to decide whether to +discard atoms outside the spatial domain covered by bins, or to assign +them to the bin they are nearest to. Details are as follows. +
+If discard is set to yes, an out-of-domain atom will have its +chunk ID set to 0. If discard is set to no, the atom will have +its chunk ID set to the first or last bin in that dimension. If +(discard is set to mixed, which is the default, it will only have +its chunk ID set to the first or last bin if bins extend to the +simulation box boundary in that dimension. This is the case if the +bound keyword settings are lower and upper, which is the +default. If the bound keyword settings are numeric values, then the +atom will have its chunk ID set to 0 if it is outside the bounds of +any bin. Note that in this case, it is possible that the first or +last bin extends beyond the numeric bounds settings, depending on +the specified origin. If this is the case, the chunk ID of the atom +is only set to 0 if it is outside the first or last bin, not if it is +simply outside the numeric bounds setting. +
+The bound keyword only applies to the binning styles; otherwise it +is ignored. It can be used one or more times to limit the extent of +bin coverage in a specified dimension, i.e. to only bin a portion of +the box. If the lo setting is lower or the hi setting is +upper, the bin extent in that direction extends to the box boundary. +If a numeric value is used for lo and/or hi, then the bin extent +in the lo or hi direction extends only to that value, which is +assumed to be inside (or at least near) the simulation box boundaries, +though LAMMPS does not check for this. Note that using the bound +keyword typically reduces the total number of bins and thus the number +of chunks Nchunk. +
+The units keyword only applies to the binning styles; otherwise it +is ignored. It determines the meaning of the distance units used for +the bin sizes delta and for origin and bounds values if they are +coordinate values. For orthogonal simulation boxes, any of the 3 +options may be used. For non-orthogonal (triclinic) simulation boxes, +only the reduced option may be used. +
+A box value selects standard distance units as defined by the +units command, e.g. Angstroms for units = real or metal. +A lattice value means the distance units are in lattice spacings. +The lattice command must have been previously used to +define the lattice spacing. A reduced value means normalized +unitless values between 0 and 1, which represent the lower and upper +faces of the simulation box respectively. Thus an origin value of +0.5 means the center of the box in any dimension. A delta value of +0.1 means 10 bins span the box in that dimension. +
+Output info: +
+This compute calculates a per-atom vector, which can be accessed by +any command that uses per-atom values from a compute as input. See +Section_howto 15 for an overview of +LAMMPS output options. +
+The per-atom vector values are unitless chunk IDs, ranging from 1 to +Nchunk (inclusive) for atoms assigned to chunks, and 0 for atoms not +belonging to a chunk. +
+Restrictions: +
+Even if the nchunk keyword is set to once, the chunk IDs assigned +to each atom are not stored in a restart files. This means you cannot +expect those assignments to persist in a restarted simulation. +Instead you must re-specify this command and assign atoms to chunks when +the restarted simulation begins. +
+Related commands: +
+ +Default: +
+The option defaults are as follows: +
+Syntax: +
+compute ID group-ID com/chunk chunkID ++
Examples: +
+compute 1 fluid com/chunk molchunk ++
Description: +
+Define a computation that calculates the center-of-mass for multiple +chunks of atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates the x,y,z coordinates of the center-of-mass +for each chunk, which includes all effects due to atoms passing thru +periodic boundaries. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's +center-of-mass in "unwrapped" form, by using the image flags +associated with each atom. See the dump custom command +for a discussion of "unwrapped" coordinates. See the Atoms section of +the read_data command for a discussion of image flags +and how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the set +image command. +
+The simplest way to output the results of the compute com/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all com/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
Output info: +
+This compute calculates a global array where the number of rows = the +number of chunks Nchunk as calculated by the specified compute +chunk/atom command. The number of columns = +3 for the x,y,z center-of-mass coordinates of each chunk. These +values can be accessed by any command that uses global array values +from a compute as input. See Section_howto +15 for an overview of LAMMPS output +options. +
+The array values are "intensive". The array values will be in +distance units. +
+Restrictions: none +
+Related commands: +
+ +Default: none +
+ diff --git a/doc/compute_com_chunk.txt b/doc/compute_com_chunk.txt new file mode 100644 index 0000000000..1e9191996c --- /dev/null +++ b/doc/compute_com_chunk.txt @@ -0,0 +1,87 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute com/chunk command :h3 + +[Syntax:] + +compute ID group-ID com/chunk chunkID :pre + +ID, group-ID are documented in "compute"_compute.html command +com/chunk = style name of this compute command +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul + +[Examples:] + +compute 1 fluid com/chunk molchunk :pre + +[Description:] + +Define a computation that calculates the center-of-mass for multiple +chunks of atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates the x,y,z coordinates of the center-of-mass +for each chunk, which includes all effects due to atoms passing thru +periodic boundaries. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's +center-of-mass in "unwrapped" form, by using the image flags +associated with each atom. See the "dump custom"_dump.html command +for a discussion of "unwrapped" coordinates. See the Atoms section of +the "read_data"_read_data.html command for a discussion of image flags +and how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the "set +image"_set.html command. + +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 myChunk all com/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +[Output info:] + +This compute calculates a global array where the number of rows = the +number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. The number of columns = +3 for the x,y,z center-of-mass coordinates of each chunk. These +values can be accessed by any command that uses global array values +from a compute as input. See "Section_howto +15"_Section_howto.html#howto_15 for an overview of LAMMPS output +options. + +The array values are "intensive". The array values will be in +distance "units"_units.html. + +[Restrictions:] none + +[Related commands:] + +"compute com"_compute_com.html + +[Default:] none diff --git a/doc/compute_com_molecule.html b/doc/compute_com_molecule.html deleted file mode 100644 index b82fa1ed76..0000000000 --- a/doc/compute_com_molecule.html +++ /dev/null @@ -1,73 +0,0 @@ - -Syntax: -
-compute ID group-ID com/molecule --
Examples: -
-compute 1 fluid com/molecule --
Description: -
-Define a computation that calculates the center-of-mass of individual -molecules. The calculation includes all effects due to atoms passing -thru periodic boundaries. -
-The x,y,z coordinates of the center-of-mass for a particular molecule -are only computed if one or more of its atoms are in the specified -group. Normally all atoms in the molecule should be in the group, -however this is not required. LAMMPS will warn you if this is not the -case. Only atoms in the group contribute to the center-of-mass -calculation for the molecule. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-IMPORTANT NOTE: The coordinates of an atom contribute to the -molecule's center-of-mass in "unwrapped" form, by using the image -flags associated with each atom. See the dump custom -command for a discussion of "unwrapped" coordinates. See the Atoms -section of the read_data command for a discussion of -image flags and how they are set for each atom. You can reset the -image flags (e.g. to 0) before invoking this compute by using the set -image command. -
-Output info: -
-This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 3 for the x,y,z center-of-mass -coordinates of each molecule. These values can be accessed by any -command that uses global array values from a compute as input. See -Section_howto 15 for an overview of -LAMMPS output options. -
-The array values are "intensive". The array values will be in -distance units. -
-Restrictions: none -
-Related commands: -
- -Default: none -
- diff --git a/doc/compute_com_molecule.txt b/doc/compute_com_molecule.txt deleted file mode 100644 index 1086f09f1b..0000000000 --- a/doc/compute_com_molecule.txt +++ /dev/null @@ -1,68 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute com/molecule command :h3 - -[Syntax:] - -compute ID group-ID com/molecule :pre - -ID, group-ID are documented in "compute"_compute.html command -com/molecule = style name of this compute command :ul - -[Examples:] - -compute 1 fluid com/molecule :pre - -[Description:] - -Define a computation that calculates the center-of-mass of individual -molecules. The calculation includes all effects due to atoms passing -thru periodic boundaries. - -The x,y,z coordinates of the center-of-mass for a particular molecule -are only computed if one or more of its atoms are in the specified -group. Normally all atoms in the molecule should be in the group, -however this is not required. LAMMPS will warn you if this is not the -case. Only atoms in the group contribute to the center-of-mass -calculation for the molecule. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -IMPORTANT NOTE: The coordinates of an atom contribute to the -molecule's center-of-mass in "unwrapped" form, by using the image -flags associated with each atom. See the "dump custom"_dump.html -command for a discussion of "unwrapped" coordinates. See the Atoms -section of the "read_data"_read_data.html command for a discussion of -image flags and how they are set for each atom. You can reset the -image flags (e.g. to 0) before invoking this compute by using the "set -image"_set.html command. - -[Output info:] - -This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 3 for the x,y,z center-of-mass -coordinates of each molecule. These values can be accessed by any -command that uses global array values from a compute as input. See -"Section_howto 15"_Section_howto.html#howto_15 for an overview of -LAMMPS output options. - -The array values are "intensive". The array values will be in -distance "units"_units.html. - -[Restrictions:] none - -[Related commands:] - -"compute com"_compute_com.html - -[Default:] none diff --git a/doc/compute_gyration_chunk.html b/doc/compute_gyration_chunk.html new file mode 100644 index 0000000000..cf65951ffb --- /dev/null +++ b/doc/compute_gyration_chunk.html @@ -0,0 +1,122 @@ + +Syntax: +
+compute ID group-ID gyration/chunk chunkID keyword value ... ++
tensor value = none ++ +
Examples: +
+compute 1 molecule gyration/chunk molchunk +compute 2 molecule gyration/chunk molchunk tensor ++
Description: +
+Define a computation that calculates the radius of gyration Rg for +multiple chunks of atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates the radius of gyration Rg for each chunk, +which includes all effects due to atoms passing thru periodic +boundaries. +
+Rg is a measure of the size of a chunk, and is computed by this +formula +
+
+where M is the total mass of the chunk, Rcm is the center-of-mass +position of the chunk, and the sum is over all atoms in the +chunk. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+If the tensor keyword is specified, then the scalar Rg value is not +calculated, but an Rg tensor is instead calculated for each chunk. +The formula for the components of the tensor is the same as the above +formula, except that (Ri - Rcm)^2 is replaced by (Rix - Rcmx) * (Riy - +Rcmy) for the xy component, etc. The 6 components of the tensor are +ordered xx, yy, zz, xy, xz, yz. +
+IMPORTANT NOTE: The coordinates of an atom contribute to Rg in +"unwrapped" form, by using the image flags associated with each atom. +See the dump custom command for a discussion of +"unwrapped" coordinates. See the Atoms section of the +read_data command for a discussion of image flags and +how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the set +image command. +
+The simplest way to output the results of the compute gyration/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all gyration/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
Output info: +
+This compute calculates a global vector if the tensor keyword is not +specified and a global array if it is. The length of the vector or +number of rows in the array = the number of chunks Nchunk as +calculated by the specified compute +chunk/atom command. If the tensor keyword +is specified, the global array has 6 columns. The vector or array can +be accessed by any command that uses global values from a compute as +input. See this section for an overview +of LAMMPS output options. +
+All the vector or array values calculated by this compute are +"intensive". The vector or array values will be in distance +units, since they are the square root of values +represented by the formula above. +
+Restrictions: none +
+Related commands: none +
+ +Default: none +
+ diff --git a/doc/compute_gyration_chunk.txt b/doc/compute_gyration_chunk.txt new file mode 100644 index 0000000000..f6b3ff8979 --- /dev/null +++ b/doc/compute_gyration_chunk.txt @@ -0,0 +1,111 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute gyration/chunk command :h3 + +[Syntax:] + +compute ID group-ID gyration/chunk chunkID keyword value ... :pre + +ID, group-ID are documented in "compute"_compute.html command :ulb,l +gyration/chunk = style name of this compute command :l +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :l +zero or more keyword/value pairs may be appended :l +keyword = {tensor} :l + {tensor} value = none :pre +:ule + +[Examples:] + +compute 1 molecule gyration/chunk molchunk +compute 2 molecule gyration/chunk molchunk tensor :pre + +[Description:] + +Define a computation that calculates the radius of gyration Rg for +multiple chunks of atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates the radius of gyration Rg for each chunk, +which includes all effects due to atoms passing thru periodic +boundaries. + +Rg is a measure of the size of a chunk, and is computed by this +formula + +:c,image(Eqs/compute_gyration.jpg) + +where M is the total mass of the chunk, Rcm is the center-of-mass +position of the chunk, and the sum is over all atoms in the +chunk. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +If the {tensor} keyword is specified, then the scalar Rg value is not +calculated, but an Rg tensor is instead calculated for each chunk. +The formula for the components of the tensor is the same as the above +formula, except that (Ri - Rcm)^2 is replaced by (Rix - Rcmx) * (Riy - +Rcmy) for the xy component, etc. The 6 components of the tensor are +ordered xx, yy, zz, xy, xz, yz. + +IMPORTANT NOTE: The coordinates of an atom contribute to Rg in +"unwrapped" form, by using the image flags associated with each atom. +See the "dump custom"_dump.html command for a discussion of +"unwrapped" coordinates. See the Atoms section of the +"read_data"_read_data.html command for a discussion of image flags and +how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the "set +image"_set.html command. + +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 myChunk all gyration/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +[Output info:] + +This compute calculates a global vector if the {tensor} keyword is not +specified and a global array if it is. The length of the vector or +number of rows in the array = the number of chunks {Nchunk} as +calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. If the {tensor} keyword +is specified, the global array has 6 columns. The vector or array can +be accessed by any command that uses global values from a compute as +input. See "this section"_Section_howto.html#howto_15 for an overview +of LAMMPS output options. + +All the vector or array values calculated by this compute are +"intensive". The vector or array values will be in distance +"units"_units.html, since they are the square root of values +represented by the formula above. + +[Restrictions:] none + +[Related commands:] none + +"compute gyration"_compute_gyration.html + +[Default:] none diff --git a/doc/compute_gyration_molecule.html b/doc/compute_gyration_molecule.html deleted file mode 100644 index 3004e34fe3..0000000000 --- a/doc/compute_gyration_molecule.html +++ /dev/null @@ -1,104 +0,0 @@ - -Syntax: -
-compute ID group-ID gyration/molecule keyword value ... --
tensor value = none -- -
Examples: -
-compute 1 molecule gyration/molecule -compute 2 molecule gyration/molecule tensor --
Description: -
-Define a computation that calculates the radius of gyration Rg of -individual molecules. The calculation includes all effects due to -atoms passing thru periodic boundaries. -
-Rg is a measure of the size of a molecule, and is computed as the -square root of the Rg^2 value in this formula -
-
-where M is the total mass of the molecule, Rcm is the center-of-mass -position of the molecule, and the sum is over all atoms in the -molecule and in the group. -
-If the tensor keyword is specified, then the scalar Rg value is not -calculated, but a 6-element Rg^2 tensor is instead calculated for each -molecule. The formula for the components of the tensor is the same as -the above formula, except that (Ri - Rcm)^2 is replaced by (Rix - -Rcmx) * (Riy - Rcmy) for the xy component, etc. The 6 components of -the tensor are ordered xx, yy, zz, xy, xz, yz. Note -that unlike the scalar Rg, each of the 6 values of the tensor is -effectively a "squared" value, since the cross-terms may be negative -and taking a sqrt() would be invalid. -
-Rg for a particular molecule is only computed if one or more of its -atoms are in the specified group. Normally all atoms in the molecule -should be in the group, however this is not required. LAMMPS will -warn you if this is not the case. Only atoms in the group contribute -to the Rg calculation for the molecule. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-IMPORTANT NOTE: The coordinates of an atom contribute to Rg in -"unwrapped" form, by using the image flags associated with each atom. -See the dump custom command for a discussion of -"unwrapped" coordinates. See the Atoms section of the -read_data command for a discussion of image flags and -how they are set for each atom. You can reset the image flags -(e.g. to 0) before invoking this compute by using the set -image command. -
-Output info: -
-This compute calculates a global vector if the tensor keyword is not -specified and a global array if it is. The length of the vector or -number of rows in the array is the number of molecules. If the -tensor keyword is specified, the global array has 6 columns. The -vector or array can be accessed by any command that uses global values -from a compute as input. See this -section for an overview of LAMMPS output -options. -
-All the vector or array values calculated by this compute are -"intensive". The vector and aray values will be in distance and -distance^2 units respectively. -
-Restrictions: none -
-Related commands: none -
- -Default: none -
- diff --git a/doc/compute_gyration_molecule.txt b/doc/compute_gyration_molecule.txt deleted file mode 100644 index 4d113d40c8..0000000000 --- a/doc/compute_gyration_molecule.txt +++ /dev/null @@ -1,94 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute gyration/molecule command :h3 - -[Syntax:] - -compute ID group-ID gyration/molecule keyword value ... :pre - -ID, group-ID are documented in "compute"_compute.html command :ulb,l -gyration/molecule = style name of this compute command :l -zero or more keyword/value pairs may be appended :l -keyword = {tensor} :l - {tensor} value = none :pre -:ule - -[Examples:] - -compute 1 molecule gyration/molecule -compute 2 molecule gyration/molecule tensor :pre - -[Description:] - -Define a computation that calculates the radius of gyration Rg of -individual molecules. The calculation includes all effects due to -atoms passing thru periodic boundaries. - -Rg is a measure of the size of a molecule, and is computed as the -square root of the Rg^2 value in this formula - -:c,image(Eqs/compute_gyration.jpg) - -where M is the total mass of the molecule, Rcm is the center-of-mass -position of the molecule, and the sum is over all atoms in the -molecule and in the group. - -If the {tensor} keyword is specified, then the scalar Rg value is not -calculated, but a 6-element Rg^2 tensor is instead calculated for each -molecule. The formula for the components of the tensor is the same as -the above formula, except that (Ri - Rcm)^2 is replaced by (Rix - -Rcmx) * (Riy - Rcmy) for the xy component, etc. The 6 components of -the tensor are ordered xx, yy, zz, xy, xz, yz. Note -that unlike the scalar Rg, each of the 6 values of the tensor is -effectively a "squared" value, since the cross-terms may be negative -and taking a sqrt() would be invalid. - -Rg for a particular molecule is only computed if one or more of its -atoms are in the specified group. Normally all atoms in the molecule -should be in the group, however this is not required. LAMMPS will -warn you if this is not the case. Only atoms in the group contribute -to the Rg calculation for the molecule. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -IMPORTANT NOTE: The coordinates of an atom contribute to Rg in -"unwrapped" form, by using the image flags associated with each atom. -See the "dump custom"_dump.html command for a discussion of -"unwrapped" coordinates. See the Atoms section of the -"read_data"_read_data.html command for a discussion of image flags and -how they are set for each atom. You can reset the image flags -(e.g. to 0) before invoking this compute by using the "set -image"_set.html command. - -[Output info:] - -This compute calculates a global vector if the {tensor} keyword is not -specified and a global array if it is. The length of the vector or -number of rows in the array is the number of molecules. If the -{tensor} keyword is specified, the global array has 6 columns. The -vector or array can be accessed by any command that uses global values -from a compute as input. See "this -section"_Section_howto.html#howto_15 for an overview of LAMMPS output -options. - -All the vector or array values calculated by this compute are -"intensive". The vector and aray values will be in distance and -distance^2 "units"_units.html respectively. - -[Restrictions:] none - -[Related commands:] none - -"compute gyration"_compute_gyration.html - -[Default:] none diff --git a/doc/compute_inertia_chunk.html b/doc/compute_inertia_chunk.html new file mode 100644 index 0000000000..5803968105 --- /dev/null +++ b/doc/compute_inertia_chunk.html @@ -0,0 +1,93 @@ + +Syntax: +
+compute ID group-ID inertia/chunk chunkID ++
Examples: +
+compute 1 fluid inertia/chunk molchunk ++
Description: +
+Define a computation that calculates the inertia tensor for multiple +chunks of atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates the 6 components of the symmetric intertia +tensor for each chunk, ordered Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The +calculation includes all effects due to atoms passing thru periodic +boundaries. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's +inertia tensor in "unwrapped" form, by using the image flags +associated with each atom. See the dump custom command +for a discussion of "unwrapped" coordinates. See the Atoms section of +the read_data command for a discussion of image flags +and how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the set +image command. +
+The simplest way to output the results of the compute inertia/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all inertia/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
Output info: +
+This compute calculates a global array where the number of rows = the +number of chunks Nchunk as calculated by the specified compute +chunk/atom command. The number of columns = +6 for the 6 components of the inertia tensor for each chunk, ordered +as listed above. These values can be accessed by any command that +uses global array values from a compute as input. See Section_howto +15 for an overview of LAMMPS output +options. +
+The array values are "intensive". The array values will be in +mass*distance^2 units. +
+Restrictions: none +
+Related commands: +
+ +Default: none +
+ diff --git a/doc/compute_inertia_chunk.txt b/doc/compute_inertia_chunk.txt new file mode 100644 index 0000000000..f268ff3d75 --- /dev/null +++ b/doc/compute_inertia_chunk.txt @@ -0,0 +1,88 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute inertia/chunk command :h3 + +[Syntax:] + +compute ID group-ID inertia/chunk chunkID :pre + +ID, group-ID are documented in "compute"_compute.html command +inertia/molecule = style name of this compute command +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul + +[Examples:] + +compute 1 fluid inertia/chunk molchunk :pre + +[Description:] + +Define a computation that calculates the inertia tensor for multiple +chunks of atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates the 6 components of the symmetric intertia +tensor for each chunk, ordered Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The +calculation includes all effects due to atoms passing thru periodic +boundaries. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's +inertia tensor in "unwrapped" form, by using the image flags +associated with each atom. See the "dump custom"_dump.html command +for a discussion of "unwrapped" coordinates. See the Atoms section of +the "read_data"_read_data.html command for a discussion of image flags +and how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the "set +image"_set.html command. + +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 myChunk all inertia/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +[Output info:] + +This compute calculates a global array where the number of rows = the +number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. The number of columns = +6 for the 6 components of the inertia tensor for each chunk, ordered +as listed above. These values can be accessed by any command that +uses global array values from a compute as input. See "Section_howto +15"_Section_howto.html#howto_15 for an overview of LAMMPS output +options. + +The array values are "intensive". The array values will be in +mass*distance^2 "units"_units.html. + +[Restrictions:] none + +[Related commands:] + +"variable inertia() function"_variable.html + +[Default:] none diff --git a/doc/compute_inertia_molecule.html b/doc/compute_inertia_molecule.html deleted file mode 100644 index 86f3e5dfb6..0000000000 --- a/doc/compute_inertia_molecule.html +++ /dev/null @@ -1,75 +0,0 @@ - -Syntax: -
-compute ID group-ID inertia/molecule --
Examples: -
-compute 1 fluid inertia/molecule --
Description: -
-Define a computation that calculates the inertia tensor of individual -molecules. The calculation includes all effects due to atoms passing -thru periodic boundaries. -
-The symmetric intertia tensor has 6 components, ordered -Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The tensor for a particular molecule is only -computed if one or more of its atoms is in the specified group. -Normally all atoms in the molecule should be in the group, however -this is not required. LAMMPS will warn you if this is not the case. -Only atoms in the group contribute to the inertia tensor and -associated center-of-mass calculation for the molecule. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-IMPORTANT NOTE: The coordinates of an atom contribute to the -molecule's inertia tensor in "unwrapped" form, by using the image -flags associated with each atom. See the dump custom -command for a discussion of "unwrapped" coordinates. See the Atoms -section of the read_data command for a discussion of -image flags and how they are set for each atom. You can reset the -image flags (e.g. to 0) before invoking this compute by using the set -image command. -
-Output info: -
-This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 6 for the 6 components of the -inertia tensor of each molecule, ordered as listed above. These -values can be accessed by any command that uses global array values -from a compute as input. See Section_howto -15 for an overview of LAMMPS output -options. -
-The array values are "intensive". The array values will be in -distance units. -
-Restrictions: none -
-Related commands: -
- -Default: none -
- diff --git a/doc/compute_inertia_molecule.txt b/doc/compute_inertia_molecule.txt deleted file mode 100644 index d5ae0c1305..0000000000 --- a/doc/compute_inertia_molecule.txt +++ /dev/null @@ -1,70 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute inertia/molecule command :h3 - -[Syntax:] - -compute ID group-ID inertia/molecule :pre - -ID, group-ID are documented in "compute"_compute.html command -inertia/molecule = style name of this compute command :ul - -[Examples:] - -compute 1 fluid inertia/molecule :pre - -[Description:] - -Define a computation that calculates the inertia tensor of individual -molecules. The calculation includes all effects due to atoms passing -thru periodic boundaries. - -The symmetric intertia tensor has 6 components, ordered -Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The tensor for a particular molecule is only -computed if one or more of its atoms is in the specified group. -Normally all atoms in the molecule should be in the group, however -this is not required. LAMMPS will warn you if this is not the case. -Only atoms in the group contribute to the inertia tensor and -associated center-of-mass calculation for the molecule. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -IMPORTANT NOTE: The coordinates of an atom contribute to the -molecule's inertia tensor in "unwrapped" form, by using the image -flags associated with each atom. See the "dump custom"_dump.html -command for a discussion of "unwrapped" coordinates. See the Atoms -section of the "read_data"_read_data.html command for a discussion of -image flags and how they are set for each atom. You can reset the -image flags (e.g. to 0) before invoking this compute by using the "set -image"_set.html command. - -[Output info:] - -This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 6 for the 6 components of the -inertia tensor of each molecule, ordered as listed above. These -values can be accessed by any command that uses global array values -from a compute as input. See "Section_howto -15"_Section_howto.html#howto_15 for an overview of LAMMPS output -options. - -The array values are "intensive". The array values will be in -distance "units"_units.html. - -[Restrictions:] none - -[Related commands:] - -"variable inertia() function"_variable.html - -[Default:] none diff --git a/doc/compute_msd_chunk.html b/doc/compute_msd_chunk.html new file mode 100644 index 0000000000..7338a41626 --- /dev/null +++ b/doc/compute_msd_chunk.html @@ -0,0 +1,125 @@ + +Syntax: +
+compute ID group-ID msd/chunk chunkID ++
Examples: +
+compute 1 all msd/chunk molchunk ++
Description: +
+Define a computation that calculates the mean-squared displacement +(MSD) for multiple chunks of atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+Four quantites are calculated by this compute for each chunk. The +first 3 quantities are the squared dx,dy,dz displacements of the +center-of-mass. The 4th component is the total squared displacement, +i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. These +calculations include all effects due to atoms passing thru periodic +boundaries. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+The slope of the mean-squared displacement (MSD) versus time is +proportional to the diffusion coefficient of the diffusing chunks. +
+The displacement of the center-of-mass of the chunk is from its +original center-of-mass position, calculated on the timestep this +compute command was first invoked. +
+IMPORTANT NOTE: The number of chunks Nchunk calculated by the +compute chunk/atom command must remain +constant each time this compute is invoked, so that the displacement +for each chunk from its original position can be computed +consistently. If Nchunk does not remain constant, an error will be +generated. If needed, you can enforce a constant Nchunk by using +the nchunk once or ids once options when specifying the compute +chunk/atom command. +
+IMPORTANT NOTE: This compute stores the original position (of the +center-of-mass) of each chunk. When a displacement is calculated on a +later timestep, it is assumed that the same atoms are assigned to the +same chunk ID. However LAMMPS has no simple way to insure this is the +case, though you can use the ids once option when specifying the +compute chunk/atom command. Note that if +this is not the case, the MSD calculation does not have a sensible +meaning. +
+IMPORTANT NOTE: The initial coordinates of the atoms in each chunk are +stored in "unwrapped" form, by using the image flags associated with +each atom. See the dump custom command for a discussion +of "unwrapped" coordinates. See the Atoms section of the +read_data command for a discussion of image flags and +how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the set +image command. +
+IMPORTANT NOTE: Unlike the compute msd command, +this compute does not store the initial center-of-mass coorindates of +its molecules in a restart file. Thus you cannot continue the MSD per +chunk calculation of this compute when running from a restart +file. +
+The simplest way to output the results of the compute com/msd +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all com/msd cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
Output info: +
+This compute calculates a global array where the number of rows = the +number of chunks Nchunk as calculated by the specified compute +chunk/atom command. The number of columns = +4 for dx,dy,dz and the total displacement. These values can be +accessed by any command that uses global array values from a compute +as input. See this section for an +overview of LAMMPS output options. +
+The array values are "intensive". The array values will be in +distance^2 units. +
+Restrictions: none +
+Related commands: +
+ +Default: none +
+ diff --git a/doc/compute_msd_chunk.txt b/doc/compute_msd_chunk.txt new file mode 100644 index 0000000000..19cc2bddc6 --- /dev/null +++ b/doc/compute_msd_chunk.txt @@ -0,0 +1,120 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute msd/chunk command :h3 + +[Syntax:] + +compute ID group-ID msd/chunk chunkID :pre + +ID, group-ID are documented in "compute"_compute.html command +msd/molecule = style name of this compute command +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul + +[Examples:] + +compute 1 all msd/chunk molchunk :pre + +[Description:] + +Define a computation that calculates the mean-squared displacement +(MSD) for multiple chunks of atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +Four quantites are calculated by this compute for each chunk. The +first 3 quantities are the squared dx,dy,dz displacements of the +center-of-mass. The 4th component is the total squared displacement, +i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. These +calculations include all effects due to atoms passing thru periodic +boundaries. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +The slope of the mean-squared displacement (MSD) versus time is +proportional to the diffusion coefficient of the diffusing chunks. + +The displacement of the center-of-mass of the chunk is from its +original center-of-mass position, calculated on the timestep this +compute command was first invoked. + +IMPORTANT NOTE: The number of chunks {Nchunk} calculated by the +"compute chunk/atom"_compute_chunk_atom.html command must remain +constant each time this compute is invoked, so that the displacement +for each chunk from its original position can be computed +consistently. If {Nchunk} does not remain constant, an error will be +generated. If needed, you can enforce a constant {Nchunk} by using +the {nchunk once} or {ids once} options when specifying the "compute +chunk/atom"_compute_chunk_atom.html command. + +IMPORTANT NOTE: This compute stores the original position (of the +center-of-mass) of each chunk. When a displacement is calculated on a +later timestep, it is assumed that the same atoms are assigned to the +same chunk ID. However LAMMPS has no simple way to insure this is the +case, though you can use the {ids once} option when specifying the +"compute chunk/atom"_compute_chunk_atom.html command. Note that if +this is not the case, the MSD calculation does not have a sensible +meaning. + +IMPORTANT NOTE: The initial coordinates of the atoms in each chunk are +stored in "unwrapped" form, by using the image flags associated with +each atom. See the "dump custom"_dump.html command for a discussion +of "unwrapped" coordinates. See the Atoms section of the +"read_data"_read_data.html command for a discussion of image flags and +how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the "set +image"_set.html command. + +IMPORTANT NOTE: Unlike the "compute msd"_compute_msd.html command, +this compute does not store the initial center-of-mass coorindates of +its molecules in a restart file. Thus you cannot continue the MSD per +chunk calculation of this compute when running from a "restart +file"_read_restart.html. + +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 myChunk all com/msd cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +[Output info:] + +This compute calculates a global array where the number of rows = the +number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. The number of columns = +4 for dx,dy,dz and the total displacement. These values can be +accessed by any command that uses global array values from a compute +as input. See "this section"_Section_howto.html#howto_15 for an +overview of LAMMPS output options. + +The array values are "intensive". The array values will be in +distance^2 "units"_units.html. + +[Restrictions:] none + +[Related commands:] + +"compute msd"_compute_msd.html + +[Default:] none diff --git a/doc/compute_msd_molecule.html b/doc/compute_msd_molecule.html deleted file mode 100644 index d1f2b2c507..0000000000 --- a/doc/compute_msd_molecule.html +++ /dev/null @@ -1,91 +0,0 @@ - -Syntax: -
-compute ID group-ID msd/molecule --
Examples: -
-compute 1 all msd/molecule --
Description: -
-Define a computation that calculates the mean-squared displacement -(MSD) of individual molecules. The calculation includes all effects -due to atoms passing thru periodic boundaries. -
-Four quantites are calculated by this compute for each molecule. The -first 3 quantities are the squared dx,dy,dz displacements of the -center-of-mass. The 4th component is the total squared displacement, -i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. -
-The slope of the mean-squared displacement (MSD) versus time is -proportional to the diffusion coefficient of the diffusing molecules. -
-The displacement of the center-of-mass of the molecule is from its -original center-of-mass position at the time the compute command was -issued. -
-The MSD for a particular molecule is only computed if one or more of -its atoms are in the specified group. Normally all atoms in the -molecule should be in the group, however this is not required. LAMMPS -will warn you if this is not the case. Only atoms in the group -contribute to the center-of-mass calculation for the molecule, which -is used to caculate its initial and current position. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-IMPORTANT NOTE: The initial coordinates of each molecule are stored in -"unwrapped" form, by using the image flags associated with each atom. -See the dump custom command for a discussion of -"unwrapped" coordinates. See the Atoms section of the -read_data command for a discussion of image flags and -how they are set for each atom. You can reset the image flags -(e.g. to 0) before invoking this compute by using the set -image command. -
-IMPORTANT NOTE: Unlike the compute msd command, -this compute does not store the initial center-of-mass coorindates of -its molecules in a restart file. Thus you cannot continue the MSD per -molecule calculation of this compute when running from a restart -file. -
-Output info: -
-This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 4 for dx,dy,dz and the total -displacement. These values can be accessed by any command that uses -global array values from a compute as input. See this -section for an overview of LAMMPS output -options. -
-The array values are "intensive". The array values will be in -distance^2 units. -
-Restrictions: none -
-Related commands: -
- -Default: none -
- diff --git a/doc/compute_msd_molecule.txt b/doc/compute_msd_molecule.txt deleted file mode 100644 index f3a224270d..0000000000 --- a/doc/compute_msd_molecule.txt +++ /dev/null @@ -1,86 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute msd/molecule command :h3 - -[Syntax:] - -compute ID group-ID msd/molecule :pre - -ID, group-ID are documented in "compute"_compute.html command -msd/molecule = style name of this compute command :ul - -[Examples:] - -compute 1 all msd/molecule :pre - -[Description:] - -Define a computation that calculates the mean-squared displacement -(MSD) of individual molecules. The calculation includes all effects -due to atoms passing thru periodic boundaries. - -Four quantites are calculated by this compute for each molecule. The -first 3 quantities are the squared dx,dy,dz displacements of the -center-of-mass. The 4th component is the total squared displacement, -i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. - -The slope of the mean-squared displacement (MSD) versus time is -proportional to the diffusion coefficient of the diffusing molecules. - -The displacement of the center-of-mass of the molecule is from its -original center-of-mass position at the time the compute command was -issued. - -The MSD for a particular molecule is only computed if one or more of -its atoms are in the specified group. Normally all atoms in the -molecule should be in the group, however this is not required. LAMMPS -will warn you if this is not the case. Only atoms in the group -contribute to the center-of-mass calculation for the molecule, which -is used to caculate its initial and current position. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -IMPORTANT NOTE: The initial coordinates of each molecule are stored in -"unwrapped" form, by using the image flags associated with each atom. -See the "dump custom"_dump.html command for a discussion of -"unwrapped" coordinates. See the Atoms section of the -"read_data"_read_data.html command for a discussion of image flags and -how they are set for each atom. You can reset the image flags -(e.g. to 0) before invoking this compute by using the "set -image"_set.html command. - -IMPORTANT NOTE: Unlike the "compute msd"_compute_msd.html command, -this compute does not store the initial center-of-mass coorindates of -its molecules in a restart file. Thus you cannot continue the MSD per -molecule calculation of this compute when running from a "restart -file"_read_restart.html. - -[Output info:] - -This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 4 for dx,dy,dz and the total -displacement. These values can be accessed by any command that uses -global array values from a compute as input. See "this -section"_Section_howto.html#howto_15 for an overview of LAMMPS output -options. - -The array values are "intensive". The array values will be in -distance^2 "units"_units.html. - -[Restrictions:] none - -[Related commands:] - -"compute msd"_compute_msd.html - -[Default:] none diff --git a/doc/compute_property_chunk.html b/doc/compute_property_chunk.html new file mode 100644 index 0000000000..aac4407a87 --- /dev/null +++ b/doc/compute_property_chunk.html @@ -0,0 +1,127 @@ + +Syntax: +
+compute ID group-ID property/chunk chunkID input1 input2 ... ++
attributes = count, id, coord1, coord2, coord3 + count = # of atoms in chunk + id = original chunk IDs before compression by compute chunk/atom + coord123 = coordinates for spatial bins calculated by compute chunk/atom ++ +
Examples: +
+compute 1 all property/chunk count +compute 1 all property/chunk ID coord1 ++
Description: +
+Define a computation that stores the specified attributes of chunks of +atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates and stores the specified attributes of chunks +as global data so they can be accessed by other output +commands and used in conjunction with +other commands that generate per-chunk data, such as compute +com/chunk or compute +msd/chunk. +
+Note that only atoms in the specified group contribute to the +calculation of the count attribute. The compute +chunk/atom command defines its own group; +atoms will have a chunk ID = 0 if they are not in that group, +signifying they are not assigned to a chunk, and will thus also not +contribute to this calculation. You can specify the "all" group for +this command if you simply want to include atoms with non-zero chunk +IDs. +
+The count attribute is the number of atoms in the chunk. +
+The id attribute stores the original chunk ID for each chunk. It +can only be used if the compress keyword was set to yes for the +compute chunk/atom command referenced by +chunkID. This means that the original chunk IDs (e.g. molecule IDs) +will have been compressed to remove chunk IDs with no atoms assigned +to them. Thus a compresed chunk ID of 3 may correspond to an original +chunk ID (molecule ID in this case) of 415. The id attribute will +then be 415 for the 3rd chunk. +
+The coordN attributes can only be used if a binning style was used +in the compute chunk/atom command referenced +by chunkID. For bin/1d, bin/2d, and bin/3d styles the attribute +is the center point of the bin in the corresponding dimension. Style +bin/1d only defines a coord1 attribute. Style bin/2d adds a +coord2 attribute. Style bin/3d adds a coord3 attribute. +
+Note that if the value of the units keyword used in the compute +chunk/atom command is box or lattice, the +coordN attributes will be in distance units. If the +value of the units keyword is reduced, the coordN attributes +will be in unitless reduced units (0-1). +
+The simplest way to output the results of the compute property/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 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 ++
Output info: +
+This compute calculates a global vector or global array depending on +the number of input values. The length of the vector or number of +rows in the array is the number of chunks. +
+This compute calculates a global vector or global array where the +number of rows = the number of chunks Nchunk as calculated by the +specified compute chunk/atom command. If a +single input is specified, a global vector is produced. If two or +more inputs are specified, a global array is produced where the number +of columns = the number of inputs. The vector or array can be +accessed by any command that uses global values from a compute as +input. See this section for an overview +of LAMMPS output options. +
+The vector or array values are "intensive". The values will be +unitless or in the units discussed above. +
+Restrictions: none +
+Related commands: +
+ +Default: none +
+ diff --git a/doc/compute_property_chunk.txt b/doc/compute_property_chunk.txt new file mode 100644 index 0000000000..8ec160e9df --- /dev/null +++ b/doc/compute_property_chunk.txt @@ -0,0 +1,118 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute property/chunk command :h3 + +[Syntax:] + +compute ID group-ID property/chunk chunkID input1 input2 ... :pre + +ID, group-ID are documented in "compute"_compute.html command :ulb,l +property/chunk = style name of this compute command :l +input = one or more attributes :l + attributes = count, id, coord1, coord2, coord3 + count = # of atoms in chunk + id = original chunk IDs before compression by "compute chunk/atom"_compute_chunk_atom.html + coord123 = coordinates for spatial bins calculated by "compute chunk/atom"_compute_chunk_atom.html :pre +:ule + +[Examples:] + +compute 1 all property/chunk count +compute 1 all property/chunk ID coord1 :pre + +[Description:] + +Define a computation that stores the specified attributes of chunks of +atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates and stores the specified attributes of chunks +as global data so they can be accessed by other "output +commands"_Section_howto.html#howto_15 and used in conjunction with +other commands that generate per-chunk data, such as "compute +com/chunk"_compute_com_chunk.html or "compute +msd/chunk"_compute_msd_chunk.html. + +Note that only atoms in the specified group contribute to the +calculation of the {count} attribute. The "compute +chunk/atom"_compute_chunk_atom.html command defines its own group; +atoms will have a chunk ID = 0 if they are not in that group, +signifying they are not assigned to a chunk, and will thus also not +contribute to this calculation. You can specify the "all" group for +this command if you simply want to include atoms with non-zero chunk +IDs. + +The {count} attribute is the number of atoms in the chunk. + +The {id} attribute stores the original chunk ID for each chunk. It +can only be used if the {compress} keyword was set to {yes} for the +"compute chunk/atom"_compute_chunk_atom.html command referenced by +chunkID. This means that the original chunk IDs (e.g. molecule IDs) +will have been compressed to remove chunk IDs with no atoms assigned +to them. Thus a compresed chunk ID of 3 may correspond to an original +chunk ID (molecule ID in this case) of 415. The {id} attribute will +then be 415 for the 3rd chunk. + +The {coordN} attributes can only be used if a {binning} style was used +in the "compute chunk/atom"_compute_chunk_atom.html command referenced +by chunkID. For {bin/1d}, {bin/2d}, and {bin/3d} styles the attribute +is the center point of the bin in the corresponding dimension. Style +{bin/1d} only defines a {coord1} attribute. Style {bin/2d} adds a +{coord2} attribute. Style {bin/3d} adds a {coord3} attribute. + +Note that if the value of the {units} keyword used in the "compute +chunk/atom command"_compute_chunk_atom.html is {box} or {lattice}, the +{coordN} attributes will be in distance "units"_units.html. If the +value of the {units} keyword is {reduced}, the {coordN} attributes +will be in unitless reduced units (0-1). + +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 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 + +[Output info:] + +This compute calculates a global vector or global array depending on +the number of input values. The length of the vector or number of +rows in the array is the number of chunks. + +This compute calculates a global vector or global array where the +number of rows = the number of chunks {Nchunk} as calculated by the +specified "compute chunk/atom"_compute_chunk_atom.html command. If a +single input is specified, a global vector is produced. If two or +more inputs are specified, a global array is produced where the number +of columns = the number of inputs. The vector or array can be +accessed by any command that uses global values from a compute as +input. See "this section"_Section_howto.html#howto_15 for an overview +of LAMMPS output options. + +The vector or array values are "intensive". The values will be +unitless or in the units discussed above. + +[Restrictions:] none + +[Related commands:] + +"fix ave/chunk"_fix_ave_chunk.html + +[Default:] none diff --git a/doc/compute_property_molecule.html b/doc/compute_property_molecule.html deleted file mode 100644 index c0b4453fe1..0000000000 --- a/doc/compute_property_molecule.html +++ /dev/null @@ -1,77 +0,0 @@ - -Syntax: -
-compute ID group-ID property/molecule input1 input2 ... --
possible attributes = mol cout - mol = molecule ID - count = # of atoms in molecule -- -
Examples: -
-compute 1 all property/molecule mol --
Description: -
-Define a computation that stores the specified attributes as global -data so it can be accessed by other output -commands and used in conjunction with -other commands that generate per-molecule data, such as compute -com/molecule and compute -msd/molecule. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-The mol attribute is the molecule ID. This attribute can be used to -produce molecule IDs as labels for per-molecule datums generated by -other computes or fixes when they are output to a file, e.g. by the -fix ave/time command. -
-The count attribute is the number of atoms in the molecule. -
-Output info: -
-This compute calculates a global vector or global array depending on -the number of input values. The length of the vector or number of -rows in the array is the number of molecules. If a single input is -specified, a global vector is produced. If two or more inputs are -specified, a global array is produced where the number of columns = -the number of inputs. The vector or array can be accessed by any -command that uses global values from a compute as input. See this -section for an overview of LAMMPS output -options. -
-The vector or array values will be integers that correspond to the -specified attribute. -
-Restrictions: none -
-Related commands: none -
-Default: none -
- diff --git a/doc/compute_property_molecule.txt b/doc/compute_property_molecule.txt deleted file mode 100644 index 7768879500..0000000000 --- a/doc/compute_property_molecule.txt +++ /dev/null @@ -1,68 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute property/molecule command :h3 - -[Syntax:] - -compute ID group-ID property/molecule input1 input2 ... :pre - -ID, group-ID are documented in "compute"_compute.html command :ulb,l -property/molecule = style name of this compute command :l -input = one or more attributes :l - possible attributes = mol cout - mol = molecule ID - count = # of atoms in molecule :pre -:ule - -[Examples:] - -compute 1 all property/molecule mol :pre - -[Description:] - -Define a computation that stores the specified attributes as global -data so it can be accessed by other "output -commands"_Section_howto.html#howto_15 and used in conjunction with -other commands that generate per-molecule data, such as "compute -com/molecule"_compute_com_molecule.html and "compute -msd/molecule"_compute_msd_molecule.html. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -The {mol} attribute is the molecule ID. This attribute can be used to -produce molecule IDs as labels for per-molecule datums generated by -other computes or fixes when they are output to a file, e.g. by the -"fix ave/time"_fix_ave_time.html command. - -The {count} attribute is the number of atoms in the molecule. - -[Output info:] - -This compute calculates a global vector or global array depending on -the number of input values. The length of the vector or number of -rows in the array is the number of molecules. If a single input is -specified, a global vector is produced. If two or more inputs are -specified, a global array is produced where the number of columns = -the number of inputs. The vector or array can be accessed by any -command that uses global values from a compute as input. See "this -section"_Section_howto.html#howto_15 for an overview of LAMMPS output -options. - -The vector or array values will be integers that correspond to the -specified attribute. - -[Restrictions:] none - -[Related commands:] none - -[Default:] none diff --git a/doc/compute_temp_chunk.html b/doc/compute_temp_chunk.html new file mode 100644 index 0000000000..26f227e880 --- /dev/null +++ b/doc/compute_temp_chunk.html @@ -0,0 +1,185 @@ + +Syntax: +
+compute ID group-ID temp/chunk chunkID keyword value ... ++
com value = yes or no + yes = subtract center-of-mass velocity from each chunk before calculating temperature + no = do not subtract center-of-mass velocity + bias value = bias-ID + bias-ID = ID of a temperature compute that removes a velocity bias + adof value = dof_per_atom + dof_per_atom = define this many degrees-of-freedom per atom + cdof value = dof_per_chunk + dof_per_chunk = define this many degrees-of-freedom per chunk ++ +
Examples: +
+compute 1 fluid temp/chunk molchunk ++
compute 1 fluid temp/chunk molchunk bias tpartial adof 2.0 ++
Description: +
+Define a computation that calculates the temperature of multiple +chunks of atoms. Note that unlike other computes with style names +temp/* which calculate the temperature of an entire group of atoms, +this compute cannot be used by any command that uses such a +temperature compute, e.g. thermo_modify, fix +temp/rescale, fix npt, etc. That +is because this compute calculates multiple temperatures, one per +chunk. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates the temperature for each chunk by the formula +KE = DOF/2 k T, where KE = total kinetic energy of the chunk of atoms +(sum of 1/2 m v^2), DOF = the total number of degrees of freedom for +all atoms in the chunk, k = Boltzmann constant, and T = temperature. +
+The DOF is calculated as N*adof + cdof, where N = number of atoms in +the chunk, adof = degrees of freedom per atom, and cdof = degrees of +freedom per chunk. By default adof = 2 or 3 = dimensionality of +system, as set via the dimension command, and cdof = +0.0. This gives the usual formula for temperature. +
+Note that currently this temperature only includes translational +degrees of freedom for each atom. No rotational degrees of freedom +are included for finite-size particles. Also no degrees of freedom +are subtracted for any velocity bias or constraints that are applied, +such as compute temp/partial, or fix +shake or fix rigid. This is because +those degrees of freedom (e.g. a constrained bond) could apply to sets +of atoms that are both included and excluded from a specific chunk, +and hence the concept is somewhat ill-defined. In some cases, you can +use the adof and cdof keywords to adjust the calculated degress of +freedom appropriately, as explained below. +
+Also note that a bias can be subtracted from atom velocities before +they are used in the above formula for KE, by using the bias +keyword. This allows, for example, a thermal temperature to be +computed after removal of a flow velocity profile. +
+Note that this compute and the fix ave/chunk temp +command can calculate different things. This compute calculates the +temperature for each chunk for a single snapshot. Fix ave/chunk can +do that but can time average those values over many snapshots, or it +can compute a temperature as if the atoms in the chunk on different +timesteps were collected together as one set of atoms to calculate +their temperature. This compute allows the center-of-mass velocity of +each chunk to be subtracted before calculating the temperature; fix +ave/chunk does not. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+The simplest way to output the results of the compute temp/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all temp/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
The keyword/value option pairs are used in the following ways. +
+The com keyword can be used with a value of yes to subtract the +velocity of the center-of-mass for each chunk from the velocity of the +atoms in that chunk, before calculating the temperature. This can be +useful if the atoms are streaming or otherwise moving collectively, +and you wish to calculate only the thermal temperature. +
+For the bias keyword, bias-ID refers to the ID of a temperature +compute that removes a "bias" velocity from each atom. This also +allows compute temp/chunk to compute the thermal temperature of each +chunk after the translational kinetic energy components have been +altered in a prescribed way, e.g. to remove a velocity profile. Note +that the temperature compute will apply its bias globally to the +entire system, not on a per-chunk basis. +
+The adof and cdof keywords define the values used in the degree of +freedom (DOF) formula used for each chunk, as described above. They +can be used to calculate a more appropriate temperature for some kinds +of chunks. Here are 3 examples. +
+If spatially binned chunks contain some number of water molecules and +fix shake is used to make each molecule rigid, then +you could calculate a temperature with 6 degrees of freedom (DOF) (3 +translational, 3 rotational) per molecule by setting adof to 2.0. +If compute temp/partial is used with the +bias keyword to only allow the x component of velocity to contribute +to the temperature, then adof = 1.0 would be appropriate. If each +chunk consists of a large molecule, with some number of its bonds +constrained by fix shake or the entire molecule by +fix rigid/small, then cdof could be set to the +remaining degrees of freedom for the entire molecule (entire chunk in +this case). +
+Output info: +
+This compute calculates a global vector where the number of rows = the +number of chunks Nchunk as calculated by the specified compute +chunk/atom command. These values can be +accessed by any command that uses global vector values from a compute +as input. See Section_howto 15 for an +overview of LAMMPS output options. +
+The vector values are "intensive". The vector values will be in +temperature units. +
+Restrictions: +
+The com and bias keywords cannot be used together. +
+Related commands: +
+compute temp, fix ave/chunk +temp +
+Default: +
+The option defaults are com no, no bias, adof = dimensionality of the +system (2 or 3), and cdof = 0.0. +
+ diff --git a/doc/compute_temp_chunk.txt b/doc/compute_temp_chunk.txt new file mode 100644 index 0000000000..83ed0e41d5 --- /dev/null +++ b/doc/compute_temp_chunk.txt @@ -0,0 +1,173 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute temp/chunk command :h3 + +[Syntax:] + +compute ID group-ID temp/chunk chunkID keyword value ... :pre + +ID, group-ID are documented in "compute"_compute.html command :ulb,l +temp/chunk = style name of this compute command :l +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :l +zero or more keyword/value pairs may be appended :l +keyword = {com} or {bias}or {adof} or {cdof} :l + {com} value = {yes} or {no} + yes = subtract center-of-mass velocity from each chunk before calculating temperature + no = do not subtract center-of-mass velocity + {bias} value = bias-ID + bias-ID = ID of a temperature compute that removes a velocity bias + {adof} value = dof_per_atom + dof_per_atom = define this many degrees-of-freedom per atom + {cdof} value = dof_per_chunk + dof_per_chunk = define this many degrees-of-freedom per chunk :pre +:ule + +[Examples:] + +compute 1 fluid temp/chunk molchunk :pre +compute 1 fluid temp/chunk molchunk bias tpartial adof 2.0 :pre + +[Description:] + +Define a computation that calculates the temperature of multiple +chunks of atoms. Note that unlike other computes with style names +temp/* which calculate the temperature of an entire group of atoms, +this compute cannot be used by any command that uses such a +temperature compute, e.g. "thermo_modify"_thermo_modify.html, "fix +temp/rescale"_fix_temp_rescale.html, "fix npt"_fix_nh.html, etc. That +is because this compute calculates multiple temperatures, one per +chunk. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates the temperature for each chunk by the formula +KE = DOF/2 k T, where KE = total kinetic energy of the chunk of atoms +(sum of 1/2 m v^2), DOF = the total number of degrees of freedom for +all atoms in the chunk, k = Boltzmann constant, and T = temperature. + +The DOF is calculated as N*adof + cdof, where N = number of atoms in +the chunk, adof = degrees of freedom per atom, and cdof = degrees of +freedom per chunk. By default adof = 2 or 3 = dimensionality of +system, as set via the "dimension"_dimension.html command, and cdof = +0.0. This gives the usual formula for temperature. + +Note that currently this temperature only includes translational +degrees of freedom for each atom. No rotational degrees of freedom +are included for finite-size particles. Also no degrees of freedom +are subtracted for any velocity bias or constraints that are applied, +such as "compute temp/partial"_compute_temp_partial.html, or "fix +shake"_fix_shake.html or "fix rigid"_fix_rigid.html. This is because +those degrees of freedom (e.g. a constrained bond) could apply to sets +of atoms that are both included and excluded from a specific chunk, +and hence the concept is somewhat ill-defined. In some cases, you can +use the {adof} and {cdof} keywords to adjust the calculated degress of +freedom appropriately, as explained below. + +Also note that a bias can be subtracted from atom velocities before +they are used in the above formula for KE, by using the {bias} +keyword. This allows, for example, a thermal temperature to be +computed after removal of a flow velocity profile. + +Note that this compute and the "fix ave/chunk temp"_fix_ave_chunk.html +command can calculate different things. This compute calculates the +temperature for each chunk for a single snapshot. Fix ave/chunk can +do that but can time average those values over many snapshots, or it +can compute a temperature as if the atoms in the chunk on different +timesteps were collected together as one set of atoms to calculate +their temperature. This compute allows the center-of-mass velocity of +each chunk to be subtracted before calculating the temperature; fix +ave/chunk does not. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +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 myChunk all temp/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +:line + +The keyword/value option pairs are used in the following ways. + +The {com} keyword can be used with a value of {yes} to subtract the +velocity of the center-of-mass for each chunk from the velocity of the +atoms in that chunk, before calculating the temperature. This can be +useful if the atoms are streaming or otherwise moving collectively, +and you wish to calculate only the thermal temperature. + +For the {bias} keyword, {bias-ID} refers to the ID of a temperature +compute that removes a "bias" velocity from each atom. This also +allows compute temp/chunk to compute the thermal temperature of each +chunk after the translational kinetic energy components have been +altered in a prescribed way, e.g. to remove a velocity profile. Note +that the temperature compute will apply its bias globally to the +entire system, not on a per-chunk basis. + +The {adof} and {cdof} keywords define the values used in the degree of +freedom (DOF) formula used for each chunk, as described above. They +can be used to calculate a more appropriate temperature for some kinds +of chunks. Here are 3 examples. + +If spatially binned chunks contain some number of water molecules and +"fix shake"_fix_shake.html is used to make each molecule rigid, then +you could calculate a temperature with 6 degrees of freedom (DOF) (3 +translational, 3 rotational) per molecule by setting {adof} to 2.0. +If "compute temp/partial"_compute_temp_partial.html is used with the +{bias} keyword to only allow the x component of velocity to contribute +to the temperature, then {adof} = 1.0 would be appropriate. If each +chunk consists of a large molecule, with some number of its bonds +constrained by "fix shake"_fix_shake.html or the entire molecule by +"fix rigid/small"_fix_rigid.html, then {cdof} could be set to the +remaining degrees of freedom for the entire molecule (entire chunk in +this case). + +:line + +[Output info:] + +This compute calculates a global vector where the number of rows = the +number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. These values can be +accessed by any command that uses global vector values from a compute +as input. See "Section_howto 15"_Section_howto.html#howto_15 for an +overview of LAMMPS output options. + +The vector values are "intensive". The vector values will be in +temperature "units"_units.html. + +[Restrictions:] + +The {com} and {bias} keywords cannot be used together. + +[Related commands:] + +"compute temp"_compute_temp.html, "fix ave/chunk +temp"_fix_ave_chunk.html + +[Default:] + +The option defaults are com no, no bias, adof = dimensionality of the +system (2 or 3), and cdof = 0.0. diff --git a/doc/compute_torque_chunk.html b/doc/compute_torque_chunk.html new file mode 100644 index 0000000000..133d4ac03a --- /dev/null +++ b/doc/compute_torque_chunk.html @@ -0,0 +1,92 @@ + +Syntax: +
+compute ID group-ID torque/chunk chunkID ++
Examples: +
+compute 1 fluid torque/chunk molchunk ++
Description: +
+Define a computation that calculates the torque on multiple chunks of +atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates the 3 components of the torque vector for eqch +chunk, due to the forces on the individual atoms in the chunk around +the center-of-mass of the chunk. The calculation includes all effects +due to atoms passing thru periodic boundaries. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's +torque in "unwrapped" form, by using the image flags associated with +each atom. See the dump custom command for a discussion +of "unwrapped" coordinates. See the Atoms section of the +read_data command for a discussion of image flags and +how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the set +image command. +
+The simplest way to output the results of the compute torque/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all torque/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
Output info: +
+This compute calculates a global array where the number of rows = the +number of chunks Nchunk as calculated by the specified compute +chunk/atom command. The number of columns = +3 for the 3 xyz components of the torque for each chunk. These values +can be accessed by any command that uses global array values from a +compute as input. See Section_howto 15 +for an overview of LAMMPS output options. +
+The array values are "intensive". The array values will be in +force-distance units. +
+Restrictions: none +
+Related commands: +
+ +Default: none +
+ diff --git a/doc/compute_torque_chunk.txt b/doc/compute_torque_chunk.txt new file mode 100644 index 0000000000..df62deaf5c --- /dev/null +++ b/doc/compute_torque_chunk.txt @@ -0,0 +1,87 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute torque/chunk command :h3 + +[Syntax:] + +compute ID group-ID torque/chunk chunkID :pre + +ID, group-ID are documented in "compute"_compute.html command +torque/molecule = style name of this compute command +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul + +[Examples:] + +compute 1 fluid torque/chunk molchunk :pre + +[Description:] + +Define a computation that calculates the torque on multiple chunks of +atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates the 3 components of the torque vector for eqch +chunk, due to the forces on the individual atoms in the chunk around +the center-of-mass of the chunk. The calculation includes all effects +due to atoms passing thru periodic boundaries. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's +torque in "unwrapped" form, by using the image flags associated with +each atom. See the "dump custom"_dump.html command for a discussion +of "unwrapped" coordinates. See the Atoms section of the +"read_data"_read_data.html command for a discussion of image flags and +how they are set for each atom. You can reset the image flags +(e.g. to 0) before invoking this compute by using the "set +image"_set.html command. + +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 myChunk all torque/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +[Output info:] + +This compute calculates a global array where the number of rows = the +number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. The number of columns = +3 for the 3 xyz components of the torque for each chunk. These values +can be accessed by any command that uses global array values from a +compute as input. See "Section_howto 15"_Section_howto.html#howto_15 +for an overview of LAMMPS output options. + +The array values are "intensive". The array values will be in +force-distance "units"_units.html. + +[Restrictions:] none + +[Related commands:] + +"variable torque() function"_variable.html + +[Default:] none diff --git a/doc/compute_vcm_chunk.html b/doc/compute_vcm_chunk.html new file mode 100644 index 0000000000..ef17b94ddd --- /dev/null +++ b/doc/compute_vcm_chunk.html @@ -0,0 +1,82 @@ + +Syntax: +
+compute ID group-ID vcm/chunk chunkID ++
Examples: +
+compute 1 fluid vcm/chunk molchunk ++
Description: +
+Define a computation that calculates the center-of-mass velocity for +multiple chunks of atoms. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+This compute calculates the x,y,z components of the center-of-mass +velocity for each chunk. This is done by summing mass*velocity for +each atom in the chunk and dividing the sum by the total mass of the +chunk. +
+Note that only atoms in the specified group contribute to the +calculation. The compute chunk/atom command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. +
+The simplest way to output the results of the compute vcm/chunk +calculation to a file is to use the fix ave/time +command, for example: +
+compute cc1 chunk/atom molecule +compute myChunk all vcm/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector ++
Output info: +
+This compute calculates a global array where the number of rows = the +number of chunks Nchunk as calculated by the specified compute +chunk/atom command. The number of columns = +3 for the x,y,z center-of-mass velocity coordinates of each chunk. +These values can be accessed by any command that uses global array +values from a compute as input. See Section_howto +15 for an overview of LAMMPS output +options. +
+The array values are "intensive". The array values will be in +velocity units. +
+Restrictions: none +
+Related commands: none +
+Default: none +
+ diff --git a/doc/compute_vcm_chunk.txt b/doc/compute_vcm_chunk.txt new file mode 100644 index 0000000000..5e7bbc0891 --- /dev/null +++ b/doc/compute_vcm_chunk.txt @@ -0,0 +1,77 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +compute vcm/chunk command :h3 + +[Syntax:] + +compute ID group-ID vcm/chunk chunkID :pre + +ID, group-ID are documented in "compute"_compute.html command +vcm/chunk = style name of this compute command +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul + +[Examples:] + +compute 1 fluid vcm/chunk molchunk :pre + +[Description:] + +Define a computation that calculates the center-of-mass velocity for +multiple chunks of atoms. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +This compute calculates the x,y,z components of the center-of-mass +velocity for each chunk. This is done by summing mass*velocity for +each atom in the chunk and dividing the sum by the total mass of the +chunk. + +Note that only atoms in the specified group contribute to the +calculation. The "compute chunk/atom"_compute_chunk_atom.html command +defines its own group; atoms will have a chunk ID = 0 if they are not +in that group, signifying they are not assigned to a chunk, and will +thus also not contribute to this calculation. You can specify the +"all" group for this command if you simply want to include atoms with +non-zero chunk IDs. + +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 myChunk all vcm/chunk cc1 +fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre + +[Output info:] + +This compute calculates a global array where the number of rows = the +number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. The number of columns = +3 for the x,y,z center-of-mass velocity coordinates of each chunk. +These values can be accessed by any command that uses global array +values from a compute as input. See "Section_howto +15"_Section_howto.html#howto_15 for an overview of LAMMPS output +options. + +The array values are "intensive". The array values will be in +velocity "units"_units.html. + +[Restrictions:] none + +[Related commands:] none + +[Default:] none diff --git a/doc/compute_vcm_molecule.html b/doc/compute_vcm_molecule.html deleted file mode 100644 index f64b4075fc..0000000000 --- a/doc/compute_vcm_molecule.html +++ /dev/null @@ -1,65 +0,0 @@ - -Syntax: -
-compute ID group-ID vcm/molecule --
Examples: -
-compute 1 fluid vcm/molecule --
Description: -
-Define a computation that calculates the center-of-mass velocity of -individual molecules. The x,y,z components of the velocity of each -molecule are computed. This is calcualted by summing mass*velocity -for each atom in the molecule and dividing the sum by the total mass -of the molecule. -
-The velocity of a particular molecule is only computed if one or more -of its atoms are in the specified group. Normally all atoms in the -molecule should be in the group, however this is not required. LAMMPS -will warn you if this is not the case. Only atoms in the group -contribute to the velocity calculation for the molecule. -
-The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. -
-Output info: -
-This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 3 for the vx,vy,vz components -of the center-of-mass velocity of each molecule. These values can be -accessed by any command that uses global array values from a compute -as input. See Section_howto 15 for an -overview of LAMMPS output options. -
-The array values are "intensive". The array values will be in -distance units. -
-Restrictions: none -
-Related commands: -
- -Default: none -
- diff --git a/doc/compute_vcm_molecule.txt b/doc/compute_vcm_molecule.txt deleted file mode 100644 index d1c9d6b93f..0000000000 --- a/doc/compute_vcm_molecule.txt +++ /dev/null @@ -1,60 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Section_commands.html#comm) - -:line - -compute vcm/molecule command :h3 - -[Syntax:] - -compute ID group-ID vcm/molecule :pre - -ID, group-ID are documented in "compute"_compute.html command -vcm/molecule = style name of this compute command :ul - -[Examples:] - -compute 1 fluid vcm/molecule :pre - -[Description:] - -Define a computation that calculates the center-of-mass velocity of -individual molecules. The x,y,z components of the velocity of each -molecule are computed. This is calcualted by summing mass*velocity -for each atom in the molecule and dividing the sum by the total mass -of the molecule. - -The velocity of a particular molecule is only computed if one or more -of its atoms are in the specified group. Normally all atoms in the -molecule should be in the group, however this is not required. LAMMPS -will warn you if this is not the case. Only atoms in the group -contribute to the velocity calculation for the molecule. - -The ordering of per-molecule quantities produced by this compute is -consistent with the ordering produced by other compute commands that -generate per-molecule datums. Conceptually, the molecule IDs will be -in ascending order for any molecule with one or more of its atoms in -the specified group. - -[Output info:] - -This compute calculates a global array where the number of rows = -Nmolecules and the number of columns = 3 for the vx,vy,vz components -of the center-of-mass velocity of each molecule. These values can be -accessed by any command that uses global array values from a compute -as input. See "Section_howto 15"_Section_howto.html#howto_15 for an -overview of LAMMPS output options. - -The array values are "intensive". The array values will be in -distance "units"_units.html. - -[Restrictions:] none - -[Related commands:] - -"compute atom/molecule"_compute_atom_molecule.html - -[Default:] none diff --git a/doc/fix_ave_chunk.html b/doc/fix_ave_chunk.html new file mode 100644 index 0000000000..ee10e43d5c --- /dev/null +++ b/doc/fix_ave_chunk.html @@ -0,0 +1,455 @@ + +Syntax: +
+fix ID group-ID ave/chunk Nevery Nrepeat Nfreq chunkID value1 value2 ... keyword args ... ++
vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) + density/number, density/mass = number or mass density + temp = temperature + c_ID = per-atom vector calculated by a compute with ID + c_ID[I] = Ith column of per-atom array calculated by a compute with ID + f_ID = per-atom vector calculated by a fix with ID + f_ID[I] = Ith column of per-atom array calculated by a fix with ID + v_name = per-atom vector calculated by an atom-style variable with name ++
norm arg = all or sample or none = how output on Nfreq steps is normalized + all = output is sum of atoms across all Nrepeat samples, divided by atom count + sample = output is sum of Nrepeat sample averages, divided by Nrepeat + none = output is sum of Nrepeat sums, divided by Nrepeat + ave args = one or running or window M + one = output new average value every Nfreq steps + running = output cumulative average of all previous Nfreq steps + window M = output average of M most recent Nfreq steps + bias arg = bias-ID + bias-ID = ID of a temperature compute that removes a velocity bias for temperature calculation + adof value = dof_per_atom + dof_per_atom = define this many degrees-of-freedom per atom for temperature calculation + cdof value = dof_per_chunk + dof_per_chunk = define this many degrees-of-freedom per chunk for temperature calculation + file arg = filename + filename = file to write results to + overwrite arg = none = overwrite output file with only latest output + title1 arg = string + string = text to print as 1st line of output file + 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 ++ +
Examples: +
+fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro ttle1 "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 ++
IMPORTANT NOTE: +
+If you are trying to replace an older fix ave/spatial command with the +newer, more flexible fix ave/chunk and compute +chunk/atom commands, you simply need to split +the fix ave/spatial arguments across the two new commands. For +example, this command: +
+fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile ++
could be replaced by: +
+compute cc1 flow chunk/atom bin/1d y 0.0 1.0 +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. +
+In LAMMPS, chunks are collections of atoms defined by a compute +chunk/atom command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the compute +chunk/atom doc page and "Section_howto +23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. +
+Note that only atoms in the specified group contribute to the summing +and averaging calculations. The compute +chunk/atom command defines its own group as +well as an optional region. Atoms will have a chunk ID = 0, meaning +they belong to no chunk, if they are not in that group or region. +Thus you can specify the "all" group for this command if you simply +want to use the chunk definitions provided by chunkID. +
+Each specified per-atom value can be an atom attribute (position, +velocity, force component), a mass or number density, or the result of +a compute or fix or the evaluation of an +atom-style variable. In the latter cases, the +compute, fix, or variable must produce a per-atom quantity, not a +global quantity. Note that the compute +property/atom command provides access to +any attribute defined and stored by atoms. If you wish to +time-average global quantities from a compute, fix, or variable, then +see the fix ave/time command. +
+Computes that produce per-atom quantities are those +which have the word atom in their style name. See the doc pages for +individual fixes to determine which ones produce per-atom +quantities. Variables of style atom are the only +ones that can be used with this fix since all other styles of variable +produce global quantities. +
+The per-atom values of each input vector are summed and averaged +independently of the per-atom values in other input vectors. +
+IMPORTANT NOTE: This fix works by creating an array of size Nchunk +by Nvalues on each processor. Nchunk is the number of chunks which +is defined by the compute chunk/atom +command. Nvalues is the number of input values specified. Each +processor loops over its atoms, tallying its values to the appropriate +chunk. Then the entire array is summed across all processors. This +means that using a large number of chunks will incur an overhead in +memory and computational cost (summing across processors), so be +careful to define a reasonable number of chunks. +
+The Nevery, Nrepeat, and Nfreq arguments specify on what +timesteps the input values will be accessed and contribute to the +average. The final averaged quantities are generated on timesteps +that are a multiples of Nfreq. The average is over Nrepeat +quantities, computed in the preceding portion of the simulation every +Nevery timesteps. Nfreq must be a multiple of Nevery and +Nevery must be non-zero even if Nrepeat is 1. Also, the timesteps +contributing to the average value cannot overlap, i.e. Nfreq > +(Nrepeat-1)*Nevery is required. +
+For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on +timesteps 90,92,94,96,98,100 will be used to compute the final average +on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on +timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time +averaging is done; values are simply generated on timesteps +100,200,etc. +
+Each input value can also be averaged over the atoms in each chunk. +The way the averaging is done across the Nrepeat timesteps to +produce output on the Nfreq timesteps, and across multiple Nfreq +outputs, is determined by the norm and ave keyword settings, as +discussed below. +
+IMPORTANT NOTE: To perform per-chunk averaging within a Nfreq time +window, the number of chunks Nchunk defined by the compute +chunk/atom command must remain constant. If +the ave keyword is set to running or window then Nchunk must +remain constant for the duration of the simulation. This fix forces +the chunk/atom compute specified by chunkID to hold Nchunk constant +for the appropriate time windows, by not allowing it to re-calcualte +Nchunk, which can also affect how it assigns chunk IDs to atoms. +More details are given on the compute +chunk/atom doc page. +
+The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory. +As noted above, any other atom attributes can be used as input values +to this fix by using the compute +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. +
+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 +chunk of atoms (sum of 1/2 m v^2), DOF = the total number of degrees +of freedom for all atoms in the chunk, k = Boltzmann constant, and T = +temperature. +
+The DOF is calculated as N*adof + cdof, where N = number of atoms in +the chunk, adof = degrees of freedom per atom, and cdof = degrees of +freedom per chunk. By default adof = 2 or 3 = dimensionality of +system, as set via the dimension command, and cdof = +0.0. This gives the usual formula for temperature. +
+Note that currently this temperature only includes translational +degrees of freedom for each atom. No rotational degrees of freedom +are included for finite-size particles. Also no degrees of freedom +are subtracted for any velocity bias or constraints that are applied, +such as compute temp/partial, or fix +shake or fix rigid. This is because +those degrees of freedom (e.g. a constrained bond) could apply to sets +of atoms that are both included and excluded from a specific chunk, +and hence the concept is somewhat ill-defined. In some cases, you can +use the adof and cdof keywords to adjust the calculated degress of +freedom appropriately, as explained below. +
+Also note that a bias can be subtracted from atom velocities before +they are used in the above formula for KE, by using the bias +keyword. This allows, for example, a thermal temperature to be +computed after removal of a flow velocity profile. +
+Note that this fix and the compute +temp/chunk command can calculate different +things. The compute calculates the temperature for each chunk for a +single snapshot. This fix can do that but can time average those +values over many snapshots, or it can compute a temperature as if the +atoms in the chunk on different timesteps were collected together as +one set of atoms to calculate their temperature. The compute allows +the center-of-mass velocity of each chunk to be subtracted before +calculating the temperature; this fix does not. +
+If a value begins with "c_", a compute ID must follow which has been +previously defined in the input script. If no bracketed integer is +appended, the per-atom vector calculated by the compute is used. If a +bracketed integer is appended, the Ith column of the per-atom array +calculated by the compute is used. Users can also write code for +their own compute styles and add them to LAMMPS. +
+If a value begins with "f_", a fix ID must follow which has been +previously defined in the input script. If no bracketed integer is +appended, the per-atom vector calculated by the fix is used. If a +bracketed integer is appended, the Ith column of the per-atom 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 results. Users can also write code for their +own fix styles and add them to LAMMPS. +
+If a value begins with "v_", a variable name must follow which has +been previously defined in the input script. Variables of style +atom can reference thermodynamic keywords and various per-atom +attributes, or invoke other computes, fixes, or variables when they +are evaluated, so this is a very general means of generating per-atom +quantities to average within chunks. +
+Additional optional keywords also affect the operation of this fix +and its outputs. +
+The norm keyword affects how averaging is done for the per-chunk +values that are output every Nfreq timesteps. +
+It the norm setting is all, which is the default, a chunk value is +summed over all atoms in all Nrepeat samples, as is the count of +atoms in the chunk. The averaged output value for the chunk on the +Nfreq timesteps is Total-sum / Total-count. In other words it is an +average over atoms across the entire Nfreq timescale. +
+If the norm setting is sample, the chunk value is summed over atoms +for each sample, as is the count, and an "average sample value" is +computed for each sample, i.e. Sample-sum / Sample-count. The outuput +value for the chunk on the Nfreq timesteps is the average of the +Nrepeat "average sample values", i.e. the sum of Nrepeat "average +sample values" divided by Nrepeat. In other words it is an average +of an average. +
+If the norm setting is none, a similar computation as for the +sample seting is done, except the individual "average sample values" +are "summed sample values". A summed sample value is simply the chunk +value summed over atoms in the sample, without dividing by the number +of atoms in the sample. The outuput value for the chunk on the +Nfreq timesteps is the average of the Nrepeat "summed sample +values", i.e. the sum of Nrepeat "summed sample values" divided by +Nrepeat. +
+The ave keyword determines how the per-chunk 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, which is the default, then the chunk +values produced on timesteps that are multiples of Nfreq are +independent of each other; they are output as-is without further +averaging. +
+If the ave setting is running, then the chunk values produced on +timesteps that are multiples of Nfreq are summed and averaged in a +cumulative sense before being output. Each output chunk value is thus +the average of the chunk value produced on that timestep with all +preceding values for the same chunk. This running average begins when +the fix is defined; it can only be restarted by deleting the fix via +the unfix command, or re-defining the fix by +re-specifying it. +
+If the ave setting is window, then the chunk values produced on +timesteps that are multiples of Nfreq are summed and averaged within +a moving "window" of time, so that the last M values for the same +chunk are used to produce the output. E.g. if M = 3 and Nfreq = 1000, +then the output on step 10000 will be the average of the individual +chunk values on steps 8000,9000,10000. Outputs on early steps will +average over less than M values if they are not available. +
+The bias keyword specifies the ID of a temperature compute that +removes a "bias" velocity from each atom, specified as bias-ID. It +is only used when the temp value is calculated, to compute the +thermal temperature of each chunk after the translational kinetic +energy components have been altered in a prescribed way, e.g. to +remove a flow velocity profile. See the doc pages for individual +computes that calculate a temperature to see which ones implement a +bias. +
+The adof and cdof keywords define the values used in the degree of +freedom (DOF) formula described above for for temperature calculation +for each chunk. They are only used when the temp value is +calculated. They can be used to calculate a more appropriate +temperature for some kinds of chunks. Here are 3 examples. +
+If spatially binned chunks contain some number of water molecules and +fix shake is used to make each molecule rigid, then +you could calculate a temperature with 6 degrees of freedom (DOF) (3 +translational, 3 rotational) per molecule by setting adof to 2.0. +If compute temp/partial is used with the +bias keyword to only allow the x component of velocity to contribute +to the temperature, then adof = 1.0 would be appropriate. If each +chunk consists of a large molecule, with some number of its bonds +constrained by fix shake or the entire molecule by +fix rigid/small, then cdof could be set to the +remaining degrees of freedom for the entire molecule (entire chunk in +this case). +
+The file keyword allows a filename to be specified. Every Nfreq +timesteps, a section of chunk info will be written to a text file in +the following format. A line with the timestep and number of chunks +is written. Then one line per chunk is written, containing the chunk +ID (1-Nchunk), an optional original ID value, optional coordinate +values for chunks that represent spatial bins, the number of atoms in +the chunk, and one or more calculated values. More explanation of the +optional values is given below. The number of values in each line +corresponds to the number of values specified in the fix ave/chunk +command. The number of atoms and the value(s) are summed or average +quantities, as explained above. +
+The overwrite keyword will continuously overwrite the output file +with the latest output, so that it only contains one timestep worth of +output. This option can only be used with the ave running setting. +
+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, these header lines are as follows: +
+# Chunk-averaged data for fix ID and group name +# Timestep Number-of-chunks +# Chunk (OrigID) (Coord1) (Coord2) (Coord3) Ncount value1 value2 ... ++
In the first line, ID and name are replaced with the fix-ID and group +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 value names, e.g. fx or c_myCompute2. +
+The words in parenthesis only appear with corresponding columns if the +chunk style specified for the compute +chunk/atom command supports them. The OrigID +column is only used if the compress keyword was set to yes for the +compute chunk/atom command. This means that +the original chunk IDs (e.g. molecule IDs) will have been compressed +to remove chunk IDs with no atoms assigned to them. Thus a compresed +chunk ID of 3 may correspond to an original chunk ID or molecule ID of +415. The OrigID column will list 415 for the 3rd chunk. +
+The CoordN columns only appear if a binning style was used in the +compute chunk/atom command. For bin/1d, +bin/2d, and bin/3d styles the column values are the center point +of the bin in the corresponding dimension. Just Coord1 is used for +bin/1d, Coord2 is added for bin/2d, Coord3 is added for bin/3d. +
+Note that if the value of the units keyword used in the compute +chunk/atom command is box or lattice, the +coordinate values will be in distance units. If the +value of the units keyword is reduced, the coordinate values will +be in unitless reduced units (0-1). +
+Restart, fix_modify, output, run start/stop, minimize info: +
+No information about this fix is written to binary restart +files. None of the fix_modify options +are relevant to this fix. +
+This fix computes a global array of values which can be accessed by +various output commands. The values can +only be accessed on timesteps that are multiples of Nfreq since that +is when averaging is performed. The global array has # of rows = +the number of chunks Nchunk as calculated by the specified compute +chunk/atom command. The # of columns = +M+1+Nvalues, where M = 1 to 4, depending on whether the optional +columns for OrigID and CoordN are used, as explained above. +Following the optional columns, the next column contains the count of +atoms in the chunk, and the remaining columns are the Nvalue +quantities. When the array is accessed with a row I that exceeds the +current number of chunks, than a 0.0 is returned by the fix instead of +an error, since the number of chunks can vary as a simulation runs +depending on how that value is computed by the compute chunk/atom +command. +
+The array values calculated by this fix are treated as "intensive", +since they are typically already normalized by the count of atoms in +each chunk. +
+No parameter of this fix can be used with the start/stop keywords of +the run command. This fix is not invoked during energy +minimization. +
+Restrictions: none +
+Related commands: +
+compute, fix ave/atom, fix +ave/histo, fix ave/time, +variable, fix ave/correlate +
+Default: +
+The option defaults are norm = all, ave = one, bias = none, no file output, and +title 1,2,3 = strings as described above. +
+ diff --git a/doc/fix_ave_chunk.txt b/doc/fix_ave_chunk.txt new file mode 100644 index 0000000000..cf57948b36 --- /dev/null +++ b/doc/fix_ave_chunk.txt @@ -0,0 +1,439 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +fix ave/chunk command :h3 + +[Syntax:] + +fix ID group-ID ave/chunk Nevery Nrepeat Nfreq chunkID value1 value2 ... keyword args ... :pre + +ID, group-ID are documented in "fix"_fix.html command :ulb,l +ave/chunk = style name of this fix command :l +Nevery = use input values every this many timesteps :l +Nrepeat = # of times to use input values for calculating averages :l +Nfreq = calculate averages every this many timesteps :l +chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :l +one or more input values can be listed :l +value = vx, vy, vz, fx, fy, fz, density/mass, density/number, temp, c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name :l + vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) + density/number, density/mass = number or mass density + temp = temperature + c_ID = per-atom vector calculated by a compute with ID + c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID + f_ID = per-atom vector calculated by a fix with ID + f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID + v_name = per-atom vector calculated by an atom-style variable with name :pre + +zero or more keyword/arg pairs may be appended :l +keyword = {norm} or {ave} or {bias} or {adof} or {cdof} or {file} or {overwrite} or {title1} or {title2} or {title3} :l + {norm} arg = {all} or {sample} or {none} = how output on {Nfreq} steps is normalized + all = output is sum of atoms across all {Nrepeat} samples, divided by atom count + sample = output is sum of {Nrepeat} sample averages, divided by {Nrepeat} + none = output is sum of {Nrepeat} sums, divided by {Nrepeat} + {ave} args = {one} or {running} or {window M} + one = output new average value every Nfreq steps + running = output cumulative average of all previous Nfreq steps + window M = output average of M most recent Nfreq steps + {bias} arg = bias-ID + bias-ID = ID of a temperature compute that removes a velocity bias for temperature calculation + {adof} value = dof_per_atom + dof_per_atom = define this many degrees-of-freedom per atom for temperature calculation + {cdof} value = dof_per_chunk + dof_per_chunk = define this many degrees-of-freedom per chunk for temperature calculation + {file} arg = filename + filename = file to write results to + {overwrite} arg = none = overwrite output file with only latest output + {title1} arg = string + string = text to print as 1st line of output file + {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 :pre +:ule + +[Examples:] + +fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro ttle1 "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 + +[IMPORTANT NOTE:] + +If you are trying to replace an older fix ave/spatial command with the +newer, more flexible fix ave/chunk and "compute +chunk/atom"_compute_chunk_atom.html commands, you simply need to split +the fix ave/spatial arguments across the two new commands. For +example, this command: + +fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile :pre + +could be replaced by: + +compute cc1 flow chunk/atom bin/1d y 0.0 1.0 +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. + +In LAMMPS, chunks are collections of atoms defined by a "compute +chunk/atom"_compute_chunk_atom.html command, which assigns each atom +to a single chunk (or no chunk). The ID for this command is specified +as chunkID. For example, a single chunk could be the atoms in a +molecule or atoms in a spatial bin. See the "compute +chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto +23"_Section_howto.html#howto_23 for details of how chunks can be +defined and examples of how they can be used to measure properties of +a system. + +Note that only atoms in the specified group contribute to the summing +and averaging calculations. The "compute +chunk/atom"_compute_chunk_atom.html command defines its own group as +well as an optional region. Atoms will have a chunk ID = 0, meaning +they belong to no chunk, if they are not in that group or region. +Thus you can specify the "all" group for this command if you simply +want to use the chunk definitions provided by chunkID. + +Each specified per-atom value can be an atom attribute (position, +velocity, force component), a mass or number density, or the result of +a "compute"_compute.html or "fix"_fix.html or the evaluation of an +atom-style "variable"_variable.html. In the latter cases, the +compute, fix, or variable must produce a per-atom quantity, not a +global quantity. Note that the "compute +property/atom"_compute_property_atom.html command provides access to +any attribute defined and stored by atoms. If you wish to +time-average global quantities from a compute, fix, or variable, then +see the "fix ave/time"_fix_ave_time.html command. + +"Computes"_compute.html that produce per-atom quantities are those +which have the word {atom} in their style name. See the doc pages for +individual "fixes"_fix.html to determine which ones produce per-atom +quantities. "Variables"_variable.html of style {atom} are the only +ones that can be used with this fix since all other styles of variable +produce global quantities. + +The per-atom values of each input vector are summed and averaged +independently of the per-atom values in other input vectors. + +IMPORTANT NOTE: This fix works by creating an array of size {Nchunk} +by Nvalues on each processor. {Nchunk} is the number of chunks which +is defined by the "compute chunk/atom"_doc/compute_chunk_atom.html +command. Nvalues is the number of input values specified. Each +processor loops over its atoms, tallying its values to the appropriate +chunk. Then the entire array is summed across all processors. This +means that using a large number of chunks will incur an overhead in +memory and computational cost (summing across processors), so be +careful to define a reasonable number of chunks. + +:line + +The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify on what +timesteps the input values will be accessed and contribute to the +average. The final averaged quantities are generated on timesteps +that are a multiples of {Nfreq}. The average is over {Nrepeat} +quantities, computed in the preceding portion of the simulation every +{Nevery} timesteps. {Nfreq} must be a multiple of {Nevery} and +{Nevery} must be non-zero even if {Nrepeat} is 1. Also, the timesteps +contributing to the average value cannot overlap, i.e. Nfreq > +(Nrepeat-1)*Nevery is required. + +For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on +timesteps 90,92,94,96,98,100 will be used to compute the final average +on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on +timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time +averaging is done; values are simply generated on timesteps +100,200,etc. + +Each input value can also be averaged over the atoms in each chunk. +The way the averaging is done across the {Nrepeat} timesteps to +produce output on the {Nfreq} timesteps, and across multiple {Nfreq} +outputs, is determined by the {norm} and {ave} keyword settings, as +discussed below. + +IMPORTANT NOTE: To perform per-chunk averaging within a {Nfreq} time +window, the number of chunks {Nchunk} defined by the "compute +chunk/atom"_compute_chunk_atom.html command must remain constant. If +the {ave} keyword is set to {running} or {window} then {Nchunk} must +remain constant for the duration of the simulation. This fix forces +the chunk/atom compute specified by chunkID to hold {Nchunk} constant +for the appropriate time windows, by not allowing it to re-calcualte +{Nchunk}, which can also affect how it assigns chunk IDs to atoms. +More details are given on the "compute +chunk/atom"_compute_chunk_atom.html doc page. + +:line + +The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory. +As noted above, any other atom attributes can be used as input values +to this fix by using the "compute +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. + +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 +chunk of atoms (sum of 1/2 m v^2), DOF = the total number of degrees +of freedom for all atoms in the chunk, k = Boltzmann constant, and T = +temperature. + +The DOF is calculated as N*adof + cdof, where N = number of atoms in +the chunk, adof = degrees of freedom per atom, and cdof = degrees of +freedom per chunk. By default adof = 2 or 3 = dimensionality of +system, as set via the "dimension"_dimension.html command, and cdof = +0.0. This gives the usual formula for temperature. + +Note that currently this temperature only includes translational +degrees of freedom for each atom. No rotational degrees of freedom +are included for finite-size particles. Also no degrees of freedom +are subtracted for any velocity bias or constraints that are applied, +such as "compute temp/partial"_compute_temp_partial.html, or "fix +shake"_fix_shake.html or "fix rigid"_fix_rigid.html. This is because +those degrees of freedom (e.g. a constrained bond) could apply to sets +of atoms that are both included and excluded from a specific chunk, +and hence the concept is somewhat ill-defined. In some cases, you can +use the {adof} and {cdof} keywords to adjust the calculated degress of +freedom appropriately, as explained below. + +Also note that a bias can be subtracted from atom velocities before +they are used in the above formula for KE, by using the {bias} +keyword. This allows, for example, a thermal temperature to be +computed after removal of a flow velocity profile. + +Note that this fix and the "compute +temp/chunk"_compute_temp_chunk.html command can calculate different +things. The compute calculates the temperature for each chunk for a +single snapshot. This fix can do that but can time average those +values over many snapshots, or it can compute a temperature as if the +atoms in the chunk on different timesteps were collected together as +one set of atoms to calculate their temperature. The compute allows +the center-of-mass velocity of each chunk to be subtracted before +calculating the temperature; this fix does not. + +If a value begins with "c_", a compute ID must follow which has been +previously defined in the input script. If no bracketed integer is +appended, the per-atom vector calculated by the compute is used. If a +bracketed integer is appended, the Ith column of the per-atom array +calculated by the compute is used. 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 integer is +appended, the per-atom vector calculated by the fix is used. If a +bracketed integer is appended, the Ith column of the per-atom 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 results. 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. Variables of style +{atom} can reference thermodynamic keywords and various per-atom +attributes, or invoke other computes, fixes, or variables when they +are evaluated, so this is a very general means of generating per-atom +quantities to average within chunks. + +:line + +Additional optional keywords also affect the operation of this fix +and its outputs. + +The {norm} keyword affects how averaging is done for the per-chunk +values that are output every {Nfreq} timesteps. + +It the {norm} setting is {all}, which is the default, a chunk value is +summed over all atoms in all {Nrepeat} samples, as is the count of +atoms in the chunk. The averaged output value for the chunk on the +{Nfreq} timesteps is Total-sum / Total-count. In other words it is an +average over atoms across the entire {Nfreq} timescale. + +If the {norm} setting is {sample}, the chunk value is summed over atoms +for each sample, as is the count, and an "average sample value" is +computed for each sample, i.e. Sample-sum / Sample-count. The outuput +value for the chunk on the {Nfreq} timesteps is the average of the +{Nrepeat} "average sample values", i.e. the sum of {Nrepeat} "average +sample values" divided by {Nrepeat}. In other words it is an average +of an average. + +If the {norm} setting is {none}, a similar computation as for the +{sample} seting is done, except the individual "average sample values" +are "summed sample values". A summed sample value is simply the chunk +value summed over atoms in the sample, without dividing by the number +of atoms in the sample. The outuput value for the chunk on the +{Nfreq} timesteps is the average of the {Nrepeat} "summed sample +values", i.e. the sum of {Nrepeat} "summed sample values" divided by +{Nrepeat}. + +The {ave} keyword determines how the per-chunk 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}, which is the default, then the chunk +values produced on timesteps that are multiples of {Nfreq} are +independent of each other; they are output as-is without further +averaging. + +If the {ave} setting is {running}, then the chunk values produced on +timesteps that are multiples of {Nfreq} are summed and averaged in a +cumulative sense before being output. Each output chunk value is thus +the average of the chunk value produced on that timestep with all +preceding values for the same chunk. This running average begins when +the fix is defined; it can only be restarted by deleting the fix via +the "unfix"_unfix.html command, or re-defining the fix by +re-specifying it. + +If the {ave} setting is {window}, then the chunk values produced on +timesteps that are multiples of {Nfreq} are summed and averaged within +a moving "window" of time, so that the last M values for the same +chunk are used to produce the output. E.g. if M = 3 and Nfreq = 1000, +then the output on step 10000 will be the average of the individual +chunk values on steps 8000,9000,10000. Outputs on early steps will +average over less than M values if they are not available. + +The {bias} keyword specifies the ID of a temperature compute that +removes a "bias" velocity from each atom, specified as {bias-ID}. It +is only used when the {temp} value is calculated, to compute the +thermal temperature of each chunk after the translational kinetic +energy components have been altered in a prescribed way, e.g. to +remove a flow velocity profile. See the doc pages for individual +computes that calculate a temperature to see which ones implement a +bias. + +The {adof} and {cdof} keywords define the values used in the degree of +freedom (DOF) formula described above for for temperature calculation +for each chunk. They are only used when the {temp} value is +calculated. They can be used to calculate a more appropriate +temperature for some kinds of chunks. Here are 3 examples. + +If spatially binned chunks contain some number of water molecules and +"fix shake"_fix_shake.html is used to make each molecule rigid, then +you could calculate a temperature with 6 degrees of freedom (DOF) (3 +translational, 3 rotational) per molecule by setting {adof} to 2.0. +If "compute temp/partial"_compute_temp_partial.html is used with the +{bias} keyword to only allow the x component of velocity to contribute +to the temperature, then {adof} = 1.0 would be appropriate. If each +chunk consists of a large molecule, with some number of its bonds +constrained by "fix shake"_fix_shake.html or the entire molecule by +"fix rigid/small"_fix_rigid.html, then {cdof} could be set to the +remaining degrees of freedom for the entire molecule (entire chunk in +this case). + +The {file} keyword allows a filename to be specified. Every {Nfreq} +timesteps, a section of chunk info will be written to a text file in +the following format. A line with the timestep and number of chunks +is written. Then one line per chunk is written, containing the chunk +ID (1-Nchunk), an optional original ID value, optional coordinate +values for chunks that represent spatial bins, the number of atoms in +the chunk, and one or more calculated values. More explanation of the +optional values is given below. The number of values in each line +corresponds to the number of values specified in the fix ave/chunk +command. The number of atoms and the value(s) are summed or average +quantities, as explained above. + +The {overwrite} keyword will continuously overwrite the output file +with the latest output, so that it only contains one timestep worth of +output. This option can only be used with the {ave running} setting. + +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, these header lines are as follows: + +# Chunk-averaged data for fix ID and group name +# Timestep Number-of-chunks +# Chunk (OrigID) (Coord1) (Coord2) (Coord3) Ncount value1 value2 ... :pre + +In the first line, ID and name are replaced with the fix-ID and group +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 value names, e.g. fx or c_myCompute[2]. + +The words in parenthesis only appear with corresponding columns if the +chunk style specified for the "compute +chunk/atom"_compute_chunk_atom.html command supports them. The OrigID +column is only used if the {compress} keyword was set to {yes} for the +"compute chunk/atom"_compute_chunk_atom.html command. This means that +the original chunk IDs (e.g. molecule IDs) will have been compressed +to remove chunk IDs with no atoms assigned to them. Thus a compresed +chunk ID of 3 may correspond to an original chunk ID or molecule ID of +415. The OrigID column will list 415 for the 3rd chunk. + +The CoordN columns only appear if a {binning} style was used in the +"compute chunk/atom"_compute_chunk_atom.html command. For {bin/1d}, +{bin/2d}, and {bin/3d} styles the column values are the center point +of the bin in the corresponding dimension. Just Coord1 is used for +{bin/1d}, Coord2 is added for {bin/2d}, Coord3 is added for {bin/3d}. + +Note that if the value of the {units} keyword used in the "compute +chunk/atom command"_compute_chunk_atom.html is {box} or {lattice}, the +coordinate values will be in distance "units"_units.html. If the +value of the {units} keyword is {reduced}, the coordinate values will +be in unitless reduced units (0-1). + +:line + +[Restart, fix_modify, output, run start/stop, minimize info:] + +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 computes a global array of values which can be accessed by +various "output commands"_Section_howto.html#howto_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 # of rows = +the number of chunks {Nchunk} as calculated by the specified "compute +chunk/atom"_compute_chunk_atom.html command. The # of columns = +M+1+Nvalues, where M = 1 to 4, depending on whether the optional +columns for OrigID and CoordN are used, as explained above. +Following the optional columns, the next column contains the count of +atoms in the chunk, and the remaining columns are the Nvalue +quantities. When the array is accessed with a row I that exceeds the +current number of chunks, than a 0.0 is returned by the fix instead of +an error, since the number of chunks can vary as a simulation runs +depending on how that value is computed by the compute chunk/atom +command. + +The array values calculated by this fix are treated as "intensive", +since they are typically already normalized by the count of atoms in +each chunk. + +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 +minimization"_minimize.html. + +[Restrictions:] none + +[Related commands:] + +"compute"_compute.html, "fix ave/atom"_fix_ave_atom.html, "fix +ave/histo"_fix_ave_histo.html, "fix ave/time"_fix_ave_time.html, +"variable"_variable.html, "fix ave/correlate"_fix_ave_correlate.html + +[Default:] + +The option defaults are norm = all, ave = one, bias = none, no file output, and +title 1,2,3 = strings as described above. diff --git a/doc/fix_ave_spatial.html b/doc/fix_ave_spatial.html index eef4ea7fa1..9d41f243ac 100644 --- a/doc/fix_ave_spatial.html +++ b/doc/fix_ave_spatial.html @@ -83,6 +83,24 @@ fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass bound y 5.0 20.0 discard yes ave running +IMPORTANT NOTE: +
+The fix ave/spatial command has been replaced by the more flexible +fix ave/chunk and compute +chunk/atom commands. The fix ave/spatial +command will be removed from LAMMPS sometime in the summer of 2015. +
+Any fix ave/spatial command can be replaced by the two new commands. +You simply need to split the fix ave/spatial arguments across the two +new commands. For example, this command: +
+fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile ++
could be replaced by: +
+compute cc1 flow chunk/atom bin/1d y 0.0 1.0 +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, bin diff --git a/doc/fix_ave_spatial.txt b/doc/fix_ave_spatial.txt index 9737302122..5c2f28f8da 100644 --- a/doc/fix_ave_spatial.txt +++ b/doc/fix_ave_spatial.txt @@ -68,6 +68,24 @@ fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass bound y 5.0 20.0 discard yes ave running :pre +[IMPORTANT NOTE:] + + The fix ave/spatial command has been replaced by the more flexible +"fix ave/chunk"_fix_ave_chunk.html and "compute +chunk/atom"_compute_chunk_atom.html commands. The fix ave/spatial +command will be removed from LAMMPS sometime in the summer of 2015. + +Any fix ave/spatial command can be replaced by the two new commands. +You simply need to split the fix ave/spatial arguments across the two +new commands. For example, this command: + +fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile :pre + +could be replaced by: + +compute cc1 flow chunk/atom bin/1d y 0.0 1.0 +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, bin