Page MenuHomec4science

fix_move.html
No OneTemporary

File Metadata

Created
Sat, Jul 6, 14:15

fix_move.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 &mdash; LAMMPS 15 Dec 2015 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 Dec 2015 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>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<a class="headerlink" href="#fix-move-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>fix ID group-ID move style args keyword values ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><em>fix</em></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<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix 1 boundary move wiggle 3.0 0.0 0.0 1.0 units box
fix 2 boundary move rotate 0.0 0.0 0.0 0.0 0.0 1.0 5.0
fix 2 boundary move variable v_myx v_myy NULL v_VX v_VY NULL
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></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"><em>fix nve</em></a>, <a class="reference internal" href="fix_nh.html"><em>fix nvt</em></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"><em>fix nve</em></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 &#8220;unwrapped&#8221; form, by using the image flags
associated with each atom. See the <a class="reference internal" href="dump.html"><em>dump custom</em></a> command
for a discussion of &#8220;unwrapped&#8221; coordinates. See the Atoms section of
the <a class="reference internal" href="read_data.html"><em>read_data</em></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"><em>set image</em></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-python"><div class="highlight"><pre><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"><em>fix nve</em></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"><em>equal-style variable</em></a> that uses the
vdisplace() function. E.g.</p>
<div class="highlight-python"><div class="highlight"><pre>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-python"><div class="highlight"><pre>X(t) = X0 + A sin(omega*delta)
</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"><em>fix nve</em></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"><em>equal-style variables</em></a> that use the
swiggle() and cwiggle() functions. E.g.</p>
<div class="highlight-python"><div class="highlight"><pre>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. 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"><em>atom_style</em></a> assigns an angular velocity to each atom,
then each atom&#8217;s angular velocity is also set to omega. Note that the
direction of rotation for the atoms around the rotation axis is
consistent with the right-hand rule: if your right-hand&#8217;s thumb points
along <em>R</em>, then your fingers wrap around the axis in the direction of
rotation.</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"><em>variable</em></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&#8217;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"><em>variable</em></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&#8217;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"><em>fix nve</em></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"><em>units</em></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"><em>lattice</em></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<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>This fix writes the original coordinates of moving atoms to <a class="reference internal" href="restart.html"><em>binary restart files</em></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"><em>read_restart</em></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>
<p>IMPORTANNT NOTE: 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>
<p>None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></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>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"><em>run</em></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
<p>For <a class="reference internal" href="run_style.html"><em>rRESPA time integration</em></a>, this fix adjusts the
position and velocity of atoms on the outermost rRESPA level.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</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="fix_nve.html"><em>fix nve</em></a>, <a class="reference internal" href="displace_atoms.html"><em>displace_atoms</em></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>
&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:'15 Dec 2015',
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>

Event Timeline