diff --git a/doc/src/set.rst b/doc/src/set.rst index 0d32d156bc..740d30d3cf 100644 --- a/doc/src/set.rst +++ b/doc/src/set.rst @@ -11,7 +11,16 @@ Syntax set style ID keyword values ... * style = *atom* or *type* or *mol* or *group* or *region* -* ID = atom ID range or type range or mol ID range or group ID or region ID +* ID = depends on style + +.. parsed-literal:: + + for style = *atom*, ID = a range of atom IDs + for style = *type*, ID = a range of numeric types or a single type label + for style = *mol*, ID = a range of molecule IDs + for style = *group*, ID = a group ID + for style = *region*, ID = a region ID + * one or more keyword/value pairs may be appended * keyword = *type* or *type/fraction* or *type/ratio* or *type/subset* or *mol* or *x* or *y* or *z* or *vx* or *vy* or *vz* or *charge* or @@ -28,22 +37,22 @@ Syntax .. parsed-literal:: - *type* value = atom type or type label + *type* value = numeric atom type or type label value can be an atom-style variable (see below) *type/fraction* values = type fraction seed - type = new atom type or type label + type = numeric atom type or type label fraction = approximate fraction of selected atoms to set to new atom type seed = random # seed (positive integer) *type/ratio* values = type fraction seed - type = new atom type or type label + type = numeric atom type or type label fraction = exact fraction of selected atoms to set to new atom type seed = random # seed (positive integer) *type/subset* values = type Nsubset seed - type = new atom type or type label + type = numeric atom type or type label Nsubset = exact number of selected atoms to set to new atom type seed = random # seed (positive integer) *mol* value = molecule ID - value can be an atom-style variable (see below) + value can be an atom-style variable (see below) *x*,\ *y*,\ *z* value = atom coordinate (distance units) value can be an atom-style variable (see below) *vx*,\ *vy*,\ *vz* value = atom velocity (velocity units) @@ -107,10 +116,10 @@ Syntax *image* nx ny nz nx,ny,nz = which periodic image of the simulation box the atom is in any of nx,ny,nz can be an atom-style variable (see below) - *bond* value = bond type or bond type label for all bonds between selected atoms - *angle* value = angle type or angle type label for all angles between selected atoms - *dihedral* value = dihedral type or dihedral type label for all dihedrals between selected atoms - *improper* value = improper type or improper type label for all impropers between selected atoms + *bond* value = numeric bond type or bond type label, for all bonds between selected atoms + *angle* value = numeric angle type or angle type label, for all angles between selected atoms + *dihedral* value = numeric dihedral type or dihedral type label, for all dihedrals between selected atoms + *improper* value = numeric improper type or improper type label, for all impropers between selected atoms *sph/e* value = energy of SPH particles (need units) value can be an atom-style variable (see below) *sph/cv* value = heat capacity of SPH particles (need units) @@ -191,9 +200,13 @@ the properties of, via the *style* and *ID* arguments. Support for type labels was added for selecting atoms by type -The style *atom* selects all the atoms in a range of atom IDs. The -style *type* selects all the atoms in a range of types or type labels. -The style *mol* selects all the atoms in a range of molecule IDs. +The style *atom* selects all the atoms in a range of atom IDs. + +The style *type* selects all the atoms in a range of types or type +labels. The style *type* selects atoms in one of two ways. A range +of numeric atom types can be specified. Or a single atom type label +can be specified, e.g. "C". The style *mol* selects all the atoms in +a range of molecule IDs. In each of the range cases, the range can be specified as a single numeric value, or a wildcard asterisk can be used to specify a range @@ -250,15 +263,15 @@ from a file. Support for type labels was added for setting atom, bond, angle, dihedral, and improper types -Keyword *type* sets the atom type for all selected atoms. A specified value -can be a type id or a type label for atom type. When using a -type id, the specified value must be from 1 to ntypes, where ntypes was set -by the :doc:`create_box ` command or the *atom types* field in the -header of the data file read by the :doc:`read_data ` -command. In the case of the specified type label, it must have been defined -before use via an alphanumeric type label. See the -:doc:`Howto type labels ` doc page for the allowed syntax -of type labels and a general discussion of how type labels can be used. +Keyword *type* sets the atom type for all selected atoms. A specified +value can be either a numeric atom type or an atom type label. When +using a numeric type, the specified value must be from 1 to ntypes, +where ntypes was set by the :doc:`create_box ` command or +the *atom types* field in the header of the data file read by the +:doc:`read_data ` command. When using a type label it must +have been defined previously. See the :doc:`Howto type labels +` doc page for the allowed syntax of type labels +and a general discussion of how type labels can be used. Keyword *type/fraction* sets the atom type for a fraction of the selected atoms. The actual number of atoms changed is not guaranteed @@ -268,10 +281,10 @@ that a particular atom is changed or not changed, regardless of how many processors are being used. This keyword does not allow use of an atom-style variable. -Keywords *type/ratio* and *type/subset* also set the atom type for -a fraction of the selected atoms. The actual number of -atoms changed will be exactly the requested number. For *type/ratio* the -specified fraction (0 <= *fraction* <= 1) determines the number. For +Keywords *type/ratio* and *type/subset* also set the atom type for a +fraction of the selected atoms. The actual number of atoms changed +will be exactly the requested number. For *type/ratio* the specified +fraction (0 <= *fraction* <= 1) determines the number. For *type/subset*, the specified *Nsubset* is the number. An iterative algorithm is used which ensures the correct number of atoms are selected, in a perfectly random fashion. Which atoms are selected @@ -480,17 +493,18 @@ simulation, but may mess up analysis of the trajectories if a LAMMPS diagnostic or your own analysis relies on the image flags to unwrap a molecule which straddles the periodic box. -Keywords *bond*, *angle*, *dihedral*, and *improper*, set the bond type -(angle type, etc) of all bonds (angles, etc) of selected atoms to the -specified value from 1 to nbondtypes (nangletypes, etc). One can also use -a specified type label. See the :doc:`Howto type labels ` -doc page for the allowed syntax of type labels and a general discussion of -how type labels can be used. All atoms in a -particular bond (angle, etc) must be selected atoms in order for the -change to be made. The value of nbondtype (nangletypes, etc) was set by -the *bond types* (\ *angle types*, etc) field in the header of the data -file read by the :doc:`read_data ` command. These keywords -do not allow use of an atom-style variable. +Keywords *bond*, *angle*, *dihedral*, and *improper*, set the bond +type (angle type, etc) of all bonds (angles, etc) of selected atoms to +the specified value. The value can be a numeric type from 1 to +nbondtypes (nangletypes, etc). Or it can be a type label (bond type +label, angle type lable, etc). See the :doc:`Howto type labels +` doc page for the allowed syntax of type labels +and a general discussion of how type labels can be used. All atoms in +a particular bond (angle, etc) must be selected atoms in order for the +change to be made. The value of nbondtypes (nangletypes, etc) was set +by the *bond types* (\ *angle types*, etc) field in the header of the +data file read by the :doc:`read_data ` command. These +keywords do not allow use of an atom-style variable. Keywords *sph/e*, *sph/cv*, and *sph/rho* set the energy, heat capacity, and density of smoothed particle hydrodynamics (SPH) particles. See