Simulations of bulk phases. Periodic boundaries. Cubic boxes

Similar documents
Non-bonded interactions

Non-bonded interactions

Computer simulation methods (2) Dr. Vania Calandrini

Advanced Molecular Molecular Dynamics

Neighbor Tables Long-Range Potentials

The Kinetic Theory of Gases

Astrometric Errors Correlated Strongly Across Multiple SIRTF Images

4. A Physical Model for an Electron with Angular Momentum. An Electron in a Bohr Orbit. The Quantum Magnet Resulting from Orbital Motion.

Lect-19. In this lecture...

A Geometric Review of Linear Algebra

Scalar multiplication and algebraic direction of a vector

4 Fundamentals of Continuum Thermomechanics

Relativistic Energy Derivation

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

Mathisson s New Mechanics : Its Aims and Realisation. W G Dixon, Churchill College, Cambridge, England

A Geometric Review of Linear Algebra

Introduction to Thermodynamic Cycles Part 1 1 st Law of Thermodynamics and Gas Power Cycles

N-body simulations. Phys 750 Lecture 10

General Lorentz Boost Transformations, Acting on Some Important Physical Quantities

Сollisionless damping of electron waves in non-maxwellian plasma 1

different formulas, depending on whether or not the vector is in two dimensions or three dimensions.

Analysis of chord-length distributions

Chapter 1 Solutions Engineering and Chemical Thermodynamics 2e Wyatt Tenhaeff Milo Koretsky

Nonequilibrium thermodynamics of driven amorphous materials. I. Internal degrees of freedom and volume deformation

Kinetic plasma description

Real Gas Thermodynamics. and the isentropic behavior of substances. P. Nederstigt

Introduction to molecular dynamics

Chapter 14 Thermal Physics: A Microscopic View


Chapter 4: Techniques of Circuit Analysis

What is Classical Molecular Dynamics?

CS205b/CME306. Lecture 4. x v. + t

DO PHYSICS ONLINE. WEB activity: Use the web to find out more about: Aristotle, Copernicus, Kepler, Galileo and Newton.

Molecular Dynamics 9/6/16

Chem 4521 Kinetic Theory of Gases PhET Simulation

Patterns of Non-Simple Continued Fractions

Stationary states and energy cascades in inelastic gases

Lecture 1. 1 Overview. 2 Maximum Flow. COMPSCI 532: Design and Analysis of Algorithms August 26, 2015

A possible mechanism to explain wave-particle duality L D HOWE No current affiliation PACS Numbers: r, w, k

Yao Liu Department of Physics, Columbia University New York, New York 10027

Math 144 Activity #9 Introduction to Vectors

Review of Matrices and Vectors 1/45

Dynamics ( 동역학 ) Ch.2 Motion of Translating Bodies (2.1 & 2.2)

v v Downloaded 01/11/16 to Redistribution subject to SEG license or copyright; see Terms of Use at

Lecture #8-6 Waves and Sound 1. Mechanical Waves We have already considered simple harmonic motion, which is an example of periodic motion in time.

MOLECULAR DYNAMICS SIMULATIONS OF BIOMOLECULES: Long-Range Electrostatic Effects

MATHEMATICAL MODELLING AND IDENTIFICATION OF THE FLOW DYNAMICS IN

Modeling Hydraulic Accumulators for use in Wind Turbines

A-level Mathematics. MM03 Mark scheme June Version 1.0: Final

Classical dynamics on graphs

0 a 3 a 2 a 3 0 a 1 a 2 a 1 0

Chapter 7: The Second Law of Thermodynamics

Section 6: PRISMATIC BEAMS. Beam Theory

SLIP MODEL PERFORMANCE FOR MICRO-SCALE GAS FLOWS

Nonexistence of Plane Symmetric Micro Model in Presence of Cosmological Constant in Barber s Modified Theory of General Relativity

Web Resource: Ideal Gas Simulation. Kinetic Theory of Gases. Ideal Gas. Ideal Gas Assumptions

Geostrophy & Thermal wind

Lecture J. 10 Counting subgraphs Kirchhoff s Matrix-Tree Theorem.

(a) Taking the derivative of the position vector with respect to time, we have, in SI units (m/s),

LECTURE 2: CROSS PRODUCTS, MULTILINEARITY, AND AREAS OF PARALLELOGRAMS

Entropic Crystal-Crystal Transitions of Brownian Squares K. Zhao, R. Bruinsma, and T.G. Mason

