de-doc multiple label maps
This commit is contained in:
@ -21,15 +21,10 @@ A collection of type labels for all type-kinds (atom types, bond
|
||||
types, etc.) is stored as a "label map" which is simply a list of
|
||||
numeric types and associated type labels. Within a type-kind, each
|
||||
type label must be unique. It can be assigned to only one numeric
|
||||
type. To read and write the default type labels to data files for a
|
||||
given type-kind, all associated numeric types need have a type label
|
||||
type. To read and write type labels to data files for a given
|
||||
type-kind, all associated numeric types need have a type label
|
||||
assigned.
|
||||
|
||||
There can be multiple label maps defined. There is a default label
|
||||
map which has no mapID. Additional label maps each have a mapID,
|
||||
which is a string containing only alphanumeric characters and
|
||||
underscores.
|
||||
|
||||
Valid type labels can contain any alphanumeric character, but cannot
|
||||
start with a number. They can also contain standard characters, such
|
||||
as square brackets "[" and "]", underscore "_", dash "-", plus "+" and
|
||||
@ -44,20 +39,13 @@ enclosing the constituent atom types in square brackets. E.g., define
|
||||
a C-H bond with a type label "[C][H]".
|
||||
|
||||
There are two ways to define label maps. One is via the
|
||||
:doc:`labelmap <labelmap>` command, which has an optional *mapID*
|
||||
keyword to allow creation of type labels in either the default map or
|
||||
an additional map with a mapID. The other is via the :doc:`read_data
|
||||
<read_data>` command. A data file can have sections such as Atom Type
|
||||
Labels, Bond Type Labels, etc, which associate type labels with
|
||||
numeric types. Only the default label map can be defined in this
|
||||
manner.
|
||||
|
||||
If defined, the default label map can be written out to data files by
|
||||
the :doc:`write_data <write_data>` command. This map is also written
|
||||
to and read from restart files, by the :doc:`write_restart
|
||||
:doc:`labelmap <labelmap>` command. The other is via the
|
||||
:doc:`read_data <read_data>` command. A data file can have sections
|
||||
such as Atom Type Labels, Bond Type Labels, etc, which associate type
|
||||
labels with numeric types. The label map can be written out to data
|
||||
files by the :doc:`write_data <write_data>` command. This map is also
|
||||
written to and read from restart files, by the :doc:`write_restart
|
||||
<write_restart>` and :doc:`read_restart <read_restart>` commands.
|
||||
Label maps with mapIDs cannot be written to either data or restart
|
||||
files by these commands.
|
||||
|
||||
----------
|
||||
|
||||
@ -65,13 +53,12 @@ Use of type labels in LAMMPS input or output
|
||||
""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Any LAMMPS input script command which takes a numeric type as an
|
||||
argument, can use the associated type label instead, with the optional
|
||||
mapID prepended, followed by a double colon "::". If a type label is
|
||||
not defined for a particular numeric type, only its numeric type can
|
||||
be used.
|
||||
argument, can use the associated type label instead. If a type label
|
||||
is not defined for a particular numeric type, only its numeric type
|
||||
can be used.
|
||||
|
||||
The first example uses the default label map for bond types. The
|
||||
second uses a label map with mapID = Map2.
|
||||
This example assigns a label to a bond type, and then uses the type
|
||||
label to redefine the bond coefficients.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -79,14 +66,6 @@ second uses a label map with mapID = Map2.
|
||||
labelmap bond 2 [C][H]
|
||||
bond_coeff [C][H] 80.0 1.2 # type label
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
bond_coeff 2 80.0 1.2 # numeric type
|
||||
labelmap bond 2 [C][H] mapID Map2
|
||||
bond_coeff Map2::[C][H] 80.0 1.2 # type label
|
||||
|
||||
Support for type labels is a work-in-progress for LAMMPS as of
|
||||
Nov 2021. If an input script command allows substituting for a
|
||||
numeric type argument with a type label, it will be mentioned on that
|
||||
|
||||
@ -13,12 +13,6 @@ Syntax
|
||||
* type-kind = *atom* or *bond* or *angle* or *dihedral* or *improper*
|
||||
* one or more numeric-type/type-label pairs may be specified
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *mapID*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*mapID* arg = name
|
||||
name = ID for the label map
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -27,7 +21,7 @@ Examples
|
||||
|
||||
labelmap atom 3 carbon
|
||||
labelmap bond 1 [c1][c2] 2 [c1][hc]
|
||||
labelmap bond 1 [c1][c2] 2 [c1][hc] mapID myMap
|
||||
labelmap bond 1 [c1][c2] 2 [c1][hc]
|
||||
labelmap atom $(label(carbon)) C # change type label from 'carbon' to 'C'
|
||||
|
||||
Description
|
||||
@ -36,10 +30,8 @@ Description
|
||||
Define alphanumeric type labels to associate with one or more numeric
|
||||
atom, bond, angle, dihedral or improper types. A collection of type
|
||||
labels for all atom types, bond types, etc is stored as a label map.
|
||||
As explained below, this command also allows definition of multiple
|
||||
label maps by use of the mapID keyword.
|
||||
|
||||
The default label maps can also be defined by the :doc:`read_data <read_data>`
|
||||
The label map can also be defined by the :doc:`read_data <read_data>`
|
||||
command when it reads these sections in a data file: Atom Type Labels,
|
||||
Bond Type Labels, etc. See the :doc:`Howto type labels
|
||||
<Howto_type_labels>` doc page for a general discussion of how type
|
||||
@ -60,13 +52,6 @@ cases, such as when reading and writing data files, it is required
|
||||
that a type label be defined for every numeric type (within a given
|
||||
type-kind).
|
||||
|
||||
It may sometimes be useful to define multiple label maps. This can be
|
||||
done using the *mapID* keyword. The specified *name* is the mapID
|
||||
assigned to the label map. The ID of a label map can only contain
|
||||
alphanumeric characters and underscores. If the *mapID* keyword is
|
||||
not used, the specified type labels are assigned to the default label
|
||||
map, which has no mapID.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
@ -85,5 +70,4 @@ Related commands
|
||||
Default
|
||||
"""""""
|
||||
|
||||
If the mapID keyword is not used, specified type labels are assigned
|
||||
to the default map.
|
||||
none
|
||||
|
||||
@ -18,7 +18,7 @@ Syntax
|
||||
|
||||
*nocoeff* = do not write out force field info
|
||||
*nofix* = do not write out extra sections read by fixes
|
||||
*nolabelmap* = do not write out the default label map
|
||||
*nolabelmap* = do not write out type labels
|
||||
*types* value = *numeric* or *labels*
|
||||
*pair* value = *ii* or *ij*
|
||||
*ii* = write one line of pair coefficient info per atom type
|
||||
@ -108,20 +108,19 @@ sections for user-created per-atom properties from :doc:`fix
|
||||
property/atom <fix_property_atom>`.
|
||||
|
||||
The *nolabelmap* and *types* keywords refer to type labels that may be
|
||||
defined for numeric atom types, bond types, angle types, etc. Only
|
||||
the default label map is written to data files. The default label map
|
||||
can be defined in two ways, either by the :doc:`labelmap <labelmap>`
|
||||
command or in data files read by the :doc:`read_data <read_data>`
|
||||
command which have sections for Atom Type Labels, Bond Type Labels,
|
||||
Angle Type Labels, etc. See the :doc:`Howto type labels
|
||||
defined for numeric atom types, bond types, angle types, etc. The
|
||||
label map can be defined in two ways, either by the :doc:`labelmap
|
||||
<labelmap>` command or in data files read by the :doc:`read_data
|
||||
<read_data>` command which have sections for Atom Type Labels, Bond
|
||||
Type Labels, Angle Type Labels, etc. See the :doc:`Howto type labels
|
||||
<Howto_type_labels>` doc page for the allowed syntax of type labels
|
||||
and a general discussion of how type labels can be used.
|
||||
|
||||
Use of the *nolabelmap* keyword means that even if the default type
|
||||
labels exist for a given type-kind (Atoms, Bonds, Angles, etc.), type
|
||||
labels are not written to the data file. By default, they are written
|
||||
if they exist. A type label must be defined for every numeric type
|
||||
(within a given type-kind) to be written to the data file.
|
||||
Use of the *nolabelmap* keyword means that even if type labels exist
|
||||
for a given type-kind (Atoms, Bonds, Angles, etc.), type labels are
|
||||
not written to the data file. By default, they are written if they
|
||||
exist. A type label must be defined for every numeric type (within a
|
||||
given type-kind) to be written to the data file.
|
||||
|
||||
The *types* keyword determines how atom types, bond types, angle
|
||||
types, etc are written into these data file sections: Atoms, Bonds,
|
||||
|
||||
Reference in New Issue
Block a user