<spanid="index-0"></span><h1>boundary command<aclass="headerlink"href="#boundary-command"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="syntax">
<h2>Syntax<aclass="headerlink"href="#syntax"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>boundary x y z
</pre></div>
</div>
<ulclass="simple">
<li>x,y,z = <em>p</em> or <em>s</em> or <em>f</em> or <em>m</em>, one or two letters</li>
</ul>
<preclass="literal-block">
<em>p</em> is periodic
<em>f</em> is non-periodic and fixed
<em>s</em> is non-periodic and shrink-wrapped
<em>m</em> is non-periodic and shrink-wrapped with a minimum value
</pre>
</div>
<divclass="section"id="examples">
<h2>Examples<aclass="headerlink"href="#examples"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>boundary p p f
boundary p fs p
boundary s f fm
</pre></div>
</div>
</div>
<divclass="section"id="description">
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>Set the style of boundaries for the global simulation box in each
dimension. A single letter assigns the same style to both the lower
and upper face of the box. Two letters assigns the first style to the
lower face and the second style to the upper face. The initial size
of the simulation box is set by the <aclass="reference internal"href="read_data.html"><em>read_data</em></a>,
<aclass="reference internal"href="read_restart.html"><em>read_restart</em></a>, or <aclass="reference internal"href="create_box.html"><em>create_box</em></a>
commands.</p>
<p>The style <em>p</em> means the box is periodic, so that particles interact
across the boundary, and they can exit one end of the box and re-enter
the other end. A periodic dimension can change in size due to
constant pressure boundary conditions or box deformation (see the <aclass="reference internal"href="fix_nh.html"><em>fix npt</em></a> and <aclass="reference internal"href="fix_deform.html"><em>fix deform</em></a> commands). The <em>p</em>
style must be applied to both faces of a dimension.</p>
<p>The styles <em>f</em>, <em>s</em>, and <em>m</em> mean the box is non-periodic, so that
particles do not interact across the boundary and do not move from one
side of the box to the other.</p>
<p>For style <em>f</em>, the position of the face is fixed. If an atom moves
outside the face it will be deleted on the next timestep that
reneighboring occurs. This will typically generate an error unless
you have set the <aclass="reference internal"href="thermo_modify.html"><em>thermo_modify lost</em></a> option to
allow for lost atoms.</p>
<p>For style <em>s</em>, the position of the face is set so as to encompass the
atoms in that dimension (shrink-wrapping), no matter how far they
move.</p>
<p>For style <em>m</em>, shrink-wrapping occurs, but is bounded by the value
specified in the data or restart file or set by the
<aclass="reference internal"href="create_box.html"><em>create_box</em></a> command. For example, if the upper z
face has a value of 50.0 in the data file, the face will always be
positioned at 50.0 or above, even if the maximum z-extent of all the
atoms becomes less than 50.0. This can be useful if you start a
simulation with an empty box or if you wish to leave room on one side
of the box, e.g. for atoms to evaporate from a surface.</p>
<p>For triclinic (non-orthogonal) simulation boxes, if the 2nd dimension
of a tilt factor (e.g. y for xy) is periodic, then the periodicity is
enforced with the tilt factor offset. If the 1st dimension is
shrink-wrapped, then the shrink wrapping is applied to the tilted box
face, to encompass the atoms. E.g. for a positive xy tilt, the xlo
and xhi faces of the box are planes tilting in the +y direction as y
increases. These tilted planes are shrink-wrapped around the atoms to
determine the x extent of the box.</p>
<p>See <aclass="reference internal"href="Section_howto.html#howto-12"><span>Section_howto 12</span></a> of the doc pages
for a geometric description of triclinic boxes, as defined by LAMMPS,
and how to transform these parameters to and from other commonly used
triclinic representations.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This command cannot be used after the simulation box is defined by a
<aclass="reference internal"href="read_data.html"><em>read_data</em></a> or <aclass="reference internal"href="create_box.html"><em>create_box</em></a> command or
<aclass="reference internal"href="read_restart.html"><em>read_restart</em></a> command. See the
<aclass="reference internal"href="change_box.html"><em>change_box</em></a> command for how to change the simulation
box boundaries after it has been defined.</p>
<p>For 2d simulations, the z dimension must be periodic.</p>
</div>
<divclass="section"id="related-commands">
<h2>Related commands<aclass="headerlink"href="#related-commands"title="Permalink to this headline">¶</a></h2>
<p>See the <aclass="reference internal"href="thermo_modify.html"><em>thermo_modify</em></a> command for a discussion
of lost atoms.</p>
</div>
<divclass="section"id="default">
<h2>Default<aclass="headerlink"href="#default"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>boundary p p p
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.