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

Similar documents
Computer simulation methods (2) Dr. Vania Calandrini

Neighbor Tables Long-Range Potentials

Applications to simulations: Monte-Carlo

Non-bonded interactions

Efficient Algorithms for Electrostatic Interactions Including Dielectric Contrasts

arxiv: v2 [physics.comp-ph] 19 Oct 2008

Advanced Molecular Molecular Dynamics

Non-bonded interactions

Optimizing GROMACS for parallel performance

Long-range Interactions in Particle Simulations ScaFaCoS. Olaf Lenz

Tutorial on the smooth particle-mesh Ewald algorithm

The Helmholtz theorem at last!

Theoretische Physik 2: Elektrodynamik (Prof. A-S. Smith) Home assignment 11

PDEs in Spherical and Circular Coordinates

Molecular Dynamics Simulations

Dielectrics - III. Lecture 22: Electromagnetic Theory. Professor D. K. Ghosh, Physics Department, I.I.T., Bombay

Electric fields in matter

Introduction to molecular dynamics

Fast Ewald Summation based on NFFT with Mixed Periodicity

Chapter 4. Electrostatic Fields in Matter

An FPGA Implementation of Reciprocal Sums for SPME

Class 6 : Insulating Materials

MOLECULAR DYNAMICS SIMULATIONS OF BIOMOLECULES: Long-Range Electrostatic Effects

free space (vacuum) permittivity [ F/m]

Practical in Numerical Astronomy, SS 2012 LECTURE 9

PHYS4210 Electromagnetic Theory Quiz 1 Feb 2010

Indiana University Physics P331: Theory of Electromagnetism Review Problems #3

Electrodynamics I Midterm - Part A - Closed Book KSU 2005/10/17 Electro Dynamic

Lecture 3. Electric Field Flux, Gauss Law

Quiz Fun! This box contains. 1. a net positive charge. 2. no net charge. 3. a net negative charge. 4. a positive charge. 5. a negative charge.

Physics 6C Review 1. Eric Reichwein Department of Physics University of California, Santa Cruz. July 16, Figure 1: Coulombs Law

lim = F F = F x x + F y y + F z

Electric and magnetic multipoles

Microscopic electrodynamics. Trond Saue (LCPQ, Toulouse) Microscopic electrodynamics Virginia Tech / 46

Junior-level Electrostatics Content Review

Self-consistent Field

Boundary conditions in local electrostatics algorithms

Capacitance. Chapter 21 Chapter 25. K = C / C o V = V o / K. 1 / Ceq = 1 / C / C 2. Ceq = C 1 + C 2

Maxwell s equations for electrostatics

3 Chapter. Gauss s Law

Simulations of bulk phases. Periodic boundaries. Cubic boxes

Questions Chapter 23 Gauss' Law

(a) Show that electric field and magnetic field have units (force)/area or energy/volume.

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

Exam 1 Solutions. Note that there are several variations of some problems, indicated by choices in parentheses. Problem 1

Problem Set #3: 2.11, 2.15, 2.21, 2.26, 2.40, 2.42, 2.43, 2.46 (Due Thursday Feb. 27th)

Energy and Forces in DFT

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

AP Physics C. Gauss s Law. Free Response Problems

Multiscale Modelling, taking into account Collisions

Physics GRE: Electromagnetism. G. J. Loges 1. University of Rochester Dept. of Physics & Astronomy. xkcd.com/567/

Theory and Applications of Dielectric Materials Introduction

Long range interactions in computer simulations. 1 (Part 3)

