Molecular Dynamics Simulations - Johnson Grouppuccini.che.pitt.edu/~karlj/Classes/CHE3935/MD_simulations.pdf · Molecular Dynamics Simulations . Professor Albert C. ... • Extract

Embed Size (px)

Citation preview

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Molecular Dynamics Simulations

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Molecular Dynamics (MD) Simulations

    Computer simulation of time evolution of

    interacting atoms based on classical

    Newtonian mechanics:

    To solve numerically the N-body problem of classical mechanics

    Deterministic method: state of the system at any future time can be predicted from its current state

    Nanowires

    Biomolecules

    Nanotubes

    http://lammps.sandia.gov

    : Interatomic potentialU

    : External forceextf

    , : mass and position of atomthm r

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    http://nanohub.org

    Multiscale Modeling and Simulations

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    MD Examples

    Systems MD can simulate Atomic systems

    Metals

    All-atom or Bead-spring polymers

    Organic molecules

    Granular systems

    Hybrid systems

    http://lammps.sandia.gov

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Ionic Diffusion

    Flow of water and ions thru a silica pore Work of Paul Crozier at Sandia National Laboratories to study how narrow

    cylindrical pores in silica can regulate the passage of water and ions in the presence of a pressure gradient for purposes of desalination.

    - Water molecules

    - Ions

    - Amorphous SiO2

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Shear Flow

    Shear flow on corrugated slip/stick surface Work of Nikolai Priezjev at Princeton to study how fluid flow is affected by

    molecular-scale interactions at a solid-liquid interface. The solid surface is patterned with alternating stripes with no-shear and finite-slip attributes.

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Carbon Nanotube Welding

    CNT welding by high heat (3000 K) Work done by Xueming Yang and

    Albert To

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Nanowire Formation

    Au nanowire formation and extension Work of Harold Park at Vanderbilt and Jon Zimmerman at Sandia to study how

    nanowires form under tensile loading at differing strain rates.

    Atoms are colored by their

    potential energy for an EAM

    potential.

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Shock Impact

    Shock induced by a piston velocity of 689 m/s. Yellow atoms note grain boundaries caused by the shock

    Work by Kai Kadau at Los Alamos National Lab

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Displacement Cascade

    MD simulation of the development of a displacement cascade from a 200

    keV recoil in iron at 100K (by R. E. Stoller, Oak Ridge National Lab)

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Helium Bubble Formation

    Metal response to helium bubble formation Work of Jon Zimmerman at Sandia to study of how helium bubble formation in a

    metal induces defect formation. As nanobubbles grow, they force the surrounding metal to respond.

    Atoms are colored by their local

    centro-symmetry value.

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Rhodopsin Solvation

    Rhodopsin in solvated lipid bilayer Work of Paul Crozier and Mark Stevens at Sandia to study the conformational

    properties of Rhodopsin protein in both dark- and light-adapted states.

    The movie shows the loop and

    helix dynamics of the

    Rhodopsin protein in a lipid

    bilayer surrounded by water

    and counter-ions.

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Protein Dynamics

    RuBisCO protein simulations Work of Paul Crozier at Sandia to study the properties of the RuBisCO enzyme

    which is a ubiquitous protein involved in converting CO2 to organic forms of carbon and in the photosynthetic process.

    An all-atom model with the binding

    pocket in color. Even though the pocket is

    closed, a CO2 molecule escapes.

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    General Overview of LAMMPS

    LAMMPS: Large-scale Atomic/Molecular Massively Parallel Simulator

    Potential for

    Soft materials; biomolecules, polymers

    Solid-state materials; metals, semiconductors

    Coarse-grain systems

    Executes On single-processor machines

    In parallel using message-passing techniques (MPI) with spatial-decomposition of the domain (distributed- or shared-memory machines or Beowulf-style clusters)

    Distributed As an open source code under the terms of the GPL license

    By Sandia National Laboratories a US Department of Energy (DOE) Laboratory

    http://www.sandia.gov/

    http://lammps.sandia.gov

    http://www.energy.gov/

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Windows-based machines

    Laptop

    Desktop

    Linux-based machines

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Go to http://lammps.sandia.gov/download.html

    Download the first two files as shown below in red box

    The first file lammps.tar.gz has sample LAMMPS input scripts

    The second file lmp_win_no-mpi.exe is the executable file for

    executing a LAMMPS input script

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Extract all the directories and files in lammps.tar.gz to a local directory, say

    your c: drive (suggest to use a freeware called winRAR)

    Put the executable file lmp_win_no-mpi.exe into the lammps-27Aug11

    directory (see below)

    The sample input scripts are contained in

    the sub-directories in the examples

    directory

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Start a command prompt in Windows

    Make current the crack directory (under the examples directory) by typing at

    the prompt

    cd c:\lammps-27Aug11\examples\crack

    Press Enter and then type at the prompt

    c:\lammps-27Aug11\lmp_win_no-mpi.exe

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    If youre lucky

    If not

    Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    If youre lucky

    If not

    Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    If youre lucky

    If not

    read the supplied documentation carefully!

    checkout the website http://lammps.sandia.gov

    email me [email protected] or visit me in 508 BEH

    Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    If youre really lucky, you should see this after a few minutes

    If not

    Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    If youre really lucky, you should see this after a few minutes

    If not

    You need to buy a new computer!

    Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    in.crack

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    log.lammps

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    dump.crack

    end of file

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Input script parsing rules

    LAMMPS does not read entire input script

    Some commands are valid ONLY when they follow other commands

    Sometimes command B will use values that can be set by command A

    reduced LJ temperature

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Input script parsing rules

    each non-blank line is treated as a command

    If the line ends with &, the command is assumed to continue on the next line

    All characters following # are treated as a comment

    $ followed by characters indicates a variable name

    $temp or ${temp}

    A line is broken into words separated by spaces OR tabs

    letters, digits, underscores or punctuation characters

    First word is a command, successive words are arguments

    Text with spaces should be enclosed by double quotes

    dump modify or fix print

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Input script structure

    LAMMPS script has 4 parts:

    Initialization

    Atom definition

    Settings

    Run a simulation

    All most all commands need only be

    used if a non-default value is desired.

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Initialization

    Set parameters before atoms are created or read-in from a file

    Units

    Dimension

    Newton

    Processors

    Boundary

    Atom style

    Pair style

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Atom definition

    2 ways to define atoms

    read from a data or restart file

    Read data

    Read restart

    create atoms on a lattice

    Lattice

    Region

    Create box

    Create atoms

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Settings

    Force field coefficients

    Bond coeff

    Angle coeff

    Special bonds

    Simulation parameters

    Group

    Timestep

    Run style

    Impose boundary conditions, time integration

    Fix

    Compute

    Output options

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    Run a simulation

    MD simulation is executed via run

    Energy minimization is performed via minimize

    Parallel tempering can be done via temper

    Monte Carlo simulations - simulation of multiple ensembles of a system on

    multiple partitions of processors

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

    default

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS Compiling xmovie

    open Makefile inside the xmovie directory

    $ make

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS Running xmovie

    inside the xmovie directory type

    $ mv ../../examples/crack/dump.crack dump.crack

    next, startx

    $ startx &

    traverse to the xmovie directory

    open dump.crack with xmovie by executing

    $ run xmovie.exe scale dump.crack

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Installing/Running LAMMPS

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    LAMMPS - Visualization

    Simple and fast visualizer xmovie Provided with the LAMMPS package

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    LAMMPS - Visualization

    Simple and fast visualizer xmovie Provided with the LAMMPS package

    High-quality visualization packages

    Raster3d

    written mostly in FORTRAN

    can download source code to compile

    can download win32 binaries

    http://www.bmsc.washington.edu/raster3d/raster3d.html

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    LAMMPS - Visualization

    Simple and fast visualizer xmovie Provided with the LAMMPS package

    High-quality visualization packages

    Raster3d

    VMD

    need to register

    can download source code to compile

    windows OpenGL available (2000/XP)

    MacOS X (Intel x86 / PowerPC)

    http://www.ks.uiuc.edu/Research/vmd

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    LAMMPS - Visualization

    Simple and fast visualizer xmovie Provided with the LAMMPS package

    High-quality visualization packages

    Raster3d

    VMD

    AtomEye

    raw binaries available only

    Windows with CYGWIN and X

    MacOS X with Darwin

    http://164.107.79.177/Archive/Graphics/A

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Computer simulation of time evolution

    of interacting atoms based on classical

    Newtonian mechanics:

    To solve numerically the N-body

    problem of classical mechanics

    Deterministic method: state of the

    system at any future time can be

    predicted from its current state

    Nanowires

    Biomolecules

    Nanotubes

    http://lammps.sandia.gov

    : Interatomic potentialU

    : External forceextf

    , : mass and position of atomthm r

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    54

    Interatomic Potential

    The most general form of the potential is given by the series

    The one-body potential W1 describes external force fields (e.g.

    gravitational filed), and external constraining fields (e.g. the wall

    function for particles in a circular chamber)

    The two-body potential describes dependence of the

    potential energy on the distances between pairs of

    atoms in the system:

    The three-body and higher order potentials (important in

    biomolecule) provide dependence on the geometry of atomic

    arrangement/bonding. For instance, a dependence on the angle

    between three mass points is given by

    1 2 1 2 3

    , , ,

    ( , ,..., ) ( ) ( , ) ( , , ) ...N i i j i j ki i j i i j i k j

    U W W W

    r r r r r r r r r

    2 2( , ) ( ), | | | |i j ij i jW W r r r r r r rx

    y

    z

    rj

    rij

    ri

    i

    j

    3 3( , , ) (cos ), cos| | | |

    ji jk

    i j k ijk ijk

    ji jk

    W W

    r r

    r r rr r

    x

    y

    z

    rj rk

    ijk

    i

    k

    j

    rji

    rjk

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    55

    Pair-Wise Potentials: Lennard-Jones

    12 6

    13 7

    ( ) 4

    ( )( ) 24 2

    LJ

    LJLJ

    W rr r

    W rF r

    r r r

    6( ) 0 2LJF

    Here, is the depth of the potential energy well and is

    the value of r where that potential energy becomes zero;

    the equilibrium distance is given by

    The first term represents repulsive interaction

    At small distances atoms repel due to quantum

    effects (to be discussed in a later lecture)

    The second term represents attractive interaction

    This term represents electrostatic attraction at

    large distances

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    56

    Pair-Wise Potentials: Morse

    2 ( ) ( )

    2 ( ) ( )

    ( ) 2

    ( ) 2

    r r

    M

    r r

    M

    W r e e

    F r e e

    Another pair-wise potential model, effective for

    modeling crystalline solids, is the Morse potential,

    Here, is the depth of the potential energy well and

    is a scaling factor; the equilibrium distance is given

    by

    Similarly to the earlier example,

    The first term represents repulsive interaction

    The second term represents attractive interaction

    ( ) 0MF

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    57

    Truncated Potential

    In system of N atoms

    accumulates unique pair interactions

    if all pair interactions are sampled, the number increases with the square of the

    number of atoms

    Saving computer time

    Neglect pair interactions beyond some distance

    Example: Lennard-Jones potential used in simulations

    )1(2

    1NN

    12 6

    4( )

    0

    c

    LJ

    c

    r rW r r r

    r r

    cr

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    58

    Potential for Biomolecules (DNAs and proteins)

    # of bondsbond 2

    0

    1

    ( ) ( )bond n n nn

    W r k b b

    Bond length (vibrational)

    spring constant

    Current bond length

    Equilibrium bond length

    Bond angle

    # of anglesangle 2

    0

    1

    ( ) ( )angle n n nn

    W r k

    spring constant

    Current bond angle

    Equilibrium bond angle

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    59

    Potential for Biomolecules (DNAs and proteins)

    Dihedral angle

    # of dihedrals

    di

    0

    1

    ( ) 1 cos ( )dihedral n n nn

    W r k m

    spring constant

    Current

    dihedral angle

    Equilibrium

    dihedral angle

    Period

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    60

    Potential for Biomolecules (DNAs and proteins)

    # of atoms # of atoms

    ( )i j

    Electrostatics

    i j i ij

    q qW r

    r

    12 6# of atoms # of atoms

    ( ) 4ij ij

    LJ ij

    i j i ij ij

    W rr r

    Non-bonded

    interaction

    Van Der Waals Force

    (London Interaction)

    Electrostatics

    Charge

    on atom i

    Charge

    on atom j - +

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    61

    Potential for Biomolecules (DNAs and proteins)

    bond angle dihedral LJ Electrostatics

    # of angles# of bonds # of dihedralsbond 2 angle 2 di

    0 0 0

    1 1 1

    12 6

    ( ) ( ) 1 cos ( )

    4

    n n n n n n n n n

    n n n

    ij ij i j

    ij

    ij ij ij

    W W W W W W

    k b b k k m

    q q

    r r r

    # of atoms # of atoms

    i j i

    Widely-used potentials having similar form to the above:

    CHARMM potential (MacKarell, 1998)

    AMBER potential (Duan et al, 2003)

    GROMACS potential (Marrink et al, 2004)

    Putting all the potentials together:

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Other Lennard-Jones Potentials in LAMMPS

    62

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    Embedded Atom Method (EAM) Potentials in LAMMPS

    63

    EAM potential (Daw and Baskes, 1984) many-body potential developed

    primarily for the most common bcc and fcc metals (ie. Fe,Al,Cu), and their

    metal alloys (ie. Ni-Al, Al-Cu, Co-Al, Cu-Zr)

    Modified EAM (MEAN) potential (Baskes, 1992) more complex metal

    alloys, also available for Si-C system

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    More Potentials in LAMMPS

    64

    (hydrocarbons, ie. CNT)

    (oxides, ie. SiO2)

    (colloids)

    (electrostatic interaction)

    (dipole-dipole interaction)

    (add damping to the system)

    (ellipsoids)

    (granular materials)

  • Professor Albert C. To, Department of Mechanical Engineering and Materials Science, University of Pittsburgh

    More Potentials in LAMMPS

    65

    (ie. monodispersed microparticles)

    (earliest potential for metals)

    (continuum/brittle fracture)

    (usually for intialization purposes)

    (your name potential)

    (well-known for Si-C, eg. CNT)

    (models electrostatic screening)

    (well-known for Si)

    (good for chemical reactions)

    (hydrocarbons)