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>lattice command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2006-11-14 06:18:34 +08:00
|
|
|
<PRE>lattice style scale keyword values ...
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
2006-11-14 06:18:34 +08:00
|
|
|
<UL><LI>style = <I>none</I> or <I>sc</I> or <I>bcc</I> or <I>fcc</I> or <I>diamond</I> or <I>sq</I> or <I>sq2</I> or <I>hex</I> or <I>user</I>
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2006-11-14 06:18:34 +08:00
|
|
|
<LI>scale = scale factor between lattice and simulation box
|
|
|
|
|
|
|
|
<PRE> for style <I>none</I>:
|
|
|
|
scale is not specified (nor any optional args)
|
2006-09-22 00:22:34 +08:00
|
|
|
for all other styles:
|
2006-11-14 06:18:34 +08:00
|
|
|
scale = reduced density rho* (for LJ units)
|
|
|
|
scale = lattice constant in Angstroms (for real or metal units)
|
|
|
|
</PRE>
|
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
|
|
|
<LI>keyword = <I>origin</I> or <I>orient</I> or <I>a1</I> or <I>a2</I> or <I>a3</I> or <I>basis</I>
|
|
|
|
|
|
|
|
<PRE> <I>origin</I> values = x y z
|
|
|
|
x,y,z = fractions of a unit cell (0 <= x,y,z < 1)
|
|
|
|
<I>orient</I> values = dim i j k
|
|
|
|
dim = <I>x</I> or <I>y</I> or <I>z</I>
|
|
|
|
i,j,k = integer lattice directions
|
|
|
|
<I>a1</I>,<I>a2</I>,<I>a3</I> values = x y z
|
|
|
|
x,y,z = primitive vector components that define unit cell
|
|
|
|
<I>basis</I> values = x y z
|
|
|
|
x,y,z = fractional coords of a basis atom (0 <= x,y,z < 1)
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>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
|
|
|
|
lattice user 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
|
2006-09-22 00:22:34 +08:00
|
|
|
lattice none
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
2006-11-14 06:18:34 +08:00
|
|
|
<P>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.
|
|
|
|
</P>
|
|
|
|
<P>A lattice is used by LAMMPS in two ways. First, the
|
|
|
|
<A HREF = "create_atoms.hmtl">create_atoms</A> command creates atoms on the lattice
|
|
|
|
points inside the simulation box. Note that the
|
|
|
|
<A HREF = "create_atoms.html">create_atoms</A> 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
|
|
|
|
used by other commands as distance units (e.g. <A HREF = "region.html">region</A>
|
|
|
|
and <A HREF = "velocity.html">velocity</A>), which are often convenient when the
|
|
|
|
underlying problem geometry is atoms on a lattice.
|
|
|
|
</P>
|
|
|
|
<P>The lattice style must be consistent with the dimension of the
|
|
|
|
simulation - see the <A HREF = "dimension.html">dimension</A> command. Styles <I>sc</I>
|
|
|
|
or <I>bcc</I> or <I>fcc</I> or <I>diamond</I> are for 3d problems. Styles <I>sq</I> or
|
|
|
|
<I>sq2</I> or <I>hex</I> are for 2d problems. Style <I>user</I> can be used for
|
|
|
|
either 2d or 3d problems.
|
|
|
|
</P>
|
|
|
|
<P>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
|
|
|
|
"primitive" vectors in solid-state crytallography, but in LAMMPS the
|
|
|
|
unit cell they determine does not have to be a "primitive cell" of
|
|
|
|
minimum volume.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>Lattices of style <I>sc</I>, <I>fcc</I>, <I>bcc</I>, and <I>diamond</I> are 3d lattices
|
|
|
|
that define a cubic unit cell with edge length = 1.0. This means a1 =
|
|
|
|
1.0 0.0 0.0, a2 = 0.0 1.0 0.0, and a3 = 0.0 0.0 1.0. The placement of
|
|
|
|
the basis atoms within the unit cell are described in any solid-state
|
|
|
|
physics text. A <I>sc</I> lattice has 1 basis atom at the
|
|
|
|
lower-left-bottom corner of the cube. A <I>bcc</I> lattice has 2 basis
|
|
|
|
atoms, one at the corner and one at the center of the cube. A <I>fcc</I>
|
|
|
|
lattice has 4 basis atoms, one at the corner and 3 at the cube face
|
|
|
|
centers. A <I>diamond</I> lattice has 8 basis atoms.
|
|
|
|
</P>
|
|
|
|
<P>Lattices of style <I>sq</I> and <I>sq2</I> are 2d lattices that define a square
|
|
|
|
unit cell with edge length = 1.0. This means a1 = 1.0 0.0 0.0 and a2
|
|
|
|
= 0.0 1.0 0.0. A <I>sq</I> lattice has 1 basis atom at the lower-left
|
|
|
|
corner of the square. A <I>sq2</I> lattice has 2 basis atoms, one at the
|
|
|
|
corner and one at the center of the square. A <I>hex</I> style is also a
|
|
|
|
2d lattice, but the unit cell is rectangular, with a1 = 1.0 0.0 0.0
|
|
|
|
and a2 = 0.0 sqrt(3.0) 0.0. It has 2 basis atoms, one at the corner
|
|
|
|
and one at the center of the rectangle.
|
|
|
|
</P>
|
|
|
|
<P>A lattice of style <I>user</I> allows you to specify a1, a2, a3, and a list
|
|
|
|
of basis atoms to put in the unit cell. By default, a1,a2,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 <I>basis</I> 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.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>This sub-section discusses the arguments that determine how the
|
|
|
|
idealized unit cell is transformed into a lattice of points within the
|
|
|
|
simulation box with desired spacings.
|
|
|
|
</P>
|
|
|
|
<P>The <I>scale</I> 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.
|
|
|
|
The meaning of the <I>scale</I> argument depends on the <A HREF = "unit.html">units</A>
|
|
|
|
being used in your simulation.
|
|
|
|
</P>
|
|
|
|
<P>For unit style <I>real</I> or <I>metal</I>, the scale argument is in Angstroms.
|
|
|
|
For example, if the unit cell is a unit cube with edge length 1.0,
|
|
|
|
setting scale = 3.52 would create a cubic lattice with a spacing of
|
|
|
|
3.52 Angstroms.
|
|
|
|
</P>
|
|
|
|
<P>For unit style <I>lj</I>, 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.
|
|
|
|
</P>
|
|
|
|
<P>The <I>origin</I> 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.
|
|
|
|
</P>
|
|
|
|
<P>The <I>orient</I> option specifies how the unit cell will be rotated when
|
|
|
|
mapping it into the simulation box. The <I>dim</I> 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
|
|
|
|
the Z direction.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>Several LAMMPS commands have the option to use distance units that are
|
|
|
|
inferred from "lattice spacings" in the x,y,z directions. E.g. the
|
|
|
|
<A HREF = "region.html">region</A> command can create a block of size 10x20x20,
|
|
|
|
where 10 means 10 lattice spacings in the x direction.
|
|
|
|
</P>
|
|
|
|
<P>These 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 it now has (perhaps) a modified shape and
|
|
|
|
orientation. The lattice 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. Similarly, the Y and Z lattice spacings
|
|
|
|
are defined as the min/max of the y and z coordinates.
|
|
|
|
</P>
|
|
|
|
<P>Note that if the unit cell has axis-aligned edges (a1,a2,a3) and is
|
|
|
|
not rotated (via the <I>orient</I> keyword), then the lattice spacings in
|
|
|
|
each dimension are simply the scale factor (descibed above) multiplied
|
|
|
|
by the length of a1,a2,a3. Thus a <I>hex</I> style lattice with a scale
|
|
|
|
factor of 3.0 Angstroms, would have a lattice spacing of 3.0 in x and
|
|
|
|
3*sqrt(3.0) in y.
|
|
|
|
</P>
|
|
|
|
<P>For unit cells with a more general shape or when a rotation is
|
|
|
|
applied, the lattice spacing is less intuitive. But regardless, the
|
|
|
|
values of the computed lattice spacings are printed by LAMMPS, so
|
|
|
|
their effect in commands that use the spacings should be decipherable.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The command "lattice none" can be used to turn off a previous lattice
|
|
|
|
definition. Any command that attempts to use the lattice directly
|
|
|
|
(<A HREF = "create_atoms.html">create_atoms</A>) or associated lattice spacings will
|
|
|
|
then generate an error. No additional arguments need be used with
|
|
|
|
"lattice none".
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>The <I>a1,a2,a3,basis</I> keywords can only be used with style <I>user</I>.
|
|
|
|
</P>
|
|
|
|
<P>For lattices oriented at an angle or with a non-orthognal unit cell,
|
|
|
|
care must be taken when using the <A HREF = "region.html">region</A> and
|
|
|
|
<A HREF = "create_atoms.html">create_atoms</A> commands to create a periodic system.
|
|
|
|
If the box size is not chosen appropriately, the system may not
|
|
|
|
actually be periodic, and atoms may overlap incorretly at the faces of
|
|
|
|
the simulation box.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
2006-11-14 06:18:34 +08:00
|
|
|
<P><A HREF = "dimension.html">dimension</A>, <A HREF = "create_atoms.html">create_atoms</A>,
|
2006-09-22 00:22:34 +08:00
|
|
|
<A HREF = "region.html">region</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>lattice none
|
|
|
|
</PRE>
|
2006-11-14 06:18:34 +08:00
|
|
|
<P>For other lattice styles, the option defaults are origin = 0.0 0.0
|
|
|
|
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1.0
|
|
|
|
0.0 0.0, a2 = 0.0 1.0 0.0, and a3 = 0.0 0.0 1.0.
|
|
|
|
</P>
|
2006-09-22 00:22:34 +08:00
|
|
|
</HTML>
|