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 > displace_atoms command — LAMMPS 15 May 2015 version documentation< / title >
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
< link rel = "stylesheet" href = "_static/css/theme.css" type = "text/css" / >
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
< link rel = "stylesheet" href = "_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type = "text/css" / >
2006-09-22 00:22:34 +08:00
2015-07-30 22:53:28 +08:00
< 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 > displace_atoms 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 = "displace-atoms-command" >
< span id = "index-0" > < / span > < h1 > displace_atoms command< a class = "headerlink" href = "#displace-atoms-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 > displace_atoms group-ID style args keyword value ...
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > group-ID = ID of group of atoms to displace< / li >
< li > style = < em > move< / em > or < em > ramp< / em > or < em > random< / em > or < em > rotate< / em > < / li >
< / ul >
< pre class = "literal-block" >
< em > move< / em > args = delx dely delz
2015-07-31 00:49:30 +08:00
delx,dely,delz = distance to displace in each dimension (distance units)
< em > ramp< / em > args = ddim dlo dhi dim clo chi
ddim = < em > x< / em > or < em > y< / em > or < em > z< / em >
dlo,dhi = displacement distance between dlo and dhi (distance units)
dim = < em > x< / em > or < em > y< / em > or < em > z< / em >
clo,chi = lower and upper bound of domain to displace (distance units)
< em > random< / em > args = dx dy dz seed
dx,dy,dz = random displacement magnitude in each dimension (distance units)
seed = random # seed (positive integer)
< em > rotate< / em > args = Px Py Pz Rx Ry Rz theta
Px,Py,Pz = origin point of axis of rotation (distance units)
Rx,Ry,Rz = axis of rotation vector
theta = angle of rotation (degrees)
2015-07-30 22:53:28 +08:00
< / pre >
< ul class = "simple" >
< li > zero or more keyword/value pairs may be appended< / li >
< / ul >
< pre class = "literal-block" >
keyword = < em > units< / em >
2015-07-31 00:49:30 +08:00
value = < em > box< / em > or < em > lattice< / em >
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 > displace_atoms top move 0 -5 0 units box
displace_atoms flow ramp x 0.0 5.0 y 2.0 20.5
< / pre > < / div >
< / div >
< / div >
< div class = "section" id = "description" >
< h2 > Description< a class = "headerlink" href = "#description" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Displace a group of atoms. This can be used to move atoms a large
2007-06-20 20:56:17 +08:00
distance before beginning a simulation or to randomize atoms initially
on a lattice. For example, in a shear simulation, an initial strain
can be imposed on the system. Or two groups of atoms can be brought
2015-07-30 22:53:28 +08:00
into closer proximity.< / p >
< p > The < em > move< / em > style displaces the group of atoms by the specified 3d
distance.< / p >
< p > The < em > ramp< / em > style displaces atoms a variable amount in one dimension
depending on the atom’ s coordinate in a (possibly) different
2006-09-22 00:22:34 +08:00
dimension. For example, the second example command displaces atoms in
the x-direction an amount between 0.0 and 5.0 distance units. Each
2015-07-30 22:53:28 +08:00
atom’ s displacement depends on the fractional distance its y
2006-09-22 00:22:34 +08:00
coordinate is between 2.0 and 20.5. Atoms with y-coordinates outside
2015-07-30 22:53:28 +08:00
those bounds will be moved the minimum (0.0) or maximum (5.0) amount.< / p >
< p > The < em > random< / em > style independently moves each atom in the group by a
2007-06-20 20:56:17 +08:00
random displacement, uniformly sampled from a value between -dx and
+dx in the x dimension, and similarly for y and z. Random numbers are
used in such a way that the displacement of a particular atom is the
2015-07-30 22:53:28 +08:00
same, regardless of how many processors are being used.< / p >
< p > The < em > rotate< / em > style rotates each atom in the group by the angle < em > theta< / em >
around a rotation axis < em > R< / em > = (Rx,Ry,Rz) that goes thru a point < em > P< / em > =
2012-11-27 05:08:13 +08:00
(Px,Py,Pz). The direction of rotation for the atoms around the
rotation axis is consistent with the right-hand rule: if your
2015-07-30 22:53:28 +08:00
right-hand’ s thumb points along < em > R< / em > , then your fingers wrap around the
axis in the direction of positive theta.< / p >
< p > Distance units for displacements and the origin point of the < em > rotate< / em >
style are determined by the setting of < em > box< / em > or < em > lattice< / em > for the
< em > units< / em > keyword. < em > Box< / em > means distance units as defined by the
< a class = "reference internal" href = "units.html" > < em > units< / em > < / a > command - e.g. Angstroms for < em > real< / em > units.
< em > Lattice< / em > means distance units are in lattice spacings. The
< a class = "reference internal" href = "lattice.html" > < em > lattice< / em > < / a > command must have been previously used to
define the lattice spacing.< / p >
< hr class = "docutils" / >
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > Care should be taken not to move atoms on top of other
2012-02-07 00:58:56 +08:00
atoms. After the move, atoms are remapped into the periodic
simulation box if needed, and any shrink-wrap boundary conditions (see
2015-07-30 22:53:28 +08:00
the < a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a > command) are enforced which may change
2012-02-07 00:58:56 +08:00
the box size. Other than this effect, this command does not change
the size or shape of the simulation box. See the
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "change_box.html" > < em > change_box< / em > < / a > command if that effect is desired.< / p >
< / div >
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > Atoms can be moved arbitrarily long distances by this
2012-02-07 00:58:56 +08:00
command. If the simulation box is non-periodic and shrink-wrapped
2015-07-30 22:53:28 +08:00
(see the < a class = "reference internal" href = "boundary.html" > < em > boundary< / em > < / a > command), this can change its size
2012-02-07 00:58:56 +08:00
or shape. This is not a problem, except that the mapping of
processors to the simulation box is not changed by this command from
2015-07-30 22:53:28 +08:00
its initial 3d configuration; see the < a class = "reference internal" href = "processors.html" > < em > processors< / em > < / a >
2012-02-07 00:58:56 +08:00
command. Thus, if the box size/shape changes dramatically, the
mapping of processors to the simulation box may not end up as optimal
2015-07-30 22:53:28 +08:00
as the initial mapping attempted to be.< / p >
< / div >
< / div >
< hr class = "docutils" / >
< div class = "section" id = "restrictions" >
< h2 > Restrictions< a class = "headerlink" href = "#restrictions" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > You cannot rotate around any rotation vector except the z-axis for a
2d simulation.< / 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 = "lattice.html" > < em > lattice< / em > < / a > , < a class = "reference internal" href = "change_box.html" > < em > change_box< / em > < / a > ,
< a class = "reference internal" href = "fix_move.html" > < em > fix_move< / 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 option defaults are units = lattice.< / 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 >