N-body simulations. Phys 750 Lecture 10

Similar documents
Neighbor Tables Long-Range Potentials

Coarse-Grained Models!

Advanced Molecular Molecular Dynamics

Computer simulation methods (2) Dr. Vania Calandrini

Notes on Ewald summation techniques

Non-bonded interactions

Simulations of bulk phases. Periodic boundaries. Cubic boxes

Physics 212: Statistical mechanics II Lecture IV

Introduction to molecular dynamics

Scientific Computing II

An introduction to Molecular Dynamics. EMBO, June 2016

Tutorial on the smooth particle-mesh Ewald algorithm

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

Supplemental Material Controlled Self-Assembly of Periodic and Aperiodic Cluster Crystals

Optimizing GROMACS for parallel performance

Molecular Dynamics Simulations

Supplemental Material Controlled Self-Assembly of Periodic and Aperiodic Cluster Crystals

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

Multiphase Flow and Heat Transfer

Non-bonded interactions

Molecular Dynamics 9/6/16

Introduction to Molecular Dynamics

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

Lecture Models for heavy-ion collisions (Part III): transport models. SS2016: Dynamical models for relativistic heavy-ion collisions

Chapter 2 Experimental sources of intermolecular potentials

Molecular Dynamics Simulation of Argon

The Second Virial Coefficient & van der Waals Equation

General theory of diffraction

Exploring the energy landscape

General Physical Chemistry II

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

Material Surfaces, Grain Boundaries and Interfaces: Structure-Property Relationship Predictions

PROBING CRYSTAL STRUCTURE

Forces, Energy and Equations of Motion

Chapter 21 Chapter 23 Gauss Law. Copyright 2014 John Wiley & Sons, Inc. All rights reserved.

Lecture 5: Logistic Regression. Neural Networks

CE 530 Molecular Simulation

Ideal Gas Behavior. NC State University

Lecture 11: Long-wavelength expansion in the Neel state Energetic terms

8.1 Concentration inequality for Gaussian random matrix (cont d)

Lecture #3 a) Nuclear structure - nuclear shell model b) Nuclear structure -quasiparticle random phase approximation c) Exactly solvable model d)

PHYS102 - Gauss s Law.

CE 530 Molecular Simulation

Lifting Airfoils in Incompressible Irrotational Flow. AA210b Lecture 3 January 13, AA210b - Fundamentals of Compressible Flow II 1

V.C The Second Virial Coefficient & van der Waals Equation

Coulomb s Law. Phys102 Lecture 2. Key Points. Coulomb s Law The electric field (E is a vector!) References

8/24/2018. Charge Polarization. Charge Polarization. Charge Polarization

Imperfect Gases. NC State University

Review of Forces and Conservation of Momentum

Summary of electrostatics

A Crash Course on Fast Multipole Method (FMM)

Basis sets for electron correlation

Dynamics of Galaxies: Basics. Frontiers in Numerical Gravitational Astrophysics July 3, 2008

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

Review of Exponential Change Model and Forces

ψ s a ˆn a s b ˆn b ψ Hint: Because the state is spherically symmetric the answer can depend only on the angle between the two directions.

General Physics II. Electric Charge, Forces & Fields

PHY 396 K. Solutions for problems 1 and 2 of set #5.

Machine Learning. Kernels. Fall (Kernels, Kernelized Perceptron and SVM) Professor Liang Huang. (Chap. 12 of CIML)

+ V = 0, j = 1,..., 3N (7.1) i =1, 3 m = 1, N, X mi, V X mi. i = 0 in the equilibrium. X mi X nj

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

Kasetsart University Workshop. Multigrid methods: An introduction

Chemistry 365: Normal Mode Analysis David Ronis McGill University

Section B. Electromagnetism

STA 4273H: Statistical Machine Learning

Problem Set 2: Solutions

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

Nucleon Pair Approximation to the nuclear Shell Model

Signals and systems Lecture (S3) Square Wave Example, Signal Power and Properties of Fourier Series March 18, 2008

Lecture C2 Microscopic to Macroscopic, Part 2: Intermolecular Interactions. Let's get together.

Short Sample Solutions to the Sample Exam for (3rd Year Course 6) Hilary Term 2011

