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
|
|
|
|
|
|
|
|
set command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2008-08-20 22:56:12 +08:00
|
|
|
set style ID keyword values ... :pre
|
2007-06-20 20:56:17 +08:00
|
|
|
|
2011-04-14 05:39:34 +08:00
|
|
|
style = {atom} or {type} or {mol} or {group} or {region} :ulb,l
|
|
|
|
ID = atom ID range or type range or mol ID range or group ID or region ID :l
|
2007-07-03 04:04:44 +08:00
|
|
|
one or more keyword/value pairs may be appended :l
|
2011-01-12 03:27:27 +08:00
|
|
|
keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \
|
2011-04-14 05:39:34 +08:00
|
|
|
{charge} or {dipole} or {dipole/random} or {quat} or \
|
|
|
|
{quat/random} or {diameter} or {shape} or {mass} or \
|
|
|
|
{density} or {volume} or {image} or
|
2008-07-25 07:46:15 +08:00
|
|
|
{bond} or {angle} or {dihedral} or {improper} :l
|
2007-06-20 20:56:17 +08:00
|
|
|
{type} value = atom type
|
|
|
|
{type/fraction} values = type fraction seed
|
|
|
|
type = new atom type
|
|
|
|
fraction = fraction of selected atoms to set to new atom type
|
2007-10-10 07:40:45 +08:00
|
|
|
seed = random # seed (positive integer)
|
2007-06-20 20:56:17 +08:00
|
|
|
{mol} value = molecule ID
|
|
|
|
{x},{y},{z} value = atom coordinate (distance units)
|
|
|
|
{charge} value = atomic charge (charge units)
|
|
|
|
{dipole} values = x y z
|
|
|
|
x,y,z = orientation of dipole moment vector
|
2011-04-14 05:39:34 +08:00
|
|
|
{dipole/random} value = seed Dlen
|
2007-10-10 07:44:18 +08:00
|
|
|
seed = random # seed (positive integer) for dipole moment orientations
|
2011-04-14 05:39:34 +08:00
|
|
|
Dlen = magnitude of dipole moment (dipole units)
|
2007-06-23 07:41:35 +08:00
|
|
|
{quat} values = a b c theta
|
|
|
|
a,b,c = unit vector to rotate particle around via right-hand rule
|
|
|
|
theta = rotation angle in degrees
|
2007-06-20 20:56:17 +08:00
|
|
|
{quat/random} value = seed
|
2007-10-10 07:44:18 +08:00
|
|
|
seed = random # seed (positive integer) for quaternion orientations
|
2011-04-14 05:39:34 +08:00
|
|
|
{diameter} value = diameter of spherical particle (distance units)
|
|
|
|
{shape} value = Sx Sy Sz
|
|
|
|
Sx,Sy,Sz = 3 diameters of ellipsoid (distance units)
|
|
|
|
{mass} value = per-atom mass (mass units)
|
|
|
|
{density} value = particle density for sphere or ellipsoid (mass/distance^3 units)
|
|
|
|
{volume} value = particle volume for Peridynamic particle (distance^3 units)
|
2008-08-20 22:56:12 +08:00
|
|
|
{image} nx ny nz
|
|
|
|
nx,ny,nz = which periodic image of the simulation box the atom is in
|
2007-06-20 20:56:17 +08:00
|
|
|
{bond} value = bond type for all bonds between selected atoms
|
2008-03-01 09:13:20 +08:00
|
|
|
{angle} value = angle type for all angles between selected atoms
|
2007-06-20 20:56:17 +08:00
|
|
|
{dihedral} value = dihedral type for all dihedrals between selected atoms
|
2008-07-25 07:46:15 +08:00
|
|
|
{improper} value = improper type for all impropers between selected atoms :pre
|
2007-06-20 20:56:17 +08:00
|
|
|
:ule
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2007-06-20 20:56:17 +08:00
|
|
|
set group solvent type 2
|
|
|
|
set group solvent type/fraction 2 0.5 12393
|
|
|
|
set group edge bond 4
|
|
|
|
set region half charge 0.5
|
2011-04-14 05:39:34 +08:00
|
|
|
set type 3 charge 0.5
|
|
|
|
set type 1*3 charge 0.5
|
|
|
|
set atom 100*200 x 0.5 y 1.0
|
2007-06-20 20:56:17 +08:00
|
|
|
set atom 1492 type 3 :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2007-06-20 20:56:17 +08:00
|
|
|
Set one or more properties of one or more atoms. Since atom
|
|
|
|
properties are initially assigned by the "read_data"_read_data.html,
|
2006-09-22 00:22:34 +08:00
|
|
|
"read_restart"_read_restart.html or "create_atoms"_create_atoms.html
|
|
|
|
commands, this command changes those assignments. This can be useful
|
2007-06-20 20:56:17 +08:00
|
|
|
for overriding the default values assigned by the
|
|
|
|
"create_atoms"_create_atoms.html command (e.g. charge = 0.0). It can
|
|
|
|
be useful for altering pairwise and molecular force interactions,
|
|
|
|
since force-field coefficients are defined in terms of types. It can
|
2011-04-14 05:39:34 +08:00
|
|
|
be used to change the labeling of atoms by atom type or molecule ID
|
|
|
|
when they are output in "dump"_dump.html files. It can be useful for
|
|
|
|
debugging purposes; i.e. positioning an atom at a precise location to
|
|
|
|
compute subsequent forces or energy.
|
|
|
|
|
|
|
|
The style {atom} selects one or more atoms in a range of atom IDs.
|
|
|
|
The style {type} selects all the atoms in a range of types. The style
|
|
|
|
{mol} selects all the atoms in a range of molecule IDs.
|
|
|
|
|
|
|
|
In each of the range cases, a single value can be specified, or a
|
|
|
|
wildcard asterisk can be used to specify a range of values. This
|
|
|
|
takes the form "*" or "*n" or "n*" or "m*n". For example, for the
|
|
|
|
style {type}, if N = the number of atom types, then an asterisk with
|
|
|
|
no numeric values means all types from 1 to N. A leading asterisk
|
|
|
|
means all types from 1 to n (inclusive). A trailing asterisk means
|
|
|
|
all types from n to N (inclusive). A middle asterisk means all types
|
|
|
|
from m to n (inclusive). Note that the loweest value for the wildcard
|
|
|
|
is 1, not 0, so you cannot not use this form to select atoms
|
|
|
|
with molecule ID = 0, for example.
|
|
|
|
|
|
|
|
The style {group} selects all the atoms in the specified group. The
|
|
|
|
style {region} selects all the atoms in the specified geometric
|
|
|
|
region. See the "group"_group.html and "region"_region.html commands
|
|
|
|
for details of how to specify a group or region.
|
2007-06-20 20:56:17 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
Keyword {type} sets the atom type for all selected atoms. The
|
|
|
|
specified value must be from 1 to ntypes, where ntypes was set by the
|
|
|
|
"create_box"_create_box.html command or the {atom types} field in the
|
|
|
|
header of the data file read by the "read_data"_read_data.html
|
|
|
|
command.
|
|
|
|
|
|
|
|
Keyword {type/fraction} sets the atom type for a fraction of the
|
|
|
|
selected atoms. The actual number of atoms changed is not guaranteed
|
2008-03-01 09:13:20 +08:00
|
|
|
to be exactly the requested fraction, but should be statistically
|
2007-06-20 20:56:17 +08:00
|
|
|
close. Random numbers are used in such a way that a particular atom
|
|
|
|
is changed or not changed, regardless of how many processors are being
|
|
|
|
used.
|
|
|
|
|
|
|
|
Keyword {mol} sets the molecule ID for all selected atoms. The "atom
|
|
|
|
style"_atom_style.html being used must support the use of molecule
|
|
|
|
IDs.
|
|
|
|
|
2011-01-12 03:27:27 +08:00
|
|
|
Keywords {x}, {y}, {z}, and {charge} set the coordinates or charge of
|
|
|
|
all selected atoms. For {charge}, the "atom style"_atom_style.html
|
|
|
|
being used must support the use of atomic charge.
|
2007-06-20 20:56:17 +08:00
|
|
|
|
|
|
|
Keyword {dipole} uses the specified x,y,z values as components of a
|
|
|
|
vector to set as the orientation of the dipole moment vectors of the
|
2011-04-14 05:39:34 +08:00
|
|
|
selected atoms. The magnitude of the dipole moment is set
|
|
|
|
by the length of this orientation vector.
|
2007-06-20 20:56:17 +08:00
|
|
|
|
|
|
|
Keyword {dipole/random} randomizes the orientation of the dipole
|
2011-04-14 05:39:34 +08:00
|
|
|
moment vectors of the selected atoms and sets the magnitude of each to
|
|
|
|
the specified {Dlen} value. For 2d systems, the z component of the
|
|
|
|
orientation is set to 0.0. Random numbers are used in such a way that
|
|
|
|
the orientation of a particular atom is the same, regardless of how
|
|
|
|
many processors are being used.
|
2007-06-23 07:41:35 +08:00
|
|
|
|
|
|
|
Keyword {quat} uses the specified values to create a quaternion
|
|
|
|
(4-vector) that represents the orientation of the selected atoms.
|
2011-04-14 05:39:34 +08:00
|
|
|
Note that particles defined by "atom_style ellipsoid"_atom_style.html
|
|
|
|
have 3 shape paraeters whicha are used to specify the aspect ratios of
|
|
|
|
an ellipsoidal particle, which is oriented by default with its x-axis
|
|
|
|
along the simulation box's x-axis, and similarly for y and z. If this
|
|
|
|
body is rotated (via the right-hand rule) by an angle theta around a
|
|
|
|
unit rotation vector (a,b,c), then the quaternion that represents its
|
|
|
|
new orientation is given by (cos(theta/2), a*sin(theta/2),
|
|
|
|
b*sin(theta/2), c*sin(theta/2)). The theta and a,b,c values are the
|
|
|
|
arguments to the {quat} keyword. LAMMPS normalizes the quaternion in
|
|
|
|
case (a,b,c) was not specified as a unit vector. For 2d systems, the
|
|
|
|
a,b,c values are ignored, since a rotation vector of (0,0,1) is the
|
|
|
|
only valid choice.
|
2007-06-20 20:56:17 +08:00
|
|
|
|
|
|
|
Keyword {quat/random} randomizes the orientation of the quaternion of
|
|
|
|
the selected atoms. Random numbers are used in such a way that the
|
|
|
|
orientation of a particular atom is the same, regardless of how many
|
2007-06-23 07:41:35 +08:00
|
|
|
processors are being used. For 2d systems, only orientations in the
|
|
|
|
xy plane are generated.
|
2007-06-20 20:56:17 +08:00
|
|
|
|
2011-04-14 05:39:34 +08:00
|
|
|
Keyword {diameter} sets the size of the selected atoms. The particles
|
|
|
|
must be finite-size spheres as defined by the "atom_style
|
|
|
|
sphere"_atom_style.html command. The diameter of a particle can be
|
|
|
|
set to 0.0, which means they will be treated as point particles. Note
|
|
|
|
that this command does not adjust the particle mass, even if it was
|
|
|
|
defined with a density, e.g. via the "read_data"_read_data.html
|
|
|
|
command.
|
2008-07-25 07:46:15 +08:00
|
|
|
|
2011-04-14 05:39:34 +08:00
|
|
|
Keyword {shape} sets the size and shape of the selected atoms. The
|
|
|
|
particles must be aspherical ellipsoids as defined by the "atom_style
|
|
|
|
ellipsoid"_atom_style.html command. The {Sx}, {Sy}, {Sz} settings are
|
|
|
|
the 3 diameters of the ellipsoid in each direction. All 3 can be set
|
|
|
|
to the same value, which means the ellipsoid is effectively a sphere.
|
|
|
|
Or then can all be set to 0.0 which means the particle will be treated
|
|
|
|
as a point particle. Note that this command does not adjust the
|
|
|
|
particle mass, even if it was defined with a density, e.g. via the
|
|
|
|
"read_data"_read_data.html command.
|
|
|
|
|
|
|
|
Keyword {mas} sets the mass of all selected particles. The
|
|
|
|
particles must have a per-atom mass attribute, as defined by the
|
|
|
|
"atom_style"_atom_style.html command. See the "mass" command for how
|
|
|
|
to set mass values on a per-type basis.
|
|
|
|
|
|
|
|
Keyword {density} sets the mass of all selected particles. The
|
|
|
|
particles must have a per-atom mass attribute, as defined by the
|
|
|
|
"atom_style"_atom_style.html command. See the "mass" command for how
|
|
|
|
to set mass values on a per-type basis. If the atom has a radius
|
|
|
|
attribute (see "atom_style sphere"_atom_style.html) and its radius is
|
|
|
|
non-zero, its mass is set from the density and particle volume. The
|
|
|
|
same is true if the atom has a shape attribute (see "atom_style
|
|
|
|
ellipsoid"_atom_style.html) and its shape parameters are non-zero.
|
|
|
|
Otherwise the mass is set to the density value directly.
|
|
|
|
|
|
|
|
Keyword {volume} sets the volume of all selected particles.
|
|
|
|
Currently, only the "atom_style peri"_atom_style.html command defines
|
|
|
|
particles with a volume attribute. Note that this command does not
|
|
|
|
adjust the particle mass.
|
2008-07-25 07:46:15 +08:00
|
|
|
|
2008-08-20 22:56:12 +08:00
|
|
|
Keyword {image} sets which image of the simulation box the atom is
|
2011-02-16 05:14:11 +08:00
|
|
|
considered to be in. An image of 0 means it is inside the box as
|
|
|
|
defined. A value of 2 means add 2 box lengths to get the true value.
|
|
|
|
A value of -1 means subtract 1 box length to get the true value.
|
|
|
|
LAMMPS updates these flags as atoms cross periodic boundaries during
|
|
|
|
the simulation. The flags can be output with atom snapshots via the
|
|
|
|
"dump"_dump.html command. If a value of NULL is specified for any of
|
|
|
|
nx,ny,nz, then the current image value for that dimension is
|
2011-02-16 05:25:32 +08:00
|
|
|
unchanged. For non-periodic dimensions only a value of 0 can be
|
|
|
|
specified.
|
2008-08-20 22:56:12 +08:00
|
|
|
|
|
|
|
This command can be useful after a system has been equilibrated and
|
|
|
|
atoms have diffused one or more box lengths in various directions.
|
|
|
|
This command can then reset the image values for atoms so that they
|
|
|
|
are effectively inside the simulation box, e.g if a diffusion
|
2010-05-07 23:11:21 +08:00
|
|
|
coefficient is about to be measured via the "compute
|
|
|
|
msd"_compute_msd.html command. Care should be taken not to reset the
|
|
|
|
image flags of two atoms in a bond to the same value if the bond
|
|
|
|
straddles a periodic boundary (rather they should be different by +/-
|
|
|
|
1). This will not affect the dynamics of a 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.
|
2008-08-20 22:56:12 +08:00
|
|
|
|
2007-06-20 20:56:17 +08:00
|
|
|
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). 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 "read_data"_read_data.html
|
|
|
|
command.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Restrictions:]
|
|
|
|
|
2008-07-25 07:46:15 +08:00
|
|
|
You cannot set an atom attribute (e.g. {mol} or {q} or {volume}) if
|
|
|
|
the "atom_style"_atom_style.html does not have that attribute.
|
2007-06-20 20:56:17 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
This command requires inter-processor communication to coordinate the
|
|
|
|
setting of bond types (angle types, etc). This means that your system
|
2007-06-20 20:56:17 +08:00
|
|
|
must be ready to perform a simulation before using one of these
|
|
|
|
keywords (force fields set, atom mass set, etc). This is not
|
|
|
|
necessary for other keywords.
|
|
|
|
|
|
|
|
Using the {region} style with the bond (angle, etc) keywords can give
|
|
|
|
unpredictable results if there are bonds (angles, etc) that straddle
|
|
|
|
periodic boundaries. This is because the region may only extend up to
|
|
|
|
the boundary and partner atoms in the bond (angle, etc) may have
|
|
|
|
coordinates outside the simulation box if they are ghost atoms.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"create_box"_create_box.html, "create_atoms"_create_atoms.html,
|
|
|
|
"read_data"_read_data.html
|
|
|
|
|
|
|
|
[Default:] none
|