What is Classical Molecular Dynamics?

Similar documents

MD Thermodynamics. Lecture 12 3/26/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Molecular Dynamics. What to choose in an integrator The Verlet algorithm Boundary Conditions in Space and time Reading Assignment: F&S Chapter 4

Javier Junquera. Statistical mechanics

Gear methods I + 1/18

Introduction to molecular dynamics

Introduction to Simulation - Lectures 17, 18. Molecular Dynamics. Nicolas Hadjiconstantinou

Molecular Dynamics. The Molecular Dynamics (MD) method for classical systems (not H or He)

Ab initio molecular dynamics. Simone Piccinin CNR-IOM DEMOCRITOS Trieste, Italy. Bangalore, 04 September 2014

Molecular Dynamics 9/6/16

Simulation of molecular systems by molecular dynamics

Ab Ini'o Molecular Dynamics (MD) Simula?ons

Molecular dynamics simulation of Aquaporin-1. 4 nm

Molecular Dynamics Simulations. Dr. Noelia Faginas Lago Dipartimento di Chimica,Biologia e Biotecnologie Università di Perugia

Molecular Dynamics Simulations

Ab initio molecular dynamics and nuclear quantum effects

Computer simulation methods (1) Dr. Vania Calandrini

Methods of Computer Simulation. Molecular Dynamics and Monte Carlo

Introduction to model potential Molecular Dynamics A3hourcourseatICTP

Energy and Forces in DFT

Exercise 2: Solvating the Structure Before you continue, follow these steps: Setting up Periodic Boundary Conditions

Ab initio molecular dynamics

Biomolecules are dynamic no single structure is a perfect model

Scientific Computing II

Biomolecular modeling I

1 Bulk Simulations in a HCP lattice

Computer simulation methods (2) Dr. Vania Calandrini

Introduction Statistical Thermodynamics. Monday, January 6, 14

Computational Chemistry - MD Simulations

Using Molecular Dynamics to Compute Properties CHEM 430

Bioengineering 215. An Introduction to Molecular Dynamics for Biomolecules

Constant Pressure Langevin Dynamics: Theory and Application to the Study of Phase Behaviour in Core-Softened Systems.

Molecular Dynamics. A very brief introduction

Part 2: Molecular Dynamics. Literature History Practical Issues

André Schleife Department of Materials Science and Engineering

CONTACT PROPERTIES OF HYDRATED SILICA SURFACES

A (short) practical introduction to kinetic theory and thermodynamic properties of gases through molecular dynamics

Temperature and Pressure Controls

Scientific Computing II

Set the initial conditions r i. Update neighborlist. r i. Get new forces F i

Accelerated Quantum Molecular Dynamics

Advanced Topics in Equilibrium Statistical Mechanics

Computer Simulation of Shock Waves in Condensed Matter. Matthew R. Farrow 2 November 2007

A MOLECULAR DYNAMICS SIMULATION OF A BUBBLE NUCLEATION ON SOLID SURFACE

Introduction to Computer Simulations of Soft Matter Methodologies and Applications Boulder July, 19-20, 2012

Brief Review of Statistical Mechanics

7 To solve numerically the equation of motion, we use the velocity Verlet or leap frog algorithm. _ V i n = F i n m i (F.5) For time step, we approxim

Hands-on : Model Potential Molecular Dynamics

Molecular computer experiment

Molecular dynamics simulations

Advanced Molecular Molecular Dynamics

Example questions for Molecular modelling (Level 4) Dr. Adrian Mulholland

Ab initio Molecular Dynamics

Molecular Dynamics at Constant Pressure: Allowing the System to Control Volume Fluctuations via a Shell Particle

2. Thermodynamics. Introduction. Understanding Molecular Simulation

MOLECULAR DYNAMICS SIMULATION OF HETEROGENEOUS NUCLEATION OF LIQUID DROPLET ON SOLID SURFACE

High-throughput Simulations of Shock-waves Using MD. Jacob Wilkins University of York

JASS Modeling and visualization of molecular dynamic processes

MOLECULAR DYNAMIC SIMULATION OF WATER VAPOR INTERACTION WITH VARIOUS TYPES OF PORES USING HYBRID COMPUTING STRUCTURES

Molecular Dynamics Simulation of Argon

Statistical thermodynamics (mechanics)

Ab initio Molecular Dynamics Born Oppenheimer and beyond