Lecture 21: Physical Brownian Motion II

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

Inelastic Collapse in One Dimensional Systems with Ordered Collisions

Notes on Linear Minimum Mean Square Error Estimators

A. Idesman. Keywords: time integration, spurious oscillations, numerical dispersion

arxiv: v1 [gr-qc] 19 Mar 2009

Kinetic Theory. Reading: Chapter 19. Ideal Gases. Ideal gas law:

DEVIL PHYSICS THE BADDEST CLASS ON CAMPUS AP PHYSICS

SELECTION, SIZING, AND OPERATION OF CONTROL VALVES FOR GASES AND LIQUIDS Class # 6110

Z transform elements Part 1:

UNDERSTAND MOTION IN ONE AND TWO DIMENSIONS

Lecture 5 Charge Density & Differential Charge. Sections: 2.3, 2.4, 2.5 Homework: See homework file

Plasma electron hole kinematics. I. Momentum conservation

The Full-rank Linear Least Squares Problem

Mechanics, Heat, Oscillations and Waves Prof. V. Balakrishnan Department of Physics Indian Institute of Technology, Madras

Causality Demystified

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

Optimizing GROMACS for parallel performance

Towards Universal Cover Decoding

OVERVIEW OF TATE S THESIS

Biomolecular modeling II

Lesson 3: Free fall, Vectors, Motion in a plane (sections )

MECHANICAL FORMULATION OF THE ENTROPY OF A SYSTEM

OPTIMAL RESOLVABLE DESIGNS WITH MINIMUM PV ABERRATION

THE DESCRIPTIVE COMPLEXITY OF SERIES REARRANGEMENTS

Lecture 12! Center of mass! Uniform circular motion!

are applied to ensure that physical principles are not iolated in the definition of the discrete transition model. The oerall goal is to use this fram

Chapter 22 Gauss s Law

Electrostatics: Energy in Electrostatic Fields

Junior-level Electrostatics Content Review

Evaluation of pressure and bulk modulus for alkali halides under high pressure and temperature using different EOS

An Alternative Characterization of Hidden Regular Variation in Joint Tail Modeling

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

Position in the xy plane y position x position

Econometrics II - EXAM Outline Solutions All questions have 25pts Answer each question in separate sheets

Electric Field Lines. lecture 4.1.1

I. TOPOLOGICAL INSULATORS IN 1,2 AND 3 DIMENSIONS. A. Edge mode of the Kitaev model

Displacement, Time, Velocity

arxiv: v2 [hep-ph] 21 Sep 2013

Transcription:

Simulations of bulk phases ChE210D Today's lecture: considerations for setting up and running simulations of bulk, isotropic phases (e.g., liquids and gases) Periodic boundaries Cubic boxes In simulations of bulk phases, the presence of explicit interfaces or walls in a simulation box would hae a profound effect on the resulting properties of the system, since these interactions are ery large compared to the small size of the system. Instead, for bulk phases we typically implement periodic boundary conditions that realize an infinite number of copies of the simulation box. Particles hae copies of themseles inside eery periodic repetition of the simulation box, called image particles. For any gien particle, we can find its position in the central box using the nearest integer operation: = nint where is the length of the imaginary cubic olume in which the particles sit. It may also be a ector for non-cubic simulation boxes. This equation implies a separate operation for each of the,, coordinates. After its application, each coordinate will be in the range /2 to /2. Oftentimes we are interested in the ector and scalar distances between two particles. We examine the minimum image distance, the smallest distance between any two images of the particles. This distance can be found using an expression similar to that aboe: = M. S. Shell 2012 1/12 last modified 4/19/2012

= nint = Note that we must first find the ector minimum image distance in order to compute its scalar norm. That is, we must first minimum image each of the,, coordinates separately. Other geometries While a cubic box is the most frequently used geometry for periodic boundary conditions, other simulation cell geometries are possible: cuboid parallelpiped hexagonal prism truncated octahedron rhombic dodecahedron All of these geometries will regularly tile space and thus can sere to replicate the infinite number of periodic images. The expression for the minimum image distance changes for each one. The choice of one of these alternate geometries can be motiated by the desire to apply a particular symmetry. For example, a hexagonal simulation box may better accommodate hexagonal ordering in a structured fluid or crystal to sae on the number of simulation atoms required. The octahedron resembles a cube with its corners cut off and thus requires less atoms. For systems in which a macromolecule is solated (e.g., a protein), the octahedron reduces the number of solent molecules required (e.g., water). Potential truncation For nonbonded pairwise interactions we typically truncate the interactions between pairs of particles that are separated by large distances. Howeer, we neer apply such treatments to bonded interactions. Cutting the potential Many nonbonded pairwise potentials decay rapidly with separation distance. This enables us to ignore interactions between pairs of particles that are separated by large distances. We typical- M. S. Shell 2012 2/12 last modified 4/19/2012

