diff --git a/doc/Section_commands.html b/doc/Section_commands.html index 2363187b76..2373c72016 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -161,10 +161,10 @@ or restart file via the read_data or read_restart commands. These files can contain molecular topology information. Or create atoms on a lattice (with no molecular topology), using these commands: lattice, -orient, origin, region, -create_box, create_atoms. The -entire set of atoms can be duplicated to make a larger simulation -using the replicate command. +region, create_box, +create_atoms. The entire set of atoms can be +duplicated to make a larger simulation using the +replicate command.
(3) Settings
@@ -222,9 +222,9 @@ in the command's documentation.Atom definition:
create_atoms, create_box, -lattice, orient, origin, -read_data, read_restart, -region, replicate +lattice, read_data, +read_restart, region, +replicate
Force fields:
@@ -293,13 +293,12 @@ in the command's documentation.Fix styles. See the fix command for one-line descriptions @@ -312,8 +311,8 @@ or click on the command itself for a full description:
Pair styles. See the pair_style command for an diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index e8c11a56fa..8716ce1191 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -158,10 +158,10 @@ or restart file via the "read_data"_read_data.html or "read_restart"_read_restart.html commands. These files can contain molecular topology information. Or create atoms on a lattice (with no molecular topology), using these commands: "lattice"_lattice.html, -"orient"_orient.html, "origin"_origin.html, "region"_region.html, -"create_box"_create_box.html, "create_atoms"_create_atoms.html. The -entire set of atoms can be duplicated to make a larger simulation -using the "replicate"_replicate.html command. +"region"_region.html, "create_box"_create_box.html, +"create_atoms"_create_atoms.html. The entire set of atoms can be +duplicated to make a larger simulation using the +"replicate"_replicate.html command. (3) Settings @@ -219,9 +219,9 @@ Initialization: Atom definition: "create_atoms"_create_atoms.html, "create_box"_create_box.html, -"lattice"_lattice.html, "orient"_orient.html, "origin"_origin.html, -"read_data"_read_data.html, "read_restart"_read_restart.html, -"region"_region.html, "replicate"_replicate.html +"lattice"_lattice.html, "read_data"_read_data.html, +"read_restart"_read_restart.html, "region"_region.html, +"replicate"_replicate.html Force fields: @@ -324,8 +324,6 @@ in the command's documentation. "neighbor"_neighbor.html, "newton"_newton.html, "next"_next.html, -"orient"_orient.html, -"origin"_origin.html, "pair_coeff"_pair_coeff.html, "pair_modify"_pair_modify.html, "pair_style"_pair_style.html, @@ -401,6 +399,7 @@ or click on the command itself for a full description: "fix volume/rescale"_fix_volume_rescale.html, "fix wall/gran"_fix_wall_gran.html, "fix wall/lj93"_fix_wall_lj93.html, +"fix wall/lj126"_fix_wall_lj126.html, "fix wall/reflect"_fix_wall_reflect.html, "fix wiggle"_fix_wiggle.html :tb(c=6,ea=c) diff --git a/doc/create_atoms.html b/doc/create_atoms.html index 88ca3daff8..8bf4df020b 100644 --- a/doc/create_atoms.html +++ b/doc/create_atoms.html @@ -13,41 +13,62 @@
Syntax:
-create_atoms type region-ID +create_atoms type keyword values ...-
region value = region-ID + region-ID = atoms will only be created if contained in the region + basis values = M itype + M = which basis atom + itype = atom type (1-N) to assign to the basis atom ++
Examples:
-create_atoms 1 regsphere -create_atoms 3 +create_atoms 1 +create_atoms 3 region regsphere +create_atoms 1 basis 2 5Description:
This command creates atoms on a lattice as an alternative to reading in their coordinates via a read_data or read_restart command. A simulation box must -already exist, which is created with the create_box -command. +already exist, which is typically created via the +create_box command.
Before using this command, a lattice must be defined using the lattice command. If a region is not specified, the create_atoms command fills the entire simulation box with atoms on the -lattice. If a region is specified, then the geometric volume is -filled that is inside the simulation box and is also consistent with -the region volume. +lattice. If a region is specified (see the region +command), then the geometric volume is filled that is inside the +simulation box and is also consistent with the region volume. Note +that a region can be specified so that its "volume" is either inside +or outside a geometric boundary.
-The create_atoms command can be used multiple times with different -lattice orientations to create grain boundaries. Used in conjunction -with the delete_atoms command, reasonably complex -geometries can be created. The create_atoms command can also be -used to add atoms to a system previously read in from a data or -restart file. In all these cases, care should be taken to insure that -new atoms do not overlap existing atoms inappropriately. +
The lattice command specifies one or more basis atoms +in each unit cell. By default, when created, all basis atoms are +assigned the argument type as their atom type. The keyword basis +can be used to override the default for one or more basis atoms and +assign them a different atom type.
-Created atoms are assigned the specified atom type and a velocity of -0.0. +
By using the create_atoms command multiple times (interleaved with +lattice commands specifying different orientations), +grain boundaries can be created. Using the create_atoms command in +conjunction with the delete_atoms command, +reasonably complex geometries can be created. The create_atoms +command can also be used to add atoms to a system previously read in +from a data or restart file. In all these cases, care should be taken +to insure that new atoms do not overlap existing atoms +inappropriately. +
+Created atoms are assigned a velocity of 0.0.
Restrictions:
@@ -56,8 +77,7 @@ previously defined to use this command.Related commands:
-lattice, orient, origin, -region, create_box, +
lattice, region, create_box, read_data, read_restart
Default: none diff --git a/doc/create_atoms.txt b/doc/create_atoms.txt index 541857730c..520529199f 100644 --- a/doc/create_atoms.txt +++ b/doc/create_atoms.txt @@ -10,41 +10,58 @@ create_atoms command :h3 [Syntax:] -create_atoms type region-ID :pre +create_atoms type keyword values ... :pre -type = atom type (1-N) of atoms to create on a lattice -region-ID = ID of region each atom will belong to (optional) :ul +type = atom type (1-N) of atoms to create on a lattice :ulb,l +zero or more keyword/value pairs may be appended :l +keyword = {region} or {basis} :l + {region} value = region-ID + region-ID = atoms will only be created if contained in the region + {basis} values = M itype + M = which basis atom + itype = atom type (1-N) to assign to the basis atom :pre +:ule [Examples:] -create_atoms 1 regsphere -create_atoms 3 :pre +create_atoms 1 +create_atoms 3 region regsphere +create_atoms 1 basis 2 5 :pre [Description:] This command creates atoms on a lattice as an alternative to reading in their coordinates via a "read_data"_read_data.html or "read_restart"_read_restart.html command. A simulation box must -already exist, which is created with the "create_box"_create_box.html -command. +already exist, which is typically created via the +"create_box"_create_box.html command. Before using this command, a lattice must be defined using the "lattice"_lattice.html command. If a region is not specified, the create_atoms command fills the entire simulation box with atoms on the -lattice. If a region is specified, then the geometric volume is -filled that is inside the simulation box and is also consistent with -the region volume. +lattice. If a region is specified (see the "region"_region.html +command), then the geometric volume is filled that is inside the +simulation box and is also consistent with the region volume. Note +that a region can be specified so that its "volume" is either inside +or outside a geometric boundary. -The {create_atoms} command can be used multiple times with different -lattice orientations to create grain boundaries. Used in conjunction -with the "delete_atoms"_delete_atoms.html command, reasonably complex -geometries can be created. The {create_atoms} command can also be -used to add atoms to a system previously read in from a data or -restart file. In all these cases, care should be taken to insure that -new atoms do not overlap existing atoms inappropriately. +The "lattice"_lattice.html command specifies one or more basis atoms +in each unit cell. By default, when created, all basis atoms are +assigned the argument {type} as their atom type. The keyword {basis} +can be used to override the default for one or more basis atoms and +assign them a different atom type. -Created atoms are assigned the specified atom type and a velocity of -0.0. +By using the create_atoms command multiple times (interleaved with +"lattice"_lattice.html commands specifying different orientations), +grain boundaries can be created. Using the create_atoms command in +conjunction with the "delete_atoms"_delete_atoms.html command, +reasonably complex geometries can be created. The create_atoms +command can also be used to add atoms to a system previously read in +from a data or restart file. In all these cases, care should be taken +to insure that new atoms do not overlap existing atoms +inappropriately. + +Created atoms are assigned a velocity of 0.0. [Restrictions:] @@ -53,8 +70,7 @@ previously defined to use this command. [Related commands:] -"lattice"_lattice.html, "orient"_orient.html, "origin"_origin.html, -"region"_region.html, "create_box"_create_box.html, +"lattice"_lattice.html, "region"_region.html, "create_box"_create_box.html, "read_data"_read_data.html, "read_restart"_read_restart.html [Default:] none diff --git a/doc/displace_atoms.html b/doc/displace_atoms.html index d9c98529fa..cc04a354c7 100644 --- a/doc/displace_atoms.html +++ b/doc/displace_atoms.html @@ -58,9 +58,9 @@ those bounds will be moved the minimum (0.0) or maximum (5.0) amount.
Distance units for the displacement are determined by the setting of box or lattice for the units keyword. Box means distance units as defined by the units command - e.g. Angstroms -for real units. Lattice means to use lattice spacings as defined -by the lattice command. The default is to use lattice -units. +for real units. Lattice means distance units are in lattice +spacings. The lattice command must have been +previously used to define the lattice spacing.
Care should be taken not to move atoms on top of other atoms. After the move, atoms are remapped to the periodic simulation box. In @@ -76,7 +76,9 @@ once they have been displaced. This means that your system must be ready to perform a simulation before using this command (force fields setup, atom masses set, etc).
-Related commands: none +
Related commands: +
+Default:
diff --git a/doc/displace_atoms.txt b/doc/displace_atoms.txt index 820949c022..ad12477dff 100644 --- a/doc/displace_atoms.txt +++ b/doc/displace_atoms.txt @@ -50,9 +50,9 @@ those bounds will be moved the minimum (0.0) or maximum (5.0) amount. Distance units for the displacement are determined by the setting of {box} or {lattice} for the {units} keyword. {Box} means distance units as defined by the "units"_units.html command - e.g. Angstroms -for {real} units. {Lattice} means to use lattice spacings as defined -by the "lattice"_lattice.html command. The default is to use lattice -units. +for {real} units. {Lattice} means distance units are in lattice +spacings. The "lattice"_lattice.html command must have been +previously used to define the lattice spacing. Care should be taken not to move atoms on top of other atoms. After the move, atoms are remapped to the periodic simulation box. In @@ -68,7 +68,9 @@ once they have been displaced. This means that your system must be ready to perform a simulation before using this command (force fields setup, atom masses set, etc). -[Related commands:] none +[Related commands:] + +"lattice"_lattice.html [Default:] diff --git a/doc/fix_indent.html b/doc/fix_indent.html index 05f6fe1975..752cfab63c 100644 --- a/doc/fix_indent.html +++ b/doc/fix_indent.html @@ -94,10 +94,11 @@ each run. to define the indenter. A box value selects standard distance units as defined by the units command, e.g. Angstroms for units = real or metal. A lattice value means the distance units are in -cubic lattice spacings. The lattice command must first -be used to define a lattice. Note that the units choice affects not -only the indenter's physical geometry, but also its velocity and force -constant since they are defined in terms of distance as well. +lattice spacings. The lattice command must have been +previously used to define the lattice spacing. Note that the units +choice affects not only the indenter's physical geometry, but also its +velocity and force constant since they are defined in terms of +distance as well.This fix supports the fix_modify options for thermo and energy. The former will print the contribution the fix diff --git a/doc/fix_indent.txt b/doc/fix_indent.txt index 51b9d3b644..b272ec4eee 100644 --- a/doc/fix_indent.txt +++ b/doc/fix_indent.txt @@ -85,10 +85,11 @@ The {units} keyword determines the meaning of the distance units used to define the indenter. A {box} value selects standard distance units as defined by the "units"_units.html command, e.g. Angstroms for units = real or metal. A {lattice} value means the distance units are in -cubic lattice spacings. The "lattice"_lattice.html command must first -be used to define a lattice. Note that the units choice affects not -only the indenter's physical geometry, but also its velocity and force -constant since they are defined in terms of distance as well. +lattice spacings. The "lattice"_lattice.html command must have been +previously used to define the lattice spacing. Note that the units +choice affects not only the indenter's physical geometry, but also its +velocity and force constant since they are defined in terms of +distance as well. This fix supports the "fix_modify"_fix_modify.html options for {thermo} and {energy}. The former will print the contribution the fix diff --git a/doc/fix_recenter.html b/doc/fix_recenter.html index ea346fc23f..6e4f4ebd97 100644 --- a/doc/fix_recenter.html +++ b/doc/fix_recenter.html @@ -65,10 +65,11 @@ could be shifted.
If the units keyword is set to box, then the distance units of x,y,z are defined by the units command - e.g. Angstroms -for real units. Lattice means to use lattice spacings as defined -by the lattice command. Fraction means a fractional -distance between the lo/hi box boundaries, e.g. 0.5 = middle of the -box. The default is to use lattice units. +for real units. A lattice value means the distance units are in +lattice spacings. The lattice command must have been +previously used to define the lattice spacing. A fraction value +means a fractional distance between the lo/hi box boundaries, e.g. 0.5 += middle of the box. The default is to use lattice units.
Note that the velocity command can be used to create velocities with zero aggregate linear and/or angular momentum. diff --git a/doc/fix_recenter.txt b/doc/fix_recenter.txt index 5f3306c72c..8aa0e52654 100644 --- a/doc/fix_recenter.txt +++ b/doc/fix_recenter.txt @@ -57,10 +57,11 @@ could be shifted. If the {units} keyword is set to {box}, then the distance units of x,y,z are defined by the "units"_units.html command - e.g. Angstroms -for {real} units. {Lattice} means to use lattice spacings as defined -by the "lattice"_lattice.html command. {Fraction} means a fractional -distance between the lo/hi box boundaries, e.g. 0.5 = middle of the -box. The default is to use lattice units. +for {real} units. A {lattice} value means the distance units are in +lattice spacings. The "lattice"_lattice.html command must have been +previously used to define the lattice spacing. A {fraction} value +means a fractional distance between the lo/hi box boundaries, e.g. 0.5 += middle of the box. The default is to use lattice units. Note that the "velocity"_velocity.html command can be used to create velocities with zero aggregate linear and/or angular momentum. diff --git a/doc/lattice.html b/doc/lattice.html index a3428f01d3..806b22d01f 100644 --- a/doc/lattice.html +++ b/doc/lattice.html @@ -13,14 +13,31 @@
Syntax:
-lattice style value +lattice style scale keyword values ...-
none value = none +
for style none: + scale is not specified (nor any optional args) for all other styles: - value = reduced density (for LJ units) - value = cubic lattice constant in Angstroms (for real or metal units) + scale = reduced density rho* (for LJ units) + scale = lattice constant in Angstroms (for real or metal units) ++
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 + 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)
lattice fcc 3.52 lattice hex 0.85 +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 lattice none
Description:
-Define a lattice type and lattice constant. This is required before -using a commands that (optionally) use the lattice, such as -create_atoms or region. The lattice -type must be consistent with the dimension of the simulation - see the -dimension command. Styles sc or bcc or fcc or -diamond are for 3d problems. Styles sq or sq2 or hex are for -2d problems. Lattices of style fcc, bcc, hex, or diamond are -described in any solid-state physics text. A sc lattice is simple -cubic, with atoms at the corners of a cube. A sq lattice is square -with atoms at the corners of a square. A sq2 lattice is a sq -lattice with an additional atom at the center of the square. +
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.
-For unit style real or metal, the specified value is the cubic -lattice constant in Angstroms. For unit style lj, the value is the -reduced density (rho*) which LAMMPS converts into a cubic lattice -constant. For 3d problems, the relationship "rho* = rho sigma^3" is -used for the conversion, where rho = N/V with V = the volume of the -cubic cell and N = 4 for fcc, 2 for bcc, 1 for sc, and 8 for -diamond lattices. For 2d problems, the relationship "rho* = rho -sigma^2" is used for the conversion, where N = 2 for sq2 or hex -and 1 for sq. In the hex case, the unit cell is actually -rectangular; it is extended by a factor of sqrt(3) in the y-dimension. +
A lattice is used by LAMMPS in two ways. First, the +create_atoms command creates atoms on the lattice +points inside the simulation box. Note that the +create_atoms 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. region +and velocity), which are often convenient when the +underlying problem geometry is atoms on a lattice.
-The command "lattice none" can be used to turn off the lattice -setting. Any command that attempts to use a lattice constant will -then generate an error. +
The lattice style must be consistent with the dimension of the +simulation - see the dimension command. Styles sc +or bcc or fcc or diamond are for 3d problems. Styles sq or +sq2 or hex are for 2d problems. Style user can be used for +either 2d or 3d problems.
-Restrictions: none +
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. +
+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 = +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 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 diamond lattice has 8 basis atoms. +
+Lattices of style sq and sq2 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 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.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. +
+A lattice of style user 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 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. +
+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. +
+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. +The meaning of the scale argument depends on the units +being used in your simulation. +
+For unit style real or metal, 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. +
+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 +the Z direction. +
+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 +region command can create a block of size 10x20x20, +where 10 means 10 lattice spacings in the x direction. +
+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. +
+Note that if the unit cell has axis-aligned edges (a1,a2,a3) and is +not rotated (via the orient 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 hex 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. +
+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. +
+The command "lattice none" can be used to turn off a previous lattice +definition. Any command that attempts to use the lattice directly +(create_atoms) or associated lattice spacings will +then generate an error. No additional arguments need be used with +"lattice none". +
+Restrictions: +
+The a1,a2,a3,basis keywords can only be used with style user. +
+For lattices oriented at an angle or with a non-orthognal unit cell, +care must be taken when using the region and +create_atoms 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.
Related commands:
-dimension, orient, -origin, create_atoms, +
dimension, create_atoms, region
Default:
lattice none+
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. +