Molecular Modeling of Matter

Project 4/5 - Molecular dynamics part II: advanced study of Lennard-Jones fluids, deadline December 1st (noon)

A Study of the Thermal Properties of a One. Dimensional Lennard-Jones System

Force fields, thermo- and barostats. Berk Hess

Comprehensive Nuclear Materials Modelling Section (R. Stoller, Editor) Chapter 128 Molecular Dynamics.

Nanoscale simulation lectures Statistical Mechanics

Molecular Dynamics Simulation of a Nanoconfined Water Film

Molecular Modeling of Matter

2008 Biowerkzeug Ltd.

A Brief Introduction to Statistical Mechanics

1 Introduction to Molecular Dynamics

Time-Dependent Statistical Mechanics 5. The classical atomic fluid, classical mechanics, and classical equilibrium statistical mechanics

1 Phase Spaces and the Liouville Equation

Advanced sampling. fluids of strongly orientation-dependent interactions (e.g., dipoles, hydrogen bonds)

LAMMPS Performance Benchmark on VSC-1 and VSC-2

Introduction to Molecular Dynamics

CE 530 Molecular Simulation

Lecture 11: Potential Energy Functions

Molecular Dynamics Simulation Study of Transport Properties of Diatomic Gases

Dynamic force matching: Construction of dynamic coarse-grained models with realistic short time dynamics and accurate long time dynamics

Langevin Dynamics in Constant Pressure Extended Systems

Summary We develop an unconditionally stable explicit particle CFD scheme: Boltzmann Particle Hydrodynamics (BPH)

Chapter 4 Molecular Dynamics and Other Dynamics

Advanced in silico drug design

Statistical methods in atomistic computer simulations

Lab 4: Handout Molecular dynamics.

Statistical thermodynamics for MD and MC simulations

Enabling constant pressure hybrid Monte Carlo simulations using the GROMACS molecular simulation package

Heat Transport in Glass-Forming Liquids

Introduction to Classical Molecular Dynamics. Giovanni Chillemi HPC department, CINECA

LECTURE 6 : BASICS FOR MOLECULAR SIMULATIONS - Historical perspective - Skimming over Statistical Mechanics - General idea of Molecular Dynamics -

Optimization of CHARMM36-UA Force Field Parameters for Phospholipid Bilayer Simulation

Ab initio molecular dynamics: Basic Theory and Advanced Met

Shear Properties and Wrinkling Behaviors of Finite Sized Graphene

Energy Landscapes and Accelerated Molecular- Dynamical Techniques for the Study of Protein Folding

Monte Carlo Simulations in Statistical Physics

Modeling & Simulation of Glass Structure

Simulations with MM Force Fields. Monte Carlo (MC) and Molecular Dynamics (MD) Video II.vi

Transcription:

What is Classical Molecular Dynamics? Simulation of explicit particles (atoms, ions,... ) Particles interact via relatively simple analytical potential functions Newton s equations of motion are integrated for all particles simultaneously 100-1,000,000 s of particles depending on model Time 10 ps to 1 µs depending on model (typically ns)

Why Classical Molecular Dynamics? Includes temperature and pressure e ects Able to treat comparatively large systems for a relatively long time Help interpret experiments, and to provide alternative interpretations Test theories of intra- and intermolecular interaction Obtain detailed molecular level information Structure and dynamics (compared to QC, MM, MC... ) Improve our understanding of nature through model-building (!!)

Phase Space and Time Averages A system containing N atoms has 6 N values defining the state of the system (3 N coordinates ( r), 3 N momenta ( p)) Each combination of coordinates and momenta define a point in the 6N-dimensional phase space : Γ N Consider a property that can be described as a function of the coordinates and momenta, A(Γ), (for instance the total energy or the (instantaneous) pressure) The average value of the property can then be written as: A obs = < A > time = < A(Γ( t)) > time = 1 lim τ -> τ τ t= 0 A(Γ( t)) dt The ergodic hypothesis: The long time average is equal to the ensemble average in the limit of an infinite number of members in the ensemble

Molecular Dynamics A MD simulation generates a sequence of points in phase space connected in time The result is a trajectory of all particles in the system as a function of time Time averages and other properties can be calculated from this trajectory Motion of the system through phase space is governed by Hamiltonian equations of motion : ṙ i = H p i = p i m i ṗ i = H r i = f i

