2006-09-22 00:22:34 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H3>group command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>group ID style args
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID = user-defined name of the group
|
|
|
|
|
|
|
|
<LI>style = <I>region</I> or <I>type</I> or <I>id</I> or <I>molecule</I> or <I>subtract</I> or <I>union</I> or <I>intersect</I>
|
|
|
|
|
|
|
|
<PRE> <I>region</I> args = region-ID
|
|
|
|
<I>type</I> or <I>id</I> or <I>molecule</I>
|
|
|
|
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 <I>style</I>)
|
|
|
|
args = logical value1 value2
|
|
|
|
logical = "<>"
|
|
|
|
value1,value2 = atom types or atom IDs or molecule IDs
|
|
|
|
(depending on <I>style</I>)
|
|
|
|
<I>subtract</I> args = two or more group IDs
|
|
|
|
<I>union</I> args = one or more group IDs
|
|
|
|
<I>intersect</I> args = two or more group IDs
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>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
|
|
|
|
group boundary intersect upper flow
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Identify a collection of atoms as belonging to a group. The group ID
|
|
|
|
can then be used in other commands such as fix, velocity, dump, or
|
|
|
|
temperature to act on the atoms together.
|
|
|
|
</P>
|
|
|
|
<P>If the group ID already exists, the group command adds the specified
|
|
|
|
atoms to the group.
|
|
|
|
</P>
|
|
|
|
<P>The <I>region</I> 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.
|
|
|
|
</P>
|
|
|
|
<P>The <I>type</I>, <I>id</I>, and <I>molecule</I> 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 <I>water</I>. The 2nd format is a <I>logical</I> 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
|
|
|
|
<I>sub</I>. 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.
|
|
|
|
</P>
|
|
|
|
<P>The <I>subtract</I> 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.
|
|
|
|
</P>
|
|
|
|
<P>The <I>union</I> 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.
|
|
|
|
</P>
|
|
|
|
<P>The <I>intersect</I> 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.
|
|
|
|
</P>
|
|
|
|
<P>A group with the ID <I>all</I> is predefined. All atoms belong to this
|
|
|
|
group.
|
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>There can be no more than 32 defined groups, including "all".
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P>region, fix, velocity, dump, temperature
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
|
|
|
<P>All atoms belong to the "all" group.
|
|
|
|
</P>
|
|
|
|
</HTML>
|