2006-09-22 00:22:34 +08:00
|
|
|
"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
|
|
|
|
|
|
|
|
group command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
group ID style args :pre
|
|
|
|
|
|
|
|
ID = user-defined name of the group :ulb,l
|
2009-03-17 23:41:12 +08:00
|
|
|
style = {delete} or {region} or {type} or {id} or {molecule} or {subtract} or \
|
2006-09-22 00:22:34 +08:00
|
|
|
{union} or {intersect} :l
|
2009-03-17 23:41:12 +08:00
|
|
|
{delete} = no args
|
2006-09-22 00:22:34 +08:00
|
|
|
{region} args = region-ID
|
|
|
|
{type} or {id} or {molecule}
|
|
|
|
args = one or more atom types, atom IDs, or molecule IDs
|
|
|
|
args = logical value
|
2007-06-20 20:56:17 +08:00
|
|
|
logical = "<" or "<=" or ">" or ">=" or "==" or "!="
|
2006-09-22 00:22:34 +08:00
|
|
|
value = an atom type or atom ID or molecule ID (depending on {style})
|
|
|
|
args = logical value1 value2
|
|
|
|
logical = "<>"
|
|
|
|
value1,value2 = atom types or atom IDs or molecule IDs
|
|
|
|
(depending on {style})
|
|
|
|
{subtract} args = two or more group IDs
|
|
|
|
{union} args = one or more group IDs
|
|
|
|
{intersect} args = two or more group IDs :pre
|
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
group edge region regstrip
|
|
|
|
group water type 3 4
|
|
|
|
group sub id <= 150
|
|
|
|
group polyA molecule <> 50 250
|
|
|
|
group boundary subtract all a2 a3
|
|
|
|
group boundary union lower upper
|
2009-03-17 23:41:12 +08:00
|
|
|
group boundary intersect upper flow
|
|
|
|
group boundary delete :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
|
|
|
Identify a collection of atoms as belonging to a group. The group ID
|
2009-03-17 23:41:12 +08:00
|
|
|
can then be used in other commands such as "fix"_fix.html,
|
|
|
|
"compute"_compute.html, "dump"_dump.html, or "velocity"_velocity.html
|
|
|
|
to act on those atoms together.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
If the group ID already exists, the group command adds the specified
|
|
|
|
atoms to the group.
|
|
|
|
|
2009-03-17 23:41:12 +08:00
|
|
|
The {delete} style removes the named group and un-assigns all atoms
|
|
|
|
that were assigned to that group. Since there is a restriction (see
|
|
|
|
below) that no more than 32 groups can be defined at any time, the
|
|
|
|
{delete} style allows you to remove groups that are no longer needed,
|
|
|
|
so that more can be specified. You cannot delete a group if it has
|
|
|
|
been used to define a current "fix"_fix.html or "compute"_compute.html
|
|
|
|
or "dump"_dump.html.
|
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
The {region} style puts all atoms in the region volume into the group.
|
|
|
|
Note that this is a static one-time assignment. The atoms remain
|
|
|
|
assigned (or not assigned) to the group even in they later move out of
|
|
|
|
the region volume.
|
|
|
|
|
|
|
|
The {type}, {id}, and {molecule} styles put all atoms with the
|
|
|
|
specified atom types, atom IDs, or molecule IDs into the group. These
|
|
|
|
3 styles can have their arguments specified in one of two formats.
|
|
|
|
The 1st format is a list of values (types or IDs). For example, the
|
2006-10-03 08:07:57 +08:00
|
|
|
2nd command in the examples above puts all atoms of type 3 or 4 into
|
2006-09-22 00:22:34 +08:00
|
|
|
the group named {water}. The 2nd format is a {logical} followed by
|
2007-06-20 20:56:17 +08:00
|
|
|
one or two values (type or ID). The 7 valid logicals are listed
|
2006-09-22 00:22:34 +08:00
|
|
|
above. All the logicals except <> take a single argument. The 3rd
|
|
|
|
example above adds all atoms with IDs from 1 to 150 to the group named
|
|
|
|
{sub}. The logical <> means "between" and takes 2 arguments. The 4th
|
|
|
|
example above adds all atoms belonging to molecules with IDs from 50
|
|
|
|
to 250 (inclusive) to the group named polyA.
|
|
|
|
|
|
|
|
The {subtract} style takes a list of two or more existing group names
|
|
|
|
as arguments. All atoms that belong to the 1st group, but not to any
|
|
|
|
of the other groups are added to the specified group.
|
|
|
|
|
|
|
|
The {union} style takes a list of one or more existing group names as
|
|
|
|
arguments. All atoms that belong to any of the listed groups are
|
|
|
|
added to the specified group.
|
|
|
|
|
|
|
|
The {intersect} style takes a list of two or more existing group names
|
|
|
|
as arguments. Atoms that belong to every one of the listed groups are
|
|
|
|
added to the specified group.
|
|
|
|
|
|
|
|
A group with the ID {all} is predefined. All atoms belong to this
|
2009-03-17 23:41:12 +08:00
|
|
|
group. This group cannot be deleted.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Restrictions:]
|
|
|
|
|
2009-03-17 23:41:12 +08:00
|
|
|
There can be no more than 32 groups defined at one time, including
|
|
|
|
"all".
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
2009-03-17 02:20:35 +08:00
|
|
|
"dump"_dump.html, "fix"_fix.html, "region"_region.html,
|
|
|
|
"temperature"_temperature.html, "velocity"_velocity.html
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Default:]
|
|
|
|
|
|
|
|
All atoms belong to the "all" group.
|