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
|
|
|
|
|
|
|
|
lattice command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2006-11-14 06:18:34 +08:00
|
|
|
lattice style scale keyword values ... :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-04-12 04:09:19 +08:00
|
|
|
style = {none} or {sc} or {bcc} or {fcc} or {hcp} or {diamond} or \
|
2007-03-08 09:01:08 +08:00
|
|
|
{sq} or {sq2} or {hex} or {custom} :ulb,l
|
2006-11-14 06:18:34 +08:00
|
|
|
scale = scale factor between lattice and simulation box :l
|
2013-05-25 03:03:04 +08:00
|
|
|
scale = reduced density rho* (for LJ units)
|
|
|
|
scale = lattice constant in distance units (for all other units) :pre
|
2006-11-14 06:18:34 +08:00
|
|
|
zero or more keyword/value pairs may be appended :l
|
2007-03-09 08:00:06 +08:00
|
|
|
keyword = {origin} or {orient} or {spacing} or {a1} or {a2} or {a3} or {basis} :l
|
2006-11-14 06:18:34 +08:00
|
|
|
{origin} values = x y z
|
|
|
|
x,y,z = fractions of a unit cell (0 <= x,y,z < 1)
|
|
|
|
{orient} values = dim i j k
|
|
|
|
dim = {x} or {y} or {z}
|
|
|
|
i,j,k = integer lattice directions
|
2007-03-08 09:01:08 +08:00
|
|
|
{spacing} values = dx dy dz
|
|
|
|
dx,dy,dz = lattice spacings in the x,y,z box directions
|
2006-11-14 06:18:34 +08:00
|
|
|
{a1},{a2},{a3} values = x y z
|
|
|
|
x,y,z = primitive vector components that define unit cell
|
|
|
|
{basis} values = x y z
|
|
|
|
x,y,z = fractional coords of a basis atom (0 <= x,y,z < 1) :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
lattice fcc 3.52
|
|
|
|
lattice hex 0.85
|
2006-11-14 06:18:34 +08:00
|
|
|
lattice sq 0.8 origin 0.0 0.5 0.0 orient x 1 1 0 orient y -1 1 0
|
2007-03-08 09:01:08 +08:00
|
|
|
lattice custom 3.52 a1 1.0 0.0 0.0 a2 0.5 1.0 0.0 a3 0.0 0.0 0.5 &
|
|
|
|
basis 0.0 0.0 0.0 basis 0.5 0.5 0.5
|
2013-05-25 03:03:04 +08:00
|
|
|
lattice none 2.0 :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2006-11-14 06:18:34 +08:00
|
|
|
Define a lattice for use by other commands. In LAMMPS, a lattice is
|
|
|
|
simply a set of points in space, determined by a unit cell with basis
|
|
|
|
atoms, that is replicated infinitely in all dimensions. The arguments
|
|
|
|
of the lattice command can be used to define a wide variety of
|
|
|
|
crystallographic lattices.
|
|
|
|
|
|
|
|
A lattice is used by LAMMPS in two ways. First, the
|
2008-07-21 22:35:37 +08:00
|
|
|
"create_atoms"_create_atoms.html command creates atoms on the lattice
|
2006-11-14 06:18:34 +08:00
|
|
|
points inside the simulation box. Note that the
|
|
|
|
"create_atoms"_create_atoms.html command allows different atom types
|
|
|
|
to be assigned to different basis atoms of the lattice. Second, the
|
|
|
|
lattice spacing in the x,y,z dimensions implied by the lattice, can be
|
2007-07-04 02:39:09 +08:00
|
|
|
used by other commands as distance units
|
|
|
|
(e.g. "create_box"_create_box.html, "region"_region.html and
|
|
|
|
"velocity"_velocity.html), which are often convenient to use when the
|
2006-11-14 06:18:34 +08:00
|
|
|
underlying problem geometry is atoms on a lattice.
|
|
|
|
|
|
|
|
The lattice style must be consistent with the dimension of the
|
|
|
|
simulation - see the "dimension"_dimension.html command. Styles {sc}
|
2008-04-12 04:09:19 +08:00
|
|
|
or {bcc} or {fcc} or {hcp} or {diamond} are for 3d problems. Styles
|
|
|
|
{sq} or {sq2} or {hex} are for 2d problems. Style {custom} can be
|
|
|
|
used for either 2d or 3d problems.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
A lattice consists of a unit cell, a set of basis atoms within that
|
|
|
|
cell, and a set of transformation parameters (scale, origin, orient)
|
|
|
|
that map the unit cell into the simulation box. The vectors a1,a2,a3
|
|
|
|
are the edge vectors of the unit cell. This is the nomenclature for
|
2008-03-01 09:13:20 +08:00
|
|
|
"primitive" vectors in solid-state crystallography, but in LAMMPS the
|
2006-11-14 06:18:34 +08:00
|
|
|
unit cell they determine does not have to be a "primitive cell" of
|
|
|
|
minimum volume.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2013-05-25 03:03:04 +08:00
|
|
|
A lattice of style {none} does not define a unit cell and basis set,
|
|
|
|
so it cannot be used with the "create_atoms"_create_atoms.html
|
|
|
|
command. However it does define a lattice spacing via the specified
|
|
|
|
scale parameter. As explained above the lattice spacings in x,y,z can
|
|
|
|
be used by other commands as distance units. No additional
|
|
|
|
keyword/value pairs can be specified for the {none} style. By
|
|
|
|
default, a "lattice none 1.0" is defined, which means the lattice
|
|
|
|
spacing is the same as one distance unit, as defined by the
|
|
|
|
"units"_units.html command.
|
|
|
|
|
2006-11-14 06:18:34 +08:00
|
|
|
Lattices of style {sc}, {fcc}, {bcc}, and {diamond} are 3d lattices
|
|
|
|
that define a cubic unit cell with edge length = 1.0. This means a1 =
|
2008-04-12 04:09:19 +08:00
|
|
|
1 0 0, a2 = 0 1 0, and a3 = 0 0 1. Style {hcp} has a1 = 1 0 0, a2 = 0
|
|
|
|
sqrt(3) 0, and a3 = 0 0 sqrt(8/3). The placement of the basis atoms
|
|
|
|
within the unit cell are described in any solid-state physics text. A
|
|
|
|
{sc} lattice has 1 basis atom at the lower-left-bottom corner of the
|
|
|
|
cube. A {bcc} lattice has 2 basis atoms, one at the corner and one at
|
|
|
|
the center of the cube. A {fcc} lattice has 4 basis atoms, one at the
|
|
|
|
corner and 3 at the cube face centers. A {hcp} lattice has 4 basis
|
|
|
|
atoms, two in the z = 0 plane and 2 in the z = 0.5 plane. A {diamond}
|
|
|
|
lattice has 8 basis atoms.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
Lattices of style {sq} and {sq2} are 2d lattices that define a square
|
2008-04-12 04:09:19 +08:00
|
|
|
unit cell with edge length = 1.0. This means a1 = 1 0 0 and a2 = 0 1
|
|
|
|
0. A {sq} lattice has 1 basis atom at the lower-left corner of the
|
|
|
|
square. A {sq2} lattice has 2 basis atoms, one at the corner and one
|
|
|
|
at the center of the square. A {hex} style is also a 2d lattice, but
|
|
|
|
the unit cell is rectangular, with a1 = 1 0 0 and a2 = 0 sqrt(3) 0.
|
|
|
|
It has 2 basis atoms, one at the corner and one at the center of the
|
|
|
|
rectangle.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
2007-07-04 02:39:09 +08:00
|
|
|
A lattice of style {custom} allows you to specify a1, a2, a3, and a
|
2008-04-15 05:37:50 +08:00
|
|
|
list of basis atoms to put in the unit cell. By default, a1 and a2
|
|
|
|
and a3 are 3 orthogonal unit vectors (edges of a unit cube). But you
|
|
|
|
can specify them to be of any length and non-orthogonal to each other,
|
|
|
|
so that they describe a tilted parallelepiped. Via the {basis}
|
|
|
|
keyword you add atoms, one at a time, to the unit cell. Its arguments
|
|
|
|
are fractional coordinates (0.0 <= x,y,z < 1.0), so that a value of
|
|
|
|
0.5 means a position half-way across the unit cell in that dimension.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
This sub-section discusses the arguments that determine how the
|
|
|
|
idealized unit cell is transformed into a lattice of points within the
|
2007-03-08 09:01:08 +08:00
|
|
|
simulation box.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
The {scale} argument determines how the size of the unit cell will be
|
|
|
|
scaled when mapping it into the simulation box. I.e. it determines a
|
|
|
|
multiplicative factor to apply to the unit cell, to convert it to a
|
|
|
|
lattice of the desired size and distance units in the simulation box.
|
2010-05-07 23:11:21 +08:00
|
|
|
The meaning of the {scale} argument depends on the "units"_units.html
|
2006-11-14 06:18:34 +08:00
|
|
|
being used in your simulation.
|
|
|
|
|
2008-08-19 00:29:36 +08:00
|
|
|
For all unit styles except {lj}, the scale argument is specified in
|
|
|
|
the distance units defined by the unit style. For example, in {real}
|
|
|
|
or {metal} units, if the unit cell is a unit cube with edge length
|
|
|
|
1.0, specifying scale = 3.52 would create a cubic lattice with a
|
|
|
|
spacing of 3.52 Angstroms. In {cgs} units, the spacing would be 3.52
|
|
|
|
cm.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
For unit style {lj}, the scale argument is the Lennard-Jones reduced
|
|
|
|
density, typically written as rho*. LAMMPS converts this value into
|
|
|
|
the multiplicative factor via the formula "factor^dim = rho/rho*",
|
|
|
|
where rho = N/V with V = the volume of the lattice unit cell and N =
|
|
|
|
the number of basis atoms in the unit cell (described below), and dim
|
|
|
|
= 2 or 3 for the dimensionality of the simulation. Effectively, this
|
|
|
|
means that if LJ particles of size sigma = 1.0 are used in the
|
|
|
|
simulation, the lattice of particles will be at the desired reduced
|
|
|
|
density.
|
|
|
|
|
|
|
|
The {origin} option specifies how the unit cell will be shifted or
|
|
|
|
translated when mapping it into the simulation box. The x,y,z values
|
|
|
|
are fractional values (0.0 <= x,y,z < 1.0) meaning shift the lattice
|
|
|
|
by a fraction of the lattice spacing in each dimension. The meaning
|
|
|
|
of "lattice spacing" is discussed below.
|
|
|
|
|
|
|
|
The {orient} option specifies how the unit cell will be rotated when
|
|
|
|
mapping it into the simulation box. The {dim} argument is one of the
|
|
|
|
3 coordinate axes in the simulation box. The other 3 arguments are
|
|
|
|
the crystallographic direction in the lattice that you want to orient
|
|
|
|
along that axis, specified as integers. E.g. "orient x 2 1 0" means
|
|
|
|
the x-axis in the simulation box will be the \[210\] lattice
|
|
|
|
direction. The 3 lattice directions you specify must be mutually
|
|
|
|
orthogonal and obey the right-hand rule, i.e. (X cross Y) points in
|
2007-07-04 02:39:09 +08:00
|
|
|
the Z direction. Note that this description is really only valid for
|
2008-04-15 05:37:10 +08:00
|
|
|
orthogonal lattices. If you are using the more general lattice style
|
2007-07-04 02:39:09 +08:00
|
|
|
{custom} with non-orthogonal a1,a2,a3 vectors, then think of the 3
|
|
|
|
{orient} options as creating a 3x3 rotation matrix which is applied to
|
|
|
|
a1,a2,a3 to rotate the original unit cell to a new orientation in the
|
|
|
|
simulation box.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
Several LAMMPS commands have the option to use distance units that are
|
2007-03-09 08:00:06 +08:00
|
|
|
inferred from "lattice spacing" in the x,y,z box directions. E.g. the
|
|
|
|
"region"_region.html command can create a block of size 10x20x20,
|
|
|
|
where 10 means 10 lattice spacings in the x direction.
|
2007-03-08 09:01:08 +08:00
|
|
|
|
|
|
|
The {spacing} option sets the 3 lattice spacings directly. All must
|
|
|
|
be non-zero (use 1.0 for dz in a 2d simulation). The specified values
|
|
|
|
are multiplied by the multiplicative factor described above that is
|
|
|
|
associated with the scale factor. Thus a spacing of 1.0 means one
|
|
|
|
unit cell independent of the scale factor. This option can be useful
|
|
|
|
if the spacings LAMMPS computes are inconvenient to use in subsequent
|
2007-07-04 02:39:09 +08:00
|
|
|
commands, which can be the case for non-orthogonal or rotated
|
2007-03-08 09:01:08 +08:00
|
|
|
lattices.
|
|
|
|
|
|
|
|
If the {spacing} option is not specified, the lattice spacings are
|
|
|
|
computed by LAMMPS in the following way. A unit cell of the lattice
|
|
|
|
is mapped into the simulation box (scaled, shifted, rotated), so that
|
2008-04-15 05:37:10 +08:00
|
|
|
it now has (perhaps) a modified size and orientation. The lattice
|
2007-03-08 09:01:08 +08:00
|
|
|
spacing in X is defined as the difference between the min/max extent
|
|
|
|
of the x coordinates of the 8 corner points of the modified unit cell.
|
2007-07-04 02:39:09 +08:00
|
|
|
Similarly, the Y and Z lattice spacings are defined as the difference
|
|
|
|
in the min/max of the y and z coordinates.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
2007-07-04 02:39:09 +08:00
|
|
|
Note that if the unit cell is orthogonal with axis-aligned edges (not
|
|
|
|
rotated via the {orient} keyword), then the lattice spacings in each
|
2008-03-01 09:13:20 +08:00
|
|
|
dimension are simply the scale factor (described above) multiplied by
|
2007-07-04 02:39:09 +08:00
|
|
|
the length of a1,a2,a3. Thus a {hex} style lattice with a scale
|
2006-11-14 06:18:34 +08:00
|
|
|
factor of 3.0 Angstroms, would have a lattice spacing of 3.0 in x and
|
|
|
|
3*sqrt(3.0) in y.
|
|
|
|
|
2007-07-04 02:39:09 +08:00
|
|
|
IMPORTANT NOTE: For non-orthogonal unit cells and/or when a rotation
|
|
|
|
is applied via the {orient} keyword, then the lattice spacings may be
|
|
|
|
less intuitive. In particular, in these cases, there is no guarantee
|
|
|
|
that the lattice spacing is an integer multiple of the periodicity of
|
|
|
|
the lattice in that direction. Thus, if you create an orthogonal
|
|
|
|
periodic simulation box whose size in a dimension is a multiple of the
|
|
|
|
lattice spacing, and then fill it with atoms via the
|
|
|
|
"create_atoms"_create_atoms.html command, you will NOT necessarily
|
|
|
|
create a periodic system. I.e. atoms may overlap incorrectly at the
|
|
|
|
faces of the simulation box.
|
|
|
|
|
|
|
|
Regardless of these issues, the values of the lattice spacings LAMMPS
|
|
|
|
calculates are printed out, so their effect in commands that use the
|
|
|
|
spacings should be decipherable.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
[Restrictions:]
|
|
|
|
|
2007-03-08 09:01:08 +08:00
|
|
|
The {a1,a2,a3,basis} keywords can only be used with style {custom}.
|
2006-11-14 06:18:34 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Related commands:]
|
|
|
|
|
2006-11-14 06:18:34 +08:00
|
|
|
"dimension"_dimension.html, "create_atoms"_create_atoms.html,
|
2006-09-22 00:22:34 +08:00
|
|
|
"region"_region.html
|
|
|
|
|
|
|
|
[Default:]
|
|
|
|
|
2013-05-25 03:03:04 +08:00
|
|
|
lattice none 1.0 :pre
|
2006-11-14 06:18:34 +08:00
|
|
|
|
|
|
|
For other lattice styles, the option defaults are origin = 0.0 0.0
|
2008-04-15 05:37:10 +08:00
|
|
|
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1 0 0,
|
|
|
|
a2 = 0 1 0, and a3 = 0 0 1.
|