Gauss s Law. Name. I. The Law: , where ɛ 0 = C 2 (N?m 2

N-body simulations. Phys 750 Lecture 10

week 3 chapter 28 - Gauss s Law

Coarse-Grained Models!

Physics 3323, Fall 2016 Problem Set 2 due Sep 9, 2016

CE 530 Molecular Simulation

A smooth particle-mesh Ewald algorithm for Stokes suspension simulations: The sedimentation of fibers

Green s functions for planarly layered media

PHY102 Electricity Course Summary

Physics 342 Lecture 22. The Hydrogen Atom. Lecture 22. Physics 342 Quantum Mechanics I

Lecture notes for ELECTRODYNAMICS.

A High-Order Galerkin Solver for the Poisson Problem on the Surface of the Cubed Sphere

Fluid Dynamics. Part 2. Massimo Ricotti. University of Maryland. Fluid Dynamics p.1/17

DIVERGENCE AND CURL THEOREMS

Solution Set One. 4 Problem #4: Force due to Self-Capacitance Charge on Conductors Repulsive Force... 11

Laplacian-Centered Poisson Solvers and Multilevel Summation Algorithms

Second Year Electromagnetism Summer 2018 Caroline Terquem. Vacation work: Problem set 0. Revisions

Plasma Astrophysics Chapter 1: Basic Concepts of Plasma. Yosuke Mizuno Institute of Astronomy National Tsing-Hua University

1. (3) Write Gauss Law in differential form. Explain the physical meaning.

Physics 221. Exam III Spring f S While the cylinder is rolling up, the frictional force is and the cylinder is rotating

E&M. 1 Capacitors. January 2009

A cylinder in a magnetic field (Jackson)

Übungen zur Elektrodynamik (T3)

Molecular Modeling -- Lecture 15 Surfaces and electrostatics

PHY294H. l Professor: Joey Huston l l office: BPS3230

3. A solid conducting sphere has net charge of +6nC. At electrostatic equilibrium the electric field inside the sphere is:

Lecture contents Review: Few concepts from physics Electric field

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

PHYS4210 Electromagnetic Theory Spring Final Exam Wednesday, 6 May 2009

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

Using Molecular Dynamics to Compute Properties CHEM 430

Electric Flux. If we know the electric field on a Gaussian surface, we can find the net charge enclosed by the surface.

Numerical Analysis of Electromagnetic Fields

1. Thomas-Fermi method

OPENATOM for GW calculations

Light Localization in Left-Handed Media

Chapter 25. Capacitance

Physics 202, Lecture 3. The Electric Field

A SHORT INTRODUCTION TO TWO-PHASE FLOWS Two-phase flows balance equations

Classical Field Theory: Electrostatics-Magnetostatics

06. Lagrangian Mechanics II

Review of Electrodynamics

Electromagnetic Field Theory (EMT)

Scalar electromagnetic integral equations

1. (3) Write Gauss Law in differential form. Explain the physical meaning.

r r 1 r r 1 2 = q 1 p = qd and it points from the negative charge to the positive charge.

and another with a peak frequency ω 2

Transcription:

Long-range interactions: P 3 M, MMMxD, ELC, MEMD and ICC Axel Arnold Institute for Computational Physics Universität Stuttgart October 10, 2012

Long-range interactions gravity Coulomb interaction dipolar interaction hydrodynamic interaction A. Arnold Long-range interactions 2/40

Electrostatics in periodic boundary conditions 3 2 1 2 3 1 1 2 0 1 3 2 Coulomb potential U = 1 2 l B N S=0 m 2 =S i,j=1 q i q j r ij + ml Bjerrum length l B = e2 4πɛ 0 k B T measures Coulomb interaction strength against thermal fluctuations sum conditionally convergent summation order important... and numerical summation difficult spherical summation order physical 3 spherical U not periodic in coordinates r i A. Arnold Long-range interactions 3/40

Electrostatics in periodic boundary conditions Alternatively from potential U = 1 2 Poisson s equation: N q i φ(r i ) i=1 N 2 φ(r) = 4π δ(r j r)q j, j=1 imposing periodic boundary conditions intrinsic solution difference to spherical sum known intrinsic U is periodic in coordinates r i A. Arnold Long-range interactions 4/40

Electrostatics in ESPResSo requires myconfig.h-switch ELECTROSTATICS switching on: inter coulomb <l B > <method > <parameters > methods and their parameters: next 2 hours switching off: inter coulomb 0 getting l B, method and parameters: inter coulomb returns e. g. { coulomb 1.0 p3m 7.75 8 5 0.1138 0.0} { coulomb epsilon 80.0 n_interpol 32768 mesh_off 0.5 0.5 0.5} A. Arnold Long-range interactions 5/40

Assigning charges assigning charges to particles part 0 pos 0 0 0 q 1 part 1 pos 0.5 0 0 q -1.5 adding a charged plate constraint plate height <h> sigma <σ> plate parallel to xy-plane at z = h, charge density σ requires 2D periodicity adding a charged rod constraint rod center <c x > <c y > lambda <λ> rod parallel to z-axis at (x, y) = (c x, c y ), line charge density λ requires 1D periodicity A. Arnold Long-range interactions 6/40

The Ewald method P. P. Ewald, 1888 1985 Coulomb potential has 2 problems 1. singular at each particle position 2. very slowly decaying Idea: separate the two problems! one smooth potential Fourier space one short-ranged potential real space A. Arnold Long-range interactions 7/40

Ewald: splitting the potential charge distribution ρ = N q i δ(r r i n) n LZ 3 i=1 = + replace δ by Gaussians of width α 1 : ρ Gauss (r) = ( α/ π ) 3 e α 2 r 2 δ(r) = ρ Gauss (r) + [δ(r) ρ Gauss (r)] A. Arnold Long-range interactions 8/40

The Ewald formula with U (r) = 1 2 m Z 3 i,j U = U (r) + U (k) + U (s) q i q j erfc(α r ij + ml ) r ij + ml U (k) = 1 4π 2L 3 k 2 e k 2 /4α 2 ρ(k) 2 k 0 U (s) = α π i q 2 i forces from differentiation F i = r i U real space correction Gaussians in k-space Gaussian self interaction A. Arnold Long-range interactions 9/40

The dipole term ɛ = ɛ 3 2 1 2 3 1 2 ɛ = 1 0 1 3 1 3 2 ɛ = ɛ U (d) = ( 2π ) 2 (1 + 2ɛ )L 3 q i r i i Ewald sum derived from Poisson s formula intrinsic potential spherical summation leads to additional term U (d) polarizable material of dielectric constant ɛ outside sphere ɛ = 1 corresponds to mathematical sum ɛ = (metallic boundary conditions) intrinsic potential A. Arnold Long-range interactions 10/40

Non-neutral systems [ U (d) 2π ( = (1 + 2ɛ )L 3 q i r i L ) ] 2 2 e i U (n) = π ( ) 2 2α 2 L 3 q i Ewald can handle systems with net charge assuming a homogeneous, neutralizing background in [0, L] 3 contributes dipole moment and constant energy energy constant is important since it depends on non-physical α i A. Arnold Long-range interactions 11/40

Mesh-based Ewald methods R. W. Hockney J. W. Eastwood replace k-space Fourier sum by discrete FFT discrete FT is exact constant real space cutoff computational order O(N log N) most frequently used methods: P 3 M: optimal method PME SPME R. W. Hockney and J. W. Eastwood, Computer Simulation Using Particles, 1988 M. Deserno and C. Holm, JCP 109:7678, 1998 A. Arnold Long-range interactions 12/40

Steps of P 3 M 1. {r i, q i } ρ(r): interpolate charges onto a grid (window functions: cardinal B-splines) 2. ρ(r) ρ(k): Fourier transform charge distribution 3. ˆφ(k) = Ĝ(k)ˆρ(k): solve Poisson s equation by multiplication with optimal influence function Ĝ(k) (in continuum: product of Green s function 4π and k 2 Fourier transform of Gaussians e k 2 /4α 2 ) 4. ik ˆφ(k) Ê(k): obtain field by Fourier space differentiation 4. Ê(k) E(r): Fourier transform field back 5. E(r) {r i, F i }: interpolate field at position of charges to obtain forces F i = q i E i A. Arnold Long-range interactions 13/40

Charge assignment q 5 q 1 a q q 6 q 3 q 4 q 2 q 7 8 interpolate charges onto h-spaced grid M (P ) (x) 1 0.8 0.6 0.4 0.2 0 0 1 1 2 3 4 2 5 6 3 7 x 4 5 6 7 ρ M (r p ) = 1 h 3 N i=1 q i W (p) (r p r i ) W (p) (r) cardinal B-splines in P 3 M / SPME A. Arnold Long-range interactions 14/40

Optimal influence function Ĝ opt (k) = h 6 ik m Z 3 Ŵ (p)2 (k + 2π h m) R(k + 2π h m) k 2 [ m Z 3 Ŵ (p)2 (k + 2π h m) ] 2 aliasing of continuum force R(k) = ik 4π k 2 e k 2 /4α 2 with differentiation, Green s function and transform of Gaussian minimizes the rms force error functional Q[F] := 1 h h 3 d 3 r 1 d 3 r [ F(r; r 1 ) R(r) ] 2 3 V A. Arnold Long-range interactions 15/40

Why to control errors rms force error F = (F exact F Ewald ) 2 = F 10 1 0.1 0.01 0.001 0.0001 r max =1, k max =10 r max =2, k max =10 r max =1, k max =20 1e-05 0 1 2 3 4 5 α 1 N N i=1 F 2 i optimal α brings orders of magnitude of accuracy at given required accuracy, find fastest cutoffs compare algorithms at the same accuracy A. Arnold Long-range interactions 16/40

How to: error estimates Kolafa and Perram: F F real 10 1 0.1 0.01 0.001 total error real space estimate k-space estimate 0.0001 0 1 2 3 4 5 α q 2 Ni 2 ) ( α rmax L exp 2 r 2 3 max Hockney and Eastwood: F Fourier q 2 i N Q[Ĝopt(k)] L 3 A. Arnold Long-range interactions 17/40

P 3 M in ESPResSo (H. Limbach, AA) tune P 3 M for rms force error τ inter coulomb <l B > p3m tune accuracy <τ > \ [ r_cut <r max >] [ mesh <n M >] [ cao <p >] [ alpha <α>] inter coulomb [ epsilon ɛ ] [ mesh_off o x o y o z ] ɛ is dielectric constant at infinity (defaults to metallic ) o x, o y, o z shifts the mesh origin (defaults to (0, 0, 0)) tunable parameters are (can be fixed) α Ewald splitting parameter (don t fix!) r max real space cutoff (0 to retune) n M = L/h mesh size (0 to retune) p charge assignment spline order p (0 to retune) manually set parameters (dangerous!) inter coulomb <l B > p3m <r max > <n M > <p> <α> A. Arnold Long-range interactions 18/40

Partially periodic systems partially p. b. c. for slablike systems (surfaces, thin films)... or for cylindrical systems (rods, nanopores) dielectric contrasts at interfaces P 3 M cannot be employed straightforwardly A. Arnold Long-range interactions 19/40

Alternative approaches: screening U(r) 10 1 0.1 0.01 1/r exp(-r)/r exp(-r/4)/r 0.001 0.1 1 10 screened Coulomb potential, screening length β 1 : r U β = m Z 3 N i,j=1 q i q j e β r ij +ml r ij + ml U = lim β 0 U β is periodic intrinsic solution A. Arnold Long-range interactions 20/40

Taking the limit: MMM2D far formula φ β (r) = = 2 L k,l LZ = 2π L 2 = 2π L 2 p 2π L Z e β (x+k) 2 +(y+l) 2 +z 2 (x + k)2 + (y + l) 2 + z 2 p,q 2π L Z ( l LZ p 2 +q 2 >0 K 0 ( β2 + p 2 (y + l) 2 + z 2 ) ) e ipx e β 2 +p 2 +q 2 z β2 + p 2 + q 2 eipx e iqy e fpq z f pq e ipx e iqy + z + π L 2 β 1 + O β 0 (β) singularity cancels due to charge neutrality bad or no convergence for z 0 A. Arnold Long-range interactions 21/40

MMM2D near formula φ β (r) = 4 ( ) p (y + l) L 2 + z 2 cos(px) K 0 l LZ p 2π L N 2 L 1 L + n 1 n 0 [ (z ) ] 2n + iy b 2n (2π) 2n 2n(2n)! R L ( 1) 2 ψ (2n) (2 + x L ) + ψ(2n) (2 x L ) n (2n)! ( y 2 + z 2 1 (x + L)2 + y 2 + z + 1 2 (x L)2 + y 2 + z 2 L 2 ) n 2 L log (4π) 2π L 3 β 1 + 1 r + O β 0(β) uses most special functions math offers self energy: special case r = 0 A. Arnold Long-range interactions 22/40

MMM2D procedure far formula = + far formula split system into slices use near formula for adjacent slices, far for the rest computation time near formula O(N 2 /B) far formula O(NR max ) = O(NB 2 ) optimal B N 1/3, computation time O(N 5/3 ) near formula A. Arnold Long-range interactions 23/40

Dielectric contrasts z q t b ε t q t x l z q ε m q b ε b q b t thin film of water in air, water at metallic plate take into dielectric contrast by image charges image charges take form of geometric series handle using far formula A. Arnold Long-range interactions 24/40

MMM2D and MMM1D in ESPResSo (AA) using MMM2D tuned for maximal pairwise error τ cellsystem layered <n layers > inter coulomb <l B > mmm2d <τ > [<k max >] \ [ dielectric <ɛ t > <ɛ m > <ɛ b > dielectric-contrasts < t > < b >] allows to fix k max (p, q)-space cutoff ɛ t, ɛ m, ɛ b dielectric constants or t, b dielectric contrasts requires layered cell system number of layers per CPU n layers = B/N p is tuning parameter using MMM1D tuned for maximal pairwise error τ cellsystem nsquare inter coulomb <l B > mmm1d tune <τ > requires all-with-all cell system A. Arnold Long-range interactions 25/40

The method of Yeh+Berkowitz replicated slab system slab system replicated slab system potential of a charge and its periodic images similar to plate plates cancel due to charge neutrality 2πq i N j=1 h L Lz σ j ( z ji + ml z + z ji ml z ) = 4πq i nl z N j=1 σ j = 0 leave a gap and hope artificial replicas cancel ( ) 2 requires changed dipole term U (d) = 2π L 3 i q iz i A. Arnold Long-range interactions 26/40

Electrostatic layer correction (ELC) error not known a priori required gap size? idea: calculate contribution of image layers Layer correction term U lc = π L 2 k 2π L Z2 k 2 >0 N i,j=1 q i q j e k z ij + e k z ij f pq (e fpqlz 1) ei(kx x ij + k y y ij ) cut off k 2 < R max : computational effort O(NR max ) subtract numerically the ELC term smaller gaps 2-4x faster than plain Yeh+Berkowitz AA, J. de Joannis, and C. Holm, JCP 117:2496, 2002 A. Arnold Long-range interactions 27/40

ELC in ESPResSo (AA) using ELC for maximal pairwise error τ inter coulomb <l B > p3m tune accuracy <τ >... inter coulomb elc <τ > <g> [k max >] \ [ dielectric <ɛ t > <ɛ m > <ɛ b > dielectric-contrasts < t > < b >] gap size g = L z h has to be specified user is responsible to keep a gap (by walls or fixed particles) gap location unimportant requires P 3 M to be switched on first allows to fix k max (p, q)-space cutoff (otherwise tuned) ɛ t, ɛ m, ɛ b dielectric constants or t, b dielectric contrasts A. Arnold Long-range interactions 28/40

Maxwell Equation Molecular Dynamics A. C. Maggs J. C. Maxwell, I. Pasichnyk 1831 1879 B. Dünweg Electrostatics is quasi static limit of electrodynamics Maxwell equations are intrinsically local dielectric constant can vary spatially naturally include boundary conditions linear scaling, easy parallelization problem: speed of light A. C. Maggs and V. Rosetto, PRL 88:196402, 2002 I. Pasichnyk and B. Dünweg, JPCM 16:3999, 2004 A. Arnold Long-range interactions 29/40

Car Parrinello Molecular Dynamics Electron dynamics in the nuclear potential is quasi static limit of coupled electron nuclei dynamics problem: speed of electrons Car Parrinello: heavy electrons to avoid mismatch of time scales statistics are still correct A. C. Maggs: electrostatics from electrodynamics with reduced speed of light A. Arnold Long-range interactions 30/40

Maxwell equations Electrostatics is c limit of E = 1 ɛ 0 ρ and E = 0, F = qe E ( F = qe E + 1 ɛ 0 c 2 v H E = 1 ρ ɛ 0 E = 1 H ɛ 0 c 2 t H = 0 E H = j + ɛ 0 ) ρ t + j = 0 t What if c? A. Arnold Long-range interactions 31/40

Electrostatics as a constraint problem Electrostatic Gauss law as constraint E = 1 ɛ 0 ρ t E = 1 ɛ 0 t ρ t E + 1 ɛ 0 j Θ = 0 solve as constrained dynamics with Lagrange multiplier Θ transversal component equivalent to electrodynamics with Θ c 2 H but c freely choosable A. Arnold Long-range interactions 32/40

Discretization Discrete curl discretize on simple cubic lattice of spacing a charge on lattice sites j, E on the links Θ, H on plaquettes y E(2) ( E) z = x E y y E x E(1) E(3) a = 1 a [(E(3) E(1)) (E(2) E(4))] E(4) x A. Arnold Long-range interactions 33/40

MEMD procedure 1. calculate current j from V j ds = V 2. calculate Ḣ = E 3. propagate H 4. calculate Θ = c 2 H 5. calculate Ė = 1 ɛ 0 j + Θ ρ dv 6. propagate E 7. backinterpolate E on particles and calculate force A. Arnold Long-range interactions 34/40

Self energy correction 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 000 111 000 111 000 111 000 111 000 111 000 111 00 11 0000 1111 00000 11111 00000 11111 000000 111111 000000 111111 000000 111111 000000 111111 00000 11111 00000 11111 00000 11111 000 111 00 11 00 11 00 11 00 11 a charge sees its interpolated charge on the lattice drives charge to center of mesh cell solution: calculate lattice Green s function and subtract A. Arnold Long-range interactions 35/40

Initial electric field initial E-field required for updating either use P 3 M & Co. for this... or a (slow) global update scheme allows for spatial inhomogeneous dielectric constant A. Arnold Long-range interactions 36/40

MEMD in ESPResSo (F. Fahrenberger) using MEMD cellsystem domain_decomposition -no_verlet_list inter coulomb <l B > maggs <f mass > <n M > [ epsilon ɛ ] requires the domain decomposition cellsystem, but with exact sorting (which implies not using Verlet lists) requires to set f mass = 1/c 2 n M = L/h ɛ mass of the field s degree of freedom mesh size dielectric constant at infinity (defaults to metallic ) plain MEMD has artificial dipole term that keeps the initial dipole moment constant ESPResSo corrects the dipole term similar to P 3 M A. Arnold Long-range interactions 37/40

Arbitrary dielectric contrasts MMM2D/ELC only handle planar parallel dielectric interfaces what about a nanopore? vesicle? cannot be handled by image charges A. Arnold Long-range interactions 38/40

ICC algorithm Maxwell equation in dielectric medium boundary condition at interface ε in E in n = ε out E out n can be fulfilled by interface charge density σ = 1 2π ε ε in ε out out E ε in + ε out solve for σ iteratively, E from standard Coulomb solver A. Arnold Long-range interactions 39/40

ICC in ESPResSo (S. Kesselheim) set up the meshed interfaces dielectric sphere center <x y z > \ radius <r > res <a> eps <ε in > a is mesh size of the generated mesh alternatively wall, pore, cylinder creates Tcl variables with properties of the surface points: n induced charges icc epsilons: list of dielectric constants, can vary per surface point icc normals: list of normal vectors icc areas: list of surface areas sigmas: optional list of additional surface charge densities surfaces charges are calculated by iccp3m $n_induced_charges epsilons $icc_epsilons \ normals $icc_normals areas $icc_areas [ sigmas $icc_sigmas ] A. Arnold Long-range interactions 40/40