labelmap map/assign docs
This commit is contained in:
@ -8,10 +8,16 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
labelmap interaction numeric-type type-label ...
|
||||
labelmap interaction numeric-type type-label ... keyword values
|
||||
|
||||
* interaction = *atom* or *bond* or *angle* or *dihedral* or *improper*
|
||||
* one or more numeric-type/type-label pairs may be appended
|
||||
* keyword = *map/assign*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*map/assign* value = mapID
|
||||
mapID = name of auxiliary label map
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -31,9 +37,9 @@ numeric type used by LAMMPS with a character-based type can be
|
||||
helpful in a variety of situations. For example, type labels can make
|
||||
various inputs more readable and compatible with other inputs (data
|
||||
files, molecule templates, etc.), particularly if your model's force
|
||||
field uses alphanumeric atom types. Type label maps can also be
|
||||
defined by :doc:`data files <read_data>` using the relevant Type Label
|
||||
sections.
|
||||
field uses alphanumeric atom types. The default type label map can
|
||||
also be defined by :doc:`data files <read_data>` using the relevant
|
||||
Type Label sections.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -67,6 +73,22 @@ atom type 'C' and 'H' is written as:
|
||||
bond_style harmonic
|
||||
bond_coeff [C][H] 80.0 1.2
|
||||
|
||||
In some circumstances, it may be helpful to define extra label maps in
|
||||
addition to the default one. An auxiliary label map can be created and
|
||||
populated using the *map/assign* keyword. Type labels of auxiliary
|
||||
label maps can be referenced by prefixing the type label with the
|
||||
mapID followed by "::". For example, a type label "C" assigned to a
|
||||
label map named "Map2" can be created and referenced as follows:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
labelmap bond 1 [C][H] map/assign Map2
|
||||
bond_coeff Map2::[C][H] 80.0 1.2
|
||||
|
||||
Auxiliary label maps are not written to restart or data files. Due to
|
||||
the syntax for auxiliary maps, type labels cannot contain the
|
||||
substring "::". The default label map has no prefix.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
|
||||
@ -175,8 +175,8 @@ These are the allowed section keywords for the body of the file.
|
||||
|
||||
For the Types, Bonds, Angles, Dihedrals, and Impropers sections, each
|
||||
atom, bond, etc. type can be listed either as a number (numeric type)
|
||||
or as an alphanumeric :doc:`type label <labelmap>`. Type labels must
|
||||
begin with letter, and a label map must have previously been defined
|
||||
or as an alphanumeric :doc:`type label <labelmap>`. Type labels cannot
|
||||
start with a number, and a label map must have previously been defined
|
||||
by a :doc:`labelmap <labelmap>` or :doc:`read_data <read_data>`
|
||||
command.
|
||||
|
||||
|
||||
0
doc/src/write_data.rst
Normal file → Executable file
0
doc/src/write_data.rst
Normal file → Executable file
@ -1601,7 +1601,7 @@ void Input::labelmap()
|
||||
int ilmap = 0;
|
||||
std::string mapid;
|
||||
for (int i = 1; i < narg; i++) {
|
||||
if (strcmp(arg[i],"mapID") == 0) {
|
||||
if (strcmp(arg[i],"map/assign") == 0) {
|
||||
mapid = arg[i+1];
|
||||
ilmap = atom->find_labelmap(mapid);
|
||||
if (ilmap == -1) ilmap = atom->add_label_map(mapid);
|
||||
|
||||
Reference in New Issue
Block a user