MODMOL 25‐27 Feb 2008, Jouy‐en‐Josas
olivier.vitrac@agroparistech.fr
This document gathers several freely available sources.
The result is freely distributable without guarantee or warrantee of any kind.
LAMMPS
LARGE
SCALE
ATOMIC
MOLECULAR
MASSIVELY
PARALLEL
SIMULATOR
INIT
ATOM DEFINITION
FORCE FIELDS
SETTINGS
FIX
COMPUTE
ACTIONS
OUTPUTS
LAMMPS is a molecular dynamics program from Sandia National
Laboratories. LAMMPS makes use of MPI for parallel communication and is a
free open‐source code, distributed under the terms of the GNU General
Public License.
LAMMPS was originally developed under a Cooperative Research and Development Agreement
(CRADA) between two laboratories from United States Department of Energy and three other
laboratories from private sector firms. It is currently maintained and distributed by researchers at the
Sandia National Laboratories.
Features
For computational efficiency LAMMPS uses neighbor lists to keep track of nearby particles. The lists
are optimized for systems with particles that are repulsive at short distances, so that the local
density of particles never becomes too large.
On parallel computers, LAMMPS uses spatial‐decomposition techniques to partition the simulation
domain into small 3d sub‐domains, one of which is assigned to each processor. Processors
communicate and store "ghost" atom information for atoms that border their sub‐domain.
LAMMPS is most efficient (in a parallel computing sense) for systems whose particles fill a 3D
rectangular box with approximately uniform density.
http://lammps.sandia.gov/
http://lammps.sandia.gov/doc/Manual.html
2
PRINCIPLES
1) Initialization
2) Atom definition
3) Settings
4) Run
units, dimension, boundary, atom_style, atom_modify.
read_data,read_restart, lattice, region, create_box, create_atoms
pair_coeff, bond_coeff, angle_coeff, dihedral_coeff, improper_coeff,
kspace_style, dielectric, special_bonds
neighbor, neigh_modify, group, timestep, reset_timestep, run_style,
min_style, min_modify.
compute, compute_modify, variable
run, minimize
3
SCRIPT
1) Initialization
2) Atom definition
3) Settings
4) Run
# 3d Lennard‐Jones melt
units
atom_style
lattice
region
create_box
create_atoms
mass
lj
atomic
fcc 0.8442
box block 0 20 0 20 0 20
1 box
1
1 1.0
velocity all create 3.0 87287
pair_style
pair_coeff
lj/cut 2.5
1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify
every 20 delay 0 check no
fix
dump
thermo
run
1 all nve
id all atom 10 dump.melt
50
250
4
INIT
atom_modify
ATOM_STYLE
boundary
dimension
newton
processors
units
atom_style style args
angle = bonds and angles ‐ e.g. bead‐spring polymers with stiffness
atomic = only the default values
bond = bonds ‐ e.g. bead‐spring polymers
charge = charge
dipole = charge and dipole moment
dpd = default values, also communicates velocities
ellipsoid = quaternion for particle orientation, angular velocity/momentum
full = molecular + charge ‐ e.g. biomolecules, charged polymers
granular = granular atoms with rotational properties
molecular = bonds, angles, dihedrals, impropers ‐ e.g. all‐atom polymers
5
INIT
atom_modify
atom_style
BOUNDARY
dimension
newton
processors
units
boundary x y z
x,y,z = p or s or f or m, one or two letters
p is periodic
f is non‐periodic and fixed
s is non‐periodic and shrink‐wrapped
m is non‐periodic and shrink‐wrapped
with a minimum value
6
INIT
atom_modify
atom_style
boundary
dimension
newton
processors
UNITS
units lj
distance = sigma
time = tau
mass = one
energy = epsilon
velocity = sigma/tau
force = epsilon/sigma
style real
distance = Angstroms
time = femtoseconds
mass = grams/mole
energy = Kcal/mole
velocity = Angstroms/femtosecond
force = Kcal/mole‐Angstrom
temperature = reduced LJ
temperature
pressure = reduced LJ pressure
temperature = degrees K
pressure = atmospheres
charge = reduced LJ charge
dipole = reduced LJ dipole
moment
electric field = force/charge
charge = multiple of electron
charge (+1.0 is a proton)
dipole = charge*Angstroms
electric field = volts/Angstrom
7
ATOM DEFINITION
create_atoms
create_box
lattice
READ_DATA
read_restart
region
replicate
read_data file
atoms = # of atoms in system
bonds = # of bonds in system
angles = # of angles in system
dihedrals = # of dihedrals in system
impropers = # of impropers in system
atom types = # of atom types in system
bond types = # of bond types in system
angle types = # of angle types in system
dihedral types = # of dihedral types in system
improper types = # of improper types in system
xlo xhi = simulation box boundaries in x dimension
ylo yhi = simulation box boundaries in y dimension
zlo zhi = simulation box boundaries in z dimension
xy xz yz = simulation box tilt factors for triclinic domain
8