forked from lijiext/lammps
627 lines
37 KiB
HTML
627 lines
37 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>lattice 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"/>
|
|
<link rel="up" title="Commands" href="commands.html"/>
|
|
<link rel="next" title="log command" href="log.html"/>
|
|
<link rel="prev" title="label command" href="label.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">
|
|
|
|
|
|
|
|
<p class="caption"><span class="caption-text">User Documentation</span></p>
|
|
<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>
|
|
<p class="caption"><span class="caption-text">Index</span></p>
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a></li>
|
|
<li class="toctree-l1 current"><a class="reference internal" href="commands.html">Commands</a><ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="angle_coeff.html">angle_coeff command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="angle_style.html">angle_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="atom_modify.html">atom_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="atom_style.html">atom_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="balance.html">balance command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="bond_coeff.html">bond_coeff command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="bond_style.html">bond_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="bond_write.html">bond_write command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="boundary.html">boundary command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="box.html">box command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="change_box.html">change_box command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="clear.html">clear command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="comm_modify.html">comm_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="comm_style.html">comm_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="compute.html">compute command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="compute_modify.html">compute_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="create_atoms.html">create_atoms command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="create_bonds.html">create_bonds command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="create_box.html">create_box command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="delete_atoms.html">delete_atoms command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="delete_bonds.html">delete_bonds command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dielectric.html">dielectric command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dihedral_coeff.html">dihedral_coeff command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dihedral_style.html">dihedral_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dimension.html">dimension command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="displace_atoms.html">displace_atoms command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html">dump command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-custom-vtk-command"><code class="docutils literal"><span class="pre">dump</span> <span class="pre">custom/vtk</span></code> command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-h5md-command"><code class="docutils literal"><span class="pre">dump</span> <span class="pre">h5md</span></code> command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-image-command"><code class="docutils literal"><span class="pre">dump</span> <span class="pre">image</span></code> command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-movie-command"><code class="docutils literal"><span class="pre">dump</span> <span class="pre">movie</span></code> command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-molfile-command"><code class="docutils literal"><span class="pre">dump</span> <span class="pre">molfile</span></code> command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump_custom_vtk.html">dump custom/vtk command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump_h5md.html">dump h5md command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump_image.html">dump image command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump_image.html#dump-movie-command">dump movie command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump_modify.html">dump_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="dump_molfile.html">dump molfile command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="echo.html">echo command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="fix.html">fix command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="fix_modify.html">fix_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="group.html">group command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="group2ndx.html">group2ndx command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="group2ndx.html#ndx2group-command">ndx2group command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="if.html">if command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="improper_coeff.html">improper_coeff command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="improper_style.html">improper_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="include.html">include command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="info.html">info command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="jump.html">jump command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="kspace_modify.html">kspace_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="kspace_style.html">kspace_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="label.html">label command</a></li>
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">lattice command</a><ul>
|
|
<li class="toctree-l3"><a class="reference internal" href="#syntax">Syntax</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#description">Description</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#restrictions">Restrictions</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#related-commands">Related commands</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#default">Default</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="log.html">log command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="mass.html">mass command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="min_modify.html">min_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="min_style.html">min_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="minimize.html">minimize command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="molecule.html">molecule command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="neb.html">neb command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="neigh_modify.html">neigh_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="neighbor.html">neighbor command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="newton.html">newton command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="next.html">next command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="package.html">package command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="pair_coeff.html">pair_coeff command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="pair_modify.html">pair_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="pair_style.html">pair_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="pair_write.html">pair_write command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="partition.html">partition command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="prd.html">prd command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="print.html">print command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="processors.html">processors command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="python.html">python command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="quit.html">quit command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="read_data.html">read_data command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="read_dump.html">read_dump command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="read_restart.html">read_restart command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="region.html">region command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="replicate.html">replicate command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="rerun.html">rerun command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="reset_timestep.html">reset_timestep command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="restart.html">restart command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="run.html">run command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="run_style.html">run_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="set.html">set command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="shell.html">shell command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="special_bonds.html">special_bonds command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="suffix.html">suffix command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="tad.html">tad command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="temper.html">temper command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="thermo.html">thermo command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="thermo_modify.html">thermo_modify command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="thermo_style.html">thermo_style command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="timer.html">timer command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="timestep.html">timestep command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="uncompute.html">uncompute command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="undump.html">undump command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="unfix.html">unfix command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="units.html">units command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="variable.html">variable command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="velocity.html">velocity command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="write_coeff.html">write_coeff command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="write_data.html">write_data command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="write_dump.html">write_dump command</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="write_restart.html">write_restart command</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="fixes.html">Fixes</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="computes.html">Computes</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="pairs.html">Pair Styles</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="bonds.html">Bonds</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="angles.html">Angle Styles</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="dihedrals.html">Dihedral Styles</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="impropers.html">Improper Styles</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><a href="commands.html">Commands</a> »</li>
|
|
|
|
<li>lattice 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 class="rst-footer-buttons" style="margin-bottom: 1em" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="log.html" class="btn btn-neutral float-right" title="log command" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="label.html" class="btn btn-neutral" title="label command" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<div class="section" id="lattice-command">
|
|
<span id="index-0"></span><h1>lattice command</h1>
|
|
<div class="section" id="syntax">
|
|
<h2>Syntax</h2>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lattice</span> <span class="n">style</span> <span class="n">scale</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
|
|
</pre></div>
|
|
</div>
|
|
<ul>
|
|
<li><p class="first">style = <em>none</em> or <em>sc</em> or <em>bcc</em> or <em>fcc</em> or <em>hcp</em> or <em>diamond</em> or <em>sq</em> or <em>sq2</em> or <em>hex</em> or <em>custom</em></p>
|
|
</li>
|
|
<li><p class="first">scale = scale factor between lattice and simulation box</p>
|
|
<pre class="literal-block">
|
|
scale = reduced density rho* (for LJ units)
|
|
scale = lattice constant in distance units (for all other units)
|
|
</pre>
|
|
</li>
|
|
<li><p class="first">zero or more keyword/value pairs may be appended</p>
|
|
</li>
|
|
<li><p class="first">keyword = <em>origin</em> or <em>orient</em> or <em>spacing</em> or <em>a1</em> or <em>a2</em> or <em>a3</em> or <em>basis</em></p>
|
|
<pre class="literal-block">
|
|
<em>origin</em> values = x y z
|
|
x,y,z = fractions of a unit cell (0 <= x,y,z < 1)
|
|
<em>orient</em> values = dim i j k
|
|
dim = <em>x</em> or <em>y</em> or <em>z</em>
|
|
i,j,k = integer lattice directions
|
|
<em>spacing</em> values = dx dy dz
|
|
dx,dy,dz = lattice spacings in the x,y,z box directions
|
|
<em>a1</em>,<em>a2</em>,<em>a3</em> values = x y z
|
|
x,y,z = primitive vector components that define unit cell
|
|
<em>basis</em> values = x y z
|
|
x,y,z = fractional coords of a basis atom (0 <= x,y,z < 1)
|
|
</pre>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="examples">
|
|
<h2>Examples</h2>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lattice</span> <span class="n">fcc</span> <span class="mf">3.52</span>
|
|
<span class="n">lattice</span> <span class="nb">hex</span> <span class="mf">0.85</span>
|
|
<span class="n">lattice</span> <span class="n">sq</span> <span class="mf">0.8</span> <span class="n">origin</span> <span class="mf">0.0</span> <span class="mf">0.5</span> <span class="mf">0.0</span> <span class="n">orient</span> <span class="n">x</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">0</span> <span class="n">orient</span> <span class="n">y</span> <span class="o">-</span><span class="mi">1</span> <span class="mi">1</span> <span class="mi">0</span>
|
|
<span class="n">lattice</span> <span class="n">custom</span> <span class="mf">3.52</span> <span class="n">a1</span> <span class="mf">1.0</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="n">a2</span> <span class="mf">0.5</span> <span class="mf">1.0</span> <span class="mf">0.0</span> <span class="n">a3</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">0.5</span> <span class="o">&</span>
|
|
<span class="n">basis</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="n">basis</span> <span class="mf">0.5</span> <span class="mf">0.5</span> <span class="mf">0.5</span>
|
|
<span class="n">lattice</span> <span class="n">none</span> <span class="mf">2.0</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="description">
|
|
<h2>Description</h2>
|
|
<p>Define a lattice for use by other commands. In LAMMPS, a lattice is
|
|
simply a set of points in space, determined by a unit cell with basis
|
|
atoms, that is replicated infinitely in all dimensions. The arguments
|
|
of the lattice command can be used to define a wide variety of
|
|
crystallographic lattices.</p>
|
|
<p>A lattice is used by LAMMPS in two ways. First, the
|
|
<a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a> command creates atoms on the lattice
|
|
points inside the simulation box. Note that the
|
|
<a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a> command allows different atom types
|
|
to be assigned to different basis atoms of the lattice. Second, the
|
|
lattice spacing in the x,y,z dimensions implied by the lattice, can be
|
|
used by other commands as distance units
|
|
(e.g. <a class="reference internal" href="create_box.html"><span class="doc">create_box</span></a>, <a class="reference internal" href="region.html"><span class="doc">region</span></a> and
|
|
<a class="reference internal" href="velocity.html"><span class="doc">velocity</span></a>), which are often convenient to use when the
|
|
underlying problem geometry is atoms on a lattice.</p>
|
|
<p>The lattice style must be consistent with the dimension of the
|
|
simulation - see the <a class="reference internal" href="dimension.html"><span class="doc">dimension</span></a> command. Styles <em>sc</em>
|
|
or <em>bcc</em> or <em>fcc</em> or <em>hcp</em> or <em>diamond</em> are for 3d problems. Styles
|
|
<em>sq</em> or <em>sq2</em> or <em>hex</em> are for 2d problems. Style <em>custom</em> can be
|
|
used for either 2d or 3d problems.</p>
|
|
<p>A lattice consists of a unit cell, a set of basis atoms within that
|
|
cell, and a set of transformation parameters (scale, origin, orient)
|
|
that map the unit cell into the simulation box. The vectors a1,a2,a3
|
|
are the edge vectors of the unit cell. This is the nomenclature for
|
|
“primitive” vectors in solid-state crystallography, but in LAMMPS the
|
|
unit cell they determine does not have to be a “primitive cell” of
|
|
minimum volume.</p>
|
|
<p>Note that the lattice command can be used multiple times in an input
|
|
script. Each time it is invoked, the lattice attributes are
|
|
re-defined and are used for all subsequent commands (that use lattice
|
|
attributes). For example, a sequence of lattice,
|
|
<a class="reference internal" href="region.html"><span class="doc">region</span></a>, and <a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a> commands
|
|
can be repeated multiple times to build a poly-crystalline model with
|
|
different geometric regions populated with atoms in different lattice
|
|
orientations.</p>
|
|
<hr class="docutils" />
|
|
<p>A lattice of style <em>none</em> does not define a unit cell and basis set,
|
|
so it cannot be used with the <a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a>
|
|
command. However it does define a lattice spacing via the specified
|
|
scale parameter. As explained above the lattice spacings in x,y,z can
|
|
be used by other commands as distance units. No additional
|
|
keyword/value pairs can be specified for the <em>none</em> style. By
|
|
default, a “lattice none 1.0” is defined, which means the lattice
|
|
spacing is the same as one distance unit, as defined by the
|
|
<a class="reference internal" href="units.html"><span class="doc">units</span></a> command.</p>
|
|
<p>Lattices of style <em>sc</em>, <em>fcc</em>, <em>bcc</em>, and <em>diamond</em> are 3d lattices
|
|
that define a cubic unit cell with edge length = 1.0. This means a1 =
|
|
1 0 0, a2 = 0 1 0, and a3 = 0 0 1. Style <em>hcp</em> has a1 = 1 0 0, a2 = 0
|
|
sqrt(3) 0, and a3 = 0 0 sqrt(8/3). The placement of the basis atoms
|
|
within the unit cell are described in any solid-state physics text. A
|
|
<em>sc</em> lattice has 1 basis atom at the lower-left-bottom corner of the
|
|
cube. A <em>bcc</em> lattice has 2 basis atoms, one at the corner and one at
|
|
the center of the cube. A <em>fcc</em> lattice has 4 basis atoms, one at the
|
|
corner and 3 at the cube face centers. A <em>hcp</em> lattice has 4 basis
|
|
atoms, two in the z = 0 plane and 2 in the z = 0.5 plane. A <em>diamond</em>
|
|
lattice has 8 basis atoms.</p>
|
|
<p>Lattices of style <em>sq</em> and <em>sq2</em> are 2d lattices that define a square
|
|
unit cell with edge length = 1.0. This means a1 = 1 0 0 and a2 = 0 1
|
|
0. A <em>sq</em> lattice has 1 basis atom at the lower-left corner of the
|
|
square. A <em>sq2</em> lattice has 2 basis atoms, one at the corner and one
|
|
at the center of the square. A <em>hex</em> style is also a 2d lattice, but
|
|
the unit cell is rectangular, with a1 = 1 0 0 and a2 = 0 sqrt(3) 0.
|
|
It has 2 basis atoms, one at the corner and one at the center of the
|
|
rectangle.</p>
|
|
<p>A lattice of style <em>custom</em> allows you to specify a1, a2, a3, and a
|
|
list of basis atoms to put in the unit cell. By default, a1 and a2
|
|
and a3 are 3 orthogonal unit vectors (edges of a unit cube). But you
|
|
can specify them to be of any length and non-orthogonal to each other,
|
|
so that they describe a tilted parallelepiped. Via the <em>basis</em>
|
|
keyword you add atoms, one at a time, to the unit cell. Its arguments
|
|
are fractional coordinates (0.0 <= x,y,z < 1.0). The position vector
|
|
x of a basis atom within the unit cell is thus a linear combination of
|
|
the the unit cell’s 3 edge vectors, i.e. x = bx a1 + by a2 + bz a3,
|
|
where bx,by,bz are the 3 values specified for the <em>basis</em> keyword.</p>
|
|
<hr class="docutils" />
|
|
<p>This sub-section discusses the arguments that determine how the
|
|
idealized unit cell is transformed into a lattice of points within the
|
|
simulation box.</p>
|
|
<p>The <em>scale</em> argument determines how the size of the unit cell will be
|
|
scaled when mapping it into the simulation box. I.e. it determines a
|
|
multiplicative factor to apply to the unit cell, to convert it to a
|
|
lattice of the desired size and distance units in the simulation box.
|
|
The meaning of the <em>scale</em> argument depends on the <a class="reference internal" href="units.html"><span class="doc">units</span></a>
|
|
being used in your simulation.</p>
|
|
<p>For all unit styles except <em>lj</em>, the scale argument is specified in
|
|
the distance units defined by the unit style. For example, in <em>real</em>
|
|
or <em>metal</em> units, if the unit cell is a unit cube with edge length
|
|
1.0, specifying scale = 3.52 would create a cubic lattice with a
|
|
spacing of 3.52 Angstroms. In <em>cgs</em> units, the spacing would be 3.52
|
|
cm.</p>
|
|
<p>For unit style <em>lj</em>, the scale argument is the Lennard-Jones reduced
|
|
density, typically written as rho*. LAMMPS converts this value into
|
|
the multiplicative factor via the formula “factor^dim = rho/rho*”,
|
|
where rho = N/V with V = the volume of the lattice unit cell and N =
|
|
the number of basis atoms in the unit cell (described below), and dim
|
|
= 2 or 3 for the dimensionality of the simulation. Effectively, this
|
|
means that if LJ particles of size sigma = 1.0 are used in the
|
|
simulation, the lattice of particles will be at the desired reduced
|
|
density.</p>
|
|
<p>The <em>origin</em> option specifies how the unit cell will be shifted or
|
|
translated when mapping it into the simulation box. The x,y,z values
|
|
are fractional values (0.0 <= x,y,z < 1.0) meaning shift the lattice
|
|
by a fraction of the lattice spacing in each dimension. The meaning
|
|
of “lattice spacing” is discussed below.</p>
|
|
<p>The <em>orient</em> option specifies how the unit cell will be rotated when
|
|
mapping it into the simulation box. The <em>dim</em> argument is one of the
|
|
3 coordinate axes in the simulation box. The other 3 arguments are
|
|
the crystallographic direction in the lattice that you want to orient
|
|
along that axis, specified as integers. E.g. “orient x 2 1 0” means
|
|
the x-axis in the simulation box will be the [210] lattice
|
|
direction, and similarly for y and z. The 3 lattice directions you
|
|
specify do not have to be unit vectors, but they must be mutually
|
|
orthogonal and obey the right-hand rule, i.e. (X cross Y) points in
|
|
the Z direction.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">The preceding paragraph describing lattice directions is only
|
|
valid for orthogonal cubic unit cells (or square in 2d). If you are
|
|
using a <em>hcp</em> or <em>hex</em> lattice or the more general lattice style
|
|
<em>custom</em> with non-orthogonal a1,a2,a3 vectors, then you should think
|
|
of the 3 <em>orient</em> vectors as creating a 3x3 rotation matrix which is
|
|
applied to a1,a2,a3 to rotate the original unit cell to a new
|
|
orientation in the simulation box.</p>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<p>Several LAMMPS commands have the option to use distance units that are
|
|
inferred from “lattice spacings” in the x,y,z box directions.
|
|
E.g. the <a class="reference internal" href="region.html"><span class="doc">region</span></a> command can create a block of size
|
|
10x20x20, where 10 means 10 lattice spacings in the x direction.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">Though they are called lattice spacings, all the commands that
|
|
have a “units lattice” option, simply use the 3 values as scale
|
|
factors on the distance units defined by the <a class="reference internal" href="units.html"><span class="doc">units</span></a>
|
|
command. Thus if you do not like the lattice spacings computed by
|
|
LAMMPS (e.g. for a non-orthogonal or rotated unit cell), you can
|
|
define the 3 values to be whatever you wish, via the <em>spacing</em> option.</p>
|
|
</div>
|
|
<p>If the <em>spacing</em> option is not specified, the lattice spacings are
|
|
computed by LAMMPS in the following way. A unit cell of the lattice
|
|
is mapped into the simulation box (scaled and rotated), so that it now
|
|
has (perhaps) a modified size and orientation. The lattice spacing in
|
|
X is defined as the difference between the min/max extent of the x
|
|
coordinates of the 8 corner points of the modified unit cell (4 in
|
|
2d). Similarly, the Y and Z lattice spacings are defined as the
|
|
difference in the min/max of the y and z coordinates.</p>
|
|
<p>Note that if the unit cell is orthogonal with axis-aligned edges (no
|
|
rotation via the <em>orient</em> keyword), then the lattice spacings in each
|
|
dimension are simply the scale factor (described above) multiplied by
|
|
the length of a1,a2,a3. Thus a <em>hex</em> style lattice with a scale
|
|
factor of 3.0 Angstroms, would have a lattice spacing of 3.0 in x and
|
|
3*sqrt(3.0) in y.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">For non-orthogonal unit cells and/or when a rotation is applied
|
|
via the <em>orient</em> keyword, then the lattice spacings computed by LAMMPS
|
|
are typically less intuitive. In particular, in these cases, there is
|
|
no guarantee that a particular lattice spacing is an integer multiple
|
|
of the periodicity of the lattice in that direction. Thus, if you
|
|
create an orthogonal periodic simulation box whose size in a dimension
|
|
is a multiple of the lattice spacing, and then fill it with atoms via
|
|
the <a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a> command, you will NOT necessarily
|
|
create a periodic system. I.e. atoms may overlap incorrectly at the
|
|
faces of the simulation box.</p>
|
|
</div>
|
|
<p>The <em>spacing</em> option sets the 3 lattice spacings directly. All must
|
|
be non-zero (use 1.0 for dz in a 2d simulation). The specified values
|
|
are multiplied by the multiplicative factor described above that is
|
|
associated with the scale factor. Thus a spacing of 1.0 means one
|
|
unit cell edge length independent of the scale factor. As mentioned
|
|
above, this option can be useful if the spacings LAMMPS computes are
|
|
inconvenient to use in subsequent commands, which can be the case for
|
|
non-orthogonal or rotated lattices.</p>
|
|
<p>Note that whenever the lattice command is used, the values of the
|
|
lattice spacings LAMMPS calculates are printed out. Thus their effect
|
|
in commands that use the spacings should be decipherable.</p>
|
|
<hr class="docutils" />
|
|
<p>Example commands for generating a Wurtzite crystal (courtesy
|
|
of Aidan Thompson), with its 8 atom unit cell.</p>
|
|
<pre class="literal-block">
|
|
variable a equal 4.340330
|
|
variable b equal $a*sqrt(3.0)
|
|
variable c equal $a*sqrt(8.0/3.0)
|
|
</pre>
|
|
<pre class="literal-block">
|
|
variable 1_3 equal 1.0/3.0
|
|
variable 2_3 equal 2.0/3.0
|
|
variable 1_6 equal 1.0/6.0
|
|
variable 5_6 equal 5.0/6.0
|
|
variable 1_12 equal 1.0/12.0
|
|
variable 5_12 equal 5.0/12.0
|
|
</pre>
|
|
<pre class="literal-block">
|
|
lattice custom 1.0 &
|
|
a1 $a 0.0 0.0 &
|
|
a2 0.0 $b 0.0 &
|
|
a3 0.0 0.0 $c &
|
|
basis 0.0 0.0 0.0 &
|
|
basis 0.5 0.5 0.0 &
|
|
basis ${1_3} 0.0 0.5 &
|
|
basis ${5_6} 0.5 0.5 &
|
|
basis 0.0 0.0 0.625 &
|
|
basis 0.5 0.5 0.625 &
|
|
basis ${1_3} 0.0 0.125 &
|
|
basis ${5_6} 0.5 0.125
|
|
</pre>
|
|
<pre class="literal-block">
|
|
region myreg block 0 1 0 1 0 1
|
|
create_box 2 myreg
|
|
create_atoms 1 box &
|
|
basis 5 2 &
|
|
basis 6 2 &
|
|
basis 7 2 &
|
|
basis 8 2
|
|
</pre>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="restrictions">
|
|
<h2>Restrictions</h2>
|
|
<p>The <em>a1,a2,a3,basis</em> keywords can only be used with style <em>custom</em>.</p>
|
|
</div>
|
|
<div class="section" id="related-commands">
|
|
<h2>Related commands</h2>
|
|
<p><a class="reference internal" href="dimension.html"><span class="doc">dimension</span></a>, <a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a>,
|
|
<a class="reference internal" href="region.html"><span class="doc">region</span></a></p>
|
|
</div>
|
|
<div class="section" id="default">
|
|
<h2>Default</h2>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lattice</span> <span class="n">none</span> <span class="mf">1.0</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>For other lattice styles, the option defaults are origin = 0.0 0.0
|
|
0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1 0 0,
|
|
a2 = 0 1 0, and a3 = 0 0 1.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="log.html" class="btn btn-neutral float-right" title="log command" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="label.html" class="btn btn-neutral" title="label command" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
|
|
<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> |