lammps/doc/html/Section_example.html

461 lines
17 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>7. Example problems &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"/>
<link rel="next" title="8. Performance &amp; scalability" href="Section_perf.html"/>
<link rel="prev" title="6. How-to discussions" href="Section_howto.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 class="current">
<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 current"><a class="current reference internal" href="#">7. Example problems</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#lowercase-directories">7.1. Lowercase directories</a></li>
<li class="toctree-l2"><a class="reference internal" href="#uppercase-directories">7.2. Uppercase directories</a></li>
</ul>
</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>
<p class="caption"><span class="caption-text">Index</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="commands.html">Commands</a></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>
&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>7. Example problems</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="Section_perf.html" class="btn btn-neutral float-right" title="8. Performance &amp; scalability" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_howto.html" class="btn btn-neutral" title="6. How-to discussions" 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="example-problems">
<h1>7. Example problems</h1>
<p>The LAMMPS distribution includes an examples sub-directory with many
sample problems. Many are 2d models that run quickly are are
straightforward to visualize, requiring at most a couple of minutes to
run on a desktop machine. Each problem has an input script (in.*) and
produces a log file (log.*) when it runs. Some use a data file
(data.*) of initial coordinates as additional input. A few sample log
file run on different machines and different numbers of processors are
included in the directories to compare your answers to. E.g. a log
file like log.date.crack.foo.P means the &#8220;crack&#8221; example was run on P
processors of machine &#8220;foo&#8221; on that date (i.e. with that version of
LAMMPS).</p>
<p>Many of the input files have commented-out lines for creating dump
files and image files.</p>
<p>If you uncomment the <a class="reference internal" href="dump.html"><span class="doc">dump</span></a> command in the input script, a
text dump file will be produced, which can be animated by various
<a class="reference external" href="http://lammps.sandia.gov/viz.html">visualization programs</a>. It can
also be animated using the xmovie tool described in the <a class="reference internal" href="Section_tools.html"><span class="doc">Additional Tools</span></a> section of the LAMMPS documentation.</p>
<p>If you uncomment the <a class="reference internal" href="dump.html"><span class="doc">dump image</span></a> command in the input
script, and assuming you have built LAMMPS with a JPG library, JPG
snapshot images will be produced when the simulation runs. They can
be quickly post-processed into a movie using commands described on the
<a class="reference internal" href="dump_image.html"><span class="doc">dump image</span></a> doc page.</p>
<p>Animations of many of the examples can be viewed on the Movies section
of the <a class="reference external" href="http://lammps.sandia.gov">LAMMPS web site</a>.</p>
<p>There are two kinds of sub-directories in the examples dir. Lowercase
dirs contain one or a few simple, quick-to-run problems. Uppercase
dirs contain up to several complex scripts that illustrate a
particular kind of simulation method or model. Some of these run for
longer times, e.g. to measure a particular quantity.</p>
<p>Lists of both kinds of directories are given below.</p>
<hr class="docutils" />
<div class="section" id="lowercase-directories">
<h2>7.1. Lowercase directories</h2>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="84%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>accelerate</td>
<td>run with various acceleration options (OpenMP, GPU, Phi)</td>
</tr>
<tr class="row-even"><td>balance</td>
<td>dynamic load balancing, 2d system</td>
</tr>
<tr class="row-odd"><td>body</td>
<td>body particles, 2d system</td>
</tr>
<tr class="row-even"><td>colloid</td>
<td>big colloid particles in a small particle solvent, 2d system</td>
</tr>
<tr class="row-odd"><td>comb</td>
<td>models using the COMB potential</td>
</tr>
<tr class="row-even"><td>coreshell</td>
<td>core/shell model using CORESHELL package</td>
</tr>
<tr class="row-odd"><td>crack</td>
<td>crack propagation in a 2d solid</td>
</tr>
<tr class="row-even"><td>deposit</td>
<td>deposit atoms and molecules on a surface</td>
</tr>
<tr class="row-odd"><td>dipole</td>
<td>point dipolar particles, 2d system</td>
</tr>
<tr class="row-even"><td>dreiding</td>
<td>methanol via Dreiding FF</td>
</tr>
<tr class="row-odd"><td>eim</td>
<td>NaCl using the EIM potential</td>
</tr>
<tr class="row-even"><td>ellipse</td>
<td>ellipsoidal particles in spherical solvent, 2d system</td>
</tr>
<tr class="row-odd"><td>flow</td>
<td>Couette and Poiseuille flow in a 2d channel</td>
</tr>
<tr class="row-even"><td>friction</td>
<td>frictional contact of spherical asperities between 2d surfaces</td>
</tr>
<tr class="row-odd"><td>hugoniostat</td>
<td>Hugoniostat shock dynamics</td>
</tr>
<tr class="row-even"><td>indent</td>
<td>spherical indenter into a 2d solid</td>
</tr>
<tr class="row-odd"><td>kim</td>
<td>use of potentials in Knowledge Base for Interatomic Models (KIM)</td>
</tr>
<tr class="row-even"><td>meam</td>
<td>MEAM test for SiC and shear (same as shear examples)</td>
</tr>
<tr class="row-odd"><td>melt</td>
<td>rapid melt of 3d LJ system</td>
</tr>
<tr class="row-even"><td>micelle</td>
<td>self-assembly of small lipid-like molecules into 2d bilayers</td>
</tr>
<tr class="row-odd"><td>min</td>
<td>energy minimization of 2d LJ melt</td>
</tr>
<tr class="row-even"><td>msst</td>
<td>MSST shock dynamics</td>
</tr>
<tr class="row-odd"><td>nb3b</td>
<td>use of nonbonded 3-body harmonic pair style</td>
</tr>
<tr class="row-even"><td>neb</td>
<td>nudged elastic band (NEB) calculation for barrier finding</td>
</tr>
<tr class="row-odd"><td>nemd</td>
<td>non-equilibrium MD of 2d sheared system</td>
</tr>
<tr class="row-even"><td>obstacle</td>
<td>flow around two voids in a 2d channel</td>
</tr>
<tr class="row-odd"><td>peptide</td>
<td>dynamics of a small solvated peptide chain (5-mer)</td>
</tr>
<tr class="row-even"><td>peri</td>
<td>Peridynamic model of cylinder impacted by indenter</td>
</tr>
<tr class="row-odd"><td>pour</td>
<td>pouring of granular particles into a 3d box, then chute flow</td>
</tr>
<tr class="row-even"><td>prd</td>
<td>parallel replica dynamics of vacancy diffusion in bulk Si</td>
</tr>
<tr class="row-odd"><td>python</td>
<td>using embedded Python in a LAMMPS input script</td>
</tr>
<tr class="row-even"><td>qeq</td>
<td>use of the QEQ package for charge equilibration</td>
</tr>
<tr class="row-odd"><td>reax</td>
<td>RDX and TATB models using the ReaxFF</td>
</tr>
<tr class="row-even"><td>rigid</td>
<td>rigid bodies modeled as independent or coupled</td>
</tr>
<tr class="row-odd"><td>shear</td>
<td>sideways shear applied to 2d solid, with and without a void</td>
</tr>
<tr class="row-even"><td>snap</td>
<td>NVE dynamics for BCC tantalum crystal using SNAP potential</td>
</tr>
<tr class="row-odd"><td>srd</td>
<td>stochastic rotation dynamics (SRD) particles as solvent</td>
</tr>
<tr class="row-even"><td>streitz</td>
<td>use of Streitz/Mintmire potential with charge equilibration</td>
</tr>
<tr class="row-odd"><td>tad</td>
<td>temperature-accelerated dynamics of vacancy diffusion in bulk Si</td>
</tr>
<tr class="row-even"><td>vashishta</td>
<td>use of the Vashishta potential</td>
</tr>
</tbody>
</table>
<p>Here is how you can run and visualize one of the sample problems:</p>
<pre class="literal-block">
cd indent
cp ../../src/lmp_linux . # copy LAMMPS executable to this dir
lmp_linux -in in.indent # run the problem
</pre>
<p>Running the simulation produces the files <em>dump.indent</em> and
<em>log.lammps</em>. You can visualize the dump file of snapshots with a
variety of 3rd-party tools highlighted on the
<a class="reference external" href="http://lammps.sandia.gov/viz.html">Visualization</a> page of the LAMMPS
web site.</p>
<p>If you uncomment the <a class="reference internal" href="dump_image.html"><span class="doc">dump image</span></a> line(s) in the input
script a series of JPG images will be produced by the run (assuming
you built LAMMPS with JPG support; see <a class="reference internal" href="Section_start.html"><span class="doc">Section start 2.2</span></a> for details). These can be viewed
individually or turned into a movie or animated by tools like
ImageMagick or QuickTime or various Windows-based tools. See the
<a class="reference internal" href="dump_image.html"><span class="doc">dump image</span></a> doc page for more details. E.g. this
Imagemagick command would create a GIF file suitable for viewing in a
browser.</p>
<pre class="literal-block">
% convert -loop 1 *.jpg foo.gif
</pre>
</div>
<hr class="docutils" />
<div class="section" id="uppercase-directories">
<h2>7.2. Uppercase directories</h2>
<table border="1" class="docutils">
<colgroup>
<col width="11%" />
<col width="89%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>ASPHERE</td>
<td>various aspherical particle models, using ellipsoids, rigid bodies, line/triangle particles, etc</td>
</tr>
<tr class="row-even"><td>COUPLE</td>
<td>examples of how to use LAMMPS as a library</td>
</tr>
<tr class="row-odd"><td>DIFFUSE</td>
<td>compute diffusion coefficients via several methods</td>
</tr>
<tr class="row-even"><td>ELASTIC</td>
<td>compute elastic constants at zero temperature</td>
</tr>
<tr class="row-odd"><td>ELASTIC_T</td>
<td>compute elastic constants at finite temperature</td>
</tr>
<tr class="row-even"><td>KAPPA</td>
<td>compute thermal conductivity via several methods</td>
</tr>
<tr class="row-odd"><td>MC</td>
<td>using LAMMPS in a Monte Carlo mode to relax the energy of a system</td>
</tr>
<tr class="row-even"><td>USER</td>
<td>examples for USER packages and USER-contributed commands</td>
</tr>
<tr class="row-odd"><td>VISCOSITY</td>
<td>compute viscosity via several methods</td>
</tr>
</tbody>
</table>
<p>Nearly all of these directories have README files which give more
details on how to understand and use their contents.</p>
<p>The USER directory has a large number of sub-directories which
correspond by name to a USER package. They contain scripts that
illustrate how to use the command(s) provided in that package. Many
of the sub-directories have their own README files which give further
instructions. See the <a class="reference internal" href="Section_packages.html"><span class="doc">Section packages</span></a> doc
page for more info on specific USER packages.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Section_perf.html" class="btn btn-neutral float-right" title="8. Performance &amp; scalability" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_howto.html" class="btn btn-neutral" title="6. How-to discussions" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<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>