Académique Documents
Professionnel Documents
Culture Documents
Taekhee Ryu
Molecular Modeling Laboratory (MML)
School of Materials Science and Engineering (MSE)
Gwangju Institute of Science and Technology (GIST)
What is LAMMPS
Large-scale Atomic/Molecular Massively Parallel Simulation
- By Dr. S. Plimpton (http://lammps.dandia.gov)
Free open-source code (C++)
Model System with only a few particles up to millions or billions
(depends on computational power)
LAMMPS doesnt
Build Molecular systems
Use a builder code or write out your own config file
Can build lattices, grain boundaries, etc
l Self-assembled monolayer
- Boundary
conditions
- Potential energy
function
(log.***, dump.***)
OUTPUT
RUNNING
INPUT
- Initial positions
and velocities
OUTPUT
RUNNING
- Molecular
- Trajectories
- Forces, Energy
Dynamics
- Temperature
Simulation
- Pressure
- Etc.
- Etc.
LAMMPS Input
Flow:
Friction:
Indent:
Melt:
Micelle:
Min:
Shear:
Peptide:
Input script
10
Input script
1. initialization
2. Atom definition
3. Settings
4. Run a simulation
11
12
13
14
2. Atom definition
Boundary - set the style of boundaries for the global simulatio
n box in each dimension
3. Settings
Processors - Specify how processors are mapped as a 3d logic
al grid to the global simulation box
Dimension - Set the dimensionality of the simulation. By defaul
t LAMMPS runs 3d simulations.
15
2. Atom definition
pair_style
set the formula uses to compute pairwise interactions
3. Settings
16
2. Atom definition
bond_style
uses to compute bond interactions between pairs of atoms
3. Settings
17
2. Atom definition
angle_style
uses to compute angle interactions between triplets of atoms
3. Settings
18
2. Atom definition
dihedral_style
uses to compute dihedral interactions between quadruplets of
atoms
3. Settings
19
2. Atom definition
improper_style
uses to compute dihedral interactions between quadruplets of
atoms
20
2. Atom definition
kspace_style
Define a K-space solver for LAMMPS to use each timestep to
compute long-range Coulombic interactions or long-range 1/r^
N interactions
Style none or ewald or pppm or pppm/cg or
The pppm style invokes a particle-particle particle-mesh solver
(Hockney) which maps atom charge to a 3d mesh, uses 3d F
FTs to solve Poisson's equation on the mesh, then interpolate
s electric fields on the mesh points back to the atoms
21
2. Atom definition
Read them in from a data or restart file
via the read data or read restart command
3. Settings
Contain molecular topology information
Create atoms on a lattice
with no molecular topology
Lattice, region, create box, create atoms
22
Input script
Read_data - Read in a data file containing information LA
MMPS needs to run a simulation (data.***)
1. initialization
# of components
in system
Simulation box
boundaries
Mass
23
Input script
Read_data - Read in a data file containing information LA
MMPS needs to run a simulation (data.***)
1. initialization
24
Input script
Read_data - Read in a data file containing information LA
MMPS needs to run a simulation (data.***)
1. initialization
25
Input script
Read_data - Read in a data file containing information LA
MMPS needs to run a simulation (data.***)
1. initialization
26
Input script
Read_data - Read in a data file containing information LA
MMPS needs to run a simulation (data.***)
1. initialization
27
Input script
Read_data - Read in a data file containing information LA
MMPS needs to run a simulation (data.***)
1. initialization
28
29
30
latt
region
This command defines a geometric region of
sp
ace
create box
This command creates a simulation box based on t
he specified region
create atoms
This command creates atoms on a lattice, or a si
ngle atom, or a random collection of atoms
31
2. Atom definition
3. Settings
3. Run a simulation
32
neighbor
This command sets parameters that affect the
building of pairwise neighbor lists
The style value selects what algorithm is used to
build the list
The bin style creates the list by binning which is an
operation that scales linearly with N/P, the number
of atoms per processor where N = total number of
atoms and P = number of processors
33
Neigh_modify
This command sets parameters that affect the
building and use of pairwise neighbor lists
The delay setting means never build a new list
until at least N steps after the previous build
34
timestep
Set the timestep size for subsequent molecular
dynamics simulations
35
thermo_style
Set the style and content for printing thermodynamic
data to the screen and log file.
Style multi prints a multiple-line listing of thermodyna
mic info
thermo_style custom etotal ke temp pe ebond eangle
edihed eimp evdwl ecoul elong press
36
thermo
Compute and print thermodynamic info on timesteps
that are a multiple of N and at the beginning and end
of a simulation
37
fix
Set a fix that will be applied to a group of atoms
38
fix
Set a fix that will be applied to a group of atoms
39
group
Identify a collection of atoms as belonging to a group
The example above adds all atoms with IDs from 1 t
o 12 to the group named peptide type
40
dump
snapshot of atom quantities to one or more files every
N timesteps in one of several styles
41
Input script
1. initialization
2. Atom definition
3. Settings
run
Run or continue dynamics for a specified number of
timesteps
3. Run a simulation
42
Tutorial
INPUT
RUNNING
VMD Data.*** .
43
OUTPUT
(log.***, dump.***)
Tutorial
VMD Data.*** .
44
Tutorial
VMD Data.*** .
45
Tutorial
VMD Data.*** .
46
Tutorial
VMD Data.*** .
47
Tutorial
VMD Data.*** .
48
Hand-on exercise
Download the files
Xming (http://sourceforge.net/projects/xming/)
VMD (http://www.ks.uiuc.edu/Research/vmd/)
Putty (SSH Access Client Program)
Input file (in.peptide)
Topology file (data.peptide)
Executable file (lammps_kigi.cmd)
Analysis file (thermo_extract.c)
Install the programs
Xming, Putty
49
Hand-on exercise
PuTTY SSH Remote Access Client Program
putty
50
Hand-on exercise
Connect to the GIST supercomputer (kigi)
localhost:0.0
51
Hand-on exercise
Connect to the GIST supercomputer (kigi)
Login01.plsi.or.kr, Port-22
52
Hand-on exercise
Connect to the GIST supercomputer (kigi)
$ ssh kigi-lg01
$ cp lammps.tar /pwork01/edun/pedunXX
$ cd /pwokr01/edun/pedunXX
$ tar xvf lammps.tar
$ cd lammps
53
Hand-on exercise
Lammps_kigi.cmd -> executable file
Job name
Job-time
Input file
54
Hand-on exercise
Example-1
55
Hand-on exercise
Running LAMMPS on PLSI supercomputer
$ llsubmit lammps_kigi.cmd
$ llcancel job_id
$ llq
$ llstatus
56
Output
There are two basic types of LAMMPS output.
1. Thermodynamic output (log.***)
1. A list of quantities printed every few time steps to the screen
and log file
2. Dump files (dump.***)
1. Snapshots of atoms and various per-atom values and are w
ritten at a specified frequency.
2. Default format is simple : id, type, x, y, z
3. VMD, Rasmol, AtomEye, XMOVIE
57
Output
Example-1 (log.lammps)
58
Output
Analysis of thermodynamic output (log.lammps)
thermo_extract.c
To run this program please compile it as
->
gcc -O3 thermo_extract.c -lm -o thermo_extract
-p for thermo parameter to extract
-s if the output format is single line, or
-m is the output format is multi line
-> thermo_extract p PotEng -m log.lammps >&PotEng.tot
59
Output
Analysis of thermodynamic output (log.***)
-> gnuplot
-> plot PotEng u 1:2 w l
60
Visualizer
AtomEye - http://li.mit.edu/Archive/Graphics/A
Rasmol - http://www.umass.edu/microbio/rasmol/
XMOVIE
Auxiliary tool distributed with LAMMPS
Very fast, simple viz
2d projection of 3d systems
/home01/applic/lammps/lammps-18Apr10/intel/ssh/tools/x
movie/xmovie scale dump.***
VMD - http://www.ks.uiuc.edu/Research/vmd/
Windows, Linux, MacOS X
3d hi-quality viz
61
Additional tools
Amber2lmp
Binary2txt
Ch2lmp
Chain
Lmp2arc
Lamp2cfg
Lmp2vmd
Msi2lmp
62
Thank you
63