You are on page 1of 16

Connecting dynamic reweighting

Algorithms: Derivation of the dynamic


reweighting family tree
Cite as: J. Chem. Phys. 153, 234106 (2020); https://doi.org/10.1063/5.0019687
Submitted: 24 June 2020 . Accepted: 29 November 2020 . Published Online: 17 December 2020

Stephanie M. Linker, R. Gregor Weiß, and Sereina Riniker

ARTICLES YOU MAY BE INTERESTED IN

Confronting pitfalls of AI-augmented molecular dynamics using statistical physics


The Journal of Chemical Physics 153, 234118 (2020); https://doi.org/10.1063/5.0030931

Classical molecular dynamics


The Journal of Chemical Physics 154, 100401 (2021); https://doi.org/10.1063/5.0045455

Reflections on electron transfer theory


The Journal of Chemical Physics 153, 210401 (2020); https://doi.org/10.1063/5.0035434

J. Chem. Phys. 153, 234106 (2020); https://doi.org/10.1063/5.0019687 153, 234106

© 2020 Author(s).
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

Connecting dynamic reweighting Algorithms:


Derivation of the dynamic reweighting family tree
Cite as: J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687
Submitted: 24 June 2020 • Accepted: 29 November 2020 •
Published Online: 17 December 2020

Stephanie M. Linker, R. Gregor Weiß, and Sereina Rinikera)

AFFILIATIONS
Laboratory of Physical Chemistry, ETH Zurich, Vladimir-Prelog-Weg 2, 8093 Zurich, Switzerland

a)
Author to whom correspondence should be addressed: sriniker@ethz.ch

