Non-bonded interactions

Similar documents
Non-bonded interactions

Biomolecular modeling II

Computer simulation methods (2) Dr. Vania Calandrini

Advanced Molecular Molecular Dynamics

An FPGA Implementation of Reciprocal Sums for SPME

Neighbor Tables Long-Range Potentials

Why Proteins Fold? (Parts of this presentation are based on work of Ashok Kolaskar) CS490B: Introduction to Bioinformatics Mar.

Simulations of bulk phases. Periodic boundaries. Cubic boxes

Computational Molecular Biophysics. Computational Biophysics, GRS Jülich SS 2013

Notes on Ewald summation techniques

Tutorial on the smooth particle-mesh Ewald algorithm

Lecture 12: Solvation Models: Molecular Mechanics Modeling of Hydration Effects

MOLECULAR DYNAMICS SIMULATIONS OF BIOMOLECULES: Long-Range Electrostatic Effects

Long-range interactions: P 3 M, MMMxD, ELC, MEMD and ICC

Molecular Dynamics Simulations

All-atom Molecular Mechanics. Trent E. Balius AMS 535 / CHE /27/2010

Optimizing GROMACS for parallel performance

Introduction to molecular dynamics

Using Molecular Dynamics to Compute Properties CHEM 430

A reciprocal space based method for treating long range interactions in ab initio and force-field-based calculations in clusters

Gromacs Workshop Spring CSC

N-body simulations. Phys 750 Lecture 10

A Fast N-Body Solver for the Poisson(-Boltzmann) Equation

Seminar in Particles Simulations. Particle Mesh Ewald. Theodora Konstantinidou

Intermolecular Forces and Monte-Carlo Integration 열역학특수연구

Free energy simulations

Molecular mechanics. classical description of molecules. Marcus Elstner and Tomáš Kubař. April 29, 2016

Developing Monovalent Ion Parameters for the Optimal Point Charge (OPC) Water Model. John Dood Hope College

Molecular Modeling -- Lecture 15 Surfaces and electrostatics

Multiphase Flow and Heat Transfer

Coarse-Grained Models!

Efficient Parallelization of Molecular Dynamics Simulations on Hybrid CPU/GPU Supercoputers

Biomolecular modeling I

Molecular Dynamics. A very brief introduction

Lecture 11: Potential Energy Functions

What is Classical Molecular Dynamics?

CS 542G: The Poisson Problem, Finite Differences

Welcome. to Electrostatics

Partial differential equations

Review: Power series define functions. Functions define power series. Taylor series of a function. Taylor polynomials of a function.

Biomolecular modeling. Theoretical Chemistry, TU Braunschweig (Dated: December 10, 2010)

1. Poisson-Boltzmann 1.1. Poisson equation. We consider the Laplacian. which is given in spherical coordinates by (2)

CS 273 Prof. Serafim Batzoglou Prof. Jean-Claude Latombe Spring Lecture 12 : Energy maintenance (1) Lecturer: Prof. J.C.

Notes for Lecture 10

Infinite series, improper integrals, and Taylor series

Notes: Most of the material presented in this chapter is taken from Jackson, Chap. 2, 3, and 4, and Di Bartolo, Chap. 2. 2π nx i a. ( ) = G n.

SYDE 112, LECTURE 7: Integration by Parts

Supporting Information

This is an electronic reprint of the original article. This reprint may differ from the original in pagination and typographic detail.

UNIT I SOLID STATE PHYSICS

Physics 200 Lecture 4. Integration. Lecture 4. Physics 200 Laboratory

Can a continuum solvent model reproduce the free energy landscape of a β-hairpin folding in water?

EECS 117 Lecture 7: Electrostatics Review

Analysis of the simulation

X-ray Crystallography

This semester. Books

1. Hydrogen atom in a box

Time scales. Notes. Mixed Implicit/Explicit. Newmark Methods [ ] [ ] "!t = O 1 %

Chapter 24. Gauss s Law

