lammps/doc/html/displace_atoms.html

327 lines
14 KiB
HTML

<!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 &mdash; LAMMPS 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 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 &amp; 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 &amp; 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>
&nbsp;
</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> &raquo;</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</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">displace_atoms</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">style</span> <span class="n">args</span> <span class="n">keyword</span> <span class="n">value</span> <span class="o">...</span>
</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
delx,dely,delz = distance to displace in each dimension (distance units)
any of delx,dely,delz can be a variable (see below)
<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)
</pre>
<ul class="simple">
<li>zero or more keyword/value pairs may be appended</li>
</ul>
<pre class="literal-block">
keyword = <em>units</em>
value = <em>box</em> or <em>lattice</em>
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">displace_atoms</span> <span class="n">top</span> <span class="n">move</span> <span class="mi">0</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">0</span> <span class="n">units</span> <span class="n">box</span>
<span class="n">displace_atoms</span> <span class="n">flow</span> <span class="n">ramp</span> <span class="n">x</span> <span class="mf">0.0</span> <span class="mf">5.0</span> <span class="n">y</span> <span class="mf">2.0</span> <span class="mf">20.5</span>
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Displace a group of atoms. This can be used to move atoms a large
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
into closer proximity.</p>
<p>The <em>move</em> style displaces the group of atoms by the specified 3d
displacement vector. Any of the 3 quantities defining the vector
components can be specified as an equal-style or atom-style
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a>. If the value is a variable, it should be
specified as v_name, where name is the variable name. In this case,
the variable will be evaluated, and its value(s) used for the
displacement(s). The scale factor implied by the <em>units</em> keyword will
also be applied to the variable result.</p>
<p>Equal-style variables can specify formulas with various mathematical
functions, and include <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command
keywords for the simulation box parameters and timestep and elapsed
time. Atom-style variables can specify the same formulas as
equal-style variables but can also include per-atom values, such as
atom coordinates or per-atom values read from a file. Note that if
the variable references other <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> or <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>
commands, those values must be up-to-date for the current timestep.
See the &#8220;Variable Accuracy&#8221; section of the <a class="reference internal" href="variable.html"><span class="doc">variable</span></a>
doc page for more details.</p>
<p>The <em>ramp</em> style displaces atoms a variable amount in one dimension
depending on the atom&#8217;s coordinate in a (possibly) different
dimension. For example, the second example command displaces atoms in
the x-direction an amount between 0.0 and 5.0 distance units. Each
atom&#8217;s displacement depends on the fractional distance its y
coordinate is between 2.0 and 20.5. Atoms with y-coordinates outside
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
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
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> =
(Px,Py,Pz). The direction of rotation for the atoms around the
rotation axis is consistent with the right-hand rule: if your
right-hand thumb points along <em>R</em>, then your fingers wrap around the
axis in the direction of positive theta.</p>
<p>If the defined <a class="reference internal" href="atom_style.html"><span class="doc">atom_style</span></a> assigns an orientation to
each atom (<a class="reference internal" href="atom_style.html"><span class="doc">atom styles</span></a> ellipsoid, line, tri, body),
then that property is also updated appropriately to correspond to the
atom&#8217;s rotation.</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"><span class="doc">units</span></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"><span class="doc">lattice</span></a> command must have been previously used to
define the lattice spacing.</p>
<hr class="docutils" />
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Care should be taken not to move atoms on top of other atoms.
After the move, atoms are remapped into the periodic simulation box if
needed, and any shrink-wrap boundary conditions (see the
<a class="reference internal" href="boundary.html"><span class="doc">boundary</span></a> command) are enforced which may change the
box size. Other than this effect, this command does not change the
size or shape of the simulation box. See the
<a class="reference internal" href="change_box.html"><span class="doc">change_box</span></a> command if that effect is desired.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Atoms can be moved arbitrarily long distances by this command.
If the simulation box is non-periodic and shrink-wrapped (see the
<a class="reference internal" href="boundary.html"><span class="doc">boundary</span></a> command), this can change its size or shape.
This is not a problem, except that the mapping of processors to the
simulation box is not changed by this command from its initial 3d
configuration; see the <a class="reference internal" href="processors.html"><span class="doc">processors</span></a> command. Thus, if
the box size/shape changes dramatically, the mapping of processors to
the simulation box may not end up as optimal as the initial mapping
attempted to be.</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<p>For a 2d simulation, only rotations around the a vector parallel to
the z-axis are allowed.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands</h2>
<p><a class="reference internal" href="lattice.html"><span class="doc">lattice</span></a>, <a class="reference internal" href="change_box.html"><span class="doc">change_box</span></a>,
<a class="reference internal" href="fix_move.html"><span class="doc">fix move</span></a></p>
</div>
<div class="section" id="default">
<h2>Default</h2>
<p>The option defaults are units = lattice.</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2013 Sandia Corporation.
</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:'',
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>