175-IJN Article No SPIN IN CARBON NANOTUBE-BASED OSCILLATORS

Outline for Fundamentals of Statistical Physics Leo P. Kadanoff

Lecture 4; January Electrons in Atoms: Magnetism; Term Symbols, Z eff, and Other Properties

Statistical Machine Learning Lecture 8: Markov Chain Monte Carlo Sampling

Chapter 3. The (L)APW+lo Method. 3.1 Choosing A Basis Set

Linear Algebra and Dirac Notation, Pt. 1

Physics 127c: Statistical Mechanics. Weakly Interacting Fermi Gas. The Electron Gas

PHYS 2426 Brooks INTRODUCTION. Physics for Scientists and Engineers, with Modern Physics, 4 th edition Giancoli

Part III: The Nuclear Many-Body Problem

The broad topic of physical metallurgy provides a basis that links the structure of materials with their properties, focusing primarily on metals.

CHEM-UA 652: Thermodynamics and Kinetics

Theoretical comparative study on hydrogen storage of BC 3 and carbon nanotubes

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

221B Lecture Notes Spontaneous Symmetry Breaking

Statistical Physics. Solutions Sheet 11.

The Fast Multipole Method in molecular dynamics

Lecture 21 Gravitational and Central Forces

Electrons in periodic potential

1 4 r q. (9.172) G(r, q) =

Physics 342 Lecture 23. Radial Separation. Lecture 23. Physics 342 Quantum Mechanics I

Complex functions in the theory of 2D flow

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

Quantum Mechanics II

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

Gases and the Virial Expansion

Quantization of the Spins

( nonlinear constraints)

Project: Vibration of Diatomic Molecules

The Kernel Trick, Gram Matrices, and Feature Extraction. CS6787 Lecture 4 Fall 2017

Transcription:

N-body simulations Phys 750 Lecture 10

N-body simulations Forward integration in time of strongly coupled classical particles or (rigid-body composite objects) dissipation Brownian motion Very general class of second-order ODE: r = r apple r apple r 5 + ë (2) (r, r )+ <, ë Referred to as N-body simulation or molecular dynamics in various scientific communities arbitrary forces (3) (r, r, r )+5

Broad applicability Useful in many contexts and over vastly different scales galaxy formation virus classical water

N-body simulations Classical systems of many particles, dissipationless and interacting via central forces, have a Hamiltonian of the form = 2 2 + < ( ) Momentum variables are conjugate to the position variables ( 2DN dimensional phase space) r i p i = m i v i Interactions determined by the pair potential U(r)

N-body simulations The set of second-order differential equations maps to a set of coupled first-order equations: Ür i = )H )p i = p i m i = v i Üp i = )H )r i = jëi )U(r ij ) )r i = jëi U (r ij )Çr ij net force exerted by the other N 1 particles

N-body simulations Special considerations: For long-range forces all particle pairs interact strongly with one another at best, N(N 1) 2 scaling Repulsive interactions require a container (via walls or periodic boundary conditions) Time step must be adjusted such that the length scale v t can resolve the spatial structure of U(r)

Finite simulation cell Typical setup: finite L L L periodic cell serves as a representative sample of space How to judge distance for the L purpose of computing long range forces? L L

Finite simulation cell Periodicity is equivalent to tiling all space with copies of the same cell Forces arise from interactions with each of an infinite number of image particles

Finite simulation cell Approximating the infinite summation in 1D: F e (r) = 1X n= 1 F (r + nl) = + F (r L)+F (r)+f(r + L)+ F (min{ r,l r }) closest-image distance intra-cell separation L<r<L r

Finite simulation cell Summation has an F e (r) exact form for EMlike and gravity-like interactions F (r) = 1 r 2 F (min{ r,l r }) F (r) F e (r) =F (chord(r)) r sin( r/l) /L chord length

Finite simulation cell F (chord(r)) closest-image F e (r) approximation increasingly good as interactions become short-ranged; e.g., F (min{ r,l r }) F (r) F (r) = 1 r 7

