lammps/examples
Axel Kohlmeyer 6eb3679468
add commented out commands for visualization with LAMMPS-GUI
2024-07-29 19:59:22 -04:00
..
ASPHERE update log files for current code 2024-02-01 00:12:04 -05:00
COUPLE add lammps_extract_pair_dimension and lammps_extract_pair to library interface 2024-07-16 01:38:21 -04:00
DIFFUSE
ELASTIC Make compliance.py Python 3 compatible 2021-06-01 15:15:11 -04:00
ELASTIC_T remove unused imports 2022-06-14 10:45:05 -04:00
HEAT
KAPPA update KAPPA example for current code, to use thermo_modify colname, and compute kappa in input 2022-05-15 18:58:50 -04:00
MC-LOOP must not have folders names differing only in case: "MC" versu "mc" 2021-10-18 18:13:21 -04:00
PACKAGES Merge branch 'lammps:develop' into spica-kk 2024-07-25 13:54:44 -04:00
QUANTUM change QM Python wrappers to use ENERGY instead of PE as MDI command 2023-06-26 11:08:04 -07:00
SPIN Adding a new test problem for large damping in the LL equation. 2022-09-26 07:49:51 +02:00
UNITS
VISCOSITY fix some more URLs 2021-05-24 15:38:27 -04:00
airebo whitespace 2024-02-23 19:08:46 -05:00
amoeba Tested a coarser PME mesh with a lower accuracy (2e-4) 2023-11-10 16:16:49 -06:00
atm
balance reduce timestep to get correct runs and no crashes. update logs. 2023-11-03 16:52:35 -04:00
body update log files for BODY package styles 2023-06-14 14:43:29 -04:00
bpm Restarting additional BPM settings, adding virial contributions from tangential bonds 2022-08-30 13:25:36 -06:00
charmmfsw add commented out commands for visualization with LAMMPS-GUI 2024-07-29 19:59:22 -04:00
cmap
colloid
comb
controller
coreshell
crack
deposit add examples for using fix rigid/nv?/small with fix deposit 2021-04-06 07:55:43 -04:00
dipole
dreiding
eim
ellipse update remaining ellipsoid example dump output for OVITO compatibility 2023-07-10 19:42:48 -04:00
fire add MEAM example to fire minimizer examples 2023-01-12 23:26:30 -05:00
flow
friction
gjf
granregion update example logs for changed granular pair style 2023-03-16 22:37:58 -04:00
granular update example 2024-05-13 14:07:24 -04:00
grid add new grid-based examples 2022-12-01 15:51:17 -07:00
hugoniostat update examples and log files for cases affected by the fix_modify changes 2021-02-08 21:17:52 -05:00
hyper
indent
kim remove special case CMake code for versions before 3.16 2023-06-30 23:15:37 -04:00
mc use dynamic/dof and extra/dof consistently. remove compatibility note in docs. 2023-06-30 16:27:07 -04:00
mdi whitespace 2023-03-14 13:53:04 -04:00
meam add missing symlink 2024-03-04 09:25:07 -05:00
melt update melt example to use velocity with loop geom for consistent velocities 2021-04-09 09:54:47 -04:00
mesh adjust keyword/function names and command line to be simpler to use 2022-05-11 09:25:27 -04:00
micelle final changes for 2d rigid bodies with jacobi 2024-04-04 13:07:35 -06:00
min
mliap mliap ace docs and example logs 2024-03-11 13:34:29 -06:00
msst update examples and log files for cases affected by the fix_modify changes 2021-02-08 21:17:52 -05:00
multi reformat and shorten new example inputs 2021-05-12 07:53:18 -04:00
nb3b make README consistent with potential file and implementation 2023-10-31 09:34:32 -04:00
neb replace individual *verbose* / *terse* keywords with *verbosity* setting 2023-01-14 07:06:26 -05:00
nemd
numdiff Switch shear strain fields to symmetric 2022-02-20 13:51:14 -07:00
obstacle
peptide get rid of obsolete README note. We have long ago fixed the aliasing issue in Coulomb tabulation 2020-10-21 11:10:26 -04:00
peri
plugins use -rdynamic for re-exporting symbols when using plugins 2024-02-25 21:11:31 -05:00
pour update example logs for changed granular pair style 2023-03-16 22:37:58 -04:00
prd
python add harmonic/cut to python example folder. small tweaks to docs and examples 2022-03-18 17:58:30 -04:00
qeq update example inputs and logs for change in ReaxFF required name 2023-11-30 10:31:08 -05:00
rdf-adf make computes rdf and adf error out multi cutoff neighbor lists if needed 2024-03-03 12:27:39 -05:00
reaxff Merge branch 'develop' of github.com:lammps/lammps into compute_reaxff_bonds_local 2023-12-13 11:14:45 -07:00
relres renormalize line endings. add .gitattributes to configure them explicitly 2022-03-17 18:21:31 -04:00
replicate clean up of docs and code 2024-05-06 19:16:06 -06:00
rerun
rheo Small doc changes, renaming status variable 2024-07-15 17:19:51 -06:00
rigid proper handle partial initialization from infile 2022-03-20 21:12:35 -04:00
shear
snap Another tweak 2023-10-16 15:17:46 -06:00
srd Fixing example input scripts with mode multi 2021-02-16 10:24:15 -07:00
steinhardt
streitz
tad
template update examples and include restart example, too. 2020-10-27 00:31:25 -04:00
tersoff update example inputs and logfile for fix_modify energy yes/no changes, where needed 2021-02-09 11:01:34 -05:00
threebody update example logs for change in cutoff setting 2024-02-22 13:37:59 -05:00
tracker simplify fix instance creation 2021-07-29 15:18:58 -04:00
triclinic change all function ptrs and 2 example dump files 2024-06-21 09:23:04 -06:00
ttm correct fix ttm/mod example input 2024-04-15 01:45:05 -04:00
vashishta
voronoi make 2d system box center on 0.0 2023-12-06 07:36:29 -05:00
wall move fix to EXTRA-FIX package, update docs, add reference logs to example 2024-02-07 15:07:11 -05:00
yaml add test for yaml dump style 2022-04-07 02:44:17 -04:00
README modified doc page, added examples 2024-05-06 16:44:45 -06:00