Plasmonics: elementary excitation of a plasma (gas of free charges) nano-scale optics done with plasmons at metal interfaces

Fast Ewald Summation based on NFFT with Mixed Periodicity

An introduction to Molecular Dynamics. EMBO, June 2016

Multiple time step Monte Carlo simulations: Application to charged systems with Ewald summation

The Fourier spectral method (Amath Bretherton)

Applications of Molecular Dynamics

3 Chapter. Gauss s Law

Salmon: Lectures on partial differential equations


INTRODUCTION. Introduction. Discrete charges: Electric dipole. Continuous charge distributions. Flux of a vector field

Conductors and Insulators

Biomolecular modeling I

Physics 2B. Lecture 24B. Gauss 10 Deutsche Mark

Parallelization of Molecular Dynamics (with focus on Gromacs) SeSE 2014 p.1/29

Bioengineering 215. An Introduction to Molecular Dynamics for Biomolecules

1. Overview of the relations among charge, field and potential Gauss law Integrate charge to get potential More about energy Laplace and Poisson

The Hydrogen Atom. Dr. Sabry El-Taher 1. e 4. U U r

Lecture 17 - The Secrets we have Swept Under the Rug

Homework 4: Hard-Copy Homework Due Wednesday 2/17

2 Structure. 2.1 Coulomb interactions

RWTH Aachen University

ONE AND MANY ELECTRON ATOMS Chapter 15

PHY102 Electricity Topic 3 (Lectures 4 & 5) Gauss s Law

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

University of Illinois at Chicago Department of Physics. Electricity & Magnetism Qualifying Examination

Castep & Real Space Integrals

Molecular dynamics simulation of Aquaporin-1. 4 nm

Electronic Structure Theory for Periodic Systems: The Concepts. Christian Ratsch

CE 530 Molecular Simulation

The generalized Born model: its foundation, applications, and limitations

Multiscale Modelling, taking into account Collisions

Multiple time step Monte Carlo

Classical Electrostatics for Biomolecular Simulations

Integrals in Electrostatic Problems

13 - ELECTROSTATICS Page 1 ( Answers at the end of all questions )

Smoothed Particle Hydrodynamics (SPH) 4. May 2012

Where, ε 0 = Permittivity of free space and = Nm 2 C 2 Therefore, force

Plasmas as fluids. S.M.Lea. January 2007

Geometry of Crystal Lattice

Efficient multiple time step method for use with Ewald and particle mesh Ewald for large biomolecular systems

Transcription:

speeding up the number-crunching continued Marcus Elstner and Tomáš Kubař December 3, 2013

why care? number of individual pair-wise interactions bonded interactions proportional to N: O(N) non-bonded interactions between every pair of atoms computational effort of O(N 2 ) take the largest part of computational time good target of optimization

Intro to electrostatic interaction Coulomb s law elstat. interaction energy of point charges q and Q on distance r: E el = 1 q Q 4πε 0 r electrostatic potential (ESP) induced at r by a number of point charges Φ( r) = 1 Q i 4πε 0 r r i if we know ESP at r, and q is placed there, elstat. energy follows as E el ( r) = Φ( r) q i

Intro to electrostatic interaction Coulomb s law continuous charge distribution charge density ρ = Q/ V = lim V Q/ V summing the potential induced by charge in volume elements V gives Φ( r) = 1 4πε 0 i ρ( r i ) V r r i for infinitesimal volume elements (with d 3 r = dv ): Φ( r) = 1 4πε 0 ρ( r 1 ) r r 1 d3 r 1

Intro to electrostatic interaction Poisson s equation needs to be solved to get ESP from charge distribution (differential equation for Φ as a function of r): 2 Φ( r) = ρ( r) ε example: ESP of Gaussian charge density around o with width σ: [ ] 1 r 2 ρ(r) = Q σ 3 2π 3 exp 2σ 2 solution of Poisson s equation: Φ(r) = 1 4πε Q r erf [ r 2σ ]

