The \fix deposit or fix pour commands, which will have more special 1-2,1-3,1-4 neighbors than any other molecules defined in the data file. This will pre-allocate space in the LAMMPS data structures for storing these neighbors. See the special_bonds and molecule doc pages for more discussion of 1-2,1-3,1-4 neighbors.
The \atom_style ellipsoid or line or tri or body and specify how many of the atoms are finite-size ellipsoids or lines or triangles or bodies; the remainder are point particles. See the discussion of ellipsoidflag and the Ellipsoids section below. See the discussion of lineflag and the Lines section below. See the discussion of triangleflag and the Triangles section below. See the discussion of bodyflag and the Bodies section below.
IMPORTANT NOTE: For atom_style template, the molecular topology (bonds,angles,etc) is contained in the molecule templates read-in by the molecule command. This means you cannot set the bonds, angles, etc header keywords in the data file, nor can you define Bonds, Angles, etc sections as discussed below. You can set the bond types, angle types, etc header keywords, though it is not necessary. If specified, they must match the maximum values defined in any of the template molecules.
These are the section keywords for the body of the file.
Atoms, Velocities, Masses, Ellipsoids, Lines, Triangles, Bodies = atom-property sections ? Bonds, Angles, Dihedrals, Impropers = molecular topology sections
? Pair Coeffs, PairIJ Coeffs, Bond Coeffs, Angle Coeffs, Dihedral Coeffs, Improper Coeffs = force field sections ? BondBond Coeffs, BondAngle Coeffs, MiddleBondTorsion Coeffs, EndBondTorsion Coeffs, AngleTorsion Coeffs,
AngleAngleTorsion Coeffs, BondBond13 Coeffs, AngleAngle Coeffs = class 2 force field sections These keywords will check an appended comment for a match with the currently defined style:
? ?
Atoms, Pair Coeffs, PairIJ Coeffs, Bond Coeffs, Angle Coeffs, Dihedral Coeffs, Improper Coeffs
For example, these lines:
Atoms # sphere Pair Coeffs # lj/cut
will check if the currently-defined atom_style is sphere, and the current pair_style is lj/cut. If not, LAMMPS will issue a warning to indicate that the data file section likely does not contain the correct number or type of parameters expected for the currently-defined style.
Each section is listed below in alphabetic order. The format of each section is described including the number of lines it must contain and rules (if any) for where it can appear in the data file.
Any individual line in the various sections can have a trailing comment starting with \the Atoms section:
10 1 17 -1.0 10.0 5.0 6.0 # salt ion
Angle Coeffs section:
one line per angle type ? line syntax: ID coeffs ? ID = angle type (1-N) ? coeffs = list of coeffs ? example:
? 6 70 108.5 0 0
The number and meaning of the coefficients are specific to the defined angle style. See the angle_style and angle_coeff commands for details. Coefficients can also be set via the angle_coeff command in the input script.
?
AngleAngle Coeffs section:
? ? ? ?
one line per improper type line syntax: ID coeffs ID = improper type (1-N)
coeffs = list of coeffs (see improper_coeff)
AngleAngleTorsion Coeffs section:
? ? ? ?
one line per dihedral type line syntax: ID coeffs ID = dihedral type (1-N)
coeffs = list of coeffs (see dihedral_coeff)
Angles section:
one line per angle
? line syntax: ID type atom1 atom2 atom3 ? ID = number of angle (1-Nangles) ? type = angle type (1-Nangletype)
? atom1,atom2,atom3 = IDs of 1st,2nd,3rd atoms in angle example:
?
2 2 17 29 430
The 3 atoms are ordered linearly within the angle. Thus the central atom (around which the angle is computed) is the atom2 in the list. E.g. H,O,H for a water molecule. The Angles section must appear after the Atoms section. All values in this section must be integers (1, not 1.0).
AngleTorsion Coeffs section:
? ? ? ?
one line per dihedral type line syntax: ID coeffs ID = dihedral type (1-N)
coeffs = list of coeffs (see dihedral_coeff)
Atoms section:
? one line per atom
? line syntax: depends on atom style
An Atoms section must appear in the data file if natoms > 0 in the header section. The atoms can be listed in any order. These are the line formats for each atom style in LAMMPS. As discussed below, each line can optionally have 3 flags (nx,ny,nz) appended to it, which indicate which image of a periodic simulation box the atom is in. These may be important to include for some kinds of analysis.
angle atomic body bond charge dipole electron ellipsoid full atom-ID molecule-ID atom-type x y z atom-ID atom-type x y z atom-ID atom-type bodyflag mass x y z atom-ID molecule-ID atom-type x y z atom-ID atom-type q x y z atom-ID atom-type q x y z mux muy muz atom-ID atom-type q spin eradius x y z atom-ID atom-type ellipsoidflag density x y z atom-ID molecule-ID atom-type q x y z line meso molecular peri sphere template tri wavepacket hybrid The keywords have these meanings: atom-ID molecule-ID atom-type lineflag density x y z atom-ID atom-type rho e cv x y z atom-ID molecule-ID atom-type x y z atom-ID atom-type volume density x y z atom-ID atom-type diameter density x y z atom-ID molecule-ID template-index template-atom atom-type x y z atom-ID molecule-ID atom-type triangleflag density x y z atom-ID atom-type charge spin eradius etag cs_re cs_im x y z atom-ID atom-type x y z sub-style1 sub-style2 ... atom-ID = integer ID of atom
? molecule-ID = integer ID of molecule the atom belongs to ? atom-type = type of atom (1-Ntype) ? q = charge on atom (charge units)
? diameter = diameter of spherical atom (distance units)
? ellipsoidflag = 1 for ellipsoidal particles, 0 for point particles ? lineflag = 1 for line segment particles, 0 for point particles ? triangleflag = 1 for triangular particles, 0 for point particles ? bodyflag = 1 for body particles, 0 for point particles
? template-index = which molecule within the molecule template the atom is part of ? template-atom = which atom within a template molecule the atom is
? density = density of particle (mass/distance^3 or mass/distance^2 or mass/distance units, depending on
dimensionality of particle)
? mass = mass of particle (mass units)
? volume = volume of particle (distance^3 units) ? x,y,z = coordinates of atom
? mux,muy,muz = components of dipole moment of atom (dipole units) ? rho = density (need units) for SPH particles ? e = energy (need units) for SPH particles
? cv = heat capacity (need units) for SPH particles
? spin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP) ? eradius = electron radius (or fixed-core radius)
? etag = integer ID of electron that each wavepacket belongs to ? cs_re,cs_im = real/imaginary parts of wavepacket coefficients
The units for these quantities depend on the unit style; see the units command for details.
?
For 2d simulations specify z as 0.0, or a value within the zlo zhi setting in the data file header.
The atom-ID is used to identify the atom throughout the simulation and in dump files. Normally, it is a unique value from 1 to Natoms for each atom. Unique values larger than Natoms can be used, but they will cause extra memory to be allocated on each processor, if an atom map array is used, but not if an atom map hash is used; see the atom_modify command for details. If an atom map is not used (e.g. an atomic system with no bonds), and you don't care if unique atom IDs appear in dump files, then the atom-IDs can all be set to 0.
The molecule ID is a 2nd identifier attached to an atom. Normally, it is a number from 1 to N, identifying which molecule the atom belongs to. It can be 0 if it is an unbonded atom or if you don't care to keep track of molecule assignments. The diameter specifies the size of a finite-size spherical particle. It can be set to 0.0, which means that atom is a point particle.
The ellipsoidflag, lineflag, triangleflag, and bodyflag determine whether the particle is a finite-size ellipsoid or line or triangle or body of finite size, or whether the particle is a point particle. Additional attributes must be defined for each ellipsoid, line, triangle, or body in the corresponding Ellipsoids, Lines, Triangles, or Bodies section.
The template-index and template-atom are only defined used by atom_style template. In this case the molecule
command is used to define a molecule template which contains one or more molecules. If an atom belongs to one of those molecules, its template-index and template-atom are both set to positive integers; if not the values are both 0. The template-index is which molecule (1 to Nmols) the atom belongs to. The template-atom is which atom (1 to Natoms) within the molecule the atom is.
Some pair styles and fixes and computes that operate on finite-size particles allow for a mixture of finite-size and point particles. See the doc pages of individual commands for details.
For finite-size particles, the density is used in conjunction with the particle volume to set the mass of each particle as mass = density * volume. In this context, volume can be a 3d quantity (for spheres or ellipsoids), a 2d quantity (for triangles), or a 1d quantity (for line segments). If the volume is 0.0, meaning a point particle, then the density value is used as the mass. One exception is for the body atom style, in which case the mass of each particle (body or point particle) is specified explicitly. This is because the volume of the body is unknown.
For atom_style hybrid, following the 5 initial values (ID,type,x,y,z), specific values for each sub-style must be listed. The order of the sub-styles is the same as they were listed in the atom_style command. The sub-style specific values are those that are not the 5 standard ones (ID,type,x,y,z). For example, for the \For the \above. Thus if
atom_style hybrid charge sphere
were used in the input script, each atom line would have these fields: atom-ID atom-type x y z q diameter density
Note that if a non-standard value is defined by multiple sub-styles, it must appear mutliple times in the atom line. E.g. the atom line for atom_style hybrid dipole full would list \atom-ID atom-type x y z q mux muy myz molecule-ID q
Atom lines specify the (x,y,z) coordinates of atoms. These can be inside or outside the simulation box. When the data file is read, LAMMPS wraps coordinates outside the box back into the box for dimensions that are periodic. As discussed above, if an atom is outside the box in a non-periodic dimension, it will be lost.
LAMMPS always stores atom coordinates as values which are inside the simulation box. It also stores 3 flags which
indicate which image of the simulation box (in each dimension) the atom would be in if its coordinates were unwrapped across periodic boundaries. An image flag of 0 means the atom is still inside the box when unwrapped. A value of 2 means add 2 box lengths to get the unwrapped coordinate. A value of -1 means subtract 1 box length to get the unwrapped coordinate. LAMMPS updates these flags as atoms cross periodic boundaries during the simulation. The dump command can output atom atom coordinates in wrapped or unwrapped form, as well as the 3 image flags. In the data file, atom lines (all lines or none of them) can optionally list 3 trailing integer values (nx,ny,nz), which are used to initialize the atom's image flags. If nx,ny,nz values are not listed in the data file, LAMMPS initializes them to 0. Note that the image flags are immediately updated if an atom's coordinates need to wrapped back into the simulation box. It is only important to set image flags correctly in a data file if a simulation model relies on unwrapped coordinates for some calculation; otherwise they can be left unspecified. Examples of LAMMPS commands that use unwrapped coordinates internally are as follows:
?
Atoms in a rigid body (see fix rigid, fix rigid/small) must have consistent image flags, so that when the atoms are unwrapped, they are near each other, i.e. as a single body.
If the replicate command is used to generate a larger system, image flags must be consistent for bonded atoms when the bond crosses a periodic boundary. I.e. the values of the image flags should be different by 1 (in the appropriate dimension) for the two atoms in such a bond.
If you plan to dump image flags and perform post-analysis that will unwrap atom coordinates, it may be important that a continued run (restarted from a data file) begins with image flags that are consistent with the previous run.
?
?
Atom velocities and other atom quantities not defined above are set to 0.0 when the Atoms section is read. Velocities can be set later by a Velocities section in the data file or by a velocity or set command in the input script.
Bodies section:
one or more lines per body
? first line syntax: atom-ID ninteger ndouble
? ninteger = # of integer quantities for this particle
? ndouble = # of floating-point quantities for this particle
? 0 or more integer lines: one line for every 10 integer quantities ? 0 or more double lines: one line for every 10 double quantities ? example: ? 12 3 6 ? 2 3 2
? 1.0 2.0 3.0 1.0 2.0 4.0 ? example: ? 12 0 14
? 1.0 2.0 3.0 1.0 2.0 4.0 1.0 2.0 3.0 1.0 ? 2.0 4.0 4.0 2.0
The Bodies section must appear if atom_style body is used and any atoms listed in the Atoms section have a bodyflag = 1. The number of bodies should be specified in the header section via the \
?
Each body can have a variable number of integer and/or floating-point values. The number and meaning of the values is defined by the body style, as described in the body doc page. The body style is given as an argument to the atom_style body command.
The ninteger and ndouble values determine how many integer and floating-point values are specified for this particle. Ninteger and ndouble can be as large as needed and can be different for every body. Integer values are then listed on subsequent lines, 10 values per line. Floating-point values follow on subsequent lines, again 10 per line. If the number of lines is not evenly divisible by 10, the last line in that group contains the remaining values, e.g. 4 values out of 14 in the last example above, for floating-point values. If there are no values of a particular type, no lines appear for that type, e.g. there are no integer lines in the last example above. The Bodies section must appear after the Atoms section.
Bond Coeffs section:
one line per bond type ? line syntax: ID coeffs ? ID = bond type (1-N) ? coeffs = list of coeffs ? example: ? 4 250 1.49
The number and meaning of the coefficients are specific to the defined bond style. See the bond_style and bond_coeff commands for details. Coefficients can also be set via the bond_coeff command in the input script.
?
BondAngle Coeffs section:
? ? ? ?
one line per angle type line syntax: ID coeffs ID = angle type (1-N)
coeffs = list of coeffs (see class 2 section of angle_coeff)