2006-09-22 00:22:34 +08:00
|
|
|
"Previous Section"_Section_howto.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_perf.html :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2011-08-26 00:17:31 +08:00
|
|
|
7. Example problems :h3
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
The LAMMPS distribution includes an examples sub-directory with
|
|
|
|
several sample problems. Each problem is in a sub-directory of its
|
|
|
|
own. Most are 2d models so that they run quickly, 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.*) and dump file
|
|
|
|
(dump.*) when it runs. Some use a data file (data.*) of initial
|
|
|
|
coordinates as additional input. A few sample log file outputs 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.crack.foo.P means it ran on P processors of machine "foo".
|
|
|
|
|
2013-02-01 04:12:57 +08:00
|
|
|
For examples that use input data files, many of them were produced by
|
|
|
|
"Pizza.py"_http://pizza.sandia.gov or setup tools described in the
|
|
|
|
"Additional Tools"_Section_tools.html section of the LAMMPS
|
|
|
|
documentation and provided with the LAMMPS distribution.
|
|
|
|
|
|
|
|
If you uncomment the "dump"_dump.html command in the input script, a
|
|
|
|
text dump file will be produced, which can be animated by various
|
|
|
|
"visualization programs"_http://lammps.sandia.gov/viz.html. It can
|
|
|
|
also be animated using the xmovie tool described in the "Additional
|
|
|
|
Tools"_Section_tools.html section of the LAMMPS documentation.
|
|
|
|
|
|
|
|
If you uncomment the "dump image"_dump.html 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
|
|
|
|
"dump image"_dump_image.html doc page.
|
|
|
|
|
|
|
|
Animations of many of these examples can be viewed on the Movies
|
|
|
|
section of the "LAMMPS WWW Site"_lws.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
These are the sample problems in the examples sub-directories:
|
|
|
|
|
2013-02-01 03:46:51 +08:00
|
|
|
body: body particles, 2d system
|
2007-06-23 07:41:35 +08:00
|
|
|
colloid: big colloid particles in a small particle solvent, 2d system
|
2010-09-07 00:56:31 +08:00
|
|
|
comb: models using the COMB potential
|
2007-06-23 07:41:35 +08:00
|
|
|
crack: crack propagation in a 2d solid
|
|
|
|
dipole: point dipolar particles, 2d system
|
2013-02-01 03:46:51 +08:00
|
|
|
dreiding: methanol via Dreiding FF
|
2010-09-07 00:56:31 +08:00
|
|
|
eim: NaCl using the EIM potential
|
2007-06-23 07:41:35 +08:00
|
|
|
ellipse: ellipsoidal particles in spherical solvent, 2d system
|
2008-03-01 09:13:20 +08:00
|
|
|
flow: Couette and Poiseuille flow in a 2d channel
|
2006-09-22 00:22:34 +08:00
|
|
|
friction: frictional contact of spherical asperities between 2d surfaces
|
2013-02-01 03:46:51 +08:00
|
|
|
gpu: use of the GPU package for GPU acceleration
|
|
|
|
hugoniostat: Hugoniostat shock dynamics
|
2007-06-23 07:41:35 +08:00
|
|
|
indent: spherical indenter into a 2d solid
|
2013-02-01 03:46:51 +08:00
|
|
|
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
|
|
|
line: line segment particles in 2d rigid bodies
|
2007-06-23 07:41:35 +08:00
|
|
|
meam: MEAM test for SiC and shear (same as shear examples)
|
|
|
|
melt: rapid melt of 3d LJ system
|
2006-09-22 00:22:34 +08:00
|
|
|
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
2007-06-23 07:41:35 +08:00
|
|
|
min: energy minimization of 2d LJ melt
|
2010-09-07 00:56:31 +08:00
|
|
|
msst: MSST shock dynamics
|
2010-10-02 00:18:09 +08:00
|
|
|
neb: nudged elastic band (NEB) calculation for barrier finding
|
2007-06-23 07:41:35 +08:00
|
|
|
nemd: non-equilibrium MD of 2d sheared system
|
2006-09-22 00:22:34 +08:00
|
|
|
obstacle: flow around two voids in a 2d channel
|
|
|
|
peptide: dynamics of a small solvated peptide chain (5-mer)
|
2010-09-07 00:56:31 +08:00
|
|
|
peri: Peridynamic model of cylinder impacted by indenter
|
2006-09-22 00:22:34 +08:00
|
|
|
pour: pouring of granular particles into a 3d box, then chute flow
|
2013-02-01 03:46:51 +08:00
|
|
|
prd: parallel replica dynamics of vacancy diffusion in bulk Si
|
2010-09-07 00:56:31 +08:00
|
|
|
reax: RDX and TATB models using the ReaxFF
|
2006-09-22 00:22:34 +08:00
|
|
|
rigid: rigid bodies modeled as independent or coupled
|
2010-10-02 00:18:09 +08:00
|
|
|
shear: sideways shear applied to 2d solid, with and without a void
|
2013-02-01 03:46:51 +08:00
|
|
|
srd: stochastic rotation dynamics (SRD) particles as solvent
|
|
|
|
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
|
|
|
|
tri: triangular particles in rigid bodies :tb(s=:)
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
Here is how you might run and visualize one of the sample problems:
|
|
|
|
|
|
|
|
cd indent
|
|
|
|
cp ../../src/lmp_linux . # copy LAMMPS executable to this dir
|
|
|
|
lmp_linux < in.indent # run the problem :pre
|
|
|
|
|
|
|
|
Running the simulation produces the files {dump.indent} and
|
|
|
|
{log.lammps}. You can visualize the dump file as follows:
|
|
|
|
|
|
|
|
../../tools/xmovie/xmovie -scale dump.indent :pre
|
|
|
|
|
2013-02-01 04:12:57 +08:00
|
|
|
If you uncomment the "dump image"_dump_image.html line(s) in the input
|
|
|
|
script a series of JPG images will be produced by the run. 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
|
|
|
|
"dump image"_dump_image.html doc page for more details. E.g. this
|
|
|
|
Imagemagick command would create a GIF file suitable for viewing in a
|
|
|
|
browser.
|
|
|
|
|
|
|
|
% convert -loop 1 *.jpg foo.gif :pre
|
|
|
|
|
2010-09-07 01:21:53 +08:00
|
|
|
:line
|
|
|
|
|
2013-02-01 04:12:57 +08:00
|
|
|
There is also a COUPLE directory with examples of how to use LAMMPS as
|
|
|
|
a library, either by itself or in tandem with another code or library.
|
|
|
|
See the COUPLE/README file to get started.
|
|
|
|
|
2010-09-07 01:21:53 +08:00
|
|
|
There is also an ELASTIC directory with an example script for
|
|
|
|
computing elastic constants, using a zero temperature Si example. See
|
|
|
|
the in.elastic file for more info.
|
|
|
|
|
2010-09-07 00:56:31 +08:00
|
|
|
There is also a USER directory which contains subdirectories of
|
|
|
|
user-provided examples for user packages. See the README files in
|
2013-03-11 22:51:34 +08:00
|
|
|
those directories for more info. See the
|
|
|
|
"Section_start.html"_Section_start.html file for more info about user
|
|
|
|
packages.
|