Lammps Tutorial Oct06
Lammps Tutorial Oct06
Lammps Tutorial Oct06
LAMMPS Tutorial CNF Fall Workshop, Oct 2006 Steve Plimpton, Sandia National Labs [email protected], lammps.sandia.gov 1. 2. 3. 4. Input and Output 11 example problems Parameters to change Adding a "feature" to LAMMPS
LAMMPS 2-2
LAMMPS Philosophy
LAMMPS is a parallel MD kernel keep the kernel simple and fast avoid non-parallel operations
LAMMPS doesn't do many pre- and post-processing tasks: other codes already do it limited development resources aren't parallel operations
LAMMPS 2-3
LAMMPS 2-4
LAMMPS 2-5
LAMMPS Input
Reads an input script (ASCII text) One command per line Command name + arguments atom_style molecular read_data water.data x 1 all nve run 10000 lammps.sandia.gov has link to command doc pages examples sub-dir has many sample input scripts
LAMMPS 2-6
LAMMPS Output
log.lammps contains what is printed to screen thermodynamic info "dump" command outputs snapshots of atom properties default format is simple: id, type, x, y, z other supported formats: XYZ, DCD, XTC conversion tools: PDB, Ensight, XYZ, VTK Rasmol, Raster3d, SVG, etc
LAMMPS 2-7
Viz of LAMMPS Snapshots xmovie auxiliary tool distributed with LAMMPS very fast, simple viz 2d projection of 3d systems reads default dump format % /usr/local/bin/xmovie -scale dump.melt VMD learning about this afternoon 3d hi-quality viz dump 1 all xyz 100 dump.melt % vmd (load xyz le thru GUI)
LAMMPS 2-8
LAMMPS 2-9
11 Example Problems
crack: ow: friction: indent: melt: micelle: min: obstacle: peptide: pour: shear:
crack growth in a LJ crystal (2d) Couette/Poisseuille ow between walls (2d) rubbing of 2 irregular surfaces (2d) crystal response to spherical indenter (2d) LJ lattice (3d) self-assembly of tiny lipid molecules (2d) energy minimization of LJ melt (2d) ow around obstacles (2d) small peptide chain in water (3d) granular particle pour and ow (2d/3d) shear of a metal slab with void (quasi-3d)
LAMMPS 2-10
Crack Problem
Tensile pull on 2d LJ solid Initial slit crack between red/green neigh_modify exclude 2 3 Uniform gradient pull velocity ramp command else shock waves or worse Need large system & slow pull else defects other than crack Biggest computational test problem run in parallel Options to play with: pull rate pair-wise cutoff turn off velocity ramp change NULL 0.0 in x 2
LAMMPS 2-11
LAMMPS 2-12
Friction Problem 2 non-uniform surfaces 2d LJ hex lattice Region commands to build geometry Options to play with: add/change asperities size separation shape x-velocity multiple passes
LAMMPS 2-13
Indent Problem 2d LJ solid periodic in x free upper y surface Spherical indenter downward push, remove Defect creation and healing Options to play with: speed & depth of indent size of indenter size of system
LAMMPS 2-14
Melt Problem 3d LJ solid periodic in x,y,z Melt an fcc lattice Options to play with: temperature x nvt or npt
LAMMPS 2-15
Micelle Problem
Simple lipid model 2d self-assembly vesicles bilayers Hydrophilic head Hydrophobic tail Monomer solvent Options to play with: timestep size # of timesteps pair-wise coeffs turn off special bonds system size: micelle2d.f
LAMMPS 2-16
Minimization Problem Melt of 2d LJ solid Followed by energy minimization Returns to hex lattice but with defects Options to play with: size of system melt temperature minimize tolerance
LAMMPS 2-17
Obstacle Problem 2d LJ ow around obstacle(s) Poisseuille kick added to atoms pressure-gradient ow Top surface applies pressure Obstacle creation delete_atoms command x indent command Options to play with: size of force kick size of system size & position of obstacles add a new obstacle
LAMMPS 2-18
Peptide Problem
Full-atom model of 5-mer Met-enkaphalin CHARMM force-eld, PPPM Coulombics SHAKE bond/angle constraints 2 fmsec timestep so cant simulate for long! To see bonds: xmovie scale dump.bonds dump.peptide Options to play with: timestep size, turn off SHAKE, add x drag command
LAMMPS 2-19
Pour Problem 3d (or 2d) pour of granular particles into empty box under gravity Change gravity direction to induce chute ow Options to play with: vol fraction for pour # of particles to pour spring constant for atoms direction of gravity
LAMMPS 2-20
Shear Problems
Fixed-end shear in fcc Ni EAM potential quasi-3d non-periodic XY slab thin in Z, periodic Defect formation with and without void Options to play with: size of system shear rate turn off velocity ramp comment in/out void add another void
LAMMPS 2-21
LAMMPS 2-22
region_triangle.cpp
35 lines of code constructor(int narg, char **arg) reads arguments: x1 y1 x2 y2 x3 y3 determines extent = bounding box match(double x, double y, double z): determine if (x,y) is inside triangle (2d only) 3 positive cross products inside
LAMMPS 2-23