The Hamiltonian : H(r, p) = K (p) + V (r) K (p) = N i p 2 i 2m i V is a potential energy function Newtons equations of motion : ẋ = H p x = p x m = v x ṗ x = H x = V (x) x The Born-Oppenheimer approximation : = F = ma x Electrons move much faster than the nuclei QM: Solve Schrodinger equation for static nuclei MD: Nuclei experience electrons as an average field

Steps in Performing an MD Simulation Selection of interaction model Selection of boundary conditions Selection of initial conditions (positions, velocities... ) Selection of ensemble (NVE, NVT, NPT... ) Selection of target temperature, density/pressure... Selection of integrator, thermostat, barostat... Perform simulation until equilibration is reached (property dependent) Perform production simulation to collect thermodynamic averages, positions, velocities Analyze the results via post-processing Initialize: Initial particle positions, velocities... Calculate forces from particle positions Solve Newton s eqns. of motion (integrate) Perform analysis / Write data to disk Loop over timesteps

The Interaction Model The potential energy can be divided into interactions between pairs, triplets,... of particles : V (r) = V ij (r i, r j )+ V ijk (r i, r j, r k )+ V ijkl (r i, r j, r k, r l )... ij ijk ijkl i V(r i,r j ) i V(r i,r k ) j V(r i,r j,r k ) j V(r j,r k ) k k

The interaction energy is (usually) largely dominated by the pair term. Truncate the series and make the assumption of pairwise additivity : V (r) ij V ij (r i, r j ) In simulations the true pair potential is usually replaced by an effective pair potential, which incorporate the average many-body e ects into the first term : V (r) ij V eff ij (r i, r j ) These potentials are usually parameterized to reproduce some experimental data

The Lennard-Jones Potential V ij (r ij ) = 4 ij σ ij r ij 12 σ ij r ij 6 r ij = r i r j 2 1.5 Lennard-Jones interaction (Argon) 1 V (kj/mol) 0.5 0 σ (3.41 Å) -0.5 ε (0.996 kj/mol) -1-1.5 1 2 3 4 5 6 7 8 9 r (Å) Two dimensional simulation of argon

The Initial Configuration For a solid it may be possible to start from the experimentally determined structure For a liquid it is also common to start from a solid lattice, and letting the structure melt For a liquid it is also possible to start from a random placement of molecules (this may be tricky) If previous simulation data is available, one might modify a configuration to suit the new simulation, for instance by replacing one or a few particles Macromolecule in liquid: Use experimental coordinates of macromolecule from solid phase structure determination, surround it by liquid

The Initial Velocities The velocities of the particles is related to the kinetic energy : N m K = i vi 2 2 The kinetic energy is related to the temperature : i 2 < K > = gk B T = 3Nk B T Assign velocities according to a Boltzmann distribution : P(v i ) = m i 2πk B T 1/ 2 e m i v2 i k B T Alternatively assign particle velocities from a uniform distribution. They will obtain a Boltzmann distribution after a short time.

It is often necessary to adjust the initial velocities so the total linear momentum of the system is zero : p = N i p i = N i m i v i = 0 This momentum corresponds to translation of the whole system Having p = 0 in simulations of liquid water, has been referred to as a flying ice cube Newton s equations of motion will preserve the linear momentum resulting in a NVE P ensemble, resulting in a system with three fewer degrees of freedom For a system with periodic boundary conditions, the angular momentum will not be conserved

Statistical Mechanical Ensembles The natural ensemble for MD is the microcanonical ensemble: NVE (constant number of particles, constant volume, constant energy) Typical experiments: Constant pressure and/or temperature Canonical ensemble: NVT (constant number of particles, volume, temperature); Isobaric, isothermal (Gibbs): NPT (constant number of particles, pressure, temperature) Some ways to include such e ects in MD Stochastic events (change kinetic energy of single particle) Periodic rescaling of velocities (2 K = gk B T ) Ad hoc partial rescaling of velocities (Berendsen s thermal bath) Extended system methods: Include extra variables in the equations of motion such as the volume of the system

Periodic Boundary Conditions A real system might contain about N A = 6 10 23 molecules Simulation may contain about 100-1,000,000 molecules A small cube of 10x10x10 molecules has about half of the molecules on the surface Not appropriate to study bulk properties Periodic boundary conditions: Small box replicated in all directions A particle that leaves the box on one side is replaced by an image particle that enters from the other side There are no walls and no surface particles Some systems inherently contains a boundary, for instance a liquid droplet, or a surface