Intro to electrostatic interaction Poisson s equation solution for Gaussian charge density: Φ(r) = 1 4πε Q r erf [ r 2σ ]

Intro to electrostatic interaction Poisson s equation solution for Gaussian charge density: Φ(r) = 1 4πε Q r erf [ r 2σ ] if we move far from the center of charge density (r is large) erf converges to 1, ESP equals that of a point charge placed in o a point charge and a localized charge density look the same from large distance the distance need not be too large actually: erf[x] = 0.999 already for x = 2.4

Periodic boundary conditions Biomolecule in solution typical setup of a biomolecular MD simulation a biomolecule / complex + several 1000s H 2 O molecules (as few as possible) in a cube n n n nm issue everything is close to the surface, while we are interested in a molecule in bulk solvent

Periodic boundary conditions Periodic boundary conditions molecular system placed in a regular-shaped box the box is virtually replicated in all spatial directions this way, the system is infinite no surface! the problems of a system in vacuo disappear

Periodic boundary conditions PBC example

Periodic boundary conditions PBC features positions / velocities of all atoms are identical in all replicas, so that we can keep only one copy in the memory an atom that leaves the box enters it on the other side the atoms near the wall of the simulation cell interact with the atoms in the neighboring replica carefull accounting of interactions between atoms is necessary

Periodic boundary conditions PBC box shape may be simple cubic or orthorhombic, parallelepiped (specially, rhombohedron), or hexagonal prism

Periodic boundary conditions PBC box shape... but also more complicated truncated octahedral or rhombic dodecahedral quite complex equations for interactions & eqns of motion advantage for simulation of spherical objects (globular proteins) no corners far from the molecule filled with unnecessary H 2 O

Periodic boundary conditions PBC box shape 2D objects phase interfaces, membrane systems usually treated in a slab geometry

Accelerating non-bonded interactions Cut-off simple idea non-bonded terms bottleneck of the calculation with PBC infinite number of interaction pairs, but the interaction decreases with increasing distance simplest and crudest approach to limit the number of calculations neglect interaction of atoms further apart than r c cut-off very good for rapidly decaying LJ interaction (1/r 6 ) (r c = 10 Å) not so good for slowly decaying electrostatics (1/r) discontinuity of potential energy and, even worse, the forces

Accelerating non-bonded interactions Cut-off better alternatives elstat. interaction energy of two unit positive charges shift / switch applied to either energy or force cut-off schemes based on functional groups, if applicable

Accelerating non-bonded interactions Neighbor lists cut-off we still have to calculate the distance for every two atoms (to compare it with the cut-off distance) we do not win much yet there are still O(N 2 ) distances observation: pick an atom A. the atoms that are within cut-off distance r c around A, remain within r c for several consecutive steps of dynamics, while no other atoms approach A that close idea: maybe it is only necessary to calculate the interactions between A and these close atoms neighbors

Accelerating non-bonded interactions Neighbor lists

Accelerating non-bonded interactions Neighbor lists what will we do? calculate the distances for every pair of atoms less frequently, i.e. every 10 or 20 steps of dynamics, and record the atoms within cut-off distance in a neighbor list then calculate the interaction for each atom only with for the atoms in the neighbor list formally O(N) note the build of the neighbor list itself is O(N 2 ), which can be reduced with further tricks ( cell lists )

Complete treatment of non-bonded interactions Accounting of all of the replicas cut-off often bad approximation, e.g. with highly charged molecular systems (DNA, some proteins) switching functions bring on artificial forces e.g. artificial accumulation of ions around cut-off the only solution abandon the cut-off sum up the long-range Coulomb interaction between all the replicas of the simulation cell

Complete treatment of non-bonded interactions Can we sum it up simply? sum of Coulomb interactions over all replicas: E Coul = 1 2 i,j replicas n q i q j r ij + n i and j run over all atoms in the unit cell (r ij their distance) infinite sum with special convergence problems alternating harmonic series n ( 1)n /n conditionally convergent: it converges i=1 a i <, but does not converge absolutely: i=1 a i = convergence is slow and dependent on the order of summation