Finite simulation cell r i =(x i,y i,z i ) Example distance measure r j =(x j,y j,z j ) in a 3D orthogonal cell d i, j = min{ Dx,L Dx } 2 +min{ Dy,L Dy } 2 j L +min{ Dz,L Dz } 2 1/2 i Dx = x i Dy = y i x j y j L L Dz = z i z j

Lennard-Jones Potential 2 1.5 U(r) Model of Van der Waal s 1 0.5 0 0.5 r 0 =2 1/6 attraction between neutral atoms plus an inner core repulsion 1 1 1.2 1.4 1.6 1.8 2 U(r) =4 r 12 6 r Equilibrium point U (r 0 )=0 separates the attractive and repulsive regions

Choice of Time Step 2 1.5 U(r) 1 two particles at rest at separation distance 1.7 0.5 0 0.5 1 1 1.2 1.4 1.6 1.8 2

Choice of Time Step 2 1.5 U(r) artificial energy gain 1 0.5 0 particle penetrated well beyond the classical turning point! 0.5 1 1 1.2 1.4 1.6 1.8 2

Adaptive Time Step t/3 t/3 Allow time step to vary dynamically within the simulation t/3 t Check convergence by comparing evolution of two otherwise identical copies of the system

Range Truncation If interactions are finite-range, there are only a small number of forces acting on each particle (unless the particles have coalesced) Algorithm now scales as 1 2 N i=1 N (i) nearby N(N 1) 2 Can we impose a cutoff?

Range Truncation E.g., Lennard-Jones tail is very weak beyond r c 2 3 10 8 U(r) U (r) 6 4 2 0 2 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6

Range Truncation Care must be taken not to introduce unphysical forces 10 8 U(r)θ(r c r) U (r)θ(r c r) + U(r)δ(r c r) 6 4 2 0 2 discontinuous, 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 impulsive force

Range Truncation Ũ(r) U(r) U(r c )+(r r c )U (r c ) (r c r) F (r) = Ũ (r) = U (r)+u (r c) (r c r) 10 8 ~ U(r) ~ U (r) 6 4 2 0 2 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6

Ewald summation Naive truncation is not possible in the case of truly longranged interactions Ewald summation is a useful Fourier space trick E.g., consider non-self electrostatic interactions between particles in all image cells: U Coulomb = 1 2 X i,j X X q i q j (1 ri rj,nl) r i r j + nl n2z 3 0 q i q j 1 2 i,j,n r i,j,n

Ewald summation Exact rewriting in terms of a background constant, a direct space sum, and a dual space sum: U 0 = U 1 = 1 2 1 X p i q 2 i 0 X erfc(r i,j,n / 0 ) 0q i q j i,j,n U 2 = 1 2 L 3 X i,j q i q j r i,j,n X m2z 3 m6=0 exponentially real lattice decaying envelope exp ( m ) 2 +2 im (r i r j ) m 2 reciprocal lattice

Ewald summation Safe to truncate the sum in U 1 at separations above 0 Order sum over particle indices in can be N 2 evaluated as two order U 2 = 1 2 L 3 X m6=0 N exp sums: U 2 ( m ) 2 m 2 S(m) 2 S(m) = X j q j exp(2 im r j ) structure factor

Barnes-Hut tree dynamic data structure: recursive subdivision of space into quads containing at most one particle The centre-of-mass position is calculated at each tree level and passed up the linked-list hierarchy

Barnes-Hut tree Assume that a particle cluster sufficiently far away can be represented by a single representative particle at the centreof-mass (neglects tidal forces) d l Distance judged by the size of the opening angle l/d < c Scales as N log N

Parallel Computation Simulate on many CPUs simultaneously Each machine updates the 9 1 2 particles in a sub-region of the full space 8 3 Position information passed as messages 7 6 5 4 passed around the ring

Parallel Computation Because of message-passing overhead, the algorithm scales somewhat worse than N(N : Each CPU is numbered cyclically n =0, 1,...,N CPU 1 Loop for each time step: Node n computes forces exerted by its own particles Repeat n 1 times: 1)/2N CPU Node n sends positions to node n + 1 and receives positions from node n 1 Uses received positions to compute forces on its own particles Each node updates its own positions and velocities

Neutral territory methods R R R R traditional half-shell neutral territory message passing overhead 1 2 R2 +2R 2R