The Minimum Image Convention Particles interact only with the closest periodic image of the other particles: How to compute minimum image : Simple and straightforward r x = x i x j ; i f ( r x > 0.5 * length ) rx = rx l engt h ; i f ( r x < 0.5 * length ) r x = r x + l engt h ; Fortran has a function, anint, which returns the nearest integer rx = rx - length* anint (rx/length) In C, the floor function can be used rx = rx length*floor(rx/length + 0.5);

Truncating the Potential The most time consuming part: Computing the nonbonded (vdw & electrostatic) energies and forces For a pair additive potential there are N 2 such interactions Consider the Lennard-Jones argon potential again: V (kj/mol) 0-0.1-0.2-0.3-0.4-0.5-0.6-0.7-0.8-0.9-1 0 1 2 3 4 5 6 7 8 9 r (Å) Spherical nonbonded c V ij (r ij ) = V ij (r ij ) r ij r c V ij (r ij ) = 0 r ij > r c Disadvantage: Discontinuity in the energy and forces Switching function ( S(r ij ) smoothly from 1 to 0) V ij (r ij ) = V ij (r ij ) r ij < r l V ij (r ij ) = S (r ij )V ij (r ij ) r l r ij r c V ij (r ij ) = 0 r ij > r c

Minimum Image and Spherical Cutoff Very commonly minimum images and spherical cuto s are used together r c

Searching for Neighbors The search loop is a double loop over all particles ( n). Execution time for the loop is proportional to n 2 The Verlet neighbor list : Maintain list of neighbor pairs closer than the radiu r c r skin r c t r c r c +r skin r c +r skin Update list from time to time ( about once every 25 timesteps, but this can be automated)

Use of Linked Lists (Cell Method) For large systems the execution time will be dominated by the search loop (because building the Verlet neighbor lists are still O(N 2 ) One solution is to divide the space into cells y Cell (0,0) Cell (7,2) a } x } b Finding which cell a particle belongs to is an O (N ) problem. A particle with coordinate (x, y ) belongs to cell ( floor (x/a ), floor (y/b ) ) All particles are sorted into so-called linked lists. There is one list for each cell.

When all particles are sorted into lists, the double loop can be done over cells instead of particles. We don t have to consider all cells. Only cells with particles closer to each other than the c distance must be considered : For the particles inside the central cell only particles inside the central cell itself and the shadowed cells are considered if the cuto distance is equal to, for instance, 1.2 cell lengths

Domain Decomposition For very large systems the memory requirement on each node becomes large, when using a replicated data algorithm Also the program will become slow due to that forces from all particles must be sent to all processors each timestep One solution for very large systems is to use domain decomposition. Particles are assigned to processors depending on their position in space. A 3x3 decomposition of a two dimensional system When domain decomposition is used larger systems may be simulated simply by using more processors

For large systems the interaction cuto radius, r c, is substantially smaller than the size of the system r c

Particles closer to the edge of the domain than the cuto radius, interact with particles on the node. UP/ LEFT LEFT UP UP/ RIGHT RIGHT 8 neighbours in 2D, and 26 in 3D DOWN/ LEFT DOWN DOWN/ RIGHT

Integrating the Equations of Motion Motion of all particles is coupled (many-body problem), This is impossible to solve analytically... Solve using finite di erences Positions, velocities... approximated as a Taylor series: r (t + t) = r (t) + tv (t) + 1 2 t2 a(t) + 1 6 t3 b(t) + 1 24 t4 c (t) +... v (t + t) = v (t) + ta(t) + 1 2 t2 b(t) + 1 6 t3 c (t) +... a(t + t) = a(t) + tb(t) + 1 2 t2 c (t) +... b(t + t) = b(t) + tc (t) +...

The simplest method truncate the series after the first-order term. This gives Euler s method : r (t + t) = r (t) + tv (t) v (t + t) = v (t) + ta(t) This is a first order method (and should not be used) The Verlet algorithm (1968, Loop Verlet) : r (t + t) = r (t) + tv (t) + 1 2 t2 a(t) r (t t) = r (t) tv (t) + 1 2 t2 a(t) Add the equations, and rearrange : r (t + t) = 2r (t) r (t t) + t 2 a(t)