ly implement a cutoff where the energy is approximately only a percent or two of the minimum energy. For example, consider the Lennard-Jones (LJ) potential: =4!" #$ A typical cutoff distance is % =2.5, beyond which the potential is chosen to be zero:!" =( 4 #$ % 0 > % This is termed a simple cut of the potential. Notice that the energy at =2.5 is 0.016. For efficiency reasons, we often aoid the computation of the square root for atom pairs beyond the cutoff using the following generic pairwise interaction loop: loop oer atom i = 1 to N 1 loop oer atom = i+1 to N 2 compute / 01 if / 2 2 01 </ 4 then: 2 compute the interaction energy; if needed, compute / 01 =5/ 01 Considerations with periodic boundary conditions With periodic boundary conditions, we want to aoid haing to account for multiple periodic images of the same particles in the pairwise interaction loop. We can aoid dealing with multiple images if the cutoff distance is less than half of the simulation box width: /2 Notice that, for pairwise distances larger than /2, a particle begins to interact with multiple images of the neighboring particles, rather than ust the minimum image distance one. Therefore, simulations are generally set up so that all cutoff distances obey M. S. Shell 2012 3/12 last modified 4/19/2012

% < 2 Typically, a cutoff is chosen first and the minimum size of the simulation box is then computed. Gien a desired bulk density, this will then also determine a minimum number of particles. Cutting and shifting the potential The simple truncation of the potential described aboe leads to a discontinuity in the pairwise potential energy function, across which the forces are undefined. A better approach is to shift the potential for < % so that the energy continuously approaches a zero alue at %. To do this, we subtract from the pairwise potential the alue of the energy ealuated at the cutoff. For the LJ system, =( 4!" # $ 4!" % # % $ % 0 > % The cut and shift approach to potential truncation is perhaps the most popular treatment and results in better energy conseration in molecular dynamics than simple cutting alone. Smooth truncation The cut and shift approach still results in a potential that has discontinuities in the first deriatie (the forces) and in higher order deriaties. For better stability, in particular during energy minimization, some authors employ a switching function that smoothly and continuously tapers the pair potential to zero between two cutoff distances. A typical form that results in continuous first and second deriaties is:? = smoothed = @A %,! > = < where the smoothing function @ is gien by: < %,! %," %,! B %,! < %," 0 %," @ C=1 10C D +15C F 6C G C %,! %," %,! M. S. Shell 2012 4/12 last modified 4/19/2012

Corrections for cut interactions Truncating pair interactions systematically remoes a contribution to the net potential energy and pressure. For moderate cutoffs, such as % =2.5 for the LJ system, this contribution can constitute a nontriial fraction of the totals. For interactions that are cut but not shifted, one can approximately add the interactions beyond % back into the total energy by assuming I > % 1 and using the integral expressions for pairwise interactions: J=J pairs +J tail 2XY " =O P V+W Z [ " \^ Q,R ST Q Here, J pairs is the energy for the explicit summation oer atom pairs separated by < %. The second term on the RHS is the tail correction, and can be ealuated analytically. For the pressure, _=_ pairs +_ tail =O Y`ab Z 1 3Z P Q,R ST Q For the Lennard-Jones system, d d V+W 2XY" 3Z J tail = 8XY" 3Z D 1 3 % f % D $ _ tail = 16XY" 3Z " D 2 3 % f % D $ [ D\ " \ \ ^ If multiple atom types are present and all hae the same interaction cutoff distance, J tail = 2X Z [ " gppy h Y i hi l\ hk! ik! _ tail = 2X 3Z [ \ hi D gppy h Y i l\ \ hk! ik! It can also be shown that cut potentials (not shifted) also incur an impulse correction term in the pressure due the discontinuous change in energy at %, but this is rarely used in simulation. M. S. Shell 2012 5/12 last modified 4/19/2012

Corrections for cut and shifted interactions For potentials that are cut and shifted, the expression for the correction to the energy also includes the aeraged (I 1) interactions below the cutoff: For multiple atom types with the same %, J tail = 2XY" Z [ " % \+ 2XY" Z [ " \ = 2XY" 3Z % D % + 2XY" Z [ " \ J tail = 2X 3Z % D gppy h Y i hi % l+ 2X Z [ " gppy h Y i hi l\ hk! ik! hk! ik! The pressure tail correction, howeer, is the same as in the cut case. Considerations for potential truncation corrections Generally speaking, these corrections should not be applied if: The system is not a bulk phase, or inoles interactions with interfaces. The system is anisotropic. The pairwise interactions themseles are anisotropic (e.g., rotation of an atom affects the pairwise energy this would be the case if the atom had a dipole interaction on it). Generally speaking, unless quantitatie agreement is desired for bulk aerages, one can perform a simulation without using the tail corrections and obtain the same qualitatie (and sometimes een quantitatie) results. By performing runs for arious alues of %, it is then possible to assess the influence of neglecting the cutoff interactions. It is not uncommon to neglect the tail corrections, but one should always be careful to report this fact in any presentation of simulation results. Treating long-ranged interactions Pair interactions that do not decay fast enough with distance can be problematic for simulations. Let a generic pair interaction hae the form =m n Here, m is a constant (positie or negatie) and o is an exponent that is greater than one. Consider the tail correction: M. S. Shell 2012 6/12 last modified 4/19/2012

J tail = 2XY" Z [ " m n \ = 2XY" m Z [ " n \ This integral dierges for o 3. Interactions of this sort are termed long-ranged, and they require special treatment. For o>3, the interactions are short-ranged and can be handled with a tail correction, or simply truncated without correction. Physically, what happens with long-ranged interactions is the following. The number of atoms interacting with a central atom grows as " with radial distance. On the other hand, the energy decays as n. If the energy does not decay fast enough, the net contribution of energies from atoms farther away will outweigh that from those nearby; the total energy therefore becomes infinite in a bulk system. Coulomb interactions A common long-ranged interaction is the Coulomb law that applies to atoms with partial charges: = p p 4X We could imagine that the tail integral for a central particle q might look like: J tail,i = 2XY" Z [ "p rps R 4X \ = Y" p 2 Z [ rps R\ Here rps R is the aerage charge of particles in a spherical shell a distance away from the central particle. For a bulk neutral system (zero net charge), we expect that rps R 0 as. Therefore, it is possible that this integral could conerge. It turns out that Coulombic interactions, while long-ranged, are in fact conergent for neutral systems. Howeer, these interactions require special treatment because it is not possible to compute a tail correction directly; the quantity rps R is not known as a function of. Instead, special techniques are used to perform the sum of the interactions for an infinite number of replicas of the simulation cell. M. S. Shell 2012 7/12 last modified 4/19/2012

For periodic systems with a net charge, the total energy depends on the number of periodic replicas. In the limit of an infinite number of replicas, these systems hae an infinite energy and are not thermodynamic (i.e., the energy does not scale extensiely with system size). Note that these considerations do not apply to the screened Coulomb potential, which is short-ranged due to the damping exponential inoling the Debye length. Keep in mind that the screened Coulomb potential is a highly approximate description of electrostatic interactions. The Ewald summation General approach A formal way to treat Coulombic interactions was deised by Paul Peter Ewald in 1921. At a fundamental leel, the goal of this approach is to compute the electrostatic energies summed oer the central simulation box and all periodic image replicas of it: J= 1 2 PP p p EPPP p p 4X 4X Ex k! w k! k! The first term denotes the interactions within the central box, and the second denotes those between atoms in the central box and images and between atoms in arious periodic replicas. Here, the superscript 0 indicates the minimum image distance. Moreoer, the ector x denotes all lattice ectors pointing from the central box to a periodic image: xyo z,yo {,yo o z,o {,o positie integers such that o z " Eo { " Eo " 1 x As written aboe, the summation oer an infinite number of periodic replicas conerges ery slowly. Moreoer, it is conditionally conergent, meaning that care must be taken in the order in which the terms are added. M. S. Shell 2012 8/12 last modified 4/19/2012

Ewald s solution to this problem was to turn the sum aboe into a mathematically equialent ersion that conerges much faster. Note that a point charge q can be expressed as a delta function in the charge density: p ƒ The Ewald solution is to subtract from the point charges equialent smeared charges whose density is Gaussian in space. These charges must then be identically added to maintain the original system: The two terms that result from this approach (on the RHS of the diagram aboe) are termed the real-space and reciprocal-space components of the electrostatic energy. They are so-named because the latter is soled in Fourier space. Real-space component For the real-space component, we subtract the smeared from the discrete charges, p ƒ D X D " S $ Here, is often called the decay parameter and controls the width of the Gaussian distribution. The limit returns an infinitely peaked Gaussian. The factors in front of the exponential on the RHS ensure normalization across space of the smeared distribution. By soling Poisson s equation for the charge density, one obtains the following electrostatic energy due to this charge density: J real P p p 4X erfc Q Here, erfc is the complementary error function. This function decays ery fast with respect to its argument, such that the pair interaction represented here is no longer long-ranged. As a result, a simple truncation of this interaction at % usually has no effect on the summation. M. S. Shell 2012 9/12 last modified 4/19/2012

Reciprocal-space component To the real-space term, we must add the reciprocal energy, gien by the sum of the smearedout charges in the central box and all image particles in the infinite replication of the central box. One can find this energy by summing the Gaussian charges in a Fourier series. A detailed deriation is aailable in Frenkel and Smit. The result is: J recip = 1 2 D P 1 Š " Š " expa Š " 4 B! "X! " " Pp 4X Šw Š Pp exp qš Here, the summation proceeds oer all reciprocal-space ectors: k! Š= ± 2Xo z,±2xo {,±2Xo Ž o z,o {,o positie integers such that o z " +o { " +o " 1 Typically the summation is not taken to infinity but to a finite number of ectors. A common criterion is to include all ectors such that Š <`max Notice that the reciprocal summation inoles a reciprocal space density (Š) that is a complex number. The computation of this quantity is usually performed using complex data types in Fortran or other programming languages. k! Polarization energy There is one final interaction that it often included in computations with electrostatics in addition to the two terms aboe. Neutral periodic systems inoling partial charges can still hae a net nonzero dipole, and this dipole can interact with whateer boundary exists around the system. This polarization energy is gien by: 1 J pol = (2 ext +1)8X D Pp k! " Here, ext is the relatie permittiity of the medium at the boundaries. For good conductors like metals, ext 0 and the polarization energy anishes. M. S. Shell 2012 10/12 last modified 4/19/2012

Parameters of the Ewald method There are two parameters of the Ewald approach that affect the conergence behaior of the sum aboe: controls the rate of decay of the Gaussian smeared charges, and of the real-space interactions ~erfc. Faster decay rates increase the accuracy of the real-space calculation but increase the number of reciprocal space ectors Š required for equialent accuracy in the reciprocal summation. `max `max - controls the number of reciprocal space ectors used, proportional roughly to D. More ectors increases accuracy, but requires greater memory storage and computation time. A typical choice for these parameters that reflects a compromise between the two is: = 5.6 `max =5 2X A longer discussion of the choice of alues for these can be found in Frenkel and Smit. Performance of the Ewald method Ewald summations add substantial computational expense to the ealuation of the energy and forces, and typically dominate the simulation time. Nominally, the Ewald method scales as Y " for the real-space term and as Y for the reciprocal-space term. Howeer, by choosing Y! # the algorithm can be made to scale as Y D " [Frenkel and Smit. Typically the reciprocal-space summation is the more computationally intensie. Fast Fourier transforms (FFTs) can speed this part of the method substantially, and result in better scalings of YlogY for the algorithm. For ery large systems, typically of 1000s or greater numbers of atoms, the Ewald method becomes extremely expensie. In these cases, alternatie mesh-based approaches can be used in which the partial charges on the atoms are distributed to grid points on a finely-discretized cubic lattice in space. These methods take adantage of the fact that the reciprocal-space summation can be soled much faster using FFTs on lattices. Some methods are: Particle-Mesh Ewald (PME) Smooth Particle-Mesh Ewald (SPME) M. S. Shell 2012 11/12 last modified 4/19/2012

Particle-Particle/Particle-Mesh Ewald (PPME) These algorithms typically scale as YlogY in computational expense. The choice of which to use often depends on whether or not the forces are needed to high accuracy (e.g., for MD simulations). Slab geometries Systems that are periodic in only two dimensions are said to hae slab geometry. Examples include fluids confined between walls and thin films. For these systems, the Ewald summation must be modified because the original equations assume infinite replication in all spherical dimensions. Seeral approaches hae been deeloped for these situations. The reader is referred to Frenkel and Smit. M. S. Shell 2012 12/12 last modified 4/19/2012