mirror of https://github.com/lammps/lammps.git
253 lines
8.9 KiB
HTML
253 lines
8.9 KiB
HTML
<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>molecule command
|
|
</H3>
|
|
<P><B>Syntax:</B>
|
|
</P>
|
|
<PRE>molecule ID file
|
|
</PRE>
|
|
<UL><LI>ID = user-assigned name for the molecule template
|
|
<LI>file = name of file containing molecule description
|
|
</UL>
|
|
<P><B>Examples:</B>
|
|
</P>
|
|
<PRE>molecule 1 mymol
|
|
molecule CO2 co2.txt
|
|
</PRE>
|
|
<P><B>Description:</B>
|
|
</P>
|
|
<P>Define a molecule template that can be used as part of other LAMMPS
|
|
commands, typically to define a collection of particles as a bonded
|
|
molecule or a rigid body. Commands that use molecule templates
|
|
include (or will include) <A HREF = "fix_deposit.html">fix deposit</A>, <A HREF = "fix_pour.html">fix
|
|
pour</A>, and <A HREF = "fix_gcmc.html">fix gcmc</A>.
|
|
</P>
|
|
<P>The ID of a molecule template can only contain alphanumeric characters
|
|
and underscores.
|
|
</P>
|
|
<P>The format of the molecule file is similar to the data file read by
|
|
the <A HREF = "read_data.html">read_data</A> commands, and is as follows.
|
|
</P>
|
|
<P>A molecule file has a header and a body. The header appears first.
|
|
The first line of the header is always skipped; it typically contains
|
|
a description of the file. Then lines are read one at a time. Lines
|
|
can have a trailing comment starting with '#' that is ignored. If the
|
|
line is blank (only whitespace after comment is deleted), it is
|
|
skipped. If the line contains a header keyword, the corresponding
|
|
value(s) is read from the line. If it doesn't contain a header
|
|
keyword, the line begins the body of the file.
|
|
</P>
|
|
<P>The body of the file contains zero or more sections. The first line
|
|
of a section has only a keyword. The next line is skipped. The
|
|
remaining lines of the section contain values. The number of lines
|
|
depends on the section keyword as described below. Zero or more blank
|
|
lines can be used between sections. Sections can appear in any order,
|
|
with a few exceptions as noted below.
|
|
</P>
|
|
<P>These are the recognized header keywords. Header lines can come in
|
|
any order. The value(s) are read from the beginning of the line.
|
|
Thus the keyword <I>atoms</I> should be in a line like "10 atoms"; the
|
|
keyword <I>ylo yhi</I> should be in a line like "-10.0 10.0 ylo yhi"; the
|
|
keyword <I>xy xz yz</I> should be in a line like "0.0 5.0 6.0 xy xz yz".
|
|
All these settings have a default value of 0, except the lo/hi box
|
|
size defaults are -0.5 and 0.5. A line need only appear if the value
|
|
is different than the default.
|
|
</P>
|
|
<UL><LI><I>atoms</I> = # of atoms in molecule
|
|
<LI><I>bonds</I> = # of bonds in molecule
|
|
<LI><I>angles</I> = # of angles in molecule
|
|
<LI><I>dihedrals</I> = # of dihedrals in molecule
|
|
<LI><I>impropers</I> = # of impropers in molecule
|
|
</UL>
|
|
<P>These are the allowed section keywords for the body of the file.
|
|
</P>
|
|
<UL><LI><I>Coords, Types, Charges, Diameters, Masses</I> = atom-property sections
|
|
<LI><I>Bonds, Angles, Dihedrals, Impropers</I> = molecular topology sections
|
|
<LI><I>Special Bond Counts, Special Bonds</I> = special neighbor info
|
|
</UL>
|
|
<P>IMPORTANT NOTE: Whether a section is required depends on how the
|
|
molecule definition is used by other LAMMPS commands. For example, to
|
|
add a molecule via the <A HREF = "fix_deposit.html">fix deposit</A> command, the
|
|
Coords and Types sections are required. To add a rigid body via the
|
|
<A HREF = "fix_pout.html">fix pour</A> command, the Bonds (Angles, etc) sections are
|
|
not required, since the molecule will be treated as a rigid body.
|
|
Some sections are optional. For example, the <A HREF = "fix_pour.html">fix pour</A>
|
|
command can add finite-size granular particles. If the Diameters
|
|
section is not specified, added particles will have a default diameter
|
|
of 1.0. See the doc pages for LAMMPS commands that use read-in
|
|
molecules for more details.
|
|
</P>
|
|
<P>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 whether it can appear in the data file. In each
|
|
case the ID is ignored; it is simply included for readability as a
|
|
number from 1 to Nlines for the section, indicating which atom (or
|
|
bond, etc) the entry applies to. The lines are assumed to be listed
|
|
in order from 1 to Nlines.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Coords</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID x y z
|
|
<LI>x,y,z = coordinate of atom
|
|
</UL>
|
|
<HR>
|
|
|
|
<P><I>Types</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID type
|
|
<LI>type = atom type of atom
|
|
</UL>
|
|
<HR>
|
|
|
|
<P><I>Charges</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID q
|
|
<LI>q = charge on atom
|
|
</UL>
|
|
<P>This section is only allowed for <A HREF = "atom_style.html">atom styles</A> that
|
|
support charge. If not listed, the default charge on each atom in the
|
|
molecule is 0.0.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Diameters</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID diam
|
|
<LI>diam = diameter of atom
|
|
</UL>
|
|
<P>This section is only allowed for <A HREF = "atom_style.html">atom styles</A> that
|
|
support finite-size spherical particles, e.g. atom_style sphere. If
|
|
not listed, the default diameter of each atom in the molecule is 1.0.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Masses</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID mass
|
|
<LI>mass = mass of atom
|
|
</UL>
|
|
<P>This section is only allowed for <A HREF = "atom_style.html">atom styles</A> that
|
|
support per-atom mass, as opposed to per-type mass. See the
|
|
<A HREF = "mass.html">mass</A> command for details. If not listed, the default mass
|
|
for each atom is derived from its volume (see Diameters section) and a
|
|
default density of 1.0, in <A HREF = "units.html">units</A> of mass/volume.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Bonds</I> section:
|
|
</P>
|
|
<UL><LI>one line per bond
|
|
<LI>line syntax: ID type atom1 atom2
|
|
<LI>type = bond type (1-Nbondtype)
|
|
<LI>atom1,atom2 = IDs of atoms in bond
|
|
</UL>
|
|
<P>The IDs for the two atoms in each bond should be values
|
|
from 1 to Natoms, where Natoms = # of atoms in the molecule.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Angles</I> section:
|
|
</P>
|
|
<UL><LI>one line per angle
|
|
<LI>line syntax: ID type atom1 atom2 atom3
|
|
<LI>type = angle type (1-Nangletype)
|
|
<LI>atom1,atom2,atom3 = IDs of atoms in angle
|
|
</UL>
|
|
<P>The IDs for the three atoms in each angle should be values from 1 to
|
|
Natoms, where Natoms = # of atoms in the molecule. 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.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Dihedrals</I> section:
|
|
</P>
|
|
<UL><LI>one line per dihedral
|
|
<LI>line syntax: ID type atom1 atom2 atom3 atom4
|
|
<LI>type = dihedral type (1-Ndihedraltype)
|
|
<LI>atom1,atom2,atom3,atom4 = IDs of atoms in dihedral
|
|
</UL>
|
|
<P>The IDs for the four atoms in each dihedral should be values from 1 to
|
|
Natoms, where Natoms = # of atoms in the molecule. The 4 atoms are
|
|
ordered linearly within the dihedral.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Impropers</I> section:
|
|
</P>
|
|
<UL><LI>one line per improper
|
|
<LI>line syntax: ID type atom1 atom2 atom3 atom4
|
|
<LI>type = improper type (1-Nimpropertype)
|
|
<LI>atom1,atom2,atom3,atom4 = IDs of atoms in improper
|
|
</UL>
|
|
<P>The IDs for the four atoms in each improper should be values from 1 to
|
|
Natoms, where Natoms = # of atoms in the molecule. The ordering of
|
|
the 4 atoms determines the definition of the improper angle used in
|
|
the formula for the defined <A HREF = "improper_style.html">improper style</A>. See
|
|
the doc pages for individual styles for details.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Special Bond Counts</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID N1 N2 N3
|
|
<LI>N1 = # of 1-2 bonds
|
|
<LI>N2 = # of 1-3 bonds
|
|
<LI>N3 = # of 1-4 bonds
|
|
</UL>
|
|
<P>N1, N2, N3 are the number of 1-2, 1-3, 1-4 neighbors respectively of
|
|
this atom within the topology of the molecule. See the
|
|
<A HREF = "special_bonds.html">special_bonds</A> doc page for more discussion of
|
|
1-2, 1-3, 1-4 neighbors. If this section appears, the Special Bonds
|
|
section must also appear. If this section is not specied, the
|
|
atoms in the molecule will have no special bonds.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><I>Special Bonds</I> section:
|
|
</P>
|
|
<UL><LI>one line per atom
|
|
<LI>line syntax: ID a b c d ...
|
|
<LI>a,b,c,d,... = IDs of atoms in N1+N2+N3 special bonds
|
|
</UL>
|
|
<P>A, b, c, d, etc are the IDs of the n1+n2+n3 atoms that are 1-2, 1-3,
|
|
1-4 neighbors of this atom. The IDs should be values from 1 to
|
|
Natoms, where Natoms = # of atoms in the molecule. The first N1
|
|
values should be the 1-2 neighbors, the next N2 should be the 1-3
|
|
neighbors, the last N3 should be the 1-4 neighbors. No atom ID should
|
|
appear more than once. See the <A HREF = "special_bonds.html">special_bonds</A> doc
|
|
page for more discussion of 1-2, 1-3, 1-4 neighbors. If this section
|
|
appears, the Special Bond Counts section must also appear. If this
|
|
section is not specied, the atoms in the molecule will have no special
|
|
bonds.
|
|
</P>
|
|
<HR>
|
|
|
|
<P><B>Restrictions:</B> none
|
|
</P>
|
|
<P><B>Related commands:</B>
|
|
</P>
|
|
<P><A HREF = "fix_deposit.html">fix deposit</A>, <A HREF = "fix_pour.html">fix pour</A>,
|
|
<A HREF = "fix_gcmc.html">fix_gcmc</A>
|
|
</P>
|
|
<P><B>Default:</B> none
|
|
</P>
|
|
</HTML>
|