The Verlet algorithm is a second order algorithm Drawbacks of the Verlet algorithm : Velocities do not appear as they have been eliminated by the addition. They must be estimated, for instance by taking another integration step : v (t) = r (t + t) r (t t) 2 t Velocities are needed, for instance, when computing the kinetic energy of the system It is not a self-starting algorithm A small term ( t 2 a(t)) is added to the di erence of two large terms (2 r (t) r (t t) )

There are several variations of the Verlet method : The Leap-Frog Verlet method : r (t + t ) = r (t) + t v (t + 1 2 t) v (t + 1 2 t) = v (t 1 2 t) + t a(t) Disadvantage: Velocities and positions not available at the same time The Velocity Verlet method : r (t + t ) = r (t) + t v(t) + 1 2 t2 a(t) v (t + t ) = v (t) + t 2 [ a(t) + a(t + t) ] Solved in two steps with a force evaluation in between Yields the positions, velocities and accelerations at the same time

Apart from numerical di erences, the three Verlet methods result in the same trajectories The Gear predictor-corrector integrator : First new positions, velocities and accelerations are predicted according to the Taylor expansions : r p (t + t ) = r (t) + t v (t) + 1 2 t2 a(t) + 1 6 t3 b(t) + 1 24 t4 c (t) v p (t + t ) = v (t) + t a(t) + 1 2 t2 b(t) + 1 6 t3 c (t) a p (t + t ) = a(t) + t b(t) + 1 2 t2 c (t) b p (t + t ) = b(t) + t c (t) Then the forces are evaluated to give the true accelerations a(t + t)

The Gear predictor-corrector integrator (cont) : The di erence between the predicted and calculated accelerations is computed : a(t + t) = a(t + t) a p (t + t) The correction step : r c (t + t) = r p (t + t) + c 0 a(t + t) v c (t + t) = v p (t + t) + c 1 a(t + t) a c (t + t) = a p (t + t) + c 2 a(t + t) b c (t + t) = b p (t + t) + c 3 a(t + t) c c (t + t) = c p (t + t) + c 4 a(t + t) The values of the coefficients c 0, c 1,... depend on the order of the method ( c 0 = 120 19, c 1 = 4 3, c 2 = 1, c 3 = 2 1, c 4 = 1 12 )

Choosing the Timestep A balance is needed in choosing the timestep. A too short timestep lead to a very expensive solution of the equations of motion, and leads to a limited coverage of phase space. A much too small timestep might lead to round-o errors. Too large of a timestep leads to instabilities Example: Simulations of the 2D Lennard-Jones Argon System -356.029 Energy (kj/mol) -356.03-356.031-356.032 0 1 2 3 4 5 6 7 8 9 10 Time (ps) Total energy as a function of time Exact trajectory of one argon atom

Velocity Verlet Integrator t = 1 fs (blue) -356.029 Energy (kj/mol) -356.03-356.031-356.032 0 1 2 3 4 5 6 7 8 9 10 Time (ps) Velocity Verlet Integrator t = 10 fs (blue) Energy (kj/mol) -355.99-356 -356.01-356.02-356.03-356.04-356.05-356.06-356.07-356.08-356.09 0 1 2 3 4 5 6 7 8 9 10 Time (ps)

Gear Predictor-Corrector Method t = 1 fs (blue) -356.029 Energy (kj/mol) -356.03-356.031-356.032 0 1 2 3 4 5 6 7 8 9 10 Time (ps) Gear Predictor-Corrector Method t = 10 fs (blue) Energy (kj/mol) -347-348 -349-350 -351-352 -353-354 -355-356 -357 0 1 2 3 4 5 6 7 8 9 10 Time (ps)

Comparison of Velocity Verlet (red) and the Gear Predictor-Corrector (blue) at t = 1 fs : Energy (kj/mol) -356.022-356.023-356.024-356.025-356.026-356.027-356.028-356.029-356.03-356.031-356.032 0 100 200 300 400 500 600 700 800 9001000 Time (ps) The Gear method has short time fluctuations, but it has a (substantial) long-time drift The Verlet method uses a central di erence and is thus time-reversible The trajectories will eventually always diverge from the true trajectory The energy (Hamiltonian) of the system should be conserved Use a shorter timestep for : Lighter particles Higher temperatures Sti er potentials