ABSTRACT
Thermally driven processes of molecular systems include transitions of energy barriers on the microsecond timescales and higher. Sufficient
sampling of such processes with molecular dynamics simulations is challenging and often requires accelerating slow transitions using external
biasing potentials. Different dynamic reweighting algorithms have been proposed in the past few years to recover the unbiased kinetics from
biased systems. However, it remains an open question if and how these dynamic reweighting approaches are connected. In this work, we
establish the link between the two main reweighting types, i.e., path-based and energy-based reweighting. We derive a path-based correction
factor for the energy-based dynamic histogram analysis method, thus connecting the previously separate reweighting types. We show that the
correction factor can be used to combine the advantages of path-based and energy-based reweighting algorithms: it is integrator independent,
more robust, and at the same time able to reweight time-dependent biases. We can furthermore demonstrate the relationship between two
independently derived path-based reweighting algorithms. Our theoretical findings are verified on a one-dimensional four-well system. By
connecting different dynamic reweighting algorithms, this work helps to clarify the strengths and limitations of the different methods and
enables a more robust usage of the combined types.
© 2020 Author(s). All article content, except where otherwise noted, is licensed under a Creative Commons Attribution (CC BY) license
(http://creativecommons.org/licenses/by/4.0/). https://doi.org/10.1063/5.0019687., s

I. INTRODUCTION the system to systematically enhance the occurrence of the slowest


processes. Hence, by definition, the enhanced sampling algorithms
Molecular dynamics (MD) simulations play a central role in distort the trajectories and their information about the unbiased
understanding molecular motion at atomic resolution across disci- system’s thermodynamics and kinetics.
plines (see, e.g., Refs. 1–5). Since the advent of MD simulations, the The ensemble averages of the unbiased system can be recovered
system size and complexity has considerably progressed. Neverthe- from biased trajectories with phase-space reweighting methods.16–20
less, MD is still limited at best to millisecond timescales.6 However, Note that these can recover thermodynamic properties (such as
free-energy landscapes of molecular systems may comprise barriers energetic differences), but not the unbiased system kinetics.
of several hundred thermal energies (kB T), which results in compa- Only recently, dynamic reweighting methods have been pro-
rably rare transitions. Thus, sufficient sampling of complex systems posed that have the ability to extract the original, unbiased kinetics
is challenging or even impossible with unbiased MD setups. from biased simulations.21–27 A summary of the different dynamic
To overcome these limitations, a wide variety of enhanced sam- reweighting methods is provided by Kieninger et al.28 In general,
pling techniques have been developed over the past decades. Meth- these dynamic reweighting methods are applied to Markov state
ods with time-independent biasing such as umbrella sampling,7,8 models (MSMs). MSMs are a widely used technique to obtain
replica exchange,9,10 and accelerated MD11,12 as well as methods the slowest dynamic processes from simulated trajectories.24,29–33
with time-dependent biasing such as local-elevation,13 conforma- The application of MSMs is focused on, but not limited to, meta-
tional flooding,14 and metadynamics15 are among the most widely stable state detection, equilibrium distribution calculation, kinetic
used enhanced sampling algorithms. These techniques have in com- rate recovery, and flux analysis (see, e.g., Refs. 34–37 for recent
mon that a biasing potential or increased temperature is applied to examples). Dynamic reweighting methods reweight individual

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-1


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

transitions. For this, individual transitions between states are II. THEORY
tracked, reweighted, and subsequently collected in the so-called
A. Markov state modeling
count matrix. This procedure is discussed in detail in Sec. II.
One can distinguish two main classes of dynamic reweighting MSMs are a technique to analyze dynamic systems in a mas-
approaches: path-based and energy-based. Both types of approaches ter equation representation.38,39 In the case of MD simulations, the
reweight the MSM propagator Pij , i.e., the probability of being in conformational dynamics are discretized into n states for which a
state j after a time step τ under the condition that we started in transition probability matrix is constructed. Particularly, the total
state i. Path-based reweighting methods are currently only appli- count Cij of transitions from state i to j can be expressed as
cable to stochastic dynamics (SD) and require the knowledge of

both the bias energy and the random number for integration at each
Cij (τ) = ∑ χi (xt )χj (xt+τ ), (1)
step. The relatively new path-based reweighting class has currently t=1
two members, Weber–Pande reweighting23 and Girsanov reweight-
ing.26,27 Both methods yield good results for the kinetics; however, where N τ is the number of paths of length τ and χ i (xt ) are the indica-
their implementation is usually non-trivial and depends on the cho- tor functions with χ i (xt ) = 1 if the configuration xt at time t is in state
sen integration scheme. In contrast, the energy-based reweighting i and χ i (xt ) = 0 otherwise. The individual transitions will be termed
methods are independent of the chosen integration algorithm and
bij (t, τ) = χi (xt )χj (xt+τ ). (2)
only require the knowledge of the bias energy for each phase-space
state, which is easily accessible from the MD trajectories. However, The total counts Cij are stored in the count matrix C, which
depending on the system, these methods are less accurate because yields the MSM, i.e., the n × n transition probability matrix P, upon
they do not explicitly consider the different paths that could lead row normalization,
from state i to state j. The energy-based reweighting class includes Cij
multiple members (see Refs. 21, 22, 24, and 25). In this work, Pij = n . (3)
∑j=1 Cij
we will focus on one of the earliest algorithms, the dynamic his-
togram analysis method (DHAM),22 as a representative of this class. The eigenvalues λi and eigenvectors ρi of the transition probability
Other energy-based reweighting methods are either extensions of matrix P provide the dynamic information of the system. The first
this method, i.e., DHAMed,25 or have a similar maximum likeli- eigenvector ρ1 represents the stationary probability distribution of
hood approach.24 In addition, DHAM can reweight kinetics based the n states, and its eigenvalue is λ1 = 1. The remaining eigenvec-
on only enhanced sampling trajectories without the need for addi- tors ρ2 , . . ., ρn represent principal dynamic modes, i.e., probability
tional unbiased simulations. Therefore, DHAM was chosen as a fluxes, in the network of the n states. The corresponding eigenvalues
representative. λ2 , . . ., λn are smaller than one and quantify the associated rates
The different dynamic reweighting algorithms were developed of the probability fluxes. Hence, the relaxation timescales of the
by different groups for different simulation setups and with differ- dynamic modes,
ent physical assumptions. Therefore, it remains an open question τ
if and how the different approaches are connected, and if a “fam- ti = − , (4)
ln(λi )
ily tree” of dynamic reweighting can be established. In this work,
we derive the link between the two main reweighting classes (path- are determined by the eigenvalues with i > 1.
based and energy-based). First, we demonstrate that the two path-
based reweighting algorithms Weber–Pande23 and Girsanov26,27 can B. DHAM reweighting
be deduced from the same ”generalized” path reweighting idea. The dynamic histogram analysis method (DHAM)22 is based
Therefore, they share the path reweighting factor but differ sig- on the master equation ansatz. More specifically, it is based on
nificantly in the phase-space reweighting. Next, we reformulate the spatial discretization of the Smoluchowski diffusion equation
this generalized path reweighting idea to show that the energy- derived by Bicout and Szabo.40 This diffusion equation states that
based reweighting method DHAM is a special case of the path- for short time steps and diffusive dynamics, the unbiased transition
based reweighting methods. They are connected by a path correc- probabilities Pij are related with the biased ones P̃ij by
tion factor, which can be used to combine the strengths of both
reweighting types. Importantly, our new formulation does no longer Uj − Ui
Pijunnorm = P̃ij exp(− ), (5)
require the knowledge of the integrator’s random number. Hence, 2kB T
this approach can be used with arbitrary numerical schemes such
that the scope of this type of reweighting methods is extended to where U i and U j are the biasing potentials of discretized states i
MD simulations with deterministic integrator schemes. Addition- and j. The biasing potential is here defined as the potential sub-
ally, our formulation leads to multiple implementation advantages tracted from the system. The resulting unbiased transition probabil-
as well as increased parameter stability. The impact of the derivation ities Pijunnorm are not normalized; thus, an additional normalization
assumptions as well as the previous and new formulations is illus- step is needed,
trated using stochastic simulations of a Brownian particle in a one- Pijunnorm
Pij = . (6)
dimensional four-well potential. This work clarifies the strengths ∑j Pijunnorm
and limitations of the different reweighting approaches and will be
crucial for the application of dynamic reweighting to more complex It can be easily shown that this procedure is equivalent to
systems. reweighting every individual transition b̃ij (t, τ) and, subsequently,

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-2


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

performing a row normalization [Eq. (3)]. Thus, DHAM is imple- For reweighting, the Girsanov theorem uses the product of the
mented using relative starting probability at configuration xk and the relative path
probability. Hence, Girsanov reweighting depicts the ratio of path
Uj − Ui probabilities in the biased and unbiased setup as
bij (t, τ) = b̃ij (t, τ) exp(− ), (7)
2kB T
π(xk ) p(xk+1 , . . . , xk+Mτ ∣xk )
ωk,k+Mτ = ⋅ . (9)
where b̃ij (t, τ) is a transition of the biased simulation. DHAM is lim- π̃(xk ) p̃(xk+1 , . . . , xk+Mτ ∣xk )
ited to time-independent biasing potentials because U i and U j are
assumed to be time-independent. The reweighting type of DHAM Note that M τ = τ/Δt is the number of simulation frames in the
can be considered “energy-based” because Eq. (5) employs the bias- path from t = t k to t + τ = t k + M τ Δt. The phase-space probability
ing energies of the start and end states. This reweighting method was ratio can be determined by the Radon–Nikodym derivative43 as
successfully applied to calculate membrane crossing rates for drug
molecules.41 Additionally, DHAM was extended to the assumption π(xk ) Z̃ −U(xk )
of the detailed balance kinetics, which was termed “DHAM extended g(xk ) = = exp( ), (10)
π̃(xk ) Z kB T
to detailed balance” (DHAMed),25 which is similar to the earlier
transition-based reweighting analysis method (TRAM).24
where U denotes the biasing potential, and Z and Z̃ stand for the
respective partition functions of the unbiased and biased system.
C. Girsanov reweighting
Similarly, the ratio of the path probability measures is deter-
Girsanov reweighting26,27 is a path-based reweighting method, mined by the Radon–Nikodym derivative. N is the number of
i.e., it reweights individual trajectory paths. Since different transi- dimensions,
tion paths can generally contribute to the same transition probabil-
ity [exemplified in Fig. 1(a)], such a path-based method explicitly p(xk+1 , . . . , xk+Mτ ∣xk )
accounts for the biasing contributions of different pathways. Gir- μpath =
p̃(xk+1 , . . . , xk+Mτ ∣xk )
sanov reweighting is based on the Girsanov theorem.42 It describes
how the dynamics of a system varies if the probability measure is
⎡k+Mτ N ∇ U∣ √ 1 (∇l U∣k )2 ⎤
= exp⎢ ∑ (∑ l k w̃lk Δt −
⎢ ⎥
2
Δt)⎥. (11)
replaced by an equivalent measure. ⎢
⎣ k l=1 σ 2 σ ⎥

In contrast to the Smoluchowski equation ansatz of DHAM,
path-based reweighting algorithms are derived from the Langevin For convenience, we will from here on use the action difference
equation of motion for stochastic dynamics (SD), defined by ΔS = − ln(P/P̃),

d2 rl (t) dr (t) k+Mτ N


−∇l U∣k 1 (∇l U∣k )2
= F l (t) − γl ml l

ml + σl W l (t). (8) ΔS = ∑ (∑ w̃lk Δt + Δt). (12)
dt 2 dt σ 2 σ2
k l=1

Here, rl (t) denotes the position vector of the lth particle with mass
ml . The force F l = −∇l V is the gradient of the potential energy V and Equations (10) and (11) compose the reweighting factor in Eq. (9).
γl denotes the static friction coefficient. The fluctuation–dissipation The reweighting factor is afterward applied to every individual
theorem determines the prefactor σl2 = 2kB Tγl ml of the random transition,
force W l (t). For simplicity, we drop the particle index l on the con-
bij (t, τ) = b̃ij (t, τ) ⋅ ωi,j . (13)
stants in the following, i.e., ml = m, γl = γ, and σ l = σ. Additionally,
in the subsequent equations, the time is indicated by the index for all Note that the partition functions in Eq. (10) cancel for time-
time-dependent variable such that, for instance, F lk = F l (t k ). independent biasing potentials during the row normalization of the

FIG. 1. (a) Different paths can lead to a transition from state i to j. Their corresponding contributions to the reweighting are accounted for in path-based reweighting. (b)
Illustration of the basic idea behind the Weber–Pande algorithm.23 An identical simulation step from r t to rt + Δt is performed on both the original energy potential (red) and
the biased potential (blue). The two systems experience different forces F and F̃. As the simulations steps are defined identical, the acceleration and velocity terms cancel
from the Langevin equation of motion [Eq. (8)]. The resulting relationship between the two random numbers and the force terms is W = W̃ + [F̃ − F]σ −1 .

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-3


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

count matrix in Eq. (3). We will discuss the implication of the based on the Brünger-Brooks-Karplus (BBK) integrator.44,45 The
partition function for time-dependent biasing potentials in Sec. IV. BBK integrator assumes weak coupling between the system and
Note that the random number and the force at every time step the surrounding.45 Therefore, in contrast to Girsanov reweighting,
are required to calculate the relative path probability. Most MD Weber–Pande is derived for the low friction limit. Insertion into
software packages do not store random numbers, and a write-out Eq. (14) yields
frequency of every step is very storage demanding. Therefore, for
wlk = w̃lk + [F̃ lk − F lk ]σ −1 Δt.

most use cases, the Girsanov reweighting factor is calculated on (15)
the fly during the numerical integration of the MD engine. This
requires implementation changes in the MD software in order to Since both wlk and w̃lk are Gaussian random numbers with
use this reweighting approach. In contrast, energy-based reweight- zero mean and unit variance, the relative probability of wlk and w̃lk
ing algorithms such as DHAM,22 TRAM,24 or DHAMed25 can be is given by
applied entirely in a post-processing step. On the plus side, the Gir-
sanov algorithm was shown to be able to handle the time-dependent ⎛k+Mτ N (w2lk − w̃2lk ) ⎞
biasing potential U(t) during the build-up phase of metadynam- μpath = exp ∑ ∑ − , (16)
⎝ k l=1 2 ⎠
ics simulations.27 Possible limitations of time-dependent biasing in
conjunction with a rigorous consideration of the partition sums in and, consequently, is the action difference of the biased and unbiased
Eq. (10) are discussed in Sec. IV. transition,

D. Weber–Pande reweighting
k+Mτ N (w2lk − w̃2lk )
ΔSk,k+Mτ = ∑ ∑ . (17)
Although among the first dynamic reweighting methods pub- k l=1 2
lished, the algorithm proposed by Weber and Pande23 remained This means that the path reweighting factor in the Weber–
largely unnoticed. In contrast to the rigorous mathematical deriva- Pande scheme is the ratio of transition probabilities. Note that the
tion of Girsanov reweighting, Weber–Pande reweighting is derived relative phase-space probability of the initial state as in Eq. (10) was
via a physical approach based on action differences. Additionally, the not considered. This leads to some implications that are discussed in
phase-space probability reweighting of the start state is not consid- Sec. IV. The reweighting of the MSM is performed on the individual
ered, which leads to some important implications that are discussed transitions such that
in Sec. IV.
To follow the path-based reweighting arguments from Weber bij (t, τ) = b̃ij (t, τ) ⋅ μi,j . (18)
and Pande, we consider a simulation step Δt = t k+1 − t k from the
same phase-space start point {rl (t k ), v l (t k )} to the same phase-space Weber–Pande reweighting has similar advantages and limita-
end point {rl (t k+1 ), v l (t k+1 )} in the unbiased and biased energy tions as the Girsanov algorithm, i.e., it can reweight time-dependent
landscapes [Fig. 1(b)]. biases but has to be incorporated in the numerical integration of the
In order to make the same step length in both the unbiased and MD engine. A detailed comparison of their relative advantages and
biased energy landscapes, the net forces in both cases must be equal disadvantages is given in Sec. IV.
such that

III. CONNECTION BETWEEN WEBER–PANDE AND


F lk − γmv lk + σW lk = F̃ lk − γmv lk + σ W̃ lk ,
GIRSANOV REWEIGHTING

W lk = W̃ lk + [F̃ lk − F lk ]σ −1 ,
We will formulate a generalized path-based reweighting algo-
(14)
rithm inspired by the work of Weber and Pande.23 In contrast to
Weber–Pande reweighting, we will assume high frictional diffusion
where quantities in the biased trajectory are labeled with tilde, e.g., processes and use Ito diffusion, an alternative formulation of the
F̃. Note that v lk is identical in the biased and unbiased simulations Langevin equation,
because we demand that both systems start and end at the same
phase-space points. γm drl (t) = F l (t)dt + σdW l (t). (19)
Equation (14) is used to determine the relative path
probability of the biased and unbiased simulations. The rel- Here, drl (t) denotes the infinitesimal position vector shift of the
ative path probability is defined as the probability to sam- lth particle with mass m. dW l (t) is the increment of a Wiener pro-
ple the sequence of random vectors required for the unbiased cess, which has the following properties: dW l (t) is Gaussian with
simulation [W 1k , W 2k , . . . , W lk , . . . , W N(k+Mτ ) ] in comparison to zero mean, i.e., ⟨dW l (t)⟩ = 0 and variance ⟨dW l (t)dW l (t)⟩ = dt.
the sequence [W̃ 1k , W̃ 2k , . . . , W̃ lk , . . . , W̃ N(k+Mτ ) ] of the actually Additionally, the increments are independent of the past values and
performed biased simulation. independent across particles.
The path reweighting term depends on the numerical repre- Following the reasoning of Weber and Pande, we consider an
sentation of W lk . Due to the discretization, the reweighting becomes infinitesimal step dt in the unbiased and biased energy landscapes
integrator dependent. In their publication, Weber and Pande chose that leads to the same displacement drl (t) such that
√ −1
W lk ≈ wlk Δt , where wlk is sampled from a Gaussian distri-
bution with zero mean and unit variance.23 This discretization is dW l (t) = (F̃ l (t) − F l (t))σ −1 dt + dW̃ l (t). (20)

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-4


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

The instantaneous relative action differential of the biased and The two path-based reweighting algorithms, Weber–Pande and
unbiased simulation is given by Girsanov, have been developed independently by different groups.
The first method was derived by comparing the relative probabili-
N (dW l (t)2 − dW̃ l (t)2 ) ties S of Gaussian random forces in the biased and unbiased cases,
dSinst = ∑ . (21) whereas the latter is based on the Girsanov theorem. However, both
l=1 2⟨dW l (t)dW l (t)⟩ methods can be traced back to a common path-reweighting concept
and therefore share some similarities.
Inserting the connection between the random numbers from
Eq. (20) in Eq. (21) yields a relationship that only contains param-
eters that are either directly obtained from the biased system (i.e., IV. DIFFERENCES BETWEEN WEBER–PANDE AND
F̃ l (t) and dW̃ l (t)) or defined by the unbiased potential [i.e., the GIRSANOV REWEIGHTING
unbiased force F l (t)]. We abbreviate ΔF l (t) = F̃ l (t) − F l (t) such The main difference between Girsanov and Weber–Pande
that the relative action reads reweighting lies in Eq. (10), namely, the ratio of the phase-space
probability of the starting configuration. This term is present in Gir-
N
(ΔF l (t)σ −1 dt + dW̃ l (t))2 − dW̃ l (t)2 sanov reweighting but not in the Weber–Pande approach. The phys-
dSinst = ∑( ) ical intuition behind the phase-space probability term is depicted
l=1 2⟨dW l (t)dW l (t)⟩
in Fig. 2(A.1). Imagine that one combines a phase-space region, in
N
2ΔF l (t)σ −1 dtdW̃ l (t) + ΔF l (t)2 σ −2 dt 2 which phase-space points were biased differently, into a single clus-
= ∑( )
l=1 2dt ter n. We will now compare two of these phase-space points r1 and
r2 within cluster n that have a weak and a strong bias, respectively.
N
ΔF l (t) ΔF l (t)2
= ∑( dW̃ l (t) + dt). (22) The path reweighting term of Weber–Pande and Girsanov will cor-
l=1 σ 2σ 2 rectly reweight the conditional transition probability [Eq. (9)]. In
other words, the transition probability under the condition that the
To compare Eq. (22) with Girsanov reweighting, we need to path started in r1 or r2 is reweighted correctly. However, the relative
discretize, in particular, dW l (t) and dt. Note that this discretization probability of starting a simulation in r1 or r2 changes due to their
is integrator dependent. Girsanov reweighting was derived for the different biases. In Fig. 2(A.1), r2 has a higher equilibrium distribu-
Euler–Maruyama integrator; therefore, we will use the same inte- tion on the biased energy surface because it is biased more strongly.
grator here. In the special Thus, more simulations will start in r2 than in r1 in the biased case,
√ case of the Euler–Maruyama integrator,
one uses dW l (tk ) = wlk Δt, where wlk is the discrete random vec- but not in the unbiased one. This can create an imbalance in the
tor drawn at time t k . Similarly, the force at time t k is termed F lk . count matrix if the conditional transition probabilities of r1 or r2
Inserting the Euler–Maruyama discretization into Eq. (22) yields the differ. Equation (10) accounts for this imbalance by reweighting the
relative action for a single step, probability to start in r1 or r2 . The Weber–Pande approach, on the
other hand, does not reweight the relative starting probability within
the cluster. Instead, it implicitly assumes that the biasing poten-
N
ΔF lk √ (ΔF lk )2
ΔSstep = ∑( w̃lk Δt + Δt) (23) tial U i (t) is identical for each member of the cluster. In this case,
l=1 σ 2σ 2 the phase-space reweighting factor can be moved in front of the
path summation [Eq. (1)] and cancels during the row normaliza-
N
∇l U∣k √ (∇l U∣k )2 tion. This assumption is approximately true only for very fine MSM
= ∑(− w̃lk Δt + Δt). (24)
l=1 σ 2σ 2 clusters. Note that DHAM uses the same approximation and thus
also requires very fine clustering. In contrast, Girsanov reweighting
In a final step, we use the fact that the force difference between is not limited to small cluster sizes.
the biased and unbiased systems is exactly determined by the bias- For time-dependent biases, we have to consider two effects.
ing potential, i.e., ΔF = −∇U. Thus, the formulation of the relative First, Eq. (10) assumes that the starting probabilities at configuration
probability in Eq. (24) is identical to the relative path probability xk are Boltzmann distributed. This assumption can be violated for
in the Girsanov formulation [Eq. (11)]. Therefore, Girsanov and time-dependent biases that push the system out of equilibrium. This
Weber–Pande reweighting can be deduced from the same principles. problem can be minimized using biases that only lead to minimal
An interesting coincidence is that even though Weber–Pande non-equilibrium perturbations. However, even in the case of Boltz-
reweighting was derived in the low friction limit and Girsanov mann distributed starting probabilities, a second problem occurs.
reweighting in the high friction limit, both yield the same transition The biased partition function Z̃ in Eq. (10) becomes time-dependent.
reweighting term. In particular, insertion of Eq. (15) into Eq. (17) Thus, Z̃ does not cancel in the row normalization of the count
yields matrix,

k+Mτ N
ΔF lk √ (ΔF lk )2 Cij
ΔSpath = ∑ ∑( w̃lk Δt + Δt), (25) Pij =
k l=1 σ 2σ 2 ∑nj=1 Cij
which is identical to Eq. (23) that leads to the Girsanov reweight-

∑t=1 b̃ij (t, τ) ⋅ μpath ⋅ Z̃(t)
Z
exp( −UkBi (t)
T
)
= . (26)
exp( −UkBi (t)
ing formulation. This observation is discussed in more detail in N Z̃(t)
Sec. VII A. ∑nj=1 ∑t=1
τ
b̃ij (t, τ) ⋅ μpath ⋅ Z T
)

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-5


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

FIG. 2. Relation between phase-space reweighting and clustering as well as time-dependent biases. (A.1) Phase-space reweighting corrects for differently biased start states
in the same cluster. Due to row normalization, the phase-space reweighting factor cancels if all cluster members have the same bias. However, the coarser the clustering and
steeper the potential, the greater the phase-space reweighting correction. (A.2) Heatmaps showing the distance factor D [Eq. (32)] between the reweighted MSMs and the
reference in the limiting case of very coarse clustering. The phase-space reweighting factor of the Girsanov algorithm is able to correct the imbalance imposed by the coarse
clustering. Weber–Pande reweighting lacks this factor, which leads to inaccurate reweighting results. The inaccuracy of Girsanov reweighting for low cluster numbers is due
to MSM errors and not the reweighting error. (B.1) Representation of the time-dependent but position-independent biasing potential U(t) = const ⋅ t. (B.2) Heatmaps showing
the distance factor D between the reweighted MSMs and the reference in the limiting case of a strong time-dependent biasing potential. The neglected time-dependency of
the Girsanov phase-space reweighting factor leads to inaccurate reweighting results for strong time-dependent biases.

Therefore, for each time step, the knowledge of the partition minimized. One has to carefully choose if one includes the phase-
function Z̃ would be necessary to reweight accurately. In the Gir- space reweighting factor based on the combination of the system and
sanov reweighting approach, however, it is assumed that the par- biasing technique.
tition function cancels in the row normalization,27 which is only
true for time-independent biases. The implication of this second
issue is depicted in Fig. 2(B.1). For didactic purposes, we chose a V. AN INTEGRATOR INDEPENDENT REWEIGHTING
SCHEME AND THE CONNECTION TO DHAM
biasing potential that is time-dependent but not position-dependent
U(t) = const ⋅ t. Thus, the energy surface is shifted along the y axis for Both Girsanov and Weber–Pande reweighting used a specific
every step. The starting probabilities remain Boltzmann distributed, discretization scheme and are therefore integrator dependent. We
and the first issue does not apply. Therefore, this bias can be used to start from the discretization independent form in Eq. (22) to derive
observe the effect of the second issue only. This bias neither changes an integrator independent formulation for path-based reweight-
the system’s kinetics nor its equilibrium distribution. However, due ing. Additionally, we show that it intrinsically contains the DHAM
to the phase-space reweighting factor in Eq. (10), the Girsanov for- formalism.
mulation gives higher weights to transitions with a higher bias (i.e., We start our derivation from the action difference formulation
transitions that occur later in the simulation). This again creates an in Eq. (22). Note that this formulation is only valid in the over-
imbalance in the count matrix. The effect of the imbalance can be damped regime (i.e., high friction), which is a good assumption for
minimized by choosing time-dependent biases that decay over time, molecules in the aqueous solution,
e.g., well-tempered metadynamics.46
In summary, the phase-space reweighting factor Eq. (10) has N
ΔF l (t) ΔF l (t)2
dSinst = ∑( dW̃ l (t) + dt).
two consequences. It removes the intra-cluster imbalance in the l=1 σ 2σ 2
case of differently biased sub-states but creates an imbalance for
time-dependent biases. By choosing fine-grained clusters or apply- Furthermore, the assumption of an overdamped system is also
ing well-suited enhanced sampling techniques, these effects can be part of the derivation of the Smoluchowski diffusion equation and

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-6


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

therefore an intrinsic feature of DHAM.22 Solving Eq. (19) for ΔS = ∫ dSinst


dW̃ l (t) and introducing ΔF l (t) = F̃ l (t) − F l (t) back into Eq. (22) path
lead to N rl (t+τ) ΔF l (r) N t+τ F l (t)2 − F̃ l (t)2
= ∑∫ dr + ∑ ∫ dt. (28)
l=1 rl (t) 2kB T l=1 t 2σ 2
N
F̃ l (t) − F l (t)
dSinst = ∑ (γm drl (t) − F̃ l (t)dt)
l=1 σ2
As we have defined before, the force at time t k is termed F lk and
N
(F̃ l (t) − F l (t))2 ΔF lk = −∇l U|k is exactly the negative gradient of the biasing poten-
+∑ dt
l=1 2σ 2 tial of particle l at time t k . Hence, for deterministic (non-stochastic)
N processes, one can obtain from Eq. (28) directly the discrete form
F̃ l (t) − F l (t)
=∑ γm drl (t)
l=1 σ2 2
U(rk+Mτ ) − U(rk ) N k+Mτ F 2lk − F̃ lk
(F̃ (t) − F l (t))2 − 2F̃ l (t)(F̃ l (t) − F l (t))
N ΔS = +∑ ∑ Δt. (29)
+∑ l dt 2kB T l=1 k 2σ 2
l=1 2σ 2
N
F̃ l (t) − F l (t) N
F l (t)2 − F̃ l (t)2 If the configuration of {rlk } lies in the (MSM) state i and the
=∑ γm dr l (t) + ∑ dt terminal configuration {rlk+Mτ } lies in a different state j, we obtain
l=1 σ2 l=1 2σ 2
N
ΔF l (t) N
F (t)2 − F̃ l (t)2 Pk,k+Mτ Uj − Ui
=∑ drl (t) + ∑ l dt. (27) = exp(− )
l=1 2kB T l=1 2σ 2 P̃k,k+Mτ 2kB T
2
⎛ N k+Mτ F 2 − F̃ lk ⎞
For the last step, the fluctuation–dissipation theorem σ 2 × exp ∑ ∑ − lk 2 Δt . (30)
⎝ l=1 k 2σ ⎠
= 2kB Tγm was used. This formulation of the action difference
between the biased and unbiased system is independent of the ran-
dom force realizations dW̃ l (t). In particular, the random term is For stochastic processes, the displacement dr consists of a
mapped by the position shift drl (t), and thus, Eq. (27) is independent deterministic and stochastic proportion. Based on the principle of
of the numerical integrator. superposition, one can split these proportions apart, i.e., dr = drdeterm
This leads to three important technical implications: + drstoch . The integral of the force over the deterministic displace-
ment will again yield the energies. For small contributions of the
(1) The requirement to know the random number at every time stochastic displacement drstoch , one obtains
step is currently one of the main limitations of path-based
reweighting algorithms. Many higher-level SD integrators 2
work with multiple random numbers, or with random num- Uj − Ui N k+Mτ F 2lk − F̃ lk
ΔS = +∑ ∑ Δt + O(∫ ΔFdrstoch ). (31)
bers that add to the velocities (random impulses) and not 2kB T l=1 k 2σ 2
to the displacement.47,48 Consequently, the path-dependent
reweighting algorithms have to be derived for each integra- Equation (31) illustrates that path-based reweighting and
tor separately. In some cases, it might even be impossible DHAM share the same (path independent) energy term but differ in
to find a suitable modification. Therefore, a random num- the path-dependent term and the stochastic displacement term. The
ber independent path-based reweighting algorithm would be magnitude of the deviation will be determined by the specific path
preferable. taken, the length of the path, and the (random) forces encountered
(2) The random number is uncorrelated between two time steps, along this path.
which makes it necessary to reweight at the same time step Starting from the path reweighting term, we showed that
as the integration. In contrast, the force F may be correlated the reweighting can be split into a path-independent and a path-
between time steps. Thus, it might be possible to write out the dependent term [Eq. (27)]. For deterministic processes, the path-
forces, like the positions, at a lower frequency. However, if independent term is identical to the DHAM reweighting formula,
and how much the write-out frequency can be reduced is still whereas the path-dependent term can be viewed as a correction
speculative and subject to future research. factor. The contribution of the path correction increases with the
(3) In relation to the first point, path-based reweighting algo- number of steps M τ in a path, which is investigated with a four-well
rithms are currently limited to SD simulations. Equation (27) test system in Sec. VII C. Note, however, that the phase-space proba-
can also be applied with MD simulations. In that case, an bility reweighting of the initial state has to be performed in addition
approximation of γ is required, which is a problem-specific to the path reweighting as in Eq. (10).
but straightforward task in MD simulation.49–51 The potential
of this path correction will be explored in future work.
VI. METHODS
In a final step, we can relate the formulation of Eq. (27) to The reweighting performance of the different algorithms was
DHAM. We take DHAM’s assumption of a time-independent bias- assessed using a simple one-dimensional (1D) four-well system. The
ing potential U. In order to obtain the relative action for the whole system contains three distinct energy barriers, which correspond
path, we integrate over the instantaneous actions, to the slowest kinetics of the system. In order to accelerate barrier

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-7


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

crossing, the system was perturbed by scaling the potential energy used. The counts were reweighted by each of the dynamic reweight-
with a factor of 0.2. This corresponds to a biasing potential of U(x) ing algorithms. The source code to perform both the simulations
= 0.8V(x), where V(x) is the potential energy of the system. The abil- and reweighting is provided on Github (see the Data Availability
ity of a reweighting algorithm to recover both the equilibrium pop- section).
ulation as well as the equilibrium kinetics was evaluated. Reweight- The distance factor D describes how accurate the reweighting
ing was performed with the Weber–Pande [Eq. (16)] and Girsanov algorithm recovers the reference kinetics. To calculate D, we use
[Eq. (11)] reweighting algorithms as well as with the original DHAM ref reweight
the MSM relaxation timescale of the slowest process t2 and t2
approach [Eq. (5)] and DHAM with the path correction [Eq. (30)]. of the reference and the reweighted system, respectively. The MSM
Additionally, the reweighting was carried out for different MSM relaxation timescale is defined in Eq. (4). Thus, D is computed using
parameters to assess the (in)dependence of the chosen parameter set.
The energy surface of the system is defined by V(x) ref
min(t2 , t2
reweight
)
= −4 ln(e−2(x−1.5) −2 + e−2(x−4) + 0.6e−2(x−7) + e−2(x−9) −1 ). The
2 2 2 2
D= ref reweight
. (32)
max(t2 , t2 )
simulations were performed using stochastic dynamics with a BBK
integrator44 and a time step of Δt = 0.005. The parameters for the
The distance factor is always ≤1, where a value of 1 corresponds to
Langevin equation of motion were set as follows: γ = 50, m = 1,
perfect agreement between reference and reweighted kinetics.
and kB T = 1.5. All quantities are in arbitrary units. The parameters
were chosen to fulfill the requirement γΔt < 1 for the BBK inte-
grator and to yield reasonably short simulation times. In general, VII. RESULTS AND DISCUSSION
dynamic-reweighting methods are stable for different parameter
choices. However, if the bias is very large in comparison to σ, the rel- A. Transition matrix comparison between
ative path probability becomes very small, which can lead to numer- Weber–Pande and Girsanov reweighting
ical instabilities. Forty trajectories with a length of 400 000 steps As shown in Sec. III, the Weber–Pande and Girsanov algo-
each were simulated for the biased systems, starting at 40 equally rithms share the same path-reweighting factor [Eqs. (11) and (25)]
spaced points on the energy surface. 200 reference simulations with but differ in the phase-space reweighting factor [Eq. (10)]. In the fol-
4 000 000 steps each were performed for the unbiased system. The lowing, we showcase the discussed theoretical implications on a sim-
simulation trajectories were clustered in 250 microclusters based ple test system. First, we tested the deviation between Weber–Pande
on their x-coordinate. For the MSM transition matrix, counts were and Girsanov reweighting on the level of the transition matrix. An
obtained using a sliding window approach. If not stated otherwise, a MSM with fine clustering was built on the biased simulations and
lagtime of 4000 steps was chosen for the Weber–Pande and Girsanov reweighted to the original energy surface [Fig. 3(a)] by either the
reweighting. For DHAM reweighting, a lagtime of 40 steps was Weber–Pande or Girsanov approach. The resulting reweighted tran-

FIG. 3. Potential-energy surface of the four-well test system (a) and the difference between the transition matrices of Weber–Pande and Girsanov reweighting without (b) and
with (c) the phase-space reweighting factor for Girsanov. The transition matrix is visualized as a heatmap with elements for the 250 start states i and end states j. Blue colors
encode no difference, and red colors encode high differences.

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-8


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

sition matrices were compared. Figure 3(b) depicts the difference B. Reweighting results for Weber–Pande, Girsanov,
between the transition matrices if only the path reweighting term of and DHAM
Weber–Pande and Girsanov is used. Every square of the 250 × 250
heat map represents a transition probability between a start state i The performance of different dynamic reweighting algorithms
and an end state j. The color indicates the difference between the (Weber–Pande, Girsanov, and DHAM) was tested on a four-well
Weber–Pande and Girsanov transition matrices. Blue regions corre- system [Fig. 4(a)]. The ability to obtain both accurate equilibrium
spond to zero deviations, white regions indicate absolute differences populations as well as kinetics from biased simulations was assessed.
of up to 3%, and red regions indicate absolute differences of up to The original potential (red) contained high-energy barriers that were
6%. As expected by theory, there are no differences in the transition significantly lowered in the biased potential (blue). The histograms
matrix in Fig. 3(b). This confirms that the path-reweighting terms from the 40 separate simulations on the biased energy surface are
are identical. In contrast, Fig. 3(c) shows the difference between shown in Fig. 4(b). An MSM was built from these simulations and
the transition matrices for the full reweighting approach, i.e., it reweighted by Weber–Pande, Girsanov, and DHAM, respectively. A
includes the phase-space reweighting factor g for Girsanov. Most second MSM was built on the 200 unbiased simulations. The kinet-
regions show still no difference between the two methods. Only tran- ics of this reference system are displayed in Fig. 4(c) (“Reference”).
sitions that start from a high-energy cluster deviate around 3%. In Three distinct slow processes can be observed that correspond to the
our simple test system, clusters comprising high-energy states have three barrier crossings in the four-well system. The numerical values
a higher intra-cluster variance in the bias energy. In other words, of the timescales are given in Table I. As expected, the MSM from the
not all members of the start cluster i have exactly the same bias biased simulations yielded kinetics that were up to 300 fold faster
energy. As the bias energy contributes exponentially to the phase- due to the reduced barrier heights [Fig. 4(c): “Not reweighted”].
space reweighting factor, a small relative change in the bias energy The reweighted kinetics [Fig. 4(c): “Weber–Pande,” “Girsanov,” and
may lead to a large change in the likelihood factor g. However, for “DHAM”] are able to recover the original kinetic pattern. The two
sufficiently fine-grained clustering, the difference between Weber– path-based reweighting methods, Weber–Pande and Girsanov, give
Pande and Girsanov is small. In the presented case, we observed very similar results and differ only by a factor 1.4 from the reference
only minor deviations around 3%, which were limited to a few (see also Table I). In contrast, the reweighting results obtained with
regions. DHAM are slightly different. The kinetic results are also within 1.4
Second, to explore the differences between Weber–Pande and of the reference; however, a much shorter lagtime was necessary to
Girsanov reweighting further, we simulated extreme cases where obtain good results.
the phase-space reweighting factor g is expected to have the high- This issue becomes more evident when varying the MSM input
est impact. For this, we tested the reweighting of an MSM as a parameters to test the stability of the model for different parame-
function of (a) the number of clusters and (b) the magnitude of ter choices. Figure 4(d) shows the results of this parameter test for
a time-dependent biasing potential [but coordinate-independent, the slowest process using heatmaps. The number of clusters of the
i.e., U(t) = const ⋅ t]. Figure 2(A.2) shows the distance between the MSM was varied between 25 and 2500 and the lagtime between
reweighted MSMs and the reference for increasingly finer cluster- 10 and 10 000 frames. These extreme ranges were chosen to test
ing (with a time-independent bias). Red color indicates good agree- the limits of the reweighting algorithms. All reweighting methods
ment with the reference, and blue color indicates larger deviations. showed improvement over the raw biased MSM (“Not reweighted”).
As expected by theory, Weber–Pande reweighting is inaccurate for The path-based algorithms were again nearly identical and also
a small (coarse) number of clusters because the bias for the dif- showed similar stability. They only deviate from each other for
ferent members of the cluster is not homogeneous, which leads small numbers of clusters, where Girsanov reweighting outperforms
to an imbalance in the count matrix. Girsanov reweighting, on Weber–Pande. This is in line with the observations from theory and
the other hand, accounts for this imbalance with the phase-space Sec. VII A. For large numbers of clusters, on the other hand, the con-
reweighting factor, and thus, the reweighted results are close to the tribution of the phase-space reweighting factor g [Eq. (10)] approxi-
reference. mately cancels out in the transition matrix. Thus, similar results are
Figure 2(B.2) shows the distance between the reweighted obtained in these cases. Furthermore, both path-based algorithms
MSMs and the reference for increasing time-independent bias (and performed poorly at small lagtimes (<400 steps) and well at high lag-
fine-grained clustering). With increasing magnitude of the bias, times (>1000 steps). DHAM, on the other hand, showed the reversed
Girsanov reweighting becomes more inaccurate because the phase- lagtime dependency, i.e., it performed well for small lagtimes (<1000
space reweighting factor g leads to a stronger contribution of transi- steps) and poorly at high lagtimes (>4000 steps). Additionally, a
tions that have a higher bias, i.e., occur late in the simulation. This sufficiently large number of clusters was necessary for good perfor-
leads again to an imbalance in the count matrix. In contrast, the mance. It is known that DHAM needs relatively fine-grained cluster-
Weber–Pande approach without the phase-space reweighting factor ing in order to keep the discretization error of the MSM small.28 For
gives accurate reweighting results. our test system, DHAM showed the best performance of the three
We want to stress that Fig. 2 explores extreme cases to reweighting algorithms, within 1% of the reference for 250 clusters
emphasis the impact of the phase-space reweighting factor g on and a lagtime of 10.
reweighting. For most use cases, the difference between Weber– In addition to the kinetics, we also tested the performance of
Pande and Girsanov reweighting is likely marginal. Neverthe- the reweighting algorithms to recover the equilibrium distribution
less, it is important to keep in mind the difference between the [Fig. 4(e)]. All reweighting algorithms performed reasonably well.
two path-reweighting algorithms when choosing a reweighting Again the path-based approaches gave very similar results; however,
approach. the reweighted potential-energy surface showed distinct deviations

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-9


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

FIG. 4. Comparison of Weber–Pande, Girsanov and, DHAM dynamic reweighting on a four-well 1D test system. (a) Free-energy landscape of the unbiased system (red)
and the biased system (blue). (b) Frequency of visited states along the reaction coordinate for each of the 40 biased simulations. (c) Kinetic spectra of the unbiased MSM
(Reference), of the MSM from the biased simulations (Not reweighted), and of the MSMs obtained by reweighting with Weber–Pande, Girsanov, and DHAM. (d) Heatmaps
showing the distance factor D between the reweighted MSMs from Weber–Pande, Girsanov, and DHAM with the reference MSM as a function of the number of clusters
of the MSM and the lagtime (red: good agreement, blue: no agreement). Parameter sets used for (c) and (e) are highlighted with a black box. (e) Reweighted free-energy
landscape (blue, dotted) in comparison with the reference (red) and the biased landscape (blue).

from the reference one. In contrast, DHAM reweighting recovered the first and last step of the path (in contrast to the path-based meth-
the reference potential-energy surface nearly perfectly, even though ods, where the reweighting factor has to be calculated for every sim-
the kinetic results were similar to those from Weber–Pande and ulation step within the path). Thus, DHAM reweighting requires less
Girsanov. input data and user effort. However, the best choice for a reweight-
In summary, the path-based reweighting methods performed ing method will depend, of course, on the use case and the enhanced
very similar to each other as shown already in Sec. II. For DHAM, we sampling method used.
observed a different parameter dependency than for the path-based
methods. When choosing the optimal MSM parameter combination
C. Path correction expands DHAM to long lagtimes
for each reweighting method, the results from DHAM reweighting
were closest to the reference for the chosen four-well test system. In order to test the connection between DHAM and Weber–
This is especially remarkable as DHAM only uses information about Pande, we additionally reweighted the MSM with Eq. (30), which

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-10


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

TABLE I. MSM relaxation timescales of the three slowest processes (the crossings of we will term “DHAM + path correction”. We named it path correc-
the three distinct energy barriers in the four-well system) of the reference MSM, the tion because it adds a correction to DHAM based on the specific
MSM from the biased simulations, and the reweighted MSMs with the Weber–Pande, path chosen. We compared the reweighting results from DHAM
Girsanov, and DHAM algorithms.
and “DHAM + path correction” for short and long lagtimes. For
short lagtime, DHAM results match the reference both in terms of
Reference Biased Weber–Pande Girsanov DHAM the potential energy and the kinetics, and thus, the application of
Relaxation timescale timescale timescale timescale timescale
process (steps) (steps) (steps) (steps) (steps) the path correction does not change these results [Fig. 5(a)]. This is
expected as the path correction (i.e., a sum over the transition path)
1 2.90 ⋅ 107 7.78 ⋅ 104 2.03 ⋅ 107 2.01 ⋅ 107 1.97 ⋅ 107 does not contribute much to the reweighting for short lagtimes.
2 1.17 ⋅ 105 1.75 ⋅ 104 1.12 ⋅ 105 1.15 ⋅ 105 1.13 ⋅ 105 As already discussed in Sec. VII B, DHAM becomes inaccu-
3 3.82 ⋅ 104 1.07 ⋅ 104 4.22 ⋅ 104 4.29 ⋅ 104 3.96 ⋅ 104 rate for longer lagtimes. Figure 5(b) depicts the reweighting results
for a lagtime of 4000 steps. The energy surface is underestimated,

FIG. 5. Reweighting performance at a lagtime of 40 steps (a) and 4000 steps (b). Top panel: DHAM reweighted free-energy landscape (blue, dotted) in comparison with the
reference (red) and the biased landscape (blue). Middle panel: “DHAM + path correction” reweighted free-energy landscape (blue, dotted) in comparison with the reference
(red) and the biased landscape (blue). Bottom panel: Kinetic spectra of the reference MSM, the DHAM reweighted MSM, and the “DHAM + path correction” reweighted MSM.
(c): Heatmaps showing the distance factor D between the reweighted MSMs with DHAM (top) and “DHAM + path correction” (bottom) and the reference as a function of the
number of clusters and the lagtime (red: good agreement, blue: no agreement). Parameter sets used for (a) and (b) are highlighted with a black and gray box, respectively.

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-11


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

and the kinetics differ by a factor of 300 from the reference. For path correction does never lead to a decrease in the performance,
long lagtimes, the path correction contributes significantly, and thus, even at small lagtimes.
the reweighted results with “DHAM + path correction” improve In their original publication, Rosta and Hummer22 proposed a
[Fig. 5(b)]. The reweighted energy surface is as close to the refer- different reweighting term for long lagtimes,
ence as with Weber–Pande or Girsanov for the same lagtime. The
kinetics deviate from the reference only by a factor of 3. How-
Uj
ever, the kinetic results have a larger deviation from the reference Pijunnorm = P̃ij exp(− ). (33)
than with Weber–Pande or Girsanov. We speculate that this is kB T
because we assumed an overdamped (high friction) system in the
derivation of the path correction. In the test system, the assump- In contrast to Eq. (5), the reweighting with Eq. (33) is independent
2
tion ∣γm drdt
∣ ≫ ∣m ddt2r ∣ is not true for all simulation steps. Therefore, of the bias energy of the start state U i . The authors argue that with
the path correction does not perfectly resemble the Weber–Pande increasing lagtime, the memory of the start state vanishes. To com-
results. It remains to be tested how well the path correction performs pare this approach with the path correction developed in the present
for more complex, biological systems. This will be subject of future work, we reweighted the test system with Eq. (33), termed “DHAM
work. for long lagtimes” in the following (Fig. 6). This variant of DHAM
In Fig. 5(c), the performance of DHAM and “DHAM + path gave more accurate reweighting results for lagtimes in the range
correction” is compared for different MSM input parameters. In of 400–1000 steps. However, the results for short lagtimes (<400)
contrast to the other three algorithms, “DHAM + path correction” is showed significantly reduced accuracy. Furthermore, we observed a
applicable to a wide range of parameters and is not limited to either high parameter sensitivity for “DHAM for long lagtimes”, and even
short or long lagtimes. Additionally, note that the application of the for the best parameter combinations, the kinetics deviated around

FIG. 6. Reweighting performance at a lagtime of 400 steps [(a) and (c)] and 4000 steps [(b) and (f)]. (a) and (b) Free-energy landscape reweighted by “DHAM for long
lagtimes” (DHAM2; blue, dotted) in comparison with the reference (red) and the biased landscape (blue) at lagtimes of 400 and 4000 steps, respectively. (c) Kinetic spectra
of the reference MSM and the MSM reweighted with “DHAM for long lagtimes” (DHAM2) with a lagtime of 400 steps. (d): Heatmap showing the distance factor D between
the biased MSMs and the reference as a function of the number of clusters and the lagtime (red: good agreement, blue: no agreement). Parameter sets used for (a)/(c) and
(b)/(f) are highlighted with a black and gray box, respectively. (e): Same as (d) but for the results with “DHAM for long lagtimes” (DHAM2). (f): Kinetic spectra of the reference
MSM and the MSM reweighted with “DHAM for long lagtimes” (DHAM2) with a lagtime of 4000 steps.

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-12


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

one order of magnitude from the reference. Therefore, we conclude not depend on the random number, in contrast to the path-based
that the “DHAM + path correction” is more accurate as well as less reweighting methods Weber–Pande and Girsanov. The need to
parameter sensitive than “DHAM for long lagtimes.” know the random number at every time step is currently one of
In summary, we showed that the application of the path cor- the main limitations of path-based reweighting. Thus, the path cor-
rection is able to extend DHAM to longer lagtimes, with improved rection can be applied with any SD integrator. Second, the path
parameter stability compared to the other tested reweighting meth- correction depends on the force of every time step, which may be
ods. With this approach, it was possible to recover the same correlated between time steps (in contrast to the random number).
potential-energy landscape as with the path-based reweighting algo- Therefore, it may be possible to increase the write-out frequency of
rithms. For long lagtimes, the kinetics were still a factor of two less the forces or even use the path correction for post-processing. Third,
accurate than Weber–Pande and Girsanov reweighting but a factor the “DHAM + path correction” approach is, in principle, no longer
of 100 more accurate than DHAM. Future work will test the perfor- restricted to SD like the other path-based methods but can be applied
mance and stability of “DHAM + path correction” for more complex to MD as well. However, a good approximation for γ will be neces-
systems to obtain more general conclusions. sary in this case. The potential of the path correction approach and
its applicability to more complex systems will be explored in future
work.
This work led to new insights into the existing dynamic
VIII. CONCLUSIONS reweighting algorithms and for the first time connected path-based
In this work, we presented the connection between path-based and energy-based approaches. In addition, a combined method that
reweighting and energy-based reweighting methods and showed a joins the advantages of path-based and energy-based reweighting
strong similarity among the path-based reweighting algorithms. We was proposed. Nevertheless, many open questions about dynamic
could demonstrate that Weber–Pande and Girsanov reweighting reweighting remain: In the presented study, we focused on the the-
share the same path-reweighting term [Eqs. (11) and (25)] but dif- oretical aspects and the mathematical derivation of the connection
fer in the phase-space reweighting term g, which is only present in between path- and energy-based reweighting methods. We chose a
the Girsanov approach. The inclusion of g leads to improved perfor- simple, easy to understand 1D model system to test our theoreti-
mances for MSMs with a low number of clusters. In contrast, g intro- cal derivations and to highlight important results. Future work is
duces an imbalance for time-dependent biases and thus decreases needed to validate the presented findings on more complex atom-
the performance in these cases. It therefore depends on the system, istic systems of practical relevance such as drug-like molecules or
the MSM input parameters, and the biasing potential if the inclusion proteins. Additionally, in this manuscript, we focused on DHAM
of g is beneficial. Despite the small difference due to the phase-space as a representative of the energy-based reweighting methods. As
reweighting factor, the two path-based reweighting approaches yield mentioned in the Introduction, the energy-based reweighting class
very similar results for our simple test system, especially with a large includes more members, e.g., DHAMed25 and TRAM.24 The perfor-
number of clusters. mance of these methods was not explicitly tested in our study. It will
In addition, we tested the dependency of the different reweight- be of special interest to test if these methods do overcome the lagtime
ing methods on the MSM input parameters. Both path-based dependence of DHAM.
reweighting algorithms performed well at long lagtimes but poorly Future work will therefore need to systematically compare the
at short lagtimes. Further research is needed to clarify if the need performance of all available dynamic reweighting algorithms on
for long lagtimes is due to (implicit) physical assumptions in the both model systems and molecular systems. In addition to testing
derivation or due to numerical reasons such as precision problems. different reweighting algorithms, it will be important to include a
In the second part of this work, we showed that the path-based variety of enhanced sampling techniques and bias strengths to deter-
reweighting methods can be linked to the DHAM approach. The mine the best balance between speed-up and reweighting perfor-
only assumptions required to connect the approaches were a high- mance. The main difficulty is thereby that the different reweight-
friction system and time-independent biases. Especially, the latter ing methods are not implemented in a single MD code and were
assumption illustrates that path-based reweighting can be applied to not tested on the same molecular systems. We are currently work-
more different types of biases. However, path-based reweighting is ing toward implementing the different reweighting methods in a
currently limited to SD, whereas energy-based reweighting can be common source and test their performance with different enhanced
applied to both SD and MD. Based on our derivation, we found that sampling methods using the same molecular systems.
path-based methods contain the path-independent DHAM equation
plus a path-dependent term, which we termed “path correction”.
DATA AVAILABILITY
While the original DHAM showed good performance for short lag-
times but poor performance for long lagtimes, the application of the Source code to perform the simulations and reweighting of
path correction led to good performances over the full range of lag- the 1D potentials as well as to reproduce all figures of this
times. “DHAM + path correction” combines the strength of high manuscript is available on GitHub: https://github.com/rinikerlab/
numerical stability at short lagtimes and the consideration of path Dynamic_Reweighting_FamilyTree.
dependency for long lagtimes. This will be especially important for
more complex systems and slow dynamics, where it is inevitable to
use long lagtimes. ACKNOWLEDGMENTS
From a technical point of view, “DHAM + path correction” The authors thank the reviewers for their valuable input.
has a number of key advantages. First of all, the formulation does The authors gratefully acknowledge financial support by the Swiss

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-13


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

23
National Science Foundation (Grant No. 200021-178762), the Schol- J. K. Weber and V. S. Pande, “Potential-based dynamical reweighting for
arship Fund of the Swiss Chemical Industry, and the ETH Zurich Markov state models of protein dynamics,” J. Chem. Theory Comput. 11, 2412
(Grant No. ETH-34 17-2). S.M.L. was also supported by the Ph.D. (2015).
24
scholarship of the German National Academic Foundation. H. Wu, F. Paul, C. Wehmeyer, and F. Noé, “Multiensemble Markov models
of molecular thermodynamics and kinetics,” Proc. Natl. Acad. Sci. U. S. A. 113,
E3221 (2016).
25
L. S. Stelzl, A. Kells, E. Rosta, and G. Hummer, “Dynamic histogram analysis
to determine free energies and rates from biased simulations,” J. Chem. Theory
REFERENCES Comput. 13, 6328 (2017).
26
L. Donati, C. Hartmann, and B. G. Keller, “Girsanov reweighting for
1
T. E. Cheatham III and P. A. Kollman, “Molecular dynamics simulation of path ensembles and Markov state models,” J. Chem. Phys. 146, 244112
nucleic acids,” Annu. Rev. Phys. Chem. 51, 435–471 (2000). (2017).
2 27
T. Hansson, C. Oostenbrink, and W. van Gunsteren, “Molecular dynamics L. Donati and B. G. Keller, “Girsanov reweighting for metadynamics simula-
simulations,” Curr. Opin. Struct. Biol. 12, 190–196 (2002). tions,” J. Chem. Phys. 149, 072335 (2018).
3 28
M. Karplus and J. Kuriyan, “Molecular dynamics and protein function,” Proc. S. Kieninger, L. Donati, and B. G. Keller, “Dynamical reweighting methods for
Natl. Acad. Sci. U. S. A. 102, 6679 (2005). Markov models,” Curr. Opin. Struct. Biol. 61, 124 (2020).
4
Y. Dong, Q. Li, and A. Martini, “Molecular dynamics simulation of 29
C. Schütte, A. Fischer, W. Huisinga, and P. Deuflhard, “A direct approach to
atomic friction: A review and guide,” J. Vac. Sci. Technol. A 31, 030801 conformational dynamics based on hybrid Monte Carlo,” J. Comput. Phys. 151,
(2013). 146 (1999).
5
S. A. Hollingsworth and R. O. Dror, “Molecular dynamics simulation for all,” 30
W. C. Swope, J. W. Pitera, and F. Suits, “Describing protein folding kinet-
Neuron 99, 1129–1143 (2018). ics by molecular dynamics simulations. 1. Theory,” J. Phys. Chem. B 108, 6571
6
K. Lindorff-Larsen, P. Maragakis, S. Piana, and D. E. Shaw, “Picosecond to (2004).
millisecond structural dynamics in human ubiquitin,” J. Phys. Chem. B 120, 31
J.-H. Prinz, H. Wu, M. Sarich, B. Keller, M. Senne, M. Held, J. D. Chodera,
8313–8320 (2016). C. Schütte, and F. Noé, “Markov models of molecular kinetics: Generation and
7
G. M. Torrie and J. P. Valleau, “Nonphysical sampling distributions in Monte validation,” J. Chem. Phys. 134, 174105 (2011).
Carlo free-energy estimation: Umbrella sampling,” J. Comput. Phys. 23, 187 32
J. D. Chodera and F. Noé, “Markov state models of biomolecular
(1977). conformational dynamics,” Curr. Opin. Struc. Biol. 25, 135
8
P. Virnau and M. Müller, “Calculation of free energy through successive umbrella (2014).
sampling,” J. Chem. Phys. 120, 10925 (2004). 33
B. E. Husic and V. S. Pande, “Markov state models: From an art to a science,”
9
U. H. E. Hansmann, “Parallel tempering algorithm for conformational studies of J. Am. Chem. Soc. 140, 2386 (2018).
biological molecules,” Chem. Phys. Lett. 281, 140 (1997). 34
W. Wang, S. Cao, L. Zhu, and X. Huang, “Constructing Markov state
10
Y. Sugita and Y. Okamoto, “Replica-exchange multicanonical algorithm and models to elucidate the functional conformational changes of
multicanonical replica-exchange method for simulating systems with rough complex biomolecules,” Wiley Interdiscip. Rev.: Comput. Mol. Sci. 8, e1343
energy landscape,” Chem. Phys. Lett. 329, 261 (2000). (2018).
11 35
A. F. Voter, “Hyperdynamics: Accelerated molecular dynamics of infrequent A. Kells, A. Annibale, and E. Rosta, “Limiting relaxation times from Markov
events,” Phys. Rev. Lett. 78, 3908 (1997). state models,” J. Chem. Phys. 149, 072324 (2018).
12 36
D. Hamelberg, J. Mongan, and J. A. McCammon, “Accelerated molecular S. M. Linker, A. Magarkar, J. Köfinger, G. Hummer, and D. Seeliger, “Fragment
dynamics: A promising and efficient simulation method for biomolecules,” binding pose predictions using unbiased simulations and Markov-state models,”
J. Chem. Phys. 120, 11919 (2004). J. Chem. Theory Comput. 15, 4974 (2019).
13 37
T. Huber, A. E. Torda, and W. F. van Gunsteren, “Local elevation: A method J. Witek, S. Wang, B. Schroeder, R. Lingwood, A. Dounas, H.-J. Roth,
for improving the searching properties of molecular dynamics simulation,” M. Fouché, M. Blatter, O. Lemke, B. Keller, and S. Riniker, “Rationalization of the
J. Comput.-Aided Mol. Des. 8, 695 (1994). membrane permeability differences in a series of analogue cyclic decapeptides,”
14
H. Grubmüller, “Predicting slow structural transitions in macromolecular sys- J. Chem. Inf. Model. 59, 294 (2019).
tems: Conformational flooding,” Phys. Rev. E 52, 2893 (1995). 38
S. Marco, J.-H. Prinz, and S. Christof, “Markov model theory,” in An Intro-
15
A. Laio and M. Parrinello, “Escaping free-energy minima,” Proc. Natl. Acad. Sci. duction to Markov State Models and Their Application to Long Timescale Molec-
U. S. A. 99, 12562 (2002). ular Simulation, edited by G. R. Bowman, V. S. Pande, and N. Frank (Springer
16 Netherlands, Dordrecht, 2014), p. 23.
R. W. Zwanzig, “High-temperature equation of state by a perturbation method.
39
I. Nonpolar gases,” J. Chem. Phys. 22, 1420 (1954). S. Winkelmann and C. Schütte, “The spatiotemporal master equation: Approxi-
17 mation of reaction-diffusion dynamics via Markov state modeling,” J. Chem. Phys.
S. Kumar, D. Bouzida, R. H. Swendsen, P. A. Kollman, and J. M. Rosen-
berg, “The weighted histogram analysis method for free-energy calculations on 145, 214107 (2016).
40
biomolecules. I. The method,” J. Comput. Chem. 13, 1011 (1992). D. J. Bicout and A. Szabo, “Electron transfer reaction dynamics in non-Debye
18 solvents,” J. Chem. Phys. 109, 2325 (1998).
M. Leitgeb, C. Schröder, and S. Boresch, “Alchemical free energy calcu-
41
lations and multiple conformational substates,” J. Chem. Phys. 122, 084109 M. Badaoui, A. Kells, C. Molteni, C. J. Dickson, V. Hornak, and E. Rosta, “Calcu-
(2005). lating kinetic rates and membrane permeability from biased simulations,” J. Phys.
19 Chem. B 122, 11571 (2018).
M. R. Shirts and J. D. Chodera, “Statistically optimal analysis of samples from
42
multiple equilibrium states,” J. Chem. Phys. 129, 124105 (2008). I. V. Girsanov, “On transforming a certain class of stochastic processes by
20 absolutely continuous substitution of measures,” Theory Probab. Appl. 5, 285
G. König and S. Boresch, “Non-Boltzmann sampling and Bennett’s acceptance
ratio method: How to profit from bending the rules,” J. Comput. Chem. 32, 1082 (1960).
43
(2011). B. Øksendal, Stochastic Differential Equations, 6th ed. (Springer-Verlag, Berlin,
21 2003), p. 139.
J. D. Chodera, W. C. Swope, F. Noé, J. H. Prinz, M. R. Shirts, and V. S.
44
Pande, “Dynamical reweighting: Improved estimates of dynamical properties A. Brünger, C. L. Brooks, and M. Karplus, “Stochastic boundary conditions
from simulations at multiple temperatures,” J. Chem. Phys. 134, 244107 (2011). for molecular dynamics simulations of ST2 water,” Chem. Phys. Lett. 105, 495
22 (1984).
E. Rosta and G. Hummer, “Free energies from dynamic weighted histogram
45
analysis using unbiased Markov state model,” J. Chem. Theory Comput. 11, 276 G. Zhang and T. Schlick, “Implicit discretization schemes for Langevin
(2015). dynamics,” Mol. Phys. 84, 1077–1098 (1995).

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-14


© Author(s) 2020
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

46 49
A. Barducci, G. Bussi, and M. Parrinello, “Well-tempered metadynamics: A A. Rahman, “Correlations in the motion of atoms in liquid argon,” Phys. Rev.
smoothly converging and tunable free-energy method,” Phys. Rev. Lett. 100, 136, A405–A411 (1964).
020603 (2008). 50
G. Hummer, “Position-dependent diffusion coefficients and free energies from
47
W. F. V. Gunsteren and H. J. C. Berendsen, “A leap-frog algorithm for stochastic Bayesian analysis of equilibrium and replica molecular dynamics simulations,”
dynamics,” Mol. Simul. 1, 173 (1988). New J. Phys. 7, 34 (2005).
48 51
N. Goga, A. J. Rzepiela, A. H. de Vries, S. J. Marrink, and H. J. C. Berendsen, M. Hinczewski, Y. von Hansen, J. Dzubiella, and R. R. Netz, “How the diffusivity
“Efficient algorithms for Langevin and DPD dynamics,” J. Chem. Theory Comput. profile reduces the arbitrariness of protein folding free energies,” J. Chem. Phys.
8, 3637 (2012). 132, 245103 (2010).

J. Chem. Phys. 153, 234106 (2020); doi: 10.1063/5.0019687 153, 234106-15


© Author(s) 2020

You might also like