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
|
|
|
|
|
|
|
|
5. Example problems :h3
|
|
|
|
|
|
|
|
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".
|
|
|
|
|
|
|
|
The dump files produced by the example runs can be animated using the
|
2007-06-23 07:41:35 +08:00
|
|
|
xmovie tool described in the "Additional Tools"_Section_tools.html
|
|
|
|
section of the LAMMPS documentation. 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:
|
|
|
|
|
2007-06-23 07:41:35 +08:00
|
|
|
colloid: big colloid particles in a small particle solvent, 2d system
|
|
|
|
crack: crack propagation in a 2d solid
|
|
|
|
dipole: point dipolar particles, 2d system
|
|
|
|
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
|
2007-06-23 07:41:35 +08:00
|
|
|
indent: spherical indenter into a 2d solid
|
|
|
|
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
|
|
|
|
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)
|
2009-01-09 08:14:52 +08:00
|
|
|
peri: Peridynamics example of cylinder hit by projectile
|
2006-09-22 00:22:34 +08:00
|
|
|
pour: pouring of granular particles into a 3d box, then chute flow
|
2009-07-03 01:10:13 +08:00
|
|
|
reax: simple example for ReaxFF force field
|
2006-09-22 00:22:34 +08:00
|
|
|
rigid: rigid bodies modeled as independent or coupled
|
|
|
|
shear: sideways shear applied to 2d solid, with and without a void :tb(s=:)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
There is also a directory "couple" in the examples sub-directory,
|
|
|
|
which contains a stand-alone code umbrella.cpp that links LAMMPS as a
|
|
|
|
library. The README describes how to build the code. The code itself
|
|
|
|
runs LAMMPS on a subset of processors, sets up a LAMMPS problem
|
|
|
|
by invoking LAMMPS input script commands one at a time, does
|
|
|
|
a run, grabs atom coordinates, changes one atom position, puts
|
|
|
|
them back into LAMMPS, and does another run.
|
|
|
|
|
|
|
|
This illustrates how an umbrella code could include new models and
|
|
|
|
physics while using LAMMPS to perform MD, or how the umbrella code
|
|
|
|
could call both LAMMPS and some other code to perform a coupled
|
|
|
|
calculation.
|