Complete treatment of non-bonded interactions Sum it up not so simply Ewald any smart way to calculate ESP induced by all images of all atoms? Φ( r i ) = j replicas n q j r ij + n to get the Coulomb energy of charges q i in the unit cell E Coul = 1 q i Φ( r i ) 2 idea: pass to a sum of two series that will converge rapidly: 1 r = f (r) r i + 1 f (r) r may seem awkward, but will work well

Complete treatment of non-bonded interactions Sum it up not so simply Ewald summing over point charges difficult (convergence problem) Ewald method Gaussian densities of the same magnitude: ( ) α 3 q j q j exp [ α 2 r j 2] π obtain ESP with Poisson s equation for 1 Gaussian ESP has a form of error function erf[x] = 2 π x erfc[x] = 1 erf[x] 0 exp[ t 2 ] dt with Ewald: summing ESP induced by all charges, we obtain Φ( r i ) = j replicas n q j erf [α r ij + n ] r ij + n

Complete treatment of non-bonded interactions Sum it up not so simply Ewald the full ESP induced by all replicas of all charges: Φ( r i ) = j + j replicas n replicas n = Φ real ( r i ) + Φ rec ( r i ) q j erfc [α r ij + n ] r ij + n q j erf [α r ij + n ] r ij + n Φ real ( r i ) real-space contribution from a certain, quite small distance (depending on α): point charges and the charge densities cancel each other this contribution vanishes and we can use cut-off here

Complete treatment of non-bonded interactions Ewald two contributions real-space contribution to the Ewald sum original point charges (red) and Gaussian charge densities (blue) of the same magnitude but opposite sign a distant Gaussian looks much like a point charge, and the difference of ESP goes to zero cut-off is justified reciprocal-space contribution

Complete treatment of non-bonded interactions Ewald 2nd contribution the total charge density is periodic it may be meaningful to Fourier-transform the calculation to the reciprocal space (density) solve (hard) (potential) Fourier transform inverse Fourier transform (transformed density) solve (easy) (transformed potential) ˆf (ξ) = Re ˆf (ξ) = Im ˆf (ξ) = f (x) exp[ i x ξ] dx f (x) cos[x ξ] dx f (x) sin[x ξ] dx

Complete treatment of non-bonded interactions Ewald 2nd contribution the total charge density is periodic it may be meaningful to Fourier-transform the calculation to the reciprocal space (density) solve (hard) (potential) Fourier transform inverse Fourier transform (transformed density) solve (easy) (transformed potential) 2 Φ( r) = ρ( r) ε k 2 ˆΦ( k) = ˆρ( k) ε hard easy

Complete treatment of non-bonded interactions Ewald 2nd contribution Φ rec ( r i ) reciprocal-space contribution with reciprocal vector ( k = k x 2π L x, k y 2π L y, k z 2π L z ), k i Z best evaluated in the form Φ rec ( r i ) = 4π V [ ] 1 exp k 2 k 2 4α 2 q j exp[ i k r ij ] k o j terms decrease with increasing k quickly cut-off possible converges fast with large Gaussian width α therefore, the value of α is a compromise between the requirements of real- and reciprocal-space calcul. both contributions favorable convergence behavior we can evaluate electrostatic interactions with atoms in all periodic images

Complete treatment of non-bonded interactions Ewald the last contribution broadened charge density interacts with itself and this energy must be subtracted from the final result Coulomb self-energy of a broadened Gaussian: E self = j q j Φ( o) = j q j q j α π

Complete treatment of non-bonded interactions Ewald complete expression for energy 3 contributions: real-space E real = 1 q j Φ real ( r j ) 2 j reciprocal-space E rec = 1 q j Φ rec ( r j ) 2 self-energy E Ewald = E real + E rec E self j

Complete AND efficient treatment of electrostatics Thinking about Ewald Ewald summation correct Coulomb interaction energy at a quite high computational cost: scales with the number of atoms as O(N 2 ) with a better algorithm O(N 3 2 ) not efficient enough for large-scale simulations goal improved efficiency of the long-range sum (reciprocal-space contribution)

