forked from lijiext/lammps
408 lines
20 KiB
HTML
408 lines
20 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>fix move command — 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 & 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>fix move 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="fix-move-command">
|
|
<span id="index-0"></span><h1>fix move command</h1>
|
|
<div class="section" id="syntax">
|
|
<h2>Syntax</h2>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">ID</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">move</span> <span class="n">style</span> <span class="n">args</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
|
|
</pre></div>
|
|
</div>
|
|
<ul class="simple">
|
|
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> command</li>
|
|
<li>move = style name of this fix command</li>
|
|
<li>style = <em>linear</em> or <em>wiggle</em> or <em>rotate</em> or <em>variable</em></li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
<em>linear</em> args = Vx Vy Vz
|
|
Vx,Vy,Vz = components of velocity vector (velocity units), any component can be specified as NULL
|
|
<em>wiggle</em> args = Ax Ay Az period
|
|
Ax,Ay,Az = components of amplitude vector (distance units), any component can be specified as NULL
|
|
period = period of oscillation (time units)
|
|
<em>rotate</em> args = Px Py Pz Rx Ry Rz period
|
|
Px,Py,Pz = origin point of axis of rotation (distance units)
|
|
Rx,Ry,Rz = axis of rotation vector
|
|
period = period of rotation (time units)
|
|
<em>variable</em> args = v_dx v_dy v_dz v_vx v_vy v_vz
|
|
v_dx,v_dy,v_dz = 3 variable names that calculate x,y,z displacement as function of time, any component can be specified as NULL
|
|
v_vx,v_vy,v_vz = 3 variable names that calculate x,y,z velocity as function of time, any component can be specified as NULL
|
|
</pre>
|
|
<ul class="simple">
|
|
<li>zero or more keyword/value pairs may be appended</li>
|
|
<li>keyword = <em>units</em></li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
<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">fix</span> <span class="mi">1</span> <span class="n">boundary</span> <span class="n">move</span> <span class="n">wiggle</span> <span class="mf">3.0</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">1.0</span> <span class="n">units</span> <span class="n">box</span>
|
|
<span class="n">fix</span> <span class="mi">2</span> <span class="n">boundary</span> <span class="n">move</span> <span class="n">rotate</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">1.0</span> <span class="mf">5.0</span>
|
|
<span class="n">fix</span> <span class="mi">2</span> <span class="n">boundary</span> <span class="n">move</span> <span class="n">variable</span> <span class="n">v_myx</span> <span class="n">v_myy</span> <span class="n">NULL</span> <span class="n">v_VX</span> <span class="n">v_VY</span> <span class="n">NULL</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="description">
|
|
<h2>Description</h2>
|
|
<p>Perform updates of position and velocity for atoms in the group each
|
|
timestep using the specified settings or formulas, without regard to
|
|
forces on the atoms. This can be useful for boundary or other atoms,
|
|
whose movement can influence nearby atoms.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">The atoms affected by this fix should not normally be time
|
|
integrated by other fixes (e.g. <a class="reference internal" href="fix_nve.html"><span class="doc">fix nve</span></a>, <a class="reference internal" href="fix_nh.html"><span class="doc">fix nvt</span></a>), since that will change their positions and
|
|
velocities twice.</p>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">As atoms move due to this fix, they will pass thru periodic
|
|
boundaries and be remapped to the other side of the simulation box,
|
|
just as they would during normal time integration (e.g. via the <a class="reference internal" href="fix_nve.html"><span class="doc">fix nve</span></a> command). It is up to you to decide whether
|
|
periodic boundaries are appropriate with the kind of atom motion you
|
|
are prescribing with this fix.</p>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">As dicsussed below, atoms are moved relative to their initial
|
|
position at the time the fix is specified. These initial coordinates
|
|
are stored by the fix in “unwrapped” form, by using the image flags
|
|
associated with each atom. See the <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> command
|
|
for a discussion of “unwrapped” coordinates. See the Atoms section of
|
|
the <a class="reference internal" href="read_data.html"><span class="doc">read_data</span></a> command for a discussion of image flags
|
|
and how they are set for each atom. You can reset the image flags
|
|
(e.g. to 0) before invoking this fix by using the <a class="reference internal" href="set.html"><span class="doc">set image</span></a>
|
|
command.</p>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<p>The <em>linear</em> style moves atoms at a constant velocity, so that their
|
|
position <em>X</em> = (x,y,z) as a function of time is given in vector
|
|
notation as</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">X</span><span class="p">(</span><span class="n">t</span><span class="p">)</span> <span class="o">=</span> <span class="n">X0</span> <span class="o">+</span> <span class="n">V</span> <span class="o">*</span> <span class="n">delta</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>where <em>X0</em> = (x0,y0,z0) is their position at the time the fix is
|
|
specified, <em>V</em> is the specified velocity vector with components
|
|
(Vx,Vy,Vz), and <em>delta</em> is the time elapsed since the fix was
|
|
specified. This style also sets the velocity of each atom to V =
|
|
(Vx,Vy,Vz). If any of the velocity components is specified as NULL,
|
|
then the position and velocity of that component is time integrated
|
|
the same as the <a class="reference internal" href="fix_nve.html"><span class="doc">fix nve</span></a> command would perform, using
|
|
the corresponding force component on the atom.</p>
|
|
<p>Note that the <em>linear</em> style is identical to using the <em>variable</em>
|
|
style with an <a class="reference internal" href="variable.html"><span class="doc">equal-style variable</span></a> that uses the
|
|
vdisplace() function. E.g.</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span>variable V equal 10.0
|
|
variable x equal vdisplace(0.0,$V)
|
|
fix 1 boundary move variable v_x NULL NULL v_V NULL NULL
|
|
</pre></div>
|
|
</div>
|
|
<p>The <em>wiggle</em> style moves atoms in an oscillatory fashion, so that
|
|
their position <em>X</em> = (x,y,z) as a function of time is given in vector
|
|
notation as</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">X</span><span class="p">(</span><span class="n">t</span><span class="p">)</span> <span class="o">=</span> <span class="n">X0</span> <span class="o">+</span> <span class="n">A</span> <span class="n">sin</span><span class="p">(</span><span class="n">omega</span><span class="o">*</span><span class="n">delta</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>where <em>X0</em> = (x0,y0,z0) is their position at the time the fix is
|
|
specified, <em>A</em> is the specified amplitude vector with components
|
|
(Ax,Ay,Az), <em>omega</em> is 2 PI / <em>period</em>, and <em>delta</em> is the time
|
|
elapsed since the fix was specified. This style also sets the
|
|
velocity of each atom to the time derivative of this expression. If
|
|
any of the amplitude components is specified as NULL, then the
|
|
position and velocity of that component is time integrated the same as
|
|
the <a class="reference internal" href="fix_nve.html"><span class="doc">fix nve</span></a> command would perform, using the
|
|
corresponding force component on the atom.</p>
|
|
<p>Note that the <em>wiggle</em> style is identical to using the <em>variable</em>
|
|
style with <a class="reference internal" href="variable.html"><span class="doc">equal-style variables</span></a> that use the
|
|
swiggle() and cwiggle() functions. E.g.</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span>variable A equal 10.0
|
|
variable T equal 5.0
|
|
variable omega equal 2.0*PI/$T
|
|
variable x equal swiggle(0.0,$A,$T)
|
|
variable v equal v_omega*($A-cwiggle(0.0,$A,$T))
|
|
fix 1 boundary move variable v_x NULL NULL v_v NULL NULL
|
|
</pre></div>
|
|
</div>
|
|
<p>The <em>rotate</em> style rotates atoms around a rotation axis <em>R</em> =
|
|
(Rx,Ry,Rz) that goes thru a point <em>P</em> = (Px,Py,Pz). The <em>period</em> of
|
|
the rotation is also specified. 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 rotation.</p>
|
|
<p>This style also sets the velocity of each atom to (omega cross Rperp)
|
|
where omega is its angular velocity around the rotation axis and Rperp
|
|
is a perpendicular vector from the rotation axis to the atom. If the
|
|
defined <a class="reference internal" href="atom_style.html"><span class="doc">atom_style</span></a> assigns an angular velocity or
|
|
angular moementum or orientation to each atom (<a class="reference internal" href="atom_style.html"><span class="doc">atom styles</span></a> sphere, ellipsoid, line, tri, body), then
|
|
those properties are also updated appropriately to correspond to the
|
|
atom’s motion and rotation over time.</p>
|
|
<p>The <em>variable</em> style allows the position and velocity components of
|
|
each atom to be set by formulas specified via the
|
|
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a> command. Each of the 6 variables is
|
|
specified as an argument to the fix as v_name, where name is the
|
|
variable name that is defined elsewhere in the input script.</p>
|
|
<p>Each variable must be of either the <em>equal</em> or <em>atom</em> style.
|
|
<em>Equal</em>-style variables compute a single numeric quantity, that can be
|
|
a function of the timestep as well as of other simulation values.
|
|
<em>Atom</em>-style variables compute a numeric quantity for each atom, that
|
|
can be a function per-atom quantities, such as the atom’s position, as
|
|
well as of the timestep and other simulation values. Note that this
|
|
fix stores the original coordinates of each atom (see note below) so
|
|
that per-atom quantity can be used in an atom-style variable formula.
|
|
See the <a class="reference internal" href="variable.html"><span class="doc">variable</span></a> command for details.</p>
|
|
<p>The first 3 variables (v_dx,v_dy,v_dz) specified for the <em>variable</em>
|
|
style are used to calculate a displacement from the atom’s original
|
|
position at the time the fix was specified. The second 3 variables
|
|
(v_vx,v_vy,v_vz) specified are used to compute a velocity for each
|
|
atom.</p>
|
|
<p>Any of the 6 variables can be specified as NULL. If both the
|
|
displacement and velocity variables for a particular x,y,z component
|
|
are specified as NULL, then the position and velocity of that
|
|
component is time integrated the same as the <a class="reference internal" href="fix_nve.html"><span class="doc">fix nve</span></a>
|
|
command would perform, using the corresponding force component on the
|
|
atom. If only the velocity variable for a component is specified as
|
|
NULL, then the displacement variable will be used to set the position
|
|
of the atom, and its velocity component will not be changed. If only
|
|
the displacement variable for a component is specified as NULL, then
|
|
the velocity variable will be used to set the velocity of the atom,
|
|
and the position of the atom will be time integrated using that
|
|
velocity.</p>
|
|
<p>The <em>units</em> keyword determines the meaning of the distance units used
|
|
to define the <em>linear</em> velocity and <em>wiggle</em> amplitude and <em>rotate</em>
|
|
origin. This setting is ignored for the <em>variable</em> style. A <em>box</em>
|
|
value selects standard units as defined by the <a class="reference internal" href="units.html"><span class="doc">units</span></a>
|
|
command, e.g. velocity in Angstroms/fmsec and amplitude and position
|
|
in Angstroms for units = real. A <em>lattice</em> value means the velocity
|
|
units are in lattice spacings per time and the amplitude and position
|
|
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. Each of these 3
|
|
quantities may be dependent on the x,y,z dimension, since the lattice
|
|
spacings can be different in x,y,z.</p>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
|
|
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
|
|
<p>This fix writes the original coordinates of moving atoms to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>, as well as the initial timestep, so that
|
|
the motion can be continuous in a restarted simulation. See the
|
|
<a class="reference internal" href="read_restart.html"><span class="doc">read_restart</span></a> command for info on how to re-specify
|
|
a fix in an input script that reads a restart file, so that the
|
|
operation of the fix continues in an uninterrupted fashion.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">Because the move positions are a function of the current
|
|
timestep and the initial timestep, you cannot reset the timestep to a
|
|
different value after reading a restart file, if you expect a fix move
|
|
command to work in an uninterrupted fashion.</p>
|
|
</div>
|
|
<p>None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options are relevant to this
|
|
fix.</p>
|
|
<p>This fix produces a per-atom array which can be accessed by various
|
|
<a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. The number of columns
|
|
for each atom is 3, and the columns store the original unwrapped x,y,z
|
|
coords of each atom. The per-atom values can be accessed on any
|
|
timestep.</p>
|
|
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
|
|
the <a class="reference internal" href="run.html"><span class="doc">run</span></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><span class="doc">energy minimization</span></a>.</p>
|
|
<p>For <a class="reference internal" href="run_style.html"><span class="doc">rRESPA time integration</span></a>, this fix adjusts the
|
|
position and velocity of atoms on the outermost rRESPA level.</p>
|
|
</div>
|
|
<div class="section" id="restrictions">
|
|
<h2>Restrictions</h2>
|
|
<blockquote>
|
|
<div>none</div></blockquote>
|
|
</div>
|
|
<div class="section" id="related-commands">
|
|
<h2>Related commands</h2>
|
|
<p><a class="reference internal" href="fix_nve.html"><span class="doc">fix nve</span></a>, <a class="reference internal" href="displace_atoms.html"><span class="doc">displace_atoms</span></a></p>
|
|
<p><strong>Default:</strong> none</p>
|
|
<p>The option default is units = lattice.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
© 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> |