Content uploaded by Florent Hédin

Author content

All content in this area was uploaded by Florent Hédin on Jul 24, 2018

Content may be subject to copyright.

Generalized Parallel Replica algorithm : implementation and application to chemical

and biochemical systems

Florent H´

edin, Tony Leli`

evre

´

Ecole des Ponts ParisTech – Universit´

e Paris-Est

florent.hedin@enpc.fr

State to state Langevin dynamics

Consider the Langevin dynamics:

(dpt=γM−1ptdt

dqt=−∇V(qt)dt −γM−1ptdt +p2γβ−1dWt

The stochastic process (qt, pt)t≥0takes values in Rd,βis the inverse temperature, Mis the mass matrix

(M=mId), V(qt)is the potential, γ > 0is the damping parameter, and Wtad-dimensional Brownian

motion.

Xt

Ω

Figure 1: Deﬁnition

of state Ω

In the following let us write Xt= (qt, pt). Let Ω⊂Rddenote the region of interest

(namely the state, see Fig. 1), and deﬁne

τ= inf {t≥0|Xt/∈Ω}

to be the ﬁrst exit time from Ω, where X0=x∈Ω. The point on the boundary,

Xτ∈∂Ω, is the ﬁrst hitting point. The aim of accelerated dynamics algorithms

(and ParRep in particular) is to efﬁciently sample (τ, Xτ)from the exit distribu-

tion.

Quasi-Stationary Distribution

Consider a smooth bounded open set Ω⊂Rd, that corresponds to a state. By deﬁni-

tion, the Quasi-Stationary Distribution ν(QSD), associated with the dynamics and the state Ω, is:

∀(X0)∈Ω,lim

t→+∞L(Xt|t < τΩ) = ν

i.e. if the stochastic process Xtlives within Ωfor a time long enough, the distribution of Xtfollows the QSD,

(Xt)∼ν. The ParRep [1,2] and Generalized ParRep algorithms [3] were designed such that, given initial

conditions X0∼ν, then:

1. τΩ

|=

XτΩ

2. τΩfollows an exponential law (geometric law in the discretized case).

Parallel Replica algorithm

The original ParRep algorithm [1,2] (see Fig. 2) is implemented in three steps (Decorrelation, Dephasing, Paral-

lel processing) repeated as the process moves from one state to another. It requires the speciﬁcation, a priori, of

two times to equilibrate to each state, tcorr and tphase.

Figure 2: Original ParRep algorithm [1,2] running on N CPUs: in red sections of the ParRep algorithm not

parallelized, in green sections running on the whole N CPUs.

Generalized Parallel Replica

The Generalized ParRep algorithm [3] consists in 2 steps (to be compared to the 3 steps required by the original

ParRep), all using the available N CPUs:

•A Fleming-Viot particle process for generating samples following the QSD.

•A Parallel step actually sampling the exit distribution.

Fleming-Viot particle process

The Fleming-Viot process is a branching and interacting particle system which will be one of the ingredients of

the modiﬁed ParRep algorithm. It gathers the Decorrelation and Dephasing steps from the original ParRep.

Let us consider i.i.d. initial conditions Xk

0(k∈ {1, . . . , N}). The process is as follows (see Fig. 3):

•Integrate Nrealizations until one of them, say X1

t, exits;

•Kill the process that exits;

•With uniform probability 1/(N−1), randomly choose one of the survivors, X2

t, . . . , XN

t, say X2

t;

•Branch X2

t, with one copy persisting as X2

t, and the other becoming the new X1

t(and thus evolving in the

future independently from X2

t).

X1

t

X2

t

X3

t

⌦

X1

t

X2

t

X3

t

⌦

X1

t

X2

t

X3

t

⌦

X1

t

X2

t

X3

t

⌦

X1

t

Figure 3: Illustration of the Fleming-Viot particle process

Gelman-Rubin convergence analysis

In order to know if the F-V process converged to a QSD, the stationarity of one or more observables is tested

using the Gelman-Rubin statistics. Let O: Ω →Rbe some observable, and let:

¯

Ok

t≡t−1Zt

0

O(Xk

s)ds, ¯

Ot≡1

N

N

X

k=1

¯

Ok

t=1

N

N

X

k=1

t−1Zt

0

O(Xk

s)ds,

be the average of an observable along each trajectory and the average of the observable along all trajectories.

Then the statistic of interest for observable Ois

ˆ

Rt(O) =

1

NPN

k=1 t−1Rt

0(O(Xk

s)−¯

Ot)2ds

1

NPN

k=1 t−1Rt

0(O(Xk

s)−¯

Ok

t)2ds.

Notice that ˆ

Rt(O)≥1, and as all the trajectories explore Ω,ˆ

Rt(O)converges to one as tgoes to inﬁnity.

Generalized ParRep: algorithm

A priori tcorr and tphase are not necessary anymore, instead they are estimated via the G-R analysis ratio Rt(O)

(for a given tolerance level TOL): tphase =tcorr = inf nt≥0|ˆ

Rt(Oj)<1 + TOL,∀jo

The following Fig. 4 illustrates the Generalized ParRep algorithm:

Figure 4: Generalized ParRep algorithm [3]. Green color denotes a full parallelization over N CPUs

Parallel step

Let the Nsamples obtained after the F-V step evolve in parallel (one on each CPU). Let us denote

k?= argminkTk

the index of the ﬁrst replica which exits Ω. During the time interval [tsim, tsim +NT k?], the reference process is

deﬁned as trapped in Ω. Accordingly, the simulation clock is advanced as

tsim 7→ tsim +NT k?

The ﬁrst replica to escape becomes the new reference process.

OpenMM based Implementation

The current implementation relies on the OpenMM toolkit [4,5] for performing the Langevin Dynamics. This

allows the use of all the ForceFields natively supported by OpenMM 7.0, and also the possibility to import

CHARMM or GROMACS input ﬁles. Fast and efﬁcient parallelization for the ParRep algorithms is achieved by

using C++ and OpenMPI.

First application: state-to-state dynamics of alanine dipeptide

Original and Generalized ParRep are used for estimating the average state-to-state αR→C5P2and C5P2→αR

transition times for Alanine Dipeptide.

ParRep Gen. ParRep MD

τcorr (ps) or G-R Tolerance (%) 5 ps 20 ps 5 % —

αR→C5P2(ps) 26.92 ±1.68 30.99 ±1.72 32.03 ±1.54 32.89 ±0.47

C5P2→αR(ps) 29.14 ±1.77 40.45 ±2.11 40.00 ±2.08 41.67 ±0.61

Table 1: Comparison of αR→C5P2and C5P2→αRtransition times estimated using Original or General-

ized ParRep (total simulation time of 100 ns, and comparison with results obtained after 1500 ns of non-parallel

Langevin dynamics. Forceﬁeld AMBER99-SBILDN. Conﬁdence interval at 95 % estimated using bootstrapping.

Figure 5: Alanine dipeptide : deﬁnition of ParRep do-

mains using ellipses on a Ramachandran Plot

Figure 6: Histogram of Generalized ParRep computed

C5P2→αRtransition times.

References

[1] A. F. Voter, Phys. Rev. B 57 (1998)

[2] C. Le Bris, T. Leli`

evre, M. Luskin and D. Perez, Monte Carlo Methods Appl. 18 (2012)

[3] A. Binder, T. Leli`

evre, G. Simpson, J. Comput. Phys. 284 (2015)

[4] http://openmm.org/

[5] P. Eastman et al, DOI: 10.1101/091801

Acknowledgements

This work was supported by the ERC Consolidator Grant MS-

Math (2014-2019) Molecular Simulation: modeling, algorithms

and mathematical analysis