Complete AND efficient treatment of electrostatics Thinking about Ewald Ewald summation correct Coulomb interaction energy at a quite high computational cost: scales with the number of atoms as O(N 2 ) with a better algorithm O(N 3 2 ) not efficient enough for large-scale simulations goal improved efficiency of the long-range sum (reciprocal-space contribution) particle mesh Ewald method (1993) combines ideas from crystallography (Ewald method) and plasma physics (particle mesh method) key to success 3D fast Fourier transform technique

Complete AND efficient treatment of electrostatics Long range energy with PME PME works with a regular grid constructed in the simulation box step 1 convert the point charges to Gaussian charge densities and spread on the grid in the form of splines series of polynoms practically, we need to have charges discretized on the grid points if an atom is close to the edge of the box, a part of its charge must be put to the opposite side of the box (PBC) step 2 Fourier transform the charge density on the grid discrete 3D fast Fourier transform technique

Complete AND efficient treatment of electrostatics Long range energy with PME step 3 solve Poisson s eqn in the reciprocal space energy and Fourier transform of potential E rec = 1 2 K 1 1 K 2 1 K 3 1 k 1 =0 k 2 =0 k 3 =0 Q(k 1, k 2, k 3 ) (Θ rec Q)(k 1, k 2, k 3 ) gridded charge array Q( k) represents the transformed density ˆρ Θ rec is given by box size and character of splines easy to get 3D-FFT used to calculate the convolution Θ rec Q this gives the transformed ESP in recip. space, ˆΦ rec

Complete AND efficient treatment of electrostatics Long range energy with PME step 4 get the potential in real space (inverse Fourier transform), interpolate its derivative to calculate the forces expressed in terms of splines analytical calculation step 5 get E real and E self directly from the presented expressions step 6 attention the reciprocal energy/forces include contributions from atom pairs that are connected with bonds these have to be subtracted afterwards (excluded) list Eexcl rec = 1 q i q j erf [α r ij ] 4πε 0 r ij i,j

Complete AND efficient treatment of electrostatics Long range energy with PME PME parameters: spacing of grid ca. 1 Å, α 1 ca. 2.5 Å short-range cutoff 10 Å possible neighbor lists every nl steps, the following procedure: measure distances of every pair of atoms in system distance smaller than a pre-set value? put the pair on the list in the following nl steps, calculate short-ranged interactions only for the pairs on this neighbor list linear scaling of short-range interactions (O(N)) complexity of the long-range PME component: O(N log N) due to the efficiency of FFT modern implementations nearly as efficient as cut-off!

Explicit water models Water in biomolecular simulations most simulations something in aqueous solutions H 2 O usually (many) thousands molecules

Explicit water models Water in biomolecular simulations most simulations something in aqueous solutions H 2 O usually (many) thousand molecules example simulation of DNA decanucleotide: PBC box 3.9 4.1 5.6 nm (smallest meaningful) 630 atoms in DNA, 8346 atoms in water and 18 Na + concentration of DNA: 18 mmol/l very high! of all pair interactions: 86 % are water water, most of the others involve water

Explicit water models Water models most interactions involve H 2 O necessary to pay attention to its description model of water must be simple enough (computational cost) and accurate enough, at the same time water models usually rigid bond lengths and angles do not vary constraints molecule with three sites (atoms in this case), or up to six sites three atoms and virtual sites corresponding to a center of electron density or lone electron pairs

Explicit water models Water models TIP3P (very similar is SPC) TIP4P TIP5P most frequently used 3 atoms with 3 rigid bonds, charge on every atom ( 0.834/+0.417) only the O possesses non-zero LJ parameters (optimization) negative charge placed on virtual site M rather than on the O electric field around the molecule described better 2 virtual sites L with negative charges near the O lone pairs better description of directionality of H-bonding etc. (radial distribution function, temperature of highest density)