A mathematical introduction to coarse-grained stochastic dynamics Gabriel STOLTZ gabriel.stoltz@enpc.fr (CERMICS, Ecole des Ponts & MATHERIALS team, INRIA Paris) Work also supported by ANR Funding ANR-14-CE23-0012 ( COSMOS ) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 1 / 33
Outline Dissipative Particle Dynamics (Isothermal) Dissipative Particle Dynamics with energy conservation Parametrizing DPDE Some numerical results: shock waves in molecular systems Coarse-graining even further: SDPD 1 1 depending on the remaining time... Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 2 / 33
Dissipative Particle Dynamics Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 3 / 33
Stochastic differential equations (1) State of the system X R d, m-dimensional Brownian motion, diffusion matrix σ R d m dx t = b(x t ) dt + σ(x t ) dw t to be thought of as the limit as t 0 of (X n approximation of X n t ) X n+1 = X n + t b (X n ) + t σ(x n )G n, G n N (0, Id m ) Analytical study of the process: law ψ(t, x) of the process at time t distribution of all possible realizations of X t for a given initial distribution ψ(0, x), e.g. δ X 0 and all realizations of the Brownian motion Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 4 / 33
Stochastic differential equations (2) Averages at time t ( ) E ϕ(x t ) = ϕ(x) ψ(t, x) dx R d Generator L = b(x) + 1 2 σσt (x) : 2 = d b i (x) xi + 1 2 i=1 d i,j=1 [ ] σσ T (x) x i xj i,j Evolution of averages at time t ) t (E [ϕ(x t )] [ ] = E (Lϕ) (X t ) Proof: Taylor expansions of E[ϕ(X n+1 )] = E[ϕ(X n )] + t... Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 5 / 33
Stochastic differential equations (3) Rephrase as ϕ(x) t ψ(t, x) dx = R d (Lϕ)(x) ψ(t, x) dx R d Fokker-Planck equation t ψ = L ψ where L is the adjoint of L (integration by parts) ( ) (LA) (x) B(x) dx = A(x) L B (x) dx X Invariant measures are stationary solutions of the Fokker-Planck equation Invariant probability measure ψ (x) dx L ψ = 0, ψ (x) dx = 1, ψ 0 X X Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 6 / 33
Langevin dynamics Positions q = (q 1,..., q N ) D and momenta p = (p 1,..., p N ) R dn Hamiltonian H(q, p) = V (q) + 1 2 pt M 1 p Stochastic perturbation of the Hamiltonian dynamics dq t = M 1 p t dt dp t = V (q t ) dt γm 1 2γ p t dt + β dw t Friction γ > 0 (could be a position-dependent matrix) Existence and uniqueness of the invariant measure (canonical measure) µ(dq dp) = Z 1 e βh(q,p) dq dp Various ergodicity results (including exponential convergence of the law) 2 2 T. Lelièvre and G. Stoltz, Acta Numerica (2016) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 7 / 33
Dissipative Particle Dynamics (1) Langevin dynamics not Galilean invariant, hence not consistent with hydrodynamics friction forces depending on relative velocities 3 Dissipative Particle Dynamics dq t = M 1 p t dt ( dp i,t = qi V (q t ) dt + i j with r ij = q i q j and v ij = p i m i p j m j γχ 2 (r ij,t )v ij,t dt + Antisymmetric stochastic forcing: W ij = W ji Cut-off function χ for the interaction, e.g. χ(r) = ) 2γ β χ(r ij,t) dw ij ( 1 r ) 1 r rcut r cut 3 P. J. Hoogerbrugge and J. M. V. A. Koelman, Europhys. Lett. (1992) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 8 / 33
Dissipative Particle Dynamics (2) Can be generalized to anisotropic frictions, e.g. only along e ij = r ij r ij Generator L = L ham + γ L FD,ij with 1 i<j N L FD,ij = χ 2 (r ij ) ( v ij ( pi pj ) + 1β ) ( p1 p2 ) 2 Thermodynamic consistency 4 Invariant measure µ DPD (dq dp) = Z 1 e βh(q,p) δ { N i=1 p i P 0} (dp) dq Ergodicity is an issue proved for d = 1 only 5 4 P. Espanol and P. Warren, Europhys. Lett. (1995) 5 T. Shardlow and Y. Yan, Stoch. Dynam. (2006) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 9 / 33
Dissipative Particle Dynamics: numerical schemes Many schemes, often dubious extensions of Verlet-like/BBK schemes More appropriate alternatives: splitting schemes 67 My favorite one: Verlet step to update (q, p) For each pair of particles, analytically integrate the elementary fluctuation/dissipation dynamics L FD,ij ( 1 dv ij = γ + 1 ) ( χ 2 2γ 1 (r ij,t )v ij,t dt+ + 1 ) χ(r ij,t ) dw ij m i m j β m i m j 6 T. Shardlow, SIAM J. Sci. Comput. (2003) 7 B. Leimkuhler and X. Shang, J. Comput. Phys. (2015) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 10 / 33
Dissipative Particle Dynamics with energy preservation Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 11 / 33
Construction of the dynamics: a simplified case (1) Enforcing energy conservation in the Langevin dynamics? Gather energy variation in some additional variable ε R + ( ) ( ) dε t = d H(q t, p t ) = γ p2 t m σ2 dt σ p t 2m m dw t The variable ε can be interpreted as some coarse-grained internal energy entropy s(ε) dq t = p t m dt dp t = V (q t ) dt γ p t m dt + dε t = ( γ p2 t m σ2 2m Generator L ham + L FD with L FD = γ 2γ β dw t, ) dt σ p t m dw t. p m A + σ2 2 A2 and A = p p m ε Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 12 / 33
Construction of the dynamics: a simplified case (2) Invariance of measures of the form (mind the factor e s(ε)...) ( ) ρ(dq dp dε) = f H(q, p) + ε e s(ε) dq dp dε Sufficient condition L FD ρ = 0, i.e. γ p ( ) σ 2 m ρ + A 2 ρ = 0 Possible choice: γ = γ(ε) and σ R Fluctuation/dissipation relation T (ε) = 1 s (ε) σ 2 = 2γ s (ε) interpreted as some internal temperature Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 13 / 33
DPDE for many-particle systems (1) Coarse-graining interpretation: a (fragment of a) molecule is replaced by a mesoparticle (q i, p i ) describes the center of mass of the ith mesoparticle missing degrees of freedom described by an internal energy ε i Evolution at constant total energy H(q, p, ε) = V (q) + N i=1 p 2 i 2m i + Microscopic state law: entropies s i = s i (ε i ), internal temperature defined from the entropy as T i (ε i ) = 1 s i (ε i) Simplest case: harmonic internal degrees of freedom, T (ε) = ε/c v J. Bonet Avalos and A. Mackie, Europhys. Lett. 40, 141-146 (1997) P. Español, Europhys. Lett. 40 631-636 (1997) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 14 / 33 N i=1 ε i
DPDE for many-particle systems (2) dq i = p i dt m i dp i = qi V (q)dt + γ ij χ 2 (r ij )v ij dt + σ ij χ(r ij ) dw ij, i j dε i = 1 2 ( χ 2 (r ij ) j i Invariant measures γ ij v 2 ij σ2 ij 2 ( ) ρ(dq dp dε) = f H(q, p, ε) g Fluctuation-dissipation relation ( 1 m i + 1 m j ) ) dt σ ij χ(r ij)v ij dw ij. ( N ) ( N ) p i exp s i (ε i ) dq dp dε, i=1 σ ij = σ, γ ij = σ2 β ij (ε i, ε j ), β ij (ε i, ε j ) = 1 2 2k B i=1 ( 1 T i (ε i ) + 1 ) T j (ε j ) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 15 / 33
Thermodynamic properties In favorable situations (...) the dynamics should be ergodic with respect to the measure ρ E0,P 0 = Z 1 E 0,P 0 δ {H(q,p,ε) E0 }δ { N i=1 p i P 0} exp ( N ) s i (ε i ) When P 0 = 0, this measure is equivalent in the thermodynamic limit to the canonical measure N ρ β (dq dp dε) = Z 1 β e βh(q,p) e βf i (ε i ) dq dp dε where f i (ε i ) = ε i s i(ε i ) β Estimators of the temperature T kin (p) = 1 dnk B i=1 i=1 is a free energy and β is such that E ρβ (H) = E 0 N i=1 p 2 i m i, T int (ε) = ( 1 N N i=1 ) 1 1 T i (ε i ) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 16 / 33
Adding thermal conduction Additional elementary pairwise fluctuation/dissipation dynamics ( 1 dε i = κχ 2 (r ij ) T i (ε i ) 1 ) dt + 2κχ(r ij ) d T j (ε j ) W ij, dε j = dε i, where κ > 0 is a thermal conductivity This dynamis preserves the elementary energy ε i + ε j by construction measures of the form f (ε i + ε j ) e s i (ε i )+s j (ε j ) dε i dε j Static thermodynamic properties therefore unchanged Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 17 / 33
Numerical integration of DPDE (1) Splitting strategy: Hamiltonian part and elementary dynamics dp i = γ(ε i, ε j )χ 2 (r ij )v ij dt + σχ(r ij ) dw ij, dp j = dp i, dε i = χ2 (r ij ) 2 dε j = dε i, [ ( γ(ε i, ε j )vij 2 σ2 1 + 1 )] dt σ 2 m i m j 2 χ(r ij)v ij dw ij, In fact, can be reduced to a dynamics on v ij only ( 1 dv ij = γ(ε i, ε j )χ 2 (r ij ) + 1 ) ( 1 v ij dt + σχ(r ij ) + 1 m i m j m i m j ) dw ij since, by the energy conservation (recall p i + p j is constant), ( ) ε i = ε i,0 + 1 p 2 i pi,0 2 + p2 j pj,0 2 = ε i,0 +F (v ij ), ε j = ε j,0 +F (v ij ) 2 2m i 2m j Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 18 / 33
Numerical integration of DPDE (2) Practical integrator: integrate the dynamics on v ij with fixed friction update the internal energies to ensure the energy conservation it is possible to superimpose a Metropolis correction 8 [w.r.t. some locally invariant measure] Pro/cons of this integrator: automatically corrects for negative internal energies (stabilization) parallelization/threadability limited dedicated schemes for that 9 8 G. Stoltz, arxiv preprint 1612.04154 9 A.-A. Homman, J.-B. Maillet, J. Roussel and G. Stoltz, J. Chem. Phys (2016) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 19 / 33
Parametrization of DPDE Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 20 / 33
Summary of the quantities to provide Static properties effective masses for mesoparticles microscopic state law ε = T (ε) 0 C v (θ) dθ effective interaction potential machine learning approaches Dynamical properties fluctuation magnitude σ thermal conductivity κ cut-off functions for the fluctuation/dissipation dynamics Derivation of DPDE? From Hamiltonian dynamics 10 10 P. Español, M. Serrano, I. Pagonabarraga and I. Zúñiga, Soft Matter (2016) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 21 / 33
Estimating some of the quantities Microscopic state law: energy as a function of the temperature ab-initio computations of the rovibrational modes integration using some distribution function (Bose Einstein) invert to obtain the temperature as a function of the energy Fluctuation magnitude: equilibration dynamics 11 initialize internal and external degrees of freedom at different temperatures N ρ βext,βint (dq dp dε) = Z 1 β e βexth(q,p) e β intf i (ε i ) dq dp dε compute the time evolution of internal and external (kinetic) temperatures timescale for return to equilibrium reference all-atom simulation (small system) i=1 11 M. Kroonblawd, T. Sewell and J.-B. Maillet, J. Chem. Phys. (2016) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 22 / 33
Some numerical results Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 23 / 33
Shock waves in an effective material 16000 14000 12000 Temperature (K) 10000 8000 6000 4000 2000 0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 Time (ps) G. Stoltz, Europhys. Lett. (2006) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 24 / 33
Detonation waves in nitromethane (1) Potential of Exp-6 type, fitted to reproduce Hugoniot curves E E 0 1 2 (P + P 0)(V 0 V) = 0 C v taken from thermodynamic tables σ so that equilibration time between internal and external degrees of freedom is of the order of a few ps Modeling of chemical reactions through some progress variables λ i System of length 4.5 µm Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 25 / 33
Detonation waves in nitromethane (2) Particle velocity, temperature, progress variable, pressure J.-B. Maillet, G. Vallverdu, N. Desbiens and G. Stoltz, Europhys. Lett. (2011) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 26 / 33
Coupling with higher scales Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 27 / 33
Coarse-graining even further: SDPD (1) Adding thermal fluctuations to particle discretization of Navier Stokes 12 Size K of particles (masses Km ) Variables: (q, p) position of discretization nodes, entropy S i or energy ε i Conservative part of the dynamics: Hamiltonian dynamics with energy E(q, p, S) = N i=1 ε i ( Si, ρ i (q) ) + p2 i 2m, ρ i(q) = N mw (r ij ) j=1 dq = p m dt, dp = q E(q, p, S) dt, ds = 0. 12 P. Español and M. Revenga, Phys. Rev. E (2003) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 28 / 33
Coarse-graining even further: SDPD (2) Fluctuation/dissipation: energy formulation 13 dp i = γijp θ ijv θ ij dt + σijp θ ij θ db ij, dp j = dp i, [ dε i = 1 2 dε j = dε j, γ θ ijv T ] ij Pijv θ ij (σθ ij )2 m Tr(Pθ ij) dt 1 2 σθ ijv T ij P θ ij db ij, with appropriate choices for γ ij, γ ij, σ ij, σ ij to ensure the invariance of µ(dq dp dε) = g ( E(q, p, ε), ) N N p i i=1 i=1 ( ) exp Si (ε i,q) k B T i (ε i, q) Reduces to Smoothed Particle Hydrodynamics when σ ij = 0 13 G. Faure, J.-B. Maillet and G. Stoltz, Phys. Rev. E (2016) dq dp dε Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 29 / 33
Parametrization of SDPD Free energy F (ρ, T ), computed from NVT simulations. Deduce... ( ) F (ρ, T ) energy E(ρ, T ) = T 2 T T E(ρ, T ) F (ρ, T ) entropy S(ρ, T ) = T pressure P(ρ, T ) = ρ 2 ρ F (ρ, T ) heat capacity C(ρ, T ) = T E(ρ, T ) Fluid viscosities, which appear in γ ij, σ ij Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 30 / 33
SDPD: some numerical results MD NS K = 10 K = 100 K = 500 K = 1,000 K = 5,000 K = 10,000 Density (kg.m 3 ) 1,600 1,400 1,200 20 15 10 5 0 5 10 Distance from the shock front (reduced units) Density (kg.m 3 ) 1,400 1,200 20 15 10 5 0 5 10 Distance from the shock front (nm) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 31 / 33
Conclusion Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 32 / 33
Conclusion and perspectives Coarse-grained models for atomistic simulations Dissipative Particle Dynamics with conserved energy (DPDE) can be used in nonequilibrium situations replace a molecule or some group of atoms by a mesoparticle consistent thermodynamics input: static properties (computed ab-initio) and dynamical parameters Smoothed Dissipative Particle Dynamics (SDPD) hydrodynamics-like (e.g. solvent in bulk-like regime)...... but particle-based: seamless coupling with DPDE can be envisioned? in progress: add chemistry (Gérôme Faure, CEA/DAM) Gabriel Stoltz (ENPC/INRIA) Aberdeen P.G., 14 Feb. 2017 33 / 33