2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > read_data command — LAMMPS 15 May 2015 version documentation< / title >
< link rel = "stylesheet" href = "_static/css/theme.css" type = "text/css" / >
< link rel = "stylesheet" href = "_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type = "text/css" / >
< link rel = "top" title = "LAMMPS 15 May 2015 version documentation" href = "index.html" / >
< script src = "_static/js/modernizr.min.js" > < / script >
< / head >
< body class = "wy-body-for-nav" role = "document" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-nav-search" >
< a href = "Manual.html" class = "icon icon-home" > LAMMPS
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_intro.html" > 1. Introduction< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_start.html" > 2. Getting Started< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_commands.html" > 3. Commands< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_packages.html" > 4. Packages< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_accelerate.html" > 5. Accelerating LAMMPS performance< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_howto.html" > 6. How-to discussions< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_example.html" > 7. Example problems< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_perf.html" > 8. Performance & scalability< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_tools.html" > 9. Additional tools< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_modify.html" > 10. Modifying & extending LAMMPS< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_python.html" > 11. Python interface to LAMMPS< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_errors.html" > 12. Errors< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_history.html" > 13. Future and history< / a > < / li >
< / ul >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "Manual.html" > LAMMPS< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "Manual.html" > Docs< / a > » < / li >
< li > read_data command< / li >
< li class = "wy-breadcrumbs-aside" >
< a href = "http://lammps.sandia.gov" > Website< / a >
< a href = "Section_commands.html#comm" > Commands< / a >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "read-data-command" >
< span id = "index-0" > < / span > < h1 > read_data command< a class = "headerlink" href = "#read-data-command" title = "Permalink to this headline" > ¶< / a > < / h1 >
< div class = "section" id = "syntax" >
< h2 > Syntax< a class = "headerlink" href = "#syntax" title = "Permalink to this headline" > ¶< / a > < / h2 >
< div class = "highlight-python" > < div class = "highlight" > < pre > read_data file keyword args ...
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > file = name of data file to read in< / li >
< li > zero or more keyword/arg pairs may be appended< / li >
< li > keyword = < em > add< / em > or < em > offset< / em > or < em > shift< / em > or < em > extra/atom/types< / em > or < em > extra/bond/types< / em > or < em > extra/angle/types< / em > or < em > extra/dihedral/types< / em > or < em > extra/improper/types< / em > or < em > group< / em > or < em > fix< / em > < / li >
< / ul >
< pre class = "literal-block" >
< em > add< / em > arg = < em > append< / em > or < em > Nstart< / em > or < em > merge< / em >
2015-07-31 00:49:30 +08:00
append = add new atoms with IDs appended to current IDs
Nstart = add new atoms with IDs starting with Nstart
merge = add new atoms with their IDs unchanged
< em > offset< / em > args = toff boff aoff doff ioff
toff = offset to add to atom types
boff = offset to add to bond types
aoff = offset to add to angle types
doff = offset to add to dihedral types
ioff = offset to add to improper types
< em > shift< / em > args = Sx Sy Sz
Sx,Sy,Sz = distance to shift atoms when adding to system (distance units)
< em > extra/atom/types< / em > arg = # of extra atom types
< em > extra/bond/types< / em > arg = # of extra bond types
< em > extra/angle/types< / em > arg = # of extra angle types
< em > extra/dihedral/types< / em > arg = # of extra dihedral types
< em > extra/improper/types< / em > arg = # of extra improper types
< em > group< / em > args = groupID
groupID = add atoms in data file to this group
< em > fix< / em > args = fix-ID header-string section-string
fix-ID = ID of fix to process header lines and sections of data file
header-string = header lines containing this string will be passed to fix
section-string = section names with this string will be passed to fix
2015-07-30 22:53:28 +08:00
< / pre >
< / div >
< div class = "section" id = "examples" >
< h2 > Examples< a class = "headerlink" href = "#examples" title = "Permalink to this headline" > ¶< / a > < / h2 >
< div class = "highlight-python" > < div class = "highlight" > < pre > read_data data.lj
2012-05-19 07:37:24 +08:00
read_data ../run7/data.polymer.gz
2015-07-30 22:53:28 +08:00
read_data data.protein fix mycmap crossterm CMAP
2015-07-18 08:08:17 +08:00
read_data data.water add append offset 3 1 1 1 1 shift 0.0 0.0 50.0
2015-07-30 22:53:28 +08:00
read_data data.water add merge 1 group solvent
< / pre > < / div >
< / div >
< / div >
< div class = "section" id = "description" >
< h2 > Description< a class = "headerlink" href = "#description" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Read in a data file containing information LAMMPS needs to run a
2006-09-22 00:22:34 +08:00
simulation. The file can be ASCII text or a gzipped text file
(detected by a .gz suffix). This is one of 3 ways to specify initial
2015-07-30 22:53:28 +08:00
atom coordinates; see the < a class = "reference internal" href = "read_restart.html" > < em > read_restart< / em > < / a > and
< a class = "reference internal" href = "create_atoms.html" > < em > create_atoms< / em > < / a > commands for alternative methods.
Also see the explanation of the < a class = "reference internal" href = "Section_start.html#start-7" > < span > -restart command-line switch< / span > < / a > which can convert a restart file to
a data file.< / p >
< p > This command can be used multiple times to add new atoms and their
properties to an existing system by using the < em > add< / em > , < em > offset< / em > , and
< em > shift< / em > keywords. See more details below, which includes the use case
for the < em > extra< / em > keywords.< / p >
< p > The < em > group< / em > keyword adds all the atoms in the data file to the
2015-07-18 08:08:17 +08:00
specified group-ID. The group will be created if it does not already
exist. This is useful if you are reading multiple data files and wish
to put sets of atoms into different groups so they can be operated on
later. E.g. a group of added atoms can be moved to new positions via
2015-07-30 22:53:28 +08:00
the < a class = "reference internal" href = "displace_atoms.html" > < em > displace_atoms< / em > < / a > command. Note that atoms
read from the data file are also always added to the “ all” group. The
< a class = "reference internal" href = "group.html" > < em > group< / em > < / a > command discusses atom groups, as used in LAMMPS.< / p >
< p > The use of the < em > fix< / em > keyword is discussed below.< / p >
< hr class = "docutils" / >
< p > < strong > Reading multiple data files< / strong > < / p >
< p > The read_data command can be used multiple times with the same or
2015-07-18 08:08:17 +08:00
different data files to build up a complex system from components
contained in individual data files. For example one data file could
contain fluid in a confined domain; a second could contain wall atoms,
and the second file could be read a third time to create a wall on the
other side of the fluid. The third set of atoms could be rotated to
2015-07-30 22:53:28 +08:00
an opposing direction using the < a class = "reference internal" href = "displace_atoms.html" > < em > displace_atoms< / em > < / a >
command, after the third read_data command is used.< / p >
< p > The < em > add< / em > , < em > offset< / em > , < em > shift< / em > , < em > extra< / em > , and < em > group< / em > keywords are
useful in this context.< / p >
< p > If a simulation box does not yet exist, the < em > add< / em > keyword
2015-07-18 08:08:17 +08:00
cannot be used; the read_data command is being used for the first
time. If a simulation box does exist, due to using the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "create_box.html" > < em > create_box< / em > < / a > command, or a previous read_data command,
then the < em > add< / em > keyword must be used.< / p >
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > The simulation box size (xlo to xhi, ylo to yhi, zlo
2015-07-18 08:08:17 +08:00
to zhi) in the new data file will be merged with the existing
simulation box to create a large enough box in each dimension to
contain both the existing and new atoms. Each box dimension never
shrinks due to this merge operation, it only stays the same or
grows. Care must be used if you are growing the existing simulation
box in a periodic dimension. If there are existing atoms with bonds
that straddle that periodic boundary, then the atoms may become far
apart if the box size grows. This will separate the atoms in the
2015-07-30 22:53:28 +08:00
bond, which can lead to “ lost” bond atoms or bad dynamics.< / p >
< / div >
< p > The three choices for the < em > add< / em > argument affect how the IDs of atoms
in the data file are treated. If < em > append< / em > is specified, atoms in the
2015-07-18 08:08:17 +08:00
data file are added to the current system, with their atom IDs reset
so that an atomID = M in the data file becomes atomID = N+M, where N
is the largest atom ID in the current system. This rule is applied to
all occurrences of atom IDs in the data file, e.g. in the Velocity or
2015-07-30 22:53:28 +08:00
Bonds section. If < em > Nstart< / em > is specified, then < em > Nstart< / em > is a numeric
2015-07-18 08:08:17 +08:00
value is given, e.g. 1000, so that an atomID = M in the data file
2015-07-30 22:53:28 +08:00
becomes atomID = 1000+M. If < em > merge< / em > is specified, the data file atoms
2015-07-18 08:08:17 +08:00
are added to the current system without changing their IDs. They are
assumed to merge (without duplication) with the currently defined
atoms. It is up to you to insure there are no multiply defined atom
IDs, as LAMMPS only performs an incomplete check that this is the case
2015-07-30 22:53:28 +08:00
by insuring the resulting max atomID > = the number of atoms.< / p >
< p > The < em > offset< / em > and < em > shift< / em > keywords can only be used if the < em > add< / em >
keyword is also specified.< / p >
< p > The < em > offset< / em > keyword adds the specified offset values to the atom
2015-07-18 08:08:17 +08:00
types, bond types, angle types, dihedral types, and improper types as
2015-07-30 22:53:28 +08:00
they are read from the data file. E.g. if < em > toff< / em > = 2, and the file
2015-07-18 08:08:17 +08:00
uses atom types 1,2,3, then the added atoms will have atom types
3,4,5. These offsets apply to all occurrences of types in the data
file, e.g. for the Atoms or Masses or Pair Coeffs or Bond Coeffs
sections. This makes it easy to use atoms and molecules and their
attributes from a data file in different simulations, where you want
their types (atom, bond, angle, etc) to be different depending on what
other types already exist. All five offset values must be specified,
but individual values will be ignored if the data file does not use
2015-07-30 22:53:28 +08:00
that attribute (e.g. no bonds).< / p >
< p > The < em > shift< / em > keyword can be used to specify an (Sx, Sy, Sz)
2015-07-18 08:08:17 +08:00
displacement applied to the coordinates of each atom. Sz must be 0.0
for a 2d simulation. This is a mechanism for adding structured
collections of atoms at different locations within the simulation box,
to build up a complex geometry. It is up to you to insure atoms do
not end up overlapping unphysically which would lead to bad dynamics.
2015-07-30 22:53:28 +08:00
Note that the < a class = "reference internal" href = "displace_atoms.html" > < em > displace_atoms< / em > < / a > command can be used
2015-07-18 08:08:17 +08:00
to move a subset of atoms after they have been read from a data file.
2015-07-30 22:53:28 +08:00
Likewise, the < a class = "reference internal" href = "delete_atoms.html" > < em > delete_atoms< / em > < / a > command can be used to
2015-07-18 08:08:17 +08:00
remove overlapping atoms. Note that the shift values (Sx, Sy, Sz) are
also added to the simulation box information (xlo, xhi, ylo, yhi, zlo,
zhi) in the data file to shift its boundaries. E.g. xlo_new = xlo +
2015-07-30 22:53:28 +08:00
Sx, xhi_new = xhi + Sx.< / p >
< p > The < em > extra< / em > keywords can only be used the first time the read_data
2015-07-18 08:08:17 +08:00
command is used. They are useful if you intend to add new atom, bond,
angle, etc types later with additional read_data commands. This is
because the maximum number of allowed atom, bond, angle, etc types is
set by LAMMPS when the system is first initialized. If you do not use
2015-07-30 22:53:28 +08:00
the < em > extra< / em > keywords, then the number of these types will be limited
2015-07-18 08:08:17 +08:00
to what appears in the first data file you read. For example, if the
first data file is a solid substrate of Si, it will likely specify a
single atom type. If you read a second data file with a different
material (water molecules) that sit on top of the substrate, you will
want to use different atom types for those atoms. You can only do
2015-07-30 22:53:28 +08:00
this if you set the < em > extra/atom/types< / em > keyword to a sufficiently large
2015-07-18 08:08:17 +08:00
value when reading the substrate data file. Note that use of the
2015-07-30 22:53:28 +08:00
< em > extra< / em > keywords also allows each data file to contain sections like
2015-07-18 08:08:17 +08:00
Masses or Pair Coeffs or Bond Coeffs which are sized appropriately for
2015-07-30 22:53:28 +08:00
the number of types in that data file. If the < em > offset< / em > keyword is
2015-07-18 08:08:17 +08:00
used appropriately when each data file is read, the values in those
sections will be stored correctly in the larger data structures
2015-07-30 22:53:28 +08:00
allocated by the use of the < em > extra< / em > keywords. E.g. the substrate file
2015-07-18 08:08:17 +08:00
can list mass and pair coefficients for type 1 silicon atoms. The
water file can list mass and pair coeffcients for type 1 and type 2
2015-07-30 22:53:28 +08:00
hydrogen and oxygen atoms. Use of the < em > extra< / em > and < em > offset< / em > keywords
2015-07-18 08:08:17 +08:00
will store those mass and pair coefficient values appropriately in
data structures that allow for 3 atom types (Si, H, O). Of course,
you would still need to specify coefficients for H/Si and O/Si
interactions in your input script to have a complete pairwise
2015-07-30 22:53:28 +08:00
interaction model.< / p >
< p > An alternative to using the < em > extra< / em > keywords with the read_data
command, is to use the < a class = "reference internal" href = "create_box.html" > < em > create_box< / em > < / a > command to
2015-07-18 08:08:17 +08:00
initialize the simulation box and all the various type limits you need
2015-07-30 22:53:28 +08:00
via its < em > extra< / em > keywords. Then use the read_data command one or more
2015-07-18 08:08:17 +08:00
times to populate the system with atoms, bonds, angles, etc, using the
2015-07-30 22:53:28 +08:00
< em > offset< / em > keyword if desired to alter types used in the various data
files you read.< / p >
< hr class = "docutils" / >
< p > < strong > Format of a data file< / strong > < / p >
< p > The structure of the data file is important, though many settings and
2006-09-22 00:22:34 +08:00
sections are optional or can come in any order. See the examples
2015-07-30 22:53:28 +08:00
directory for sample data files for different problems.< / p >
< p > A data file has a header and a body. The header appears first. The
2006-09-22 00:22:34 +08:00
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
2015-07-30 22:53:28 +08:00
can have a trailing comment starting with ‘ #’ that is ignored. If the
2006-09-22 00:22:34 +08:00
line is blank (only whitespace after comment is deleted), it is
skipped. If the line contains a header keyword, the corresponding
2015-07-30 22:53:28 +08:00
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
2014-03-11 00:53:22 +08:00
of a section has only a keyword. This line can have a trailing
2015-07-30 22:53:28 +08:00
comment starting with ‘ #’ that is either ignored or can be used to
2014-03-11 00:53:22 +08:00
check for a style match, as described below. 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
2015-07-30 22:53:28 +08:00
appear in any order, with a few exceptions as noted below.< / p >
< p > The keyword < em > fix< / em > can be used one or more times. Each usage specifies
2013-07-26 01:02:34 +08:00
a fix that will be used to process a specific portion of the data
2015-07-30 22:53:28 +08:00
file. Any header line containing < em > header-string< / em > and any section with
a name containing < em > section-string< / em > will be passed to the specified
fix. See the < a class = "reference internal" href = "fix_property_atom.html" > < em > fix property/atom< / em > < / a > command for
2013-07-26 01:02:34 +08:00
an example of a fix that operates in this manner. The doc page for
the fix defines the syntax of the header line(s) and section(s) that
2015-07-30 22:53:28 +08:00
it reads from the data file. Note that the < em > header-string< / em > can be
2013-07-26 01:02:34 +08:00
specified as NULL, in which case no header lines are passed to the
fix. This means that it can infer the length of its Section from
2015-07-30 22:53:28 +08:00
standard header settings, such as the number of atoms.< / p >
< p > The formatting of individual lines in the data file (indentation,
2006-09-22 00:22:34 +08:00
spacing between words and numbers) is not important except that header
and section keywords (e.g. atoms, xlo xhi, Masses, Bond Coeffs) must
2015-07-30 22:53:28 +08:00
be capitalized as shown and can’ t have extra white space between their
words - e.g. two spaces or a tab between the 2 words in “ xlo xhi” or
the 2 words in “ Bond Coeffs” , is not valid.< / p >
< hr class = "docutils" / >
< p > < strong > Format of the header of a data file< / strong > < / p >
< p > These are the recognized header keywords. Header lines can come in
2007-03-06 23:13:57 +08:00
any order. The value(s) are read from the beginning of the line.
2015-07-30 22:53:28 +08:00
Thus the keyword < em > atoms< / em > should be in a line like “ 1000 atoms” ; the
keyword < em > ylo yhi< / em > should be in a line like “ -10.0 10.0 ylo yhi” ; the
keyword < em > xy xz yz< / em > should be in a line like “ 0.0 5.0 6.0 xy xz yz” .
2007-03-06 23:13:57 +08:00
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
2015-07-30 22:53:28 +08:00
is different than the default.< / p >
< ul class = "simple" >
< li > < em > atoms< / em > = # of atoms in system< / li >
< li > < em > bonds< / em > = # of bonds in system< / li >
< li > < em > angles< / em > = # of angles in system< / li >
< li > < em > dihedrals< / em > = # of dihedrals in system< / li >
< li > < em > impropers< / em > = # of impropers in system< / li >
< li > < em > atom types< / em > = # of atom types in system< / li >
< li > < em > bond types< / em > = # of bond types in system< / li >
< li > < em > angle types< / em > = # of angle types in system< / li >
< li > < em > dihedral types< / em > = # of dihedral types in system< / li >
< li > < em > improper types< / em > = # of improper types in system< / li >
< li > < em > extra bond per atom< / em > = leave space for this many new bonds per atom< / li >
< li > < em > extra angle per atom< / em > = leave space for this many new angles per atom< / li >
< li > < em > extra dihedral per atom< / em > = leave space for this many new dihedrals per atom< / li >
< li > < em > extra improper per atom< / em > = leave space for this many new impropers per atom< / li >
< li > < em > extra special per atom< / em > = leave space for this many new special bonds per atom< / li >
< li > < em > ellipsoids< / em > = # of ellipsoids in system< / li >
< li > < em > lines< / em > = # of line segments in system< / li >
< li > < em > triangles< / em > = # of triangles in system< / li >
< li > < em > bodies< / em > = # of bodies in system< / li >
< li > < em > xlo xhi< / em > = simulation box boundaries in x dimension< / li >
< li > < em > ylo yhi< / em > = simulation box boundaries in y dimension< / li >
< li > < em > zlo zhi< / em > = simulation box boundaries in z dimension< / li >
< li > < em > xy xz yz< / em > = simulation box tilt factors for triclinic system< / li >
< / ul >
< p > The initial simulation box size is determined by the lo/hi settings.
2006-09-22 00:22:34 +08:00
In any dimension, the system may be periodic or non-periodic; see the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a > command. When the simulation box is created
2014-05-13 22:04:47 +08:00
it is also partitioned into a regular 3d grid of rectangular bricks,
one per processor, based on the number of processors being used and
2015-07-30 22:53:28 +08:00
the settings of the < a class = "reference internal" href = "processors.html" > < em > processors< / em > < / a > command. The
partitioning can later be changed by the < a class = "reference internal" href = "balance.html" > < em > balance< / em > < / a > or
< a class = "reference internal" href = "fix_balance.html" > < em > fix balance< / em > < / a > commands.< / p >
< p > If the < em > xy xz yz< / em > line does not appear, LAMMPS will set up an
2007-03-06 23:13:57 +08:00
axis-aligned (orthogonal) simulation box. If the line does appear,
LAMMPS creates a non-orthogonal simulation domain shaped as a
2010-10-15 07:23:43 +08:00
parallelepiped with triclinic symmetry. The parallelepiped has its
2015-07-30 22:53:28 +08:00
“ origin” at (xlo,ylo,zlo) and is defined by 3 edge vectors starting
2010-10-15 07:23:43 +08:00
from the origin given by A = (xhi-xlo,0,0); B = (xy,yhi-ylo,0); C =
2015-07-30 22:53:28 +08:00
(xz,yz,zhi-zlo). < em > Xy,xz,yz< / em > can be 0.0 or positive or negative values
and are called “ tilt factors” because they are the amount of
2010-10-15 07:23:43 +08:00
displacement applied to faces of an originally orthogonal box to
2015-07-30 22:53:28 +08:00
transform it into the parallelepiped.< / p >
< p > By default, the tilt factors (xy,xz,yz) can not skew the box more than
2015-01-31 06:25:16 +08:00
half the distance of the corresponding parallel box length. For
example, if xlo = 2 and xhi = 12, then the x box length is 10 and the
xy tilt factor must be between -5 and 5. Similarly, both xz and yz
must be between -(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is not
a limitation, since if the maximum tilt factor is 5 (as in this
2010-10-15 07:23:43 +08:00
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
2015-01-31 06:25:16 +08:00
... are all geometrically equivalent. If you wish to define a box
2015-07-30 22:53:28 +08:00
with tilt factors that exceed these limits, you can use the < a class = "reference internal" href = "box.html" > < em > box tilt< / em > < / a > command, with a setting of < em > large< / em > ; a setting of
< em > small< / em > is the default.< / p >
< p > See < a class = "reference internal" href = "Section_howto.html#howto-12" > < span > Section_howto 12< / span > < / a > of the doc pages
2011-12-14 04:43:36 +08:00
for a geometric description of triclinic boxes, as defined by LAMMPS,
and how to transform these parameters to and from other commonly used
2015-07-30 22:53:28 +08:00
triclinic representations.< / p >
< p > When a triclinic system is used, the simulation domain should normally
2015-01-31 06:25:16 +08:00
be periodic in the dimension that the tilt is applied to, which is
given by the second dimension of the tilt factor (e.g. y for xy tilt).
This is so that pairs of atoms interacting across that boundary will
have one of them shifted by the tilt factor. Periodicity is set by
2015-07-30 22:53:28 +08:00
the < a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a > command. For example, if the xy tilt
2015-01-31 06:25:16 +08:00
factor is non-zero, then the y dimension should be periodic.
Similarly, the z dimension should be periodic if xz or yz is non-zero.
LAMMPS does not require this periodicity, but you may lose atoms if
2015-07-30 22:53:28 +08:00
this is not the case.< / p >
< p > Also note that if your simulation will tilt the box, e.g. via the < a class = "reference internal" href = "fix_deform.html" > < em > fix deform< / em > < / a > command, the simulation box must be setup to
2015-01-31 06:25:16 +08:00
be triclinic, even if the tilt factors are initially 0.0. You can
also change an orthogonal box to a triclinic box or vice versa by
2015-07-30 22:53:28 +08:00
using the < a class = "reference internal" href = "change_box.html" > < em > change box< / em > < / a > command with its < em > ortho< / em > and
< em > triclinic< / em > options.< / p >
< p > For 2d simulations, the < em > zlo zhi< / em > values should be set to bound the z
2007-03-06 23:13:57 +08:00
coords for atoms that appear in the file; the default of -0.5 0.5 is
valid if all z coords are 0.0. For 2d triclinic simulations, the xz
2015-07-30 22:53:28 +08:00
and yz tilt factors must be 0.0.< / p >
< p > If the system is periodic (in a dimension), then atom coordinates can
2009-04-04 00:19:32 +08:00
be outside the bounds (in that dimension); they will be remapped (in a
2015-07-30 22:53:28 +08:00
periodic sense) back inside the box. Note that if the < em > add< / em > option is
2015-07-18 08:08:17 +08:00
being used to add atoms to a simulation box that already exists, this
periodic remapping will be performed using simulation box bounds that
are the union of the existing box and the box boundaries in the new
2015-07-30 22:53:28 +08:00
data file.< / p >
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > If the system is non-periodic (in a dimension), then
2008-05-20 23:38:43 +08:00
all atoms in the data file must have coordinates (in that dimension)
2015-07-30 22:53:28 +08:00
that are “ greater than or equal to” the lo value and “ less than or
equal to” the hi value. If the non-periodic dimension is of style
“ fixed” (see the < a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a > command), then the atom
coords must be strictly “ less than” the hi value, due to the way
2008-05-21 05:19:34 +08:00
LAMMPS assign atoms to processors. Note that you should not make the
lo/hi values radically smaller/larger than the extent of the atoms.
For example, if your atoms extend from 0 to 50, you should not specify
the box bounds as -10000 and 10000. This is because LAMMPS uses the
2008-05-20 23:38:43 +08:00
specified box size to layout the 3d grid of processors. A huge
2010-10-06 00:12:36 +08:00
(mostly empty) box will be sub-optimal for performance when using
2015-07-30 22:53:28 +08:00
“ fixed” boundary conditions (see the < a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a >
command). When using “ shrink-wrap” boundary conditions (see the
< a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a > command), a huge (mostly empty) box may cause
2015-02-03 05:40:14 +08:00
a parallel simulation to lose atoms when LAMMPS shrink-wraps the box
around the atoms. The read_data command will generate an error
2015-07-30 22:53:28 +08:00
in this case.< / p >
< / div >
< p > The “ extra bond per atom” setting (angle, dihedral, improper) is only
2014-01-09 04:38:18 +08:00
needed if new bonds (angles, dihedrals, impropers) will be added to
2015-07-30 22:53:28 +08:00
the system when a simulation runs, e.g. by using the < a class = "reference internal" href = "fix_bond_create.html" > < em > fix bond/create< / em > < / a > command. This will pre-allocate
2013-12-17 23:12:58 +08:00
space in LAMMPS data structures for storing the new bonds (angles,
2015-07-30 22:53:28 +08:00
dihedrals, impropers).< / p >
< p > The “ extra special per atom” setting is typically only needed if new
bonds/angles/etc will be added to the system, e.g. by using the < a class = "reference internal" href = "fix_bond_create.html" > < em > fix bond/create< / em > < / a > command. Or if entire new molecules
will be added to the system, e.g. by using the < a class = "reference internal" href = "fix_deposit.html" > < em > fix deposit< / em > < / a > or < a class = "reference internal" href = "fix_pour.html" > < em > fix pour< / em > < / a > commands, which
2014-01-09 04:38:18 +08:00
will have more special 1-2,1-3,1-4 neighbors than any other molecules
2014-11-21 02:17:51 +08:00
defined in the data file. Using this setting will pre-allocate space
in the LAMMPS data structures for storing these neighbors. See the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "special_bonds.html" > < em > special_bonds< / em > < / a > and < a class = "reference internal" href = "molecule.html" > < em > molecule< / em > < / a > doc
pages for more discussion of 1-2,1-3,1-4 neighbors.< / p >
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > All of the “ extra” settings are only used if they
appear in the first data file read; see the description of the < em > add< / em >
2015-07-18 08:15:47 +08:00
keyword above for reading multiple data files. If they appear in
2015-07-30 22:53:28 +08:00
later data files, they are ignored.< / p >
< / div >
< p > The “ ellipsoids” and “ lines” and “ triangles” and “ bodies” settings are
only used with < a class = "reference internal" href = "atom_style.html" > < em > atom_style ellipsoid or line or tri or body< / em > < / a > and specify how many of the atoms are
2013-02-01 00:39:48 +08:00
finite-size ellipsoids or lines or triangles or bodies; the remainder
are point particles. See the discussion of ellipsoidflag and the
2015-07-30 22:53:28 +08:00
< em > Ellipsoids< / em > section below. See the discussion of lineflag and the
< em > Lines< / em > section below. See the discussion of triangleflag and the
< em > Triangles< / em > section below. See the discussion of bodyflag and the
< em > Bodies< / em > section below.< / p >
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > For < a class = "reference internal" href = "atom_style.html" > < em > atom_style template< / em > < / a > , the
2014-01-26 07:36:16 +08:00
molecular topology (bonds,angles,etc) is contained in the molecule
2015-07-30 22:53:28 +08:00
templates read-in by the < a class = "reference internal" href = "molecule.html" > < em > molecule< / em > < / a > command. This means
you cannot set the < em > bonds< / em > , < em > angles< / em > , etc header keywords in the data
file, nor can you define < em > Bonds< / em > , < em > Angles< / em > , etc sections as discussed
below. You can set the < em > bond types< / em > , < em > angle types< / em > , etc header
2014-01-26 07:36:16 +08:00
keywords, though it is not necessary. If specified, they must match
2015-07-30 22:53:28 +08:00
the maximum values defined in any of the template molecules.< / p >
< / div >
< hr class = "docutils" / >
< p > < strong > Format of the body of a data file< / strong > < / p >
< p > These are the section keywords for the body of the file.< / p >
< ul class = "simple" >
< li > < em > Atoms, Velocities, Masses, Ellipsoids, Lines, Triangles, Bodies< / em > = atom-property sections< / li >
< li > < em > Bonds, Angles, Dihedrals, Impropers< / em > = molecular topology sections< / li >
< li > < em > Pair Coeffs, PairIJ Coeffs, Bond Coeffs, Angle Coeffs, Dihedral Coeffs, Improper Coeffs< / em > = force field sections< / li >
< li > < em > BondBond Coeffs, BondAngle Coeffs, MiddleBondTorsion Coeffs, EndBondTorsion Coeffs, AngleTorsion Coeffs, AngleAngleTorsion Coeffs, BondBond13 Coeffs, AngleAngle Coeffs< / em > = class 2 force field sections< / li >
< / ul >
< p > These keywords will check an appended comment for a match with the
currently defined style:< / p >
< ul class = "simple" >
< li > < em > Atoms, Pair Coeffs, PairIJ Coeffs, Bond Coeffs, Angle Coeffs, Dihedral Coeffs, Improper Coeffs< / em > < / li >
< / ul >
< p > For example, these lines:< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > Atoms # sphere
Pair Coeffs # lj/cut
< / pre > < / div >
< / div >
< p > will check if the currently-defined < a class = "reference internal" href = "atom_style.html" > < em > atom_style< / em > < / a > is
< em > sphere< / em > , and the current < a class = "reference external" href = "pair_style" > pair_style< / a > is < em > lj/cut< / em > . If
2014-03-11 00:53:22 +08:00
not, LAMMPS will issue a warning to indicate that the data file
section likely does not contain the correct number or type of
2015-07-30 22:53:28 +08:00
parameters expected for the currently-defined style.< / p >
< p > Each section is listed below in alphabetic order. The format of each
2006-09-22 00:22:34 +08:00
section is described including the number of lines it must contain and
2015-07-30 22:53:28 +08:00
rules (if any) for where it can appear in the data file.< / p >
< p > Any individual line in the various sections can have a trailing
comment starting with “ #” for annotation purposes. E.g. in the
Atoms section:< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > 10 1 17 -1.0 10.0 5.0 6.0 # salt ion
< / pre > < / div >
< / div >
< hr class = "docutils" / >
< p > < em > Angle Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per angle type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = angle type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 6 70 108.5 0 0
< / pre > < / div >
< / div >
< p > The number and meaning of the coefficients are specific to the defined
angle style. See the < a class = "reference internal" href = "angle_style.html" > < em > angle_style< / em > < / a > and
< a class = "reference internal" href = "angle_coeff.html" > < em > angle_coeff< / em > < / a > commands for details. Coefficients can
also be set via the < a class = "reference internal" href = "angle_coeff.html" > < em > angle_coeff< / em > < / a > command in the
input script.< / p >
< hr class = "docutils" / >
< p > < em > AngleAngle Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per improper type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = improper type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see < a class = "reference internal" href = "improper_coeff.html" > < em > improper_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > AngleAngleTorsion Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = dihedral type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see < a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > Angles< / em > section:< / p >
< ul class = "simple" >
< li > one line per angle< / li >
< li > line syntax: ID type atom1 atom2 atom3< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = number of angle (1-Nangles)
2015-07-31 00:49:30 +08:00
type = angle type (1-Nangletype)
atom1,atom2,atom3 = IDs of 1st,2nd,3rd atoms in angle
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< p > example:
.. parsed-literal:< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > 2 2 17 29 430
< / pre > < / div >
< / div >
< p > The 3 atoms are ordered linearly within the angle. Thus the central
2006-09-22 00:22:34 +08:00
atom (around which the angle is computed) is the atom2 in the list.
2015-07-30 22:53:28 +08:00
E.g. H,O,H for a water molecule. The < em > Angles< / em > section must appear
after the < em > Atoms< / em > section. All values in this section must be
integers (1, not 1.0).< / p >
< hr class = "docutils" / >
< p > < em > AngleTorsion Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = dihedral type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see < a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > Atoms< / em > section:< / p >
< ul class = "simple" >
< li > one line per atom< / li >
< li > line syntax: depends on atom style< / li >
< / ul >
< p > An < em > Atoms< / em > section must appear in the data file if natoms > 0 in the
2007-02-10 05:37:30 +08:00
header section. The atoms can be listed in any order. These are the
2015-07-30 22:53:28 +08:00
line formats for each < a class = "reference internal" href = "atom_style.html" > < em > atom style< / em > < / a > in LAMMPS. As
2007-12-12 07:28:43 +08:00
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
2015-07-30 22:53:28 +08:00
of analysis.< / p >
< table border = "1" class = "docutils" >
< colgroup >
2015-08-05 08:29:31 +08:00
< col width = "14%" / >
< col width = "86%" / >
2015-07-30 22:53:28 +08:00
< / colgroup >
< tbody valign = "top" >
< tr class = "row-odd" > < td > angle< / td >
< td > atom-ID molecule-ID atom-type x y z< / td >
< / tr >
< tr class = "row-even" > < td > atomic< / td >
< td > atom-ID atom-type x y z< / td >
< / tr >
< tr class = "row-odd" > < td > body< / td >
< td > atom-ID atom-type bodyflag mass x y z< / td >
< / tr >
< tr class = "row-even" > < td > bond< / td >
< td > atom-ID molecule-ID atom-type x y z< / td >
< / tr >
< tr class = "row-odd" > < td > charge< / td >
< td > atom-ID atom-type q x y z< / td >
< / tr >
< tr class = "row-even" > < td > dipole< / td >
< td > atom-ID atom-type q x y z mux muy muz< / td >
< / tr >
< tr class = "row-odd" > < td > electron< / td >
< td > atom-ID atom-type q spin eradius x y z< / td >
< / tr >
< tr class = "row-even" > < td > ellipsoid< / td >
< td > atom-ID atom-type ellipsoidflag density x y z< / td >
< / tr >
< tr class = "row-odd" > < td > full< / td >
< td > atom-ID molecule-ID atom-type q x y z< / td >
< / tr >
< tr class = "row-even" > < td > line< / td >
< td > atom-ID molecule-ID atom-type lineflag density x y z< / td >
< / tr >
< tr class = "row-odd" > < td > meso< / td >
< td > atom-ID atom-type rho e cv x y z< / td >
< / tr >
< tr class = "row-even" > < td > molecular< / td >
< td > atom-ID molecule-ID atom-type x y z< / td >
< / tr >
< tr class = "row-odd" > < td > peri< / td >
< td > atom-ID atom-type volume density x y z< / td >
< / tr >
2015-08-05 08:29:31 +08:00
< tr class = "row-even" > < td > smd< / td >
< td > atom-ID atom-type molecule volume mass kernel_radius contact_radius x y z< / td >
< / tr >
< tr class = "row-odd" > < td > sphere< / td >
2015-07-30 22:53:28 +08:00
< td > atom-ID atom-type diameter density x y z< / td >
< / tr >
2015-08-05 08:29:31 +08:00
< tr class = "row-even" > < td > template< / td >
2015-07-30 22:53:28 +08:00
< td > atom-ID molecule-ID template-index template-atom atom-type x y z< / td >
< / tr >
2015-08-05 08:29:31 +08:00
< tr class = "row-odd" > < td > tri< / td >
2015-07-30 22:53:28 +08:00
< td > atom-ID molecule-ID atom-type triangleflag density x y z< / td >
< / tr >
2015-08-05 08:29:31 +08:00
< tr class = "row-even" > < td > wavepacket< / td >
2015-07-30 22:53:28 +08:00
< td > atom-ID atom-type charge spin eradius etag cs_re cs_im x y z< / td >
< / tr >
2015-08-05 08:29:31 +08:00
< tr class = "row-odd" > < td > hybrid< / td >
2015-07-30 22:53:28 +08:00
< td > atom-ID atom-type x y z sub-style1 sub-style2 ...< / td >
< / tr >
< / tbody >
< / table >
< p > The keywords have these meanings:< / p >
< ul class = "simple" >
< li > atom-ID = integer ID of atom< / li >
< li > molecule-ID = integer ID of molecule the atom belongs to< / li >
< li > atom-type = type of atom (1-Ntype)< / li >
< li > q = charge on atom (charge units)< / li >
< li > diameter = diameter of spherical atom (distance units)< / li >
< li > ellipsoidflag = 1 for ellipsoidal particles, 0 for point particles< / li >
< li > lineflag = 1 for line segment particles, 0 for point particles< / li >
< li > triangleflag = 1 for triangular particles, 0 for point particles< / li >
< li > bodyflag = 1 for body particles, 0 for point particles< / li >
< li > template-index = which molecule within the molecule template the atom is part of< / li >
< li > template-atom = which atom within a template molecule the atom is< / li >
< li > density = density of particle (mass/distance^3 or mass/distance^2 or mass/distance units, depending on dimensionality of particle)< / li >
< li > mass = mass of particle (mass units)< / li >
< li > volume = volume of particle (distance^3 units)< / li >
< li > x,y,z = coordinates of atom< / li >
< li > mux,muy,muz = components of dipole moment of atom (dipole units)< / li >
< li > rho = density (need units) for SPH particles< / li >
< li > e = energy (need units) for SPH particles< / li >
< li > cv = heat capacity (need units) for SPH particles< / li >
< li > spin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP)< / li >
< li > eradius = electron radius (or fixed-core radius)< / li >
< li > etag = integer ID of electron that each wavepacket belongs to< / li >
< li > cs_re,cs_im = real/imaginary parts of wavepacket coefficients< / li >
2015-08-05 08:29:31 +08:00
< li > kernel_radius = ??? (distance units)< / li >
< li > contact_radius = ??? (distance units)< / li >
2015-07-30 22:53:28 +08:00
< / ul >
< p > The units for these quantities depend on the unit style; see the
< a class = "reference internal" href = "units.html" > < em > units< / em > < / a > command for details.< / p >
< p > For 2d simulations specify z as 0.0, or a value within the < em > zlo zhi< / em >
setting in the data file header.< / p >
< p > The atom-ID is used to identify the atom throughout the simulation and
2006-09-22 00:22:34 +08:00
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
2014-01-26 07:06:52 +08:00
map array is used, but not if an atom map hash is used; see the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "atom_modify.html" > < em > atom_modify< / em > < / a > command for details. If an atom map is
not used (e.g. an atomic system with no bonds), and you don’ t care if
2014-01-26 07:06:52 +08:00
unique atom IDs appear in dump files, then the atom-IDs can all be set
2015-07-30 22:53:28 +08:00
to 0.< / p >
< p > The molecule ID is a 2nd identifier attached to an atom. Normally, it
2006-09-22 00:22:34 +08:00
is a number from 1 to N, identifying which molecule the atom belongs
2015-07-30 22:53:28 +08:00
to. It can be 0 if it is an unbonded atom or if you don’ t care to
keep track of molecule assignments.< / p >
< p > 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.< / p >
< p > The ellipsoidflag, lineflag, triangleflag, and bodyflag determine
2013-02-01 00:39:48 +08:00
whether the particle is a finite-size ellipsoid or line or triangle or
2013-02-01 01:46:29 +08:00
body of finite size, or whether the particle is a point particle.
Additional attributes must be defined for each ellipsoid, line,
2015-07-30 22:53:28 +08:00
triangle, or body in the corresponding < em > Ellipsoids< / em > , < em > Lines< / em > ,
< em > Triangles< / em > , or < em > Bodies< / em > section.< / p >
< p > The < em > template-index< / em > and < em > template-atom< / em > are only defined used by
< a class = "reference internal" href = "atom_style.html" > < em > atom_style template< / em > < / a > . In this case the
< a class = "reference internal" href = "molecule.html" > < em > molecule< / em > < / a > command is used to define a molecule template
2014-01-26 07:06:52 +08:00
which contains one or more molecules. If an atom belongs to one of
2015-07-30 22:53:28 +08:00
those molecules, its < em > template-index< / em > and < em > template-atom< / em > are both set
2014-01-26 07:06:52 +08:00
to positive integers; if not the values are both 0. The
2015-07-30 22:53:28 +08:00
< em > template-index< / em > is which molecule (1 to Nmols) the atom belongs to.
The < em > template-atom< / em > is which atom (1 to Natoms) within the molecule
the atom is.< / p >
< p > Some pair styles and fixes and computes that operate on finite-size
2011-04-14 05:39:34 +08:00
particles allow for a mixture of finite-size and point particles. See
2015-07-30 22:53:28 +08:00
the doc pages of individual commands for details.< / p >
< p > For finite-size particles, the density is used in conjunction with the
2013-02-01 00:39:48 +08:00
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
2013-02-01 01:46:29 +08:00
density value is used as the mass. One exception is for the body atom
2013-02-01 00:39:48 +08:00
style, in which case the mass of each particle (body or point
particle) is specified explicitly. This is because the volume of the
2015-07-30 22:53:28 +08:00
body is unknown.< / p >
< p > For atom_style hybrid, following the 5 initial values (ID,type,x,y,z),
2007-06-20 20:56:17 +08:00
specific values for each sub-style must be listed. The order of the
sub-styles is the same as they were listed in the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "atom_style.html" > < em > atom_style< / em > < / a > command. The sub-style specific values
2007-06-20 20:56:17 +08:00
are those that are not the 5 standard ones (ID,type,x,y,z). For
2015-07-30 22:53:28 +08:00
example, for the “ charge” sub-style, a “ q” value would appear. For
the “ full” sub-style, a “ molecule-ID” and “ q” would appear. These are
listed in the same order they appear as listed above. Thus if< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom_style hybrid charge sphere
< / pre > < / div >
< / div >
< p > were used in the input script, each atom line would have these fields:< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom-ID atom-type x y z q diameter density
< / pre > < / div >
< / div >
< p > Note that if a non-standard value is defined by multiple sub-styles,
2012-06-07 23:02:09 +08:00
it must appear mutliple times in the atom line. E.g. the atom line
2015-07-30 22:53:28 +08:00
for atom_style hybrid dipole full would list “ q” twice:< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom-ID atom-type x y z q mux muy myz molecule-ID q
< / pre > < / div >
< / div >
< p > Atom lines specify the (x,y,z) coordinates of atoms. These can be
2014-01-10 00:32:42 +08:00
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
2015-07-30 22:53:28 +08:00
outside the box in a non-periodic dimension, it will be lost.< / p >
< p > LAMMPS always stores atom coordinates as values which are inside the
2014-01-10 00:32:42 +08:00
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
2015-07-30 22:53:28 +08:00
the simulation. The < a class = "reference internal" href = "dump.html" > < em > dump< / em > < / a > command can output atom atom
2014-01-10 00:32:42 +08:00
coordinates in wrapped or unwrapped form, as well as the 3 image
2015-07-30 22:53:28 +08:00
flags.< / p >
< p > In the data file, atom lines (all lines or none of them) can
2014-01-10 00:32:42 +08:00
optionally list 3 trailing integer values (nx,ny,nz), which are used
2015-07-30 22:53:28 +08:00
to initialize the atom’ s image flags. If nx,ny,nz values are not
2014-01-10 00:32:42 +08:00
listed in the data file, LAMMPS initializes them to 0. Note that the
2015-07-30 22:53:28 +08:00
image flags are immediately updated if an atom’ s coordinates need to
wrapped back into the simulation box.< / p >
< p > It is only important to set image flags correctly in a data file if a
2014-01-10 00:32:42 +08:00
simulation model relies on unwrapped coordinates for some calculation;
otherwise they can be left unspecified. Examples of LAMMPS commands
2015-07-30 22:53:28 +08:00
that use unwrapped coordinates internally are as follows:< / p >
< ul class = "simple" >
< li > Atoms in a rigid body (see < a class = "reference internal" href = "fix_rigid.html" > < em > fix rigid< / em > < / a > , < a class = "reference internal" href = "fix_rigid.html" > < em > fix rigid/small< / em > < / a > ) must have consistent image flags, so that
2014-01-10 00:32:42 +08:00
when the atoms are unwrapped, they are near each other, i.e. as a
2015-07-30 22:53:28 +08:00
single body.< / li >
< li > If the < a class = "reference internal" href = "replicate.html" > < em > replicate< / em > < / a > command is used to generate a larger
2014-01-10 00:32:42 +08:00
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
2015-07-30 22:53:28 +08:00
atoms in such a bond.< / li >
< li > If you plan to < a class = "reference internal" href = "dump.html" > < em > dump< / em > < / a > image flags and perform post-analysis
2014-01-10 00:32:42 +08:00
that will unwrap atom coordinates, it may be important that a
continued run (restarted from a data file) begins with image flags
2015-07-30 22:53:28 +08:00
that are consistent with the previous run.< / li >
< / ul >
< p > Atom velocities and other atom quantities not defined above are set to
0.0 when the < em > Atoms< / em > section is read. Velocities can be set later by
a < em > Velocities< / em > section in the data file or by a
< a class = "reference internal" href = "velocity.html" > < em > velocity< / em > < / a > or < a class = "reference internal" href = "set.html" > < em > set< / em > < / a > command in the input
script.< / p >
< hr class = "docutils" / >
< p > < em > Bodies< / em > section:< / p >
< ul class = "simple" >
< li > one or more lines per body< / li >
< li > first line syntax: atom-ID ninteger ndouble< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ninteger = # of integer quantities for this particle
2015-07-31 00:49:30 +08:00
ndouble = # of floating-point quantities for this particle
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > 0 or more integer lines: one line for every 10 integer quantities< / li >
< li > 0 or more double lines: one line for every 10 double quantities< / li >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 3 6
2015-07-31 00:49:30 +08:00
2 3 2
1.0 2.0 3.0 1.0 2.0 4.0
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 0 14
2015-07-31 00:49:30 +08:00
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
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< p > The < em > Bodies< / em > section must appear if < a class = "reference internal" href = "atom_style.html" > < em > atom_style body< / em > < / a >
is used and any atoms listed in the < em > Atoms< / em > section have a bodyflag =
2013-02-01 01:46:29 +08:00
1. The number of bodies should be specified in the header section via
2015-07-30 22:53:28 +08:00
the “ bodies” keyword.< / p >
< p > Each body can have a variable number of integer and/or floating-point
2013-02-01 01:46:29 +08:00
values. The number and meaning of the values is defined by the body
2015-07-30 22:53:28 +08:00
style, as described in the < a class = "reference internal" href = "body.html" > < em > body< / em > < / a > doc page. The body style
is given as an argument to the < a class = "reference internal" href = "atom_style.html" > < em > atom_style body< / em > < / a >
command.< / p >
< p > The ninteger and ndouble values determine how many integer and
2013-02-01 00:39:48 +08:00
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,
2015-07-30 22:53:28 +08:00
e.g. there are no integer lines in the last example above.< / p >
< p > The < em > Bodies< / em > section must appear after the < em > Atoms< / em > section.< / p >
< hr class = "docutils" / >
< p > < em > Bond Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per bond type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = bond type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 4 250 1.49
< / pre > < / div >
< / div >
< p > The number and meaning of the coefficients are specific to the defined
bond style. See the < a class = "reference internal" href = "bond_style.html" > < em > bond_style< / em > < / a > and
< a class = "reference internal" href = "bond_coeff.html" > < em > bond_coeff< / em > < / a > commands for details. Coefficients can
also be set via the < a class = "reference internal" href = "bond_coeff.html" > < em > bond_coeff< / em > < / a > command in the input
script.< / p >
< hr class = "docutils" / >
< p > < em > BondAngle Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per angle type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = angle type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see class 2 section of < a class = "reference internal" href = "angle_coeff.html" > < em > angle_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > BondBond Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per angle type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = angle type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see class 2 section of < a class = "reference internal" href = "angle_coeff.html" > < em > angle_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > BondBond13 Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = dihedral type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see class 2 section of < a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > Bonds< / em > section:< / p >
< ul class = "simple" >
< li > one line per bond< / li >
< li > line syntax: ID type atom1 atom2< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = bond number (1-Nbonds)
2015-07-31 00:49:30 +08:00
type = bond type (1-Nbondtype)
atom1,atom2 = IDs of 1st,2nd atoms in bond
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 3 17 29
< / pre > < / div >
< / div >
< p > The < em > Bonds< / em > section must appear after the < em > Atoms< / em > section. All values
in this section must be integers (1, not 1.0).< / p >
< hr class = "docutils" / >
< p > < em > Dihedral Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = dihedral type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 3 0.6 1 0 1
< / pre > < / div >
< / div >
< p > The number and meaning of the coefficients are specific to the defined
dihedral style. See the < a class = "reference internal" href = "dihedral_style.html" > < em > dihedral_style< / em > < / a > and
< a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > commands for details.
2006-09-22 00:22:34 +08:00
Coefficients can also be set via the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > command in the input script.< / p >
< hr class = "docutils" / >
< p > < em > Dihedrals< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral< / li >
< li > line syntax: ID type atom1 atom2 atom3 atom4< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = number of dihedral (1-Ndihedrals)
2015-07-31 00:49:30 +08:00
type = dihedral type (1-Ndihedraltype)
atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in dihedral
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 4 17 29 30 21
< / pre > < / div >
< / div >
< p > The 4 atoms are ordered linearly within the dihedral. The < em > Dihedrals< / em >
section must appear after the < em > Atoms< / em > section. All values in this
section must be integers (1, not 1.0).< / p >
< hr class = "docutils" / >
< p > < em > Ellipsoids< / em > section:< / p >
< ul class = "simple" >
< li > one line per ellipsoid< / li >
< li > line syntax: atom-ID shapex shapey shapez quatw quati quatj quatk< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom-ID = ID of atom which is an ellipsoid
2015-07-31 00:49:30 +08:00
shapex,shapey,shapez = 3 diameters of ellipsoid (distance units)
quatw,quati,quatj,quatk = quaternion components for orientation of atom
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 1 2 1 1 0 0 0
< / pre > < / div >
< / div >
< p > The < em > Ellipsoids< / em > section must appear if < a class = "reference internal" href = "atom_style.html" > < em > atom_style ellipsoid< / em > < / a > is used and any atoms are listed in the
< em > Atoms< / em > section with an ellipsoidflag = 1. The number of ellipsoids
should be specified in the header section via the “ ellipsoids”
keyword.< / p >
< p > The 3 shape values specify the 3 diameters or aspect ratios of a
2011-04-16 07:14:41 +08:00
finite-size ellipsoidal particle, when it is oriented along the 3
2015-07-30 22:53:28 +08:00
coordinate axes. They must all be non-zero values.< / p >
< p > The values < em > quatw< / em > , < em > quati< / em > , < em > quatj< / em > , and < em > quatk< / em > set the orientation
2011-04-16 07:14:41 +08:00
of the atom as a quaternion (4-vector). Note that the shape
attributes specify the aspect ratios of an ellipsoidal particle, which
2015-07-30 22:53:28 +08:00
is oriented by default with its x-axis along the simulation box’ s
2011-04-16 07:14:41 +08:00
x-axis, and similarly for y and z. If this body is rotated (via the
right-hand rule) by an angle theta around a unit vector (a,b,c), then
the quaternion that represents its new orientation is given by
(cos(theta/2), a*sin(theta/2), b*sin(theta/2), c*sin(theta/2)). These
4 components are quatw, quati, quatj, and quatk as specified above.
2015-07-30 22:53:28 +08:00
LAMMPS normalizes each atom’ s quaternion in case (a,b,c) is not
specified as a unit vector.< / p >
< p > The < em > Ellipsoids< / em > section must appear after the < em > Atoms< / em > section.< / p >
< hr class = "docutils" / >
< p > < em > EndBondTorsion Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = dihedral type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see class 2 section of < a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > Improper Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per improper type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = improper type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 2 20 0.0548311
< / pre > < / div >
< / div >
< p > The number and meaning of the coefficients are specific to the defined
improper style. See the < a class = "reference internal" href = "improper_style.html" > < em > improper_style< / em > < / a > and
< a class = "reference internal" href = "improper_coeff.html" > < em > improper_coeff< / em > < / a > commands for details.
2006-09-22 00:22:34 +08:00
Coefficients can also be set via the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "improper_coeff.html" > < em > improper_coeff< / em > < / a > command in the input script.< / p >
< hr class = "docutils" / >
< p > < em > Impropers< / em > section:< / p >
< ul class = "simple" >
< li > one line per improper< / li >
< li > line syntax: ID type atom1 atom2 atom3 atom4< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = number of improper (1-Nimpropers)
2015-07-31 00:49:30 +08:00
type = improper type (1-Nimpropertype)
atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in improper
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 3 17 29 13 100
< / pre > < / div >
< / div >
< p > The ordering of the 4 atoms determines the definition of the improper
angle used in the formula for each < a class = "reference internal" href = "improper_style.html" > < em > improper style< / em > < / a > . See the doc pages for individual styles
for details.< / p >
< p > The < em > Impropers< / em > section must appear after the < em > Atoms< / em > section. All
values in this section must be integers (1, not 1.0).< / p >
< hr class = "docutils" / >
< p > < em > Lines< / em > section:< / p >
< ul class = "simple" >
< li > one line per line segment< / li >
< li > line syntax: atom-ID x1 y1 x2 y2< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom-ID = ID of atom which is a line segment
2015-07-31 00:49:30 +08:00
x1,y1 = 1st end point
x2,y2 = 2nd end point
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 1.0 0.0 2.0 0.0
< / pre > < / div >
< / div >
< p > The < em > Lines< / em > section must appear if < a class = "reference internal" href = "atom_style.html" > < em > atom_style line< / em > < / a >
is used and any atoms are listed in the < em > Atoms< / em > section with a
2011-10-20 23:01:56 +08:00
lineflag = 1. The number of lines should be specified in the header
2015-07-30 22:53:28 +08:00
section via the “ lines” keyword.< / p >
< p > The 2 end points are the end points of the line segment. The ordering
2011-10-20 23:01:56 +08:00
of the 2 points should be such that using a right-hand rule to cross
the line segment with a unit vector in the +z direction, gives an
2015-07-30 22:53:28 +08:00
“ outward” normal vector perpendicular to the line segment.
2011-10-20 23:01:56 +08:00
I.e. normal = (c2-c1) x (0,0,1). This orientation may be important
2015-07-30 22:53:28 +08:00
for defining some interactions.< / p >
< p > The < em > Lines< / em > section must appear after the < em > Atoms< / em > section.< / p >
< hr class = "docutils" / >
< p > < em > Masses< / em > section:< / p >
< ul class = "simple" >
< li > one line per atom type< / li >
< li > line syntax: ID mass< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = atom type (1-N)
2015-07-31 00:49:30 +08:00
mass = mass value
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 3 1.01
< / pre > < / div >
< / div >
< p > This defines the mass of each atom type. This can also be set via the
< a class = "reference internal" href = "mass.html" > < em > mass< / em > < / a > command in the input script. This section cannot be
2011-04-14 05:39:34 +08:00
used for atom styles that define a mass for individual atoms -
2015-07-30 22:53:28 +08:00
e.g. < a class = "reference internal" href = "atom_style.html" > < em > atom_style sphere< / em > < / a > .< / p >
< hr class = "docutils" / >
< p > < em > MiddleBondTorsion Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per dihedral type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< pre class = "literal-block" >
ID = dihedral type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs (see class 2 section of < a class = "reference internal" href = "dihedral_coeff.html" > < em > dihedral_coeff< / em > < / a > )
2015-07-30 22:53:28 +08:00
< / pre >
< hr class = "docutils" / >
< p > < em > Pair Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per atom type< / li >
< li > line syntax: ID coeffs< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID = atom type (1-N)
2015-07-31 00:49:30 +08:00
coeffs = list of coeffs
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 3 0.022 2.35197 0.022 2.35197
< / pre > < / div >
< / div >
< p > The number and meaning of the coefficients are specific to the defined
pair style. See the < a class = "reference internal" href = "pair_style.html" > < em > pair_style< / em > < / a > and
< a class = "reference internal" href = "pair_coeff.html" > < em > pair_coeff< / em > < / a > commands for details. Since pair
2013-04-24 04:53:50 +08:00
coefficients for types I != J are not specified, these will be
2015-07-30 22:53:28 +08:00
generated automatically by the pair style’ s mixing rule. See the
individual pair_style doc pages and the < a class = "reference internal" href = "pair_modify.html" > < em > pair_modify mix< / em > < / a > command for details. Pair coefficients can also
be set via the < a class = "reference internal" href = "pair_coeff.html" > < em > pair_coeff< / em > < / a > command in the input
script.< / p >
< hr class = "docutils" / >
< p > < em > PairIJ Coeffs< / em > section:< / p >
< ul class = "simple" >
< li > one line per pair of atom types for all I,J with I < = J< / li >
< li > line syntax: ID1 ID2 coeffs< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > ID1 = atom type I = 1-N
2015-07-31 00:49:30 +08:00
ID2 = atom type J = I-N, with I < = J
coeffs = list of coeffs
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > examples:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 3 3 0.022 2.35197 0.022 2.35197
2015-07-31 00:49:30 +08:00
3 5 0.022 2.35197 0.022 2.35197
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< p > This section must have N*(N+1)/2 lines where N = # of atom types. The
2013-04-24 04:53:50 +08:00
number and meaning of the coefficients are specific to the defined
2015-07-30 22:53:28 +08:00
pair style. See the < a class = "reference internal" href = "pair_style.html" > < em > pair_style< / em > < / a > and
< a class = "reference internal" href = "pair_coeff.html" > < em > pair_coeff< / em > < / a > commands for details. Since pair
2013-04-24 04:53:50 +08:00
coefficients for types I != J are all specified, these values will
turn off the default mixing rule defined by the pair style. See the
2015-07-30 22:53:28 +08:00
individual pair_style doc pages and the < a class = "reference internal" href = "pair_modify.html" > < em > pair_modify mix< / em > < / a > command for details. Pair coefficients can also
be set via the < a class = "reference internal" href = "pair_coeff.html" > < em > pair_coeff< / em > < / a > command in the input
script.< / p >
< hr class = "docutils" / >
< p > < em > Triangles< / em > section:< / p >
< ul class = "simple" >
< li > one line per triangle< / li >
< li > line syntax: atom-ID x1 y1 x2 y2< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom-ID = ID of atom which is a line segment
2015-07-31 00:49:30 +08:00
x1,y1,z1 = 1st corner point
x2,y2,z2 = 2nd corner point
x3,y3,z3 = 3rd corner point
2015-07-30 22:53:28 +08:00
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > example:< / li >
< / ul >
< div class = "highlight-python" > < div class = "highlight" > < pre > 12 0.0 0.0 0.0 2.0 0.0 1.0 0.0 2.0 1.0
< / pre > < / div >
< / div >
< p > The < em > Triangles< / em > section must appear if < a class = "reference internal" href = "atom_style.html" > < em > atom_style tri< / em > < / a > is used and any atoms are listed in the < em > Atoms< / em >
2011-10-20 23:01:56 +08:00
section with a triangleflag = 1. The number of lines should be
2015-07-30 22:53:28 +08:00
specified in the header section via the “ triangles” keyword.< / p >
< p > The 3 corner points are the corner points of the triangle. The
2011-10-20 23:01:56 +08:00
ordering of the 3 points should be such that using a right-hand rule
2015-07-30 22:53:28 +08:00
to go from point1 to point2 to point3 gives an “ outward” normal vector
2011-10-20 23:01:56 +08:00
to the face of the triangle. I.e. normal = (c2-c1) x (c3-c1). This
2015-07-30 22:53:28 +08:00
orientation may be important for defining some interactions.< / p >
< p > The < em > Triangles< / em > section must appear after the < em > Atoms< / em > section.< / p >
< hr class = "docutils" / >
< p > < em > Velocities< / em > section:< / p >
< ul class = "simple" >
< li > one line per atom< / li >
< li > line syntax: depends on atom style< / li >
< / ul >
< table border = "1" class = "docutils" >
< colgroup >
< col width = "42%" / >
< col width = "58%" / >
< / colgroup >
< tbody valign = "top" >
< tr class = "row-odd" > < td > all styles except those listed< / td >
< td > atom-ID vx vy vz< / td >
< / tr >
< tr class = "row-even" > < td > electron< / td >
< td > atom-ID vx vy vz ervel< / td >
< / tr >
< tr class = "row-odd" > < td > ellipsoid< / td >
< td > atom-ID vx vy vz lx ly lz< / td >
< / tr >
< tr class = "row-even" > < td > sphere< / td >
< td > atom-ID vx vy vz wx wy wz< / td >
< / tr >
< tr class = "row-odd" > < td > hybrid< / td >
< td > atom-ID vx vy vz sub-style1 sub-style2 ...< / td >
< / tr >
< / tbody >
< / table >
< p > where the keywords have these meanings:< / p >
< p > vx,vy,vz = translational velocity of atom
2011-02-23 06:29:54 +08:00
lx,ly,lz = angular momentum of aspherical atom
2011-04-14 05:39:34 +08:00
wx,wy,wz = angular velocity of spherical atom
2015-07-30 22:53:28 +08:00
ervel = electron radial velocity (0 for fixed-core):ul< / p >
< p > The velocity lines can appear in any order. This section can only be
used after an < em > Atoms< / em > section. This is because the < em > Atoms< / em > section
2007-04-20 07:25:27 +08:00
must have assigned a unique atom ID to each atom so that velocities
2015-07-30 22:53:28 +08:00
can be assigned to them.< / p >
< p > Vx, vy, vz, and ervel are in < a class = "reference internal" href = "units.html" > < em > units< / em > < / a > of velocity. Lx, ly,
2010-08-21 04:47:28 +08:00
lz are in units of angular momentum (distance-velocity-mass). Wx, Wy,
2015-07-30 22:53:28 +08:00
Wz are in units of angular velocity (radians/time).< / p >
< p > For atom_style hybrid, following the 4 initial values (ID,vx,vy,vz),
2012-06-07 23:02:09 +08:00
specific values for each sub-style must be listed. The order of the
sub-styles is the same as they were listed in the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "atom_style.html" > < em > atom_style< / em > < / a > command. The sub-style specific values
2012-06-07 23:02:09 +08:00
are those that are not the 5 standard ones (ID,vx,vy,vz). For
2015-07-30 22:53:28 +08:00
example, for the “ sphere” sub-style, “ wx” , “ wy” , “ wz” values would
2012-06-07 23:02:09 +08:00
appear. These are listed in the same order they appear as listed
2015-07-30 22:53:28 +08:00
above. Thus if< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom_style hybrid electron sphere
< / pre > < / div >
< / div >
< p > were used in the input script, each velocity line would have these
fields:< / p >
< div class = "highlight-python" > < div class = "highlight" > < pre > atom-ID vx vy vz ervel wx wy wz
< / pre > < / div >
< / div >
< p > Translational velocities can also be set by the
< a class = "reference internal" href = "velocity.html" > < em > velocity< / em > < / a > command in the input script.< / p >
< / div >
< hr class = "docutils" / >
< div class = "section" id = "restrictions" >
< h2 > Restrictions< a class = "headerlink" href = "#restrictions" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > To read gzipped data files, you must compile LAMMPS with the
-DLAMMPS_GZIP option - see the < a class = "reference internal" href = "Section_start.html#start-2" > < span > Making LAMMPS< / span > < / a > section of the documentation.< / p >
< / div >
< div class = "section" id = "related-commands" >
< h2 > Related commands< a class = "headerlink" href = "#related-commands" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > < a class = "reference internal" href = "read_dump.html" > < em > read_dump< / em > < / a > , < a class = "reference internal" href = "read_restart.html" > < em > read_restart< / em > < / a > ,
< a class = "reference internal" href = "create_atoms.html" > < em > create_atoms< / em > < / a > , < a class = "reference internal" href = "write_data.html" > < em > write_data< / em > < / a > < / p >
< / div >
< div class = "section" id = "default" >
< h2 > Default< a class = "headerlink" href = "#default" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > The default for all the < em > extra< / em > keywords is 0.< / p >
< / div >
< / div >
< / div >
< / div >
< footer >
< hr / >
< div role = "contentinfo" >
< p >
© Copyright .
< / p >
< / div >
Built with < a href = "http://sphinx-doc.org/" > Sphinx< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
< / script >
< script type = "text/javascript" src = "_static/jquery.js" > < / script >
< script type = "text/javascript" src = "_static/underscore.js" > < / script >
< script type = "text/javascript" src = "_static/doctools.js" > < / script >
< script type = "text/javascript" src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" > < / script >
< script type = "text/javascript" src = "_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js" > < / script >
< script type = "text/javascript" src = "_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js" > < / script >
< script type = "text/javascript" src = "_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js" > < / script >
< script type = "text/javascript" src = "_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
< / body >
< / html >