README

LAMMPS example problems

There are 3 flavors of sub-directories in this file, each with sample
problems you can run with LAMMPS.

lower-case directories = simple test problems for LAMMPS and its packages
upper-case directories = more complex problems
PACKAGES directory with its own sub-directories = tests for styles from specific packages

Each is discussed below.

------------------------------------------

Lower-case directories

Each of these sub-directories contains a sample problem you can run
with LAMMPS.  Most are 2d models so that they run quickly, requiring a
few seconds to a few minutes to run on a desktop machine.  Each
problem has an input script (in.*) and produces a log file (log.*) and
(optionally) a dump file (dump.*) or image files (image.*) or movie
(movie.mpg) when it runs.  Some use a data file (data.*) of initial
coordinates as additional input.  Some require that you install one or
more optional LAMMPS packages.

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.date.foo.P means it ran on
P processors of machine "foo" with the dated version of LAMMPS.  Note
that these problems should get statistically similar answers when run
on different machines or different numbers of processors, but not
identical answers to those in the log of dump files included here.
See the Errors section of the LAMMPS documentation for more
discussion.

Most of the example input scripts have commented-out lines that
produce dump snapshots of the running simulation in any of 3 formats.

If you uncomment the dump command in the input script, a text dump
file will be produced, which can be animated by various visualization
programs (see https://www.lammps.org/viz.html) such as Ovito, VMD,
or AtomEye.

If you uncomment the dump image 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
doc page.

If you uncomment the dump movie command in the input script, and
assuming you have built LAMMPS with the FFMPEG library, an MPG movie
will be produced when the simulation runs.  The movie file can be
played using various viewers, such as mplayer or QuickTime.

Animations of many of these examples can be viewed on the Movies
section of the LAMMPS WWW Site.

These are the sample problems and their output in the various
sub-directories:

accelerate: use of all the various accelerator packages
airebo:   polyethylene with AIREBO potential
amoeba:   small water and bio models with AMOEBA and HIPPO potentials
atm:      Axilrod-Teller-Muto potential
balance:  dynamic load balancing, 2d system
body:     body particles, 2d system
cmap:     CMAP 5-body contributions to CHARMM force field
colloid:  big colloid particles in a small particle solvent, 2d system
comb:     models using the COMB potential
coreshell: adiabatic core/shell model
controller: use of fix controller as a thermostat
crack:    crack propagation in a 2d solid
deposit:  deposition of atoms and molecules onto a 3d substrate
dipole:   point dipolar particles, 2d system
dreiding: methanol via Dreiding FF
eim:      NaCl using the EIM potential
ellipse:  ellipsoidal particles in spherical solvent, 2d system
flow:     Couette and Poiseuille flow in a 2d channel
friction: frictional contact of spherical asperities between 2d surfaces
gjf:      use of fix langevin Gronbech-Jensen/Farago option
granregion: use of fix wall/region/gran as boundary on granular particles
grid      use of commands which overlay grids on the simulation domain
hugoniostat: Hugoniostat shock dynamics
hyper:    global and local hyperdynamics of diffusion on Pt surface
indent:   spherical indenter into a 2d solid
kim:      use of potentials in Knowledge Base for Interatomic Models (KIM)
mc:       MC package models: GCMC, Widom, fix mol/swap
mdi:      use of the MDI package and MolSSI MDI code coupling library
meam:     MEAM test for SiC and shear (same as shear examples)
melt:     rapid melt of 3d LJ system
mesh:     create_atoms mesh command
micelle:  self-assembly of small lipid-like molecules into 2d bilayers
min:      energy minimization of 2d LJ melt
mliap:    examples for using several bundled MLIAP potentials
msst:     MSST shock dynamics
nb3b:     use of nonbonded 3-body harmonic pair style
neb:      nudged elastic band (NEB) calculation for barrier finding
nemd:     non-equilibrium MD of 2d sheared system
numdiff:  numerical difference computation of forces, virial, and Born matrix
obstacle: flow around two voids in a 2d channel
peptide:  dynamics of a small solvated peptide chain (5-mer)
peri:     Peridynamic model of cylinder impacted by indenter
pour:     pouring of granular particles into a 3d box, then chute flow
prd:      parallel replica dynamics of vacancy diffusion in bulk Si
python:   use of PYTHON package to invoke Python code from input script
qeq:      use of QEQ package for charge equilibration
reaxff:   RDX and TATB and several other models using ReaxFF
replicate: use of replicate command
rerun:    use of rerun and read_dump commands
rigid:    rigid bodies modeled as independent or coupled
shear:    sideways shear applied to 2d solid, with and without a void
snap:     examples for using several bundled SNAP potentials
srd:      stochastic rotation dynamics (SRD) particles as solvent
steinhardt: Steinhardt-Nelson Q_l and W_l parameters usng orientorder/atom
streitz:  Streitz-Mintmire potential for Al2O3
tad:      temperature-accelerated dynamics of vacancy diffusion in bulk Si
template: examples for using atom_style template and comparing to atom style molecular
tersoff:  regression test input for Tersoff variants
threebody: regression test input for a variety of threebody potentials
triclinic: general triclinic simulation boxes versus orthogonal boxes
ttm:      two-temeperature model examples
vashishta: models using the Vashishta potential
voronoi:  Voronoi tesselation via compute voronoi/atom command
wall:     use of reflective walls with different stochastic models
yaml:     demonstrates use of yaml thermo and dump styles

Here is how you might run and visualize one of the sample problems:

cd indent
cp ../../src/lmp_mpi .           # copy LAMMPS executable to this dir
lmp_mpi -in in.indent              # run the problem

Running the simulation produces the files {dump.indent} and
{log.lammps}.

If you uncomment the dump image 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 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

------------------------------------------

Upper-case directories

The ASPHERE directory has examples of how to model aspherical
particles with or without solvent, in 3 styles LAMMPS provides.
Namely point ellipsoids, rigid bodies, and generalized aspherical
bodies built from line/triangle surface facets in 2d/3d.  See the
ASPHERE/README file to get started.

The COUPLE directory has 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.

The ELASTIC directory has an example script for computing elastic
stiffness tensor (elastic constants)
at zero temperature, using an Si example.  See the
ELASTIC/in.elastic file for more info.

The ELASTIC_T directory has example scripts for the computing elastic
stiffness tensor at finite temperature. Two different methods are
demonstrated. DEFORMATION estimates the change in the average
stress tensor between multiple simulations
in which small finite deformations are made to the simulation cell.
BORN_MATRIX runs a single simulation in which the Born matrix and stress
fluctuations are averaged. The second method
is newer in LAMMPS and is generally more efficient and
more reliable.

The HEAT directory has example scripts for heat exchange algorithms
(e.g. used for establishing a thermal gradient), using two different
methods.  See the HEAT/README file for more info.

The KAPPA directory has example scripts for computing the thermal
conductivity (kappa) of a LJ liquid using 5 different methods.  See
the KAPPA/README file for more info.

The MC-LOOP directory has an example script for using LAMMPS as an
energy-evaluation engine in a iterative Monte Carlo energy-relaxation
loop.

The PACKAGES directory contains subdirectories of example scripts for
individual packages or additional individual styles. Most of those are
contributed by the corresponding package or style developers.
See the README files in those directories (if available) or the
corresponding doc page in the manual for more info.  See the
https://docs.lammps.org/Build_package.html page for more info about
installing and building packages.

The QUANTUM directory has examples of how to use LAMMPS in tandem with
several quantum codes via the MDI code coupling library.

The TIP4P directory has an example for testing forces computed on a
GPU.

The UNITS directory contains examples of input scripts modeling the
same Lennard-Jones liquid model, written in 3 different unit systems:
lj, real, and metal.  So that you can see how to scale/unscale input
and output values read/written by LAMMPS to verify you are performing
the same simulation in different unit systems.

The VISCOSITY directory has example scripts for computing the
viscosity of a LJ liquid using 4 different methods.  See the
VISCOSITY/README file for more info.