Algorithms and Software for Large-Scale Simulation of Reactive Systems...

28
Algorithms and Software for Large-Scale Simulation of Reactive Systems _____________________________ __ Ananth Grama Coordinated Systems Lab Purdue University [email protected]

Transcript of Algorithms and Software for Large-Scale Simulation of Reactive Systems...

Page 1: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Algorithms and Software for Large-Scale Simulation ofReactive Systems_______________________________

Ananth GramaCoordinated Systems LabPurdue [email protected]

Page 2: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Molecular Simulation Methods

• Ab-initio methods (few approximations but slow)• DFT

• CPMD• Electron and nuclei treated explicitly

• Classical atomistic methods (more approximations)• Classical molecular dynamics

• Monte Carlo• Brownian dynamics• No electronic degrees of freedom. Electrons are

approximated through fixed partial charges on atoms.

• Continuum methods (no atomistic details)

Page 3: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Statistical and continuum methods

ps ns s ms

nm

m

mm

Ab-initio methodsAtomistic methods

Page 4: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

V = Vbond + Vangle + Vdihedral + VLJ + VElecrostatics

F V

VLJ Cij(12)

rij12

Cij(6)

rij6

i j VElectrostatics f

qiq jrriji j

Vbond 1

2kij (rij bij )

2

Vangle 1

2kijk

(ijk ijk0 )2

Vdihedral kijkl (1 cos(nijkl ijkl

n0 ))n

Simplified Interactions in Classical MD Simulations

Page 5: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Implementation of Classical Interactions

• Molecular topologies are fixed, so bonded interactions are implemented as static neighbor lists

• Non-bonded interactions are implemented as dynamic neighbor lists

• Usually not updated at every time step• Only two body interactions, so relatively easy to implement.

Page 6: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Reactive systems

• Chemical reactions correspond to association and dissociation of chemical bonds

• Classical simulations cannot simulate reactions• ab-initio methods calculate overlap of electron orbitals to model chemical reactions

• ReaX force field postulates a classical bond order interaction to mimic the association and dissociation of chemical bonds1

1 van Duin et al , J. Phys. Chem. A, 105, 9396 (2001)

Page 7: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Bond order interaction

1 van Duin et al , J. Phys. Chem. A, 105, 9396 (2001)

Bond order for C-C bond

BOij '(rij )exp a

rijr0

b

• Uncorrected bond order:

Where is for andbonds

• The total uncorrected bond order is sum of three types of bonds• Bond order requires correction to account for the correct valency

Page 8: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

• Upon correction, the bond order between a pair of atoms depends on the uncorrected bond orders of the neighbors of each atoms

• The bond orders rapidly decay to zero as a function of distance so it is reasonable to construct a neighbor list for efficient computation of bond orders

Bond Order Interaction

Page 9: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Neighbor Lists for Bond Order

• Efficient implementation critical for performance

• Implementation based on an oct-tree decomposition of the domain

• For each particle, we traverse down to neighboring octs and collect neighboring atoms

• Has implications for parallelism (issues identical to parallelizing multipole methods)

Page 10: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Bond Order : Choline

Page 11: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Bond Order : Benzene

Page 12: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Other Local Energy Terms

• Other interaction terms common to classical simulations, e.g., bond energy, valence angle and torsion, are appropriately modified and contribute to non-zero bond order pairs of atoms

• These terms also become many body interactions as bond order itself depends on the neighbors and neighbor’s neighbors

• Due to variable bond structure there are other interaction terms, such as over/under coordination energy, lone pair interaction, 3 and 4 body conjugation, and three body penalty energy

Page 13: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Non Bonded van der Waals Interaction

• The van der Waals interactions are modeled using distance corrected Morse potential

Where R(rij) is the shielded distance given by

VvdW (rij )Dij exp ij 1 R(rij )

rvdW

2Dij exp

1

2ij 1

R(rij )

rvdW

R(rij ) rij

1

ij

1

Page 14: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Electrostatics

• Shielded electrostatic interaction is used to account for orbital overlap of electrons at closer distances

• Long range electrostatics interactions are handled using the Fast Multipole Method (FMM).

VEle(rij ) fqiq j

rij3 ij

3 1

3

Page 15: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Charge Equilibration (QEq) Method

• The fixed partial charge model used in classical simulations is inadequate for reacting systems.

• One must compute the partial charges on atoms at each time step using an ab-initio method.

• We compute the partial charges on atoms at each time step using a simplified approach call the Qeq method.

Page 16: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Charge Equilibration (QEq) Method

• Expand electrostatic energy as a Taylor series in charge around neutral charge.

• Identify the term linear in charge as electronegativity of the atom and the quadratic term as electrostatic potential and self energy.

• Using these, solve for self-term of partial derivative of electrostatic energy.

Page 17: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Qeq Method

We need to minimize:

subject to:

jii

ijii

iele qqHqXE 2

1

0i

iq

H ij Jiij 1 ijrij3 ij

3 1 3where

Page 18: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Qeq Method

i

iieleiu quqEqE })({})({

0

jj

ijiui

qHuXEq

uXqH ijj

ij

uXqH ~~~

Page 19: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Qeq Method

)1(1kk

k

iki uXHq

i k

ik

ik

k

ik

ii uHXHq 011

From charge neutrality, we get:

i kkik

ik

k

ik

H

XHu

11

1

Page 20: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Qeq Method

ii

ii

t

su

Let

wherek

k

iki XHs 1

kk

iki Ht 11

or ii

ikk sHX

ii

iktH 1

Page 21: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Qeq Method

• Substituting back, we get:

i

ii

ii

iiii tt

ssutsq

We need to solve 2n equations with kernel H for si and ti.

Page 22: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Qeq Method

• Observations:– H is dense.

– The diagonal term is Ji– The shielding term is short-range– Long range behavior of the kernel is 1/r

Page 23: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Implementation, Performance, and Validation

Page 24: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Serial Performance: Scaling

Page 25: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Parallel Performance

Reactive and non-reactive MD simulations on 131K BG/L processors. Total execution time per MD step as a function of the number of atoms for 3 algorithms: QMMD, ReaxFF,conventional MD [Goddard, Vashistha, Grama]

Page 26: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Parallel Performance

Total execution (circles) and communication (squares) times per MD time for the ReaxFF MD with scaled workloads—36,288 x p atom RDX systems (p = 1,..,1920).

Page 27: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Current Development Efforts

• Development and validation of parallel version of next generation Reax code.

• Integration into LAMMPS.

Page 28: Algorithms and Software for Large-Scale Simulation of Reactive Systems _______________________________ Ananth Grama Coordinated Systems Lab Purdue University.

Planned Development Efforts

• Interface with conventional MD

•Interface with continuum models

•Validation in the context of surface contact for RF MEMS device