Achemical substance in the solid state may form crystals in which the atoms, molecules, or ions are arranged in space according to one of a small finite number of possible crystal systems (lattice types), each with fairly well defined set of lattice parameters that are characteristic of the substance. These parameters typically depend on the temperature, pressure (or, more generally, the local state of mechanical stress within the crystal),[2] electric and magnetic fields, and its isotopic composition.[3] The lattice is usually distorted near impurities, crystal defects, and the crystal's surface. Parameter values quoted in manuals should specify those environment variables, and are usually averages affected by measurement errors.
The lattice parameters of a crystalline substance can be determined using techniques such as X-ray diffraction or with an atomic force microscope. They can be used as a natural length standard of nanometer range.[4][5] In the epitaxial growth of a crystal layer over a substrate of different composition, the lattice parameters must be matched in order to reduce strain and crystal defects.
The volume of the unit cell can be calculated from the lattice constant lengths and angles. If the unit cell sides are represented as vectors, then the volume is the scalar triple product of the vectors. The volume is represented by the letter V. For the general unit cell
Matching of lattice structures between two different semiconductor materials allows a region of band gap change to be formed in a material without introducing a change in crystal structure. This allows construction of advanced light-emitting diodes and diode lasers.
For example, gallium arsenide, aluminium gallium arsenide, and aluminium arsenide have almost equal lattice constants, making it possible to grow almost arbitrarily thick layers of one on the other one.
An alternative method is to grade the lattice constant from one value to another by a controlled altering of the alloy ratio during film growth. The beginning of the grading layer will have a ratio to match the underlying lattice and the alloy at the end of the layer growth will match the desired final lattice for the following layer to be deposited.
Define a lattice for use by other commands. In LAMMPS, a lattice issimply a set of points in space, determined by a unit cell with basisatoms, that is replicated infinitely in all dimensions. The argumentsof the lattice command can be used to define a wide variety ofcrystallographic lattices.
A lattice is used by LAMMPS in two ways. First, thecreate_atoms command creates atoms on the latticepoints inside the simulation box. Note that thecreate_atoms command allows different atom typesto be assigned to different basis atoms of the lattice. Second, thelattice spacing in the x,y,z dimensions implied by the lattice, can beused by other commands as distance units(e.g. create_box, region andvelocity), which are often convenient to use when theunderlying problem geometry is atoms on a lattice.
The lattice style must be consistent with the dimension of thesimulation - see the dimension command. Styles scor bcc or fcc or hcp or diamond are for 3d problems. Stylessq or sq2 or hex are for 2d problems. Style custom can beused for either 2d or 3d problems.
Note that the lattice command can be used multiple times in an inputscript. Each time it is invoked, the lattice attributes arere-defined and are used for all subsequent commands (that use latticeattributes). For example, a sequence of lattice,region, and create_atoms commandscan be repeated multiple times to build a poly-crystalline model withdifferent geometric regions populated with atoms in different latticeorientations.
Lattices of style sq and sq2 are 2d lattices that define a squareunit cell with edge length = 1.0. This means a1 = 1 0 0 and a2 = 0 10. A sq lattice has 1 basis atom at the lower-left corner of thesquare. A sq2 lattice has 2 basis atoms, one at the corner and oneat the center of the square. A hex style is also a 2d lattice, butthe 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 therectangle.
A lattice of style custom allows you to specify a1, a2, a3, and alist of basis atoms to put in the unit cell. By default, a1 and a2and a3 are 3 orthogonal unit vectors (edges of a unit cube). But youcan specify them to be of any length and non-orthogonal to each other,so that they describe a tilted parallelepiped. Via the basiskeyword you add atoms, one at a time, to the unit cell. Its argumentsare fractional coordinates (0.0
The scale argument determines how the size of the unit cell will bescaled when mapping it into the simulation box. I.e. it determines amultiplicative factor to apply to the unit cell, to convert it to alattice of the desired size and distance units in the simulation box.The meaning of the scale argument depends on the unitsbeing used in your simulation.
For all unit styles except lj, the scale argument is specified inthe distance units defined by the unit style. For example, in realor metal units, if the unit cell is a unit cube with edge length1.0, specifying scale = 3.52 would create a cubic lattice with aspacing of 3.52 Angstroms. In cgs units, the spacing would be 3.52cm.
The preceding paragraph describing lattice directions is onlyvalid for orthogonal cubic unit cells (or square in 2d). If you areusing a hcp or hex lattice or the more general lattice stylecustom with non-orthogonal a1,a2,a3 vectors, then you should thinkof the 3 orient vectors as creating a 3x3 rotation matrix which isapplied to a1,a2,a3 to rotate the original unit cell to a neworientation in the simulation box.
The triclinic/general option specifies that the defined lattice isfor use with a general triclinic simulation box, as opposed to anorthogonal or restricted triclinic box. The Howto triclinic doc page explains all 3 kinds of simulation boxesLAMMPS supports.
If this option is specified, a custom lattice style must be used.The a1, a2, a3 vectors should define the edge vectors of asingle unit cell of the lattice with one or more basis atoms. Theyedge vectors can be arbitrary so long as they are non-zero, distinct,and not co-planar. In addition, they must define a right-handedsystem, such that (a1 cross a2) points in the direction of a3.Note that a left-handed system can be converted to a right-handedsystem by simply swapping the order of any pair of the a1, a2,a3 vectors. For 2d simulations, the a3 vector must be specifiedas (0.0,0.0,1.0), which is its default value.
The create_box command can be used to create ageneral triclinic box that replicates the a1, a2, a3 unit cellvectors in each direction to create the 3 arbitrary edge vectors ofthe overall simulation box. It requires a lattice with thetriclinic/general option.
Likewise, the create_atoms command can be usedto add atoms (or molecules) to a general triclinic box which lie onthe lattice points defined by a1, a2, a3 and the unit cell basisatoms. To do this, it also requires a lattice with thetriclinic/general option.
LAMMPS allows specification of general triclinic lattices andsimulation boxes as a convenience for users who may be convertingdata from solid-state crystallographic representations or from DFTcodes for input to LAMMPS. However, as explained on theHowto_triclinic doc page, internally,LAMMPS only uses restricted triclinic simulation boxes. This meansthe box and per-atom information (e.g. coordinates, velocities)defined by the create_box andcreate_atoms commands are converted fromgeneral to restricted triclinic form when the two commands areinvoked. It also means that any other commands which use latticespacings from this command (e.g. the region command), will beoperating on a restricted triclinic simulation box, even if thetriclinic/general option was used to define the lattice. See thenext section for details.
If the spacing option is not specified, the lattice spacings arecomputed by LAMMPS in the following way. A unit cell of the latticeis mapped into the simulation box (scaled and rotated), so that it nowhas (perhaps) a modified size and orientation. The lattice spacing inX is defined as the difference between the min/max extent of the xcoordinates of the 8 corner points of the modified unit cell (4 in2d). Similarly, the Y and Z lattice spacings are defined as thedifference in the min/max of the y and z coordinates.
If the triclinic/general option is specified, the unit celldefined by a1, a2, a3 edge vectors is first converted to arestricted triclinic orientation, which is a rotation operation.The min/max extent of the 8 corner points is then determined, asdescribed in the preceding paragraph, to set the latticespacings. As explained for the triclinic/general option above,this is because any use of the lattice spacings by other commandswill be for a restricted triclinic simulation box, not a generaltriclinic box.
Note that if the unit cell is orthogonal with axis-aligned edges (norotation via the orient keyword), then the lattice spacings in eachdimension are simply the scale factor (described above) multiplied bythe length of a1,a2,a3. Thus a hex style lattice with a scalefactor of 3.0 Angstroms, would have a lattice spacing of 3.0 in x and3*sqrt(3.0) in y.
For non-orthogonal unit cells and/or when a rotation is appliedvia the orient keyword, then the lattice spacings computed by LAMMPSare typically less intuitive. In particular, in these cases, there isno guarantee that a particular lattice spacing is an integer multipleof the periodicity of the lattice in that direction. Thus, if youcreate an orthogonal periodic simulation box whose size in a dimensionis a multiple of the lattice spacing, and then fill it with atoms viathe create_atoms command, you will NOT necessarilycreate a periodic system. I.e. atoms may overlap incorrectly at thefaces of the simulation box.
The spacing option sets the 3 lattice spacings directly. All mustbe non-zero (use 1.0 for dz in a 2d simulation). The specified valuesare multiplied by the multiplicative factor described above that isassociated with the scale factor. Thus a spacing of 1.0 means oneunit cell edge length independent of the scale factor. As mentionedabove, this option can be useful if the spacings LAMMPS computes areinconvenient to use in subsequent commands, which can be the case fornon-orthogonal or rotated lattices.
3a8082e126