betaFeedback

WorksPhysics and Astronomy

Correcting systematic errors in the likelihood optimization of underdamped Langevin models of molecular dynamics trajectories

Abstract

Since Kramers' pioneering work in 1940, significant efforts have been devoted to studying Langevin equations applied to physical and chemical reactions projected onto few collective variables, with particular focus on the inference of their parameters. While the inference for overdamped Langevin equations is well-established and widely applied, a notable gap remains in the literature for underdamped Langevin equation. This gap arises from the challenge of accessing velocities solely through finite differences of positions, resulting in spurious correlations. In this letter, we propose an analytical correction for these correlations, specifically designed for a likelihood-maximization algorithm that exploits short, non-ergodic trajectories that can be obtained at reasonable numerical cost. The accuracy and robustness of our approach are tested on a benchmark case and a realistic system. This work paves the way for applying generalized Langevin equation inference to activated phenomena, such as chemical reactions, in several scientific domains.

In addition to providing ergodic canonical sampling for atomistic simulations of condensed phase systems, Langevin equations are used by a broad scientific community to describe the time evolution of generic observables. The flexibility of the equations’ structure, accommodating both deterministic and Markovian or non-Markovian random forces, enables them to model successfully phenomena as diverse as phase transitions[1], climate-change effects on ocean currents[2], and clocks[3].

In particular, many complex, high-dimensional physical and chemical processes can be effectively studied through the lens of Langevin dynamics when projected onto one (or a few) collective variable (CV), qq that tracks their progress4. Depending on the problem, different types of Langevin equations should be adopted. In this work, we focus on the underdamped, Markovian regime. In this case, the evolution equations are

{q˙=vv˙=−1mdFdq−γv+σ~η(t)(1)\begin{cases} \dot{q}=v \\ \dot{v}=-\frac{1}{m}\frac{\mathrm{d}F}{\mathrm{d}q}-\gamma v+\tilde{\sigma}\eta(t) \tag*{(1)} \end{cases}

where mm is the effective CV mass, F(q)F(q) the free energy landscape (or potential of mean force), γ(q)\gamma(q) is the friction, σ~\tilde{\sigma} is the amplitude of the random force, and η(t)\eta(t) a time-uncorrelated Gaussian white noise. If

σ~=2kBTγm,\tilde{\sigma}=\sqrt{\frac{2k_{\mathrm{B}}T\gamma}{m}},

fluctuation dissipation is enforced. In general, F(q)F(q) and γ(q)\gamma(q) are not available analytically and must be determined starting from observational time series of the CV and (in principle of) its velocity, based, e.g., on experiments or molecular dynamics trajectories.

Furthermore, the stochastic equation is typically not employed in the differential form above, but via a numerical integrator with a finite time step5 τ\tau, that establishes the time resolution adopted to analyze the data. Such resolution is a key parameter: depending on the degree of temporal coarse-graining, different types of Langevin equations act as suitable approximations6. In the case of overdamped models, statistical inference approaches based on likelihood maximization currently allow to reconstruct the potential of mean force, the diffusion coefficient (related to the friction) and the kinetic rate in a range of overdamped processes7–15. We remark that long, ergodic trajectories that accurately sample the probability landscape of the CV are often unavailable, so it is important to develop numerical schemes able to exploit also short, unbiased, non-ergodic trajectories15.

The parametrization of underdamped models is presently considerably less developed and understood. These models are, however, needed to describe important phenomena, such as migrating cells dynamics16 and biomolecular processes17, that display inertial effects at fine-grained time resolution, so progress in this direction is highly desirable. Unfortunately, model inference for the underdamped case is significantly more complex than for the overdamped. CV positions and velocities appear on equal footings in Eq. (1). However, often in observational time-series only coordinates are directly accessible, while velocities need to be estimated via finite differences schemes18. This introduces spurious correlations even at infinitely-small time resolution, spoiling the accuracy of current inference methods. In Ref.19 it was shown that serious inaccuracies on friction estimation (subsequently affecting free energy estimation in non ergodic calculations), arise when the propagator deployed in the likelihood scheme is of order lower than O(τ3/2)O(\tau^{3/2}). Unfortunately, no general solution for this problem was proposed.

The spurious velocity correlations hinder also use of alternative approaches. For example, in Refs.17,20,21 only positions are employed in the parametrization of the potential of mean force and the friction (and diffusion) is obtained via local averages. This procedure, however, is based on an ad hoc choice of an integrator of first order in time and therefore open to the problems highlighted in Ref. 19. A solution to the problems arising from finite-difference velocities was proposed in Ref. 16, where unbiased estimators for the drift and noise amplitude in Eq. (1) were derived. Even though this method represents a significant advance in the inference of realistic data, converging these estimators requires simulations lengths that might be unattainable in the presence of free-energy barriers. The approaches mentioned above are not based on likelihood maximization. More recently, we introduced a likelihood-based scheme in which the velocity issue was circumvented by inferring the friction beforehand through correlation functions within a free-energy well6. This approach has the advantage of simplicity but it does not account for the position-dependence of the friction and relies on approximately harmonic dynamics.

In this letter, we propose a novel likelihood-maximization approach that overcomes the limitations of current inference schemes for underdamped Langevin models: requiring as only input short, non ergodic trajectories, it eliminates the aforementioned systematic errors via an original analytical correction scheme. We provide both a priori and a posteriori evaluations of the quality of the inference that do not require prior knowledge on the system. We demonstrate the accuracy and robustness of the approach with respect to varying the time resolution of the Langevin model for benchmark and realistic systems. In principle, the approach can be extended to non-Markovian generalized Langevin equations.

The projection of high-dimensional Hamiltonian dynamics onto one (or a few) CV(s) results in a generalized Langevin equation4,22, that simplifies to the Markovian Eq. (1) for sufficiently coarse temporal subsampling6. Starting from a given set of trajectories discretized as MM samples, an efficient strategy to parametrize Langevin models exploits the maximization of a likelihood function written as the product of short-time propagators:

Lθ=∏n=1M−1Pθ(qn+1,vn+1∣qn,vn)(2)\mathcal{L}_{\theta} = \prod_{n=1}^{M-1} \mathcal{P}_{\theta}(q_{n+1},v_{n+1}\mid q_n,v_n) \tag*{(2)}

where θ\theta is the set of model parameter, which in our case include friction and free-energy landscapes. The mass is directly estimated using the equipartition theorem or via a coordinate transformation6,23.

Following Refs. 6,24 we approximate the propagator in

Gaussian form

Pθ(qn+1,vn+1∣qn,vn)=14π∣M∣exp⁡[−Mqq2∣M∣(vn+1−⟨v⟩)2−Mvv2∣M∣(qn+1−⟨q⟩)2+Mqv∣M∣(qn+1−⟨q⟩)(vn+1−⟨v⟩)](3)\mathcal{P}_{\theta}(q_{n+1},v_{n+1}\mid q_n,v_n) = \frac{1}{\sqrt{4\pi\lvert M\rvert}}\exp\left[ -\frac{M_{qq}}{2\lvert M\rvert}(v_{n+1}-\langle v\rangle)^2 -\frac{M_{vv}}{2\lvert M\rvert}(q_{n+1}-\langle q\rangle)^2 +\frac{M_{qv}}{\lvert M\rvert}(q_{n+1}-\langle q\rangle)(v_{n+1}-\langle v\rangle) \right] \tag*{(3)}

where averages ⟨q⟩\langle q\rangle, ⟨v⟩\langle v\rangle and (co)variances Mαβ=⟨αβ⟩−⟨α⟩⟨β⟩M_{\alpha\beta}=\langle\alpha\beta\rangle-\langle\alpha\rangle\langle\beta\rangle (elements of the matrix MM) are defined in SI section A.

As proved in SI section B, the specific form of the matrix and averages adopted in this work corresponds, to order O(τ3)\mathcal{O}(\tau^3), to the evolution determined by the second order Vanden-Eijnden and Ciccotti (VEC) integrator for underdamped Langevin dynamics (eq. 21 in Ref. 5):

qn+1=qn+τ(1−γτ2)vn+τ22ϕn+τ2σ[Gn+13G~n](4)q_{n+1}=q_n+\tau\left(1-\frac{\gamma\tau}{2}\right)v_n+\frac{\tau^2}{2}\phi_n+\frac{\tau}{2}\sigma\left[G_n+\frac{1}{\sqrt{3}}\widetilde{G}_n\right] \tag*{(4)}
vn+1=(1−γτ+γ2τ22)vn+τ2(ϕn+ϕn+1)+σGn−γτ22ϕn−γτ2σ[Gn+13G~n]v_{n+1}=\left(1-\gamma\tau+\frac{\gamma^2\tau^2}{2}\right)v_n+\frac{\tau}{2}(\phi_n+\phi_{n+1})+\sigma G_n -\gamma\frac{\tau^2}{2}\phi_n-\gamma\frac{\tau}{2}\sigma\left[G_n+\frac{1}{\sqrt{3}}\widetilde{G}_n\right]

with ϕn=−1mdF(qn)dq\phi_n=-\frac{1}{m}\frac{dF(q_n)}{dq}, σ=σ~τ=2kBTγmτ\sigma=\widetilde{\sigma}\sqrt{\tau}=\sqrt{2\frac{k_{\mathrm{B}}T\gamma}{m}\tau}. GnG_n and G~n\widetilde{G}_n are two independent Gaussian random numbers with zero mean and unit variance. This correspondence can also be verified numerically. If exact positions and velocities of a VEC trajectory with integration time step τ\tau are supplied to Eqs. (2),(3), the maximum likelihood value is obtained for the correct parameters of the underlying underdamped Langevin equation. This is illustrated in Figure 1, that shows, for a double-well F(q)F(q) landscape, different curves showing −log⁡Lθ-\log\mathcal{L}_{\theta} as a function of the friction. Let us focus, for the moment, on the dashed black curve in the figure, computed by feeding to the likelihood positions and velocities coming from a VEC trajectory: it yields an optimal γ=1\gamma=1, which is, indeed, the friction used to integrate the trajectory.

Corrected log-likelihood curves as a function of friction

Figure 1. Corrected log-likelihood estimated from the finite-difference velocity using the first two equations in the set of Eq. (6), as a function of the friction γ\gamma, for non-ergodic trajectories of a double-well system (with free energy and mass fixed to their optimal values), for different numbers of iterations of the correcting scheme. The non-corrected curve is displayed for comparison. The dashed line represents the log-likelihood computed from the integration velocities.

In typical applications, we need to estimate velocities starting from the observed positions at a given time resolution τ\tau, resulting in a bias in the likelihood. This is illustrated via the purple curve in Figure 1, obtained using finite-difference velocities. We now describe how this problem can be efficiently and accurately corrected. Let us consider the time-reversible central finite difference estimator of the velocity un=qn+1−qn−12τu_n=\frac{q_{n+1}-q_{n-1}}{2\tau}, combined with the VEC integrator. In SI section C, it is shown that, up to order τ3/2\tau^{3/2}, the difference between unu_n and the integration velocity vnv_n is given by:

vn=un−σ4[Gn+13G~n−Gn−1+13G~n−1]+O(τ3/2)(5)v_n=u_n-\frac{\sigma}{4}\left[G_n+\frac{1}{\sqrt{3}}\widetilde{G}_n-G_{n-1}+\frac{1}{\sqrt{3}}\widetilde{G}_{n-1}\right]+\mathcal{O}(\tau^{3/2}) \tag*{(5)}

Using this result, the properties of Gaussian white noises and their correlations with positions or velocities (SI section D), we can correct the averages appearing in the likelihood:

⟨vn2⟩=⟨un2⟩+σ23+O(τ3/2)\langle v_n^2\rangle= \langle u_n^2\rangle+ \frac{\sigma^2}{3} + O(\tau^{3/2})
⟨vnvn−1⟩=⟨unun−1⟩+σ224+O(τ3/2)\langle v_nv_{n-1}\rangle= \langle u_nu_{n-1}\rangle+ \frac{\sigma^2}{24} + O(\tau^{3/2})
⟨vnqn⟩=⟨unqn⟩+O(τ3/2)\langle v_nq_n\rangle= \langle u_nq_n\rangle+ O(\tau^{3/2})
⟨vnqn+1⟩=⟨unqn+1⟩+O(τ3/2)\langle v_nq_{n+1}\rangle= \langle u_nq_{n+1}\rangle+ O(\tau^{3/2})
⟨vn+1qn⟩=⟨un+1qn⟩(6)\langle v_{n+1}q_n\rangle= \langle u_{n+1}q_n\rangle \tag*{(6)}

This enables to remove from the log-likelihood the spurious correlations that lead to substantial systematic errors for inferred free-energy and friction landscapes (SI section E for details). The corrections depend implicitly on the friction γ\gamma, one of the parameters that must be inferred, via σ\sigma. To circumvent this problem, we adopt an expectation-maximization scheme:

  1. likelihood optimization without correction

  2. correction of the likelihood with the previously obtained friction and new optimization

  3. iterate until convergence

The efficiency of the scheme is demonstrated in Figure 1, where, after 5 iterations, the correction added to finite-difference velocity likelihood (dark-red curve) recovers the likelihood computed using the integration velocity (dashed curve).

As a first full illustration of the validity and efficiency of the new algorithm, we infer the parameters of the underdamped Langevin equation from one-dimensional underdamped Langevin trajectories in a double-well landscape with a 10 kBT10\,k_B T barrier, γ=5 ps−1\gamma= 5\ \mathrm{ps}^{-1} and unit mass, using an Euler-Maruyama integrator with a time step of 10−4 ps10^{-4}\ \mathrm{ps}. Time resolutions τ≥10−3 ps\tau\ge10^{-3}\ \mathrm{ps} are employed for analyses, to ensure that the choice of integrator does not affect the inference results. Importantly, we consider relatively-short non-ergodic trajectories to train the model (Figure 2a), since in realistic barrier-crossing processes it is unfeasible to perform ergodic MD simulations.

Benchmarks for the new inference approach

Figure 2. Benchmarks for the new inference approach. Top panels: double well landscape; Bottom panels: fullerenes in water. (a) Underdamped Langevin trajectories relaxing from the top of the barrier. (b) Free-energy profiles for underdamped models inferred at different time resolutions τ\tau with the likelihood correction (except the purple dashed curve, for comparison). (c) Velocity autocorrelation function of the original trajectories and of synthetic ones generated from the models using the Euler–Maruyama integrator. (d) Correlation analysis of the noise time series deduced from the trajectories in panel (a) by inverting the positional part of Vanden-Eijnden Ciccotti integrator. The inset shows the noise distribution. (e) Aimless shooting trajectories of a fullerene dimer in water (see inset) projected onto the distance between the C60_{60} centers of mass. (f) Free-energy profiles at different time resolutions τ\tau using the likelihood correction (inset: result without correction, with a ≈30 kBT\approx30\,k_{\mathrm{B}}T barrier). (g) Comparison between the velocity autocorrelation function of the original trajectories and of synthetic ones generated from the models using the Euler–Maruyama integrator (inset: memory kernel computed for the associated state of the dimer). (h) Correlation analysis of the noise time series deduced from the trajectories in (e) by inverting the positional part of the VEC integrator. The inset shows the noise distribution.

In general, in order to determine whether the initial data can be accurately reproduced with an underdamped Langevin model, there are two characteristic timescales that define the acceptable bounds for inference. The lower bound is set by the correlation time of the noise for projected (non-Markovian) dynamics, and the upper bound is determined by the velocity decorrelation time. The time-resolution adopted in the underdamped inference, τ\tau, has to be coarse-enough to lose non-Markovian effects, while providing sufficient resolution to capture the original velocity autocorrelation function (VACF). In our benchmark case, with Markovian dynamics, the lower limit is of no concern. Figure 2c shows that, for our double well system, a time resolution τ≤0.02 ps\tau\le0.02\ \mathrm{ps} should be adequate.

Our iterative correction scheme is then applied to CV trajectories, for which the velocity is accessed through finite differences. We then systematically compare the statistical properties of original trajectories with those of the underdamped models generated at different τ\tau values. Results are shown in Figure 2, panels a-d. The sampling trajectories and results for the inferred free energy are presented in panel a and b of Figure 2. The free-energy landscape is accurately reproduced up to τ=0.04 ps\tau= 0.04\ \mathrm{ps} consistently with the VACF diagnostics in Figure 2c. As a further test, Figure 2d reports the distribution and time-correlation of the noise reconstructed from the trajectory via the Langevin model, compared to the expected ideal behavior (derived in SI, Section F). Results for the friction are reported in SI section G where we show that it is accurately reproduced (error within 10%10\%) only up to τ=0.01 ps\tau= 0.01\ \mathrm{ps}.

In summary, consistently with the diagnostics, the most accurate models are obtained for τ\tau in the range 0.0010.001–0.01 ps0.01\ \mathrm{ps}, even though the error remains moderate for higher τ\tau, highlighting the stability of our inference scheme with respect to the increase of time resolution. Note that, without applying the correction scheme, the model is inaccurate even for an optimal choice τ=0.001 ps\tau= 0.001\ \mathrm{ps}. As shown by the purple dashed curve in Figure 2b, in this case, the barrier is underestimated by about 20%20\% and the friction by about 40%40\%, to be compared with the 1/31/3 relative error on the latter predicted in Ref. 19.

We now focus on a realistic system, formed by two C60\mathrm{C}_{60} fullerene nanoparticles immersed in liquid water, modeled as a periodically-repeated cubic simulation box including 2398 water molecules (Figure 2e inset). We perform MD simulations at 300 K in the NVTNVT ensemble25, with the SPC water force field26 and OPLS-AA27 for carbon using the GROMACS 2019.4 code28, with a timestep of 1 fs. For computational details we refer to Ref.6. We modified the masses of oxygen and carbon to 1 and 120 a.u., respectively to ensure, without affecting the free-energy landscape, a wider range of time resolutions for the accurate reconstruction of underdamped models (see SI section H for comparisons with unmodified masses).

We analyze the dissociation/association process of the fullerene dimer, employing 500 short (40 ps) unbiased MD trajectories relaxing from the transition state ensemble, generated with the aimless shooting algorithm15,29. The high-dimensional trajectories are projected onto one CV, defined as the distance between the centers of mass of the two fullerenes (Figure 2e). Albeit sub-optimal, this CV captures the main features of the transition process. In particular, explicitly including water degrees of freedom does not improve the kinetic description30.

As for the benchmark case, as a first step we determine a time resolution τ\tau that avoids memory effects while maintaining smoothness in the VACF. The memory kernel in Figure 2g, computed using the Volterra method of Ref.31 on a locally-equilibrated 10 ns trajectory of the dimer, indicates that τ≥0.1\tau\ge0.1 ps is required to eliminate most non-Markovian effects, notwithstanding a surviving tail in the memory kernel. We make here the customary approximation of a position-independent kernel.

To ensure a good representation of the VACF (Figure 2g, black dashed line), the upper bound is set as τ<1\tau< 1 ps. Thus, we conclude that the inference of underdamped Langevin models can be attempted for 0.1≤τ<10.1 \le\tau< 1 ps. We apply our inference scheme in this range, obtaining

F(q)F(q) and γ(q)\gamma(q) by likelihood maximization, while estimating the mass via equipartition of kinetic energy at the finest time resolution τ=10−3\tau= 10^{-3} ps, yielding m=1.48⋅103m = 1.48 \cdot10^{3} ps2^{2} nm−2^{-2}.

As a first observation, we note that the inferred free-energy profile is in good agreement with the brute-force reference, particularly in the dimer region, except for the largest τ=1\tau= 1 ps. For 0.1≤τ≤0.50.1 \le\tau\le0.5 ps, the barrier height is consistent within 1 kBTk_{\mathrm{B}}T across models, even though the transition-state region is best captured by the τ=0.5\tau= 0.5 ps model. The importance of the likelihood correction can be appreciated from the inset in Figure 2f: the uncorrected model at the optimal τ\tau yields a grossly inaccurate free-energy barrier (≈30 kBT\approx30\,k_{\mathrm{B}}T), consistent with the bad diagnostics in Figure 2g,Figure 2h. Even for other values of τ\tau, the barrier is always overestimated. Comparison of the VACF for the different models with the one from the original MD simulation (Figure 2g) confirms that the time resolution τ=0.5\tau= 0.5 ps is the most suitable for accurately modeling the projected dynamics. The same resolution appears optimal also by testing the time-correlation of the noise inferred by interpreting the original MD trajectories as if they were generated by the Langevin models, compared with the expected analytical result (Figure 2h). We note that in the case of MD simulation data the interpretation of the noise correlation could be more subtle than for the benchmark one-dimensional system of Figure 2d, due to the long, non-exponential tail of the memory kernel. The probability density of the noise, well described by a Gaussian of zero mean and 2/3 variance for different τ\tau values, points again to reliable models.

An important motivation for the inference of stochastic models from limited, non-ergodic MD data is the attempt to predict kinetic properties without passing through cumbersome free-energy calculation techniques, often based on biased simulations32,33. We test the quantitative predictive power of the data-driven models of the fullerene dimer in water by comparing their dissociation rates with the brute-force one: as shown in Table 1, the model with the best performance from the viewpoint of diagnostics (τ=0.5\tau= 0.5 ps) overestimates the MD rate by only 20%, whereas models with different τ\tau have less accurate rates, but always in the same order of magnitude. Note that without our correction scheme, the errors in the estimation of the barrier (and friction) lead to very severe errors in the rates, that sometimes cannot even be computed.

τ\tau [ps]MFPT [ns]
0.11.3±0.11.3 \pm0.1
0.21.6±0.21.6 \pm0.2
0.32.7±0.32.7 \pm0.3
0.42.8±0.32.8 \pm0.3
0.54.3±0.44.3 \pm0.4
12.3±0.22.3 \pm0.2
MD3.6±0.23.6 \pm0.2

Table 1. Mean first passage time (MFPT) for fullerene dissociation predicted by the Langevin models, inferred using the likelihood correction, computed using Euler-Maruyama integrator, compared to the brute-force MFPT from all-atom MD simulations. Statistical uncertainties are standard deviations of the mean.

In summary, the results presented in this paper demonstrate that the proposed correction to likelihood inference eliminates systematic errors originating from finite-difference CV velocity estimation. The new scheme is able to parametrize accurate underdamped Langevin models of real complex systems projected on a CV, even for barrier-crossing processes, despite of the use of short, non-ergodic trajectories. We underline the importance of the diagnostic tests we put forward to assess the pertinence and expected accuracy of the model in realistic scenarios, where the brute-force free-energy landscape or kinetic rate are not known beforehand. The main limitation to the applicability of this method, based on the Markovian Langevin equation, arises from the existence of long-time memory kernels in several realistic systems. To go beyond this hurdle, two possible strategies could be explored: i) increasing the dimensionality of the model to mitigate non-Markovian effects, or ii) adapting our approach to the inference of generalized Langevin models, where memory effects are reproduced by the addition of hidden variables, based on expectation-maximization likelihood schemes34.

Acknowledgements

This work was performed with the support of the Institut des Sciences du Calcul et des Données (ISCD) of Sorbonne University (IDEX SUPER 11-IDEX-0004). Calculations were performed on the GENCI-IDRIS French national supercomputing facility, under grant numbers A0110811069, A0130811069. We gratefully acknowledge Line Mouaffac and Jeremy Diharce for suggestions related to code development and simulations.

Supporting Information:

Cumulants entering the propagator expression

We list here the cumulants obtained with the procedure from Ref.[1]

⟨q⟩=qn+vnτ+12(ϕn−γvn)τ2(7)\langle q\rangle= q_n + v_n\tau+ \frac{1}{2}(\phi_n-\gamma v_n)\tau^2 \tag*{(7)}
⟨v⟩=vn+(ϕn−γvn)τ−12[(ϕn−γvn)γ−ϕnqvn]τ2(8)\langle v\rangle= v_n + (\phi_n-\gamma v_n)\tau- \frac{1}{2}\left[(\phi_n-\gamma v_n)\gamma-\phi_n^q v_n\right]\tau^2 \tag*{(8)}
Mqq=⟨q2⟩−⟨q⟩⟨q⟩=23cτ3(9)M_{qq}=\langle q^2\rangle-\langle q\rangle\langle q\rangle=\frac{2}{3}c\tau^3 \tag*{(9)}
Mvv=⟨v2⟩−⟨v⟩⟨v⟩=2cτ−2cγτ2+13(2cϕnq+4cγ2)τ3(10)M_{vv}=\langle v^2\rangle-\langle v\rangle\langle v\rangle=2c\tau-2c\gamma\tau^2+\frac{1}{3}(2c\phi_n^q+4c\gamma^2)\tau^3 \tag*{(10)}
Mqv=⟨qv⟩−⟨q⟩⟨v⟩=cτ2−cγτ3(11)M_{qv}=\langle qv\rangle-\langle q\rangle\langle v\rangle=c\tau^2-c\gamma\tau^3 \tag*{(11)}

with c=kBTγ/mc=k_B T\gamma/m and ϕnq\phi_n^q is the positional derivative of the force at qnq_n. The covariance matrix can then be written as

M=[MqqMqvMqvMvv](12)M= \begin{bmatrix} M_{qq} & M_{qv}\\ M_{qv} & M_{vv} \end{bmatrix} \tag*{(12)}

Correspondence between the propagator and the integrator

In order to demonstrate the correspondence (up to order τ2\tau^2) between the propagator derived from Ref.[1] and the VEC integrator[2], we start by rewriting the integrator in vector form:

(qn+1vn+1)=(qnvn)+(τ−γτ22−γτ+γ2τ22)vn+τ2(ϕnτ(1−γτ)ϕn+ϕn+1)+(τ23στ2σ−γτ23σ(1−γτ2)σ)(G~nGn)(13)\begin{pmatrix} q_{n+1}\\ v_{n+1} \end{pmatrix} = \begin{pmatrix} q_n\\ v_n \end{pmatrix} + \begin{pmatrix} \tau-\frac{\gamma\tau^2}{2}\\ -\gamma\tau+\frac{\gamma^2\tau^2}{2} \end{pmatrix} v_n + \frac{\tau}{2} \begin{pmatrix} \phi_n\tau\\ (1-\gamma\tau)\phi_n+\phi_{n+1} \end{pmatrix} + \begin{pmatrix} \frac{\tau}{2\sqrt{3}}\sigma& \frac{\tau}{2}\sigma\\ -\frac{\gamma\tau}{2\sqrt{3}}\sigma& \left(1-\frac{\gamma\tau}{2}\right)\sigma \end{pmatrix} \begin{pmatrix} \widetilde{G}_n\\ G_n \tag*{(13)} \end{pmatrix}

We need to estimate the average of the variables qn+1q_{n+1} and vn+1v_{n+1} of the Gaussian in Eq. (3) of the main text, therefore we evaluate the average of the right hand side of Eq. (13), keeping qnq_n and vnv_n as constant (since the relevant dynamical variables are the increments qn+1−qnq_{n+1}-q_n and vn+1−vnv_{n+1}-v_n). The resulting moments ⟨q⟩\langle q\rangle, ⟨v⟩\langle v\rangle are manifestly equivalent to the ones from the previous section, as long as we approximate ϕnqvn≡(dϕdq)q=qn(dqdt)q=qn≈ϕn+1−ϕnτ\phi_n^q v_n \equiv\left(\frac{d\phi}{dq}\right)_{q=q_n}\left(\frac{dq}{dt}\right)_{q=q_n}\approx\frac{\phi_{n+1}-\phi_n}{\tau}. The covariance matrix is M~=ΣΣT\widetilde{M}=\Sigma\Sigma^T where Σ\Sigma is the matrix multiplying the noises in Eq. (13). Explicitly,

M~qq=23cτ3(14)\widetilde{M}_{qq}=\frac{2}{3}c\tau^{3} \tag*{(14)}
M~vv=2cτ−2cγτ2+23cγ2τ3(15)\widetilde{M}_{vv}=2c\tau-2c\gamma\tau^{2}+\frac{2}{3}c\gamma^{2}\tau^{3} \tag*{(15)}
M~qv=cτ2−23cγτ3(16)\widetilde{M}_{qv}=c\tau^{2}-\frac{2}{3}c\gamma\tau^{3} \tag*{(16)}

Clearly, M~vv\widetilde{M}_{vv} and M~qv\widetilde{M}_{qv} only differ from MvvM_{vv} and MqvM_{qv} (see previous section) at the order τ3\tau^{3}.

Finite-difference definition of velocities

Starting from the following definition of finite-difference velocities:

unλ=(1−λ)qn−qn−1τ+λqn+1−qnτ(17)u_n^\lambda=(1-\lambda)\frac{q_n-q_{n-1}}{\tau}+\lambda\frac{q_{n+1}-q_n}{\tau} \tag*{(17)}

we can express the velocity for the VEC integrator as

unλ=(1−γτ2)[λvn+(1−λ)vn−1]+τ2[λϕn+(1−λ)ϕn−1]+σ2λ[Gn+13G~n]+σ2(1−λ)[Gn−1+13G~n−1](18)\begin{aligned} u_n^\lambda={}&\left(1-\frac{\gamma\tau}{2}\right)\left[\lambda v_n+(1-\lambda)v_{n-1}\right]+\frac{\tau}{2}\left[\lambda\phi_n+(1-\lambda)\phi_{n-1}\right]\\ &+\frac{\sigma}{2}\lambda\left[G_n+\frac{1}{\sqrt{3}}\widetilde{G}_n\right]+\frac{\sigma}{2}(1-\lambda)\left[G_{n-1}+\frac{1}{\sqrt{3}}\widetilde{G}_{n-1}\right] \tag*{(18)} \end{aligned}

Using the update equation for the velocity, this leads to

unλ=(1−γτ2)1−λα(γτ−γ2τ22)vn+τ2[λ−(1−λ)(1−γτ2)α]ϕn+τ2[(1−λ)−(1−λ)(1+γτ2+γ2τ22)α]ϕn−1+σ2λ[Gn+13G~n]−σ(1−λ)2α[1−γτ]Gn−1+σ(1−λ)2α13G~n−1(19)\begin{aligned} u_n^\lambda={}&\left(1-\frac{\gamma\tau}{2}\right)\frac{1-\lambda}{\alpha}\left(\gamma\tau-\frac{\gamma^{2}\tau^{2}}{2}\right)v_n+\frac{\tau}{2}\left[\lambda-\frac{(1-\lambda)\left(1-\frac{\gamma\tau}{2}\right)}{\alpha}\right]\phi_n\\ &+\frac{\tau}{2}\left[(1-\lambda)-\frac{(1-\lambda)\left(1+\frac{\gamma\tau}{2}+\frac{\gamma^{2}\tau^{2}}{2}\right)}{\alpha}\right]\phi_{n-1}\\ &+\frac{\sigma}{2}\lambda\left[G_n+\frac{1}{\sqrt{3}}\widetilde{G}_n\right]-\frac{\sigma(1-\lambda)}{2\alpha}\left[1-\gamma\tau\right]G_{n-1}+\frac{\sigma(1-\lambda)}{2\alpha}\frac{1}{\sqrt{3}}\widetilde{G}_{n-1} \tag*{(19)} \end{aligned}

with

α=(1−γτ+γ2τ22).(20)\alpha=\left(1-\gamma\tau+\frac{\gamma^{2}\tau^{2}}{2}\right). \tag*{(20)}

The Taylor expansion up to order τ\tau gives

unλ=(1+γτ(1/2−λ))vn+τ2(1−2λ)ϕn+σ2λ[Gn+13G~n]−σ2(1−λ)Gn−1+σ2(1−λ)1+γτ3G~n−1(21)\begin{aligned} u_n^\lambda={}&\left(1+\gamma\tau(1/2-\lambda)\right)v_n+\frac{\tau}{2}(1-2\lambda)\phi_n+\frac{\sigma}{2}\lambda\left[G_n+\frac{1}{\sqrt{3}}\widetilde{G}_n\right]\\ &-\frac{\sigma}{2}(1-\lambda)G_{n-1}+\frac{\sigma}{2}(1-\lambda)\frac{1+\gamma\tau}{\sqrt{3}}\widetilde{G}_{n-1} \tag*{(21)} \end{aligned}

Therefore, the difference is minimized for λ=1/2\lambda= 1/2.

un1/2=vn+σ4[Gn+13G~n−Gn−1+13G~n−1](22)u_n^{1/2} = v_n + \frac{\sigma}{4}\left[G_n + \frac{1}{\sqrt{3}}\widetilde{G}_n - G_{n-1} + \frac{1}{\sqrt{3}}\widetilde{G}_{n-1}\right] \tag*{(22)}

Even though the derivation of this correction does not explicitly account for position-dependent friction. If we consider a case, where τ\tau is small and γ(q)\gamma(q) do not vary drastically, it seems reasonable to allow the friction to be position dependent in the likelihood maximization.

Correlations of position, velocity and noise for the VEC integrator

In order to express the differences in Eq. (6), we will need the following properties for the noises times velocity

⟨vnGn⟩=0⟨vnG~n⟩=0⟨vnGn−1⟩=σ−γτ2σ⟨vnG~n−1⟩=−γτ23σ⟨vnGn−2⟩=σ−γ3τ2σ+O(τ2)⟨vnG~n−2⟩=−γτ23σ+O(τ2)\begin{aligned} \langle v_nG_n\rangle&= 0 & \langle v_n\widetilde{G}_n\rangle&= 0 \\ \langle v_nG_{n-1}\rangle&= \sigma-\gamma\frac{\tau}{2}\sigma& \langle v_n\widetilde{G}_{n-1}\rangle&= -\gamma\frac{\tau}{2\sqrt{3}}\sigma\\ \langle v_nG_{n-2}\rangle&= \sigma-\gamma\frac{3\tau}{2}\sigma+O(\tau^2) & \langle v_n\widetilde{G}_{n-2}\rangle&= -\gamma\frac{\tau}{2\sqrt{3}}\sigma+O(\tau^2) \end{aligned}

and noises times position

⟨qnGn⟩=0⟨qnG~n⟩=0⟨qnGn−1⟩=τ2σ⟨qnG~n−1⟩=τ23σ⟨qnGn−2⟩=3τ2σ+O(τ2)⟨qnG~n−2⟩=τ23σ+O(τ2)\begin{aligned} \langle q_nG_n\rangle&= 0 & \langle q_n\widetilde{G}_n\rangle&= 0 \\ \langle q_nG_{n-1}\rangle&= \frac{\tau}{2}\sigma& \langle q_n\widetilde{G}_{n-1}\rangle&= \frac{\tau}{2\sqrt{3}}\sigma\\ \langle q_nG_{n-2}\rangle&= \frac{3\tau}{2}\sigma+O(\tau^2) & \langle q_n\widetilde{G}_{n-2}\rangle&= \frac{\tau}{2\sqrt{3}}\sigma+O(\tau^2) \end{aligned}

All of these properties can be obtained by multiplying Eq. (4) by a certain noise GnG_n or G~n\widetilde{G}_n and taking the averages.

Likelihood correction

We show here how to isolate the correlations introduced in Eq. (6) starting from the likelihood function. For the sake of simplicity we use the following notations q′≡qn+1,q≡q' \equiv q_{n+1},q \equiv qn,v′≡vn+1q_n,v' \equiv v_{n+1} and v≡vnv \equiv v_n. Let us consider

−log⁡Lθ=1N∑12ln⁡(4πdet⁡M)−1N∑Mqq2det⁡M(v′−Mv)2−1N∑Mvv2det⁡M(q′−Mq)2+∑1NMqvdet⁡M(v′−Mv)(q′−Mq)(23)-\log\mathcal{L}_{\theta} = \frac{1}{N}\sum\frac{1}{2}\ln(4\pi\det M) - \frac{1}{N}\sum\frac{M_{qq}}{2\det M}(v'-M_v)^2 - \frac{1}{N}\sum\frac{M_{vv}}{2\det M}(q'-M_q)^2 + \sum\frac{1}{N}\frac{M_{qv}}{\det M}(v'-M_v)(q'-M_q) \tag*{(23)}

We can take variances (Eq. S3, S4, S5) out of the sums in Eq. S17 to express it as

−log⁡Lθ=1N∑12ln⁡(4πdet⁡M)−Mqq2det⁡M⟨(v′−Mv)2⟩−Mvv2det⁡M⟨(q′−Mq)2⟩+Mqvdet⁡M⟨(v′−Mv)(q′−Mq)⟩(24)-\log\mathcal{L}_{\theta} = \frac{1}{N}\sum\frac{1}{2}\ln(4\pi\det M) - \frac{M_{qq}}{2\det M}\langle(v'-M_v)^2\rangle - \frac{M_{vv}}{2\det M}\langle(q'-M_q)^2\rangle+ \frac{M_{qv}}{\det M}\langle(v'-M_v)(q'-M_q)\rangle \tag*{(24)}

with

⟨(q′−Mq)2⟩=⟨q′2⟩+⟨q2⟩−2⟨qq′⟩+⟨vq′⟩(−2τ+γτ2)+⟨vq⟩(2τ−γτ2)+⟨v2⟩(τ2−γτ3+14γ2τ4)−⟨ϕq′⟩τ2+⟨ϕq⟩τ2+⟨ϕv⟩(τ3−12γτ4)+14⟨ϕ2⟩τ4(25)\begin{aligned} \langle(q'-M_q)^2\rangle={}& \langle q'^2\rangle+ \langle q^2\rangle- 2\langle qq'\rangle+ \langle vq'\rangle(-2\tau+\gamma\tau^2) + \langle vq\rangle(2\tau-\gamma\tau^2) \\ &+ \langle v^2\rangle\left(\tau^2-\gamma\tau^3+\frac{1}{4}\gamma^2\tau^4\right) - \langle\phi q'\rangle\tau^2 + \langle\phi q\rangle\tau^2 \\ &+ \langle\phi v\rangle\left(\tau^3-\frac{1}{2}\gamma\tau^4\right) + \frac{1}{4}\langle\phi^2\rangle\tau^4 \tag*{(25)} \end{aligned}
⟨(v′−Mv)2⟩=⟨v′2⟩+⟨v′v⟩(−2+2γτ−γ2τ2)+⟨v2⟩(1−2γτ+2γ2τ2−γ3τ3+14γ4τ4)+⟨ϕv′⟩(−2+γτ2)+⟨ϕv⟩(2−3γτ2+2γ2τ3−12γ3τ4)+⟨ϕ2⟩(τ2−γτ3+14γ2τ4)−⟨vv′ϕq⟩τ2+⟨v2ϕq⟩τ2+⟨vϕϕq⟩τ3−⟨vϕq⟩γτ3−12⟨vϕϕq⟩γτ4+12⟨v2ϕq⟩γ2τ4+14⟨v2ϕq2⟩τ4(26)\begin{aligned} \langle(v'-M_v)^2\rangle={}& \langle v'^2\rangle+ \langle v'v\rangle(-2+2\gamma\tau-\gamma^2\tau^2) \\ &+ \langle v^2\rangle\left(1-2\gamma\tau+2\gamma^2\tau^2-\gamma^3\tau^3+\frac{1}{4}\gamma^4\tau^4\right) + \langle\phi v'\rangle(-2+\gamma\tau^2) \\ &+ \langle\phi v\rangle\left(2-3\gamma\tau^2+2\gamma^2\tau^3-\frac{1}{2}\gamma^3\tau^4\right) + \langle\phi^2\rangle\left(\tau^2-\gamma\tau^3+\frac{1}{4}\gamma^2\tau^4\right) \\ &-\langle vv'\phi_q\rangle\tau^2+\langle v^2\phi_q\rangle\tau^2+\langle v\phi\phi_q\rangle\tau^3-\langle v\phi_q\rangle\gamma\tau^3-\frac{1}{2}\langle v\phi\phi_q\rangle\gamma\tau^4 \\ &+\frac{1}{2}\langle v^2\phi_q\rangle\gamma^2\tau^4+\frac{1}{4}\langle v^2\phi_q^2\rangle\tau^4 \tag*{(26)} \end{aligned}
⟨(q′−Mq)(v′−Mv)⟩=⟨v′q′⟩−⟨v′q⟩+⟨vq′⟩(−1+γτ−12γ2τ2)+⟨vq⟩(1−γτ+12γ2τ2)+⟨vv′⟩(−τ+12γτ2)+⟨v2⟩(τ−32γτ2+γ2τ3−14γ3τ4)+⟨ϕq′⟩(−τ+12γτ2)+⟨ϕq⟩(τ−12γτ2)−12⟨ϕv′⟩+⟨ϕv⟩(32τ2−32γτ3+12γ2τ4)+⟨ϕ2⟩(12τ3−14γτ4)−12⟨vq′ϕq⟩τ2+12⟨vqϕq⟩τ2+12⟨v2ϕq⟩τ3+14⟨vϕϕq⟩τ4−14⟨v2ϕq⟩γτ4(27)\begin{aligned} \langle(q'-M_q)(v'-M_v)\rangle={}& \langle v'q'\rangle-\langle v'q\rangle\\ &+\langle vq'\rangle\left(-1+\gamma\tau-\frac{1}{2}\gamma^2\tau^2\right)+\langle vq\rangle\left(1-\gamma\tau+\frac{1}{2}\gamma^2\tau^2\right) \\ &+\langle vv'\rangle\left(-\tau+\frac{1}{2}\gamma\tau^2\right)+\langle v^2\rangle\left(\tau-\frac{3}{2}\gamma\tau^2+\gamma^2\tau^3-\frac{1}{4}\gamma^3\tau^4\right) \\ &+\langle\phi q'\rangle\left(-\tau+\frac{1}{2}\gamma\tau^2\right)+\langle\phi q\rangle\left(\tau-\frac{1}{2}\gamma\tau^2\right) \\ &-\frac{1}{2}\langle\phi v'\rangle+\langle\phi v\rangle\left(\frac{3}{2}\tau^2-\frac{3}{2}\gamma\tau^3+\frac{1}{2}\gamma^2\tau^4\right)+\langle\phi^2\rangle\left(\frac{1}{2}\tau^3-\frac{1}{4}\gamma\tau^4\right) \\ &-\frac{1}{2}\langle vq'\phi_q\rangle\tau^2+\frac{1}{2}\langle vq\phi_q\rangle\tau^2+\frac{1}{2}\langle v^2\phi_q\rangle\tau^3 \\ &+\frac{1}{4}\langle v\phi\phi_q\rangle\tau^4-\frac{1}{4}\langle v^2\phi_q\rangle\gamma\tau^4 \tag*{(27)} \end{aligned}

Now that the correlations of Eq. (6) appear in the previous expressions it is then possible to account for the use of finite difference velocities.

Noise Analysis

To further validate the accuracy of the inference, it is useful to analyze the noise that would have been required to reproduce the initial trajectories using the optimal Langevin model. In the absence of the issues arising from finite-difference velocities, the recovered noise should be centered around zero, exhibit unit variance, and be delta-correlated in time. We focus on the positional part of the numerical integrator (Eq. (4)), combining the two noise terms and isolating them as:

Gn=Gn+13G~n=(qn+1−qnτ−(1−γτ2)vn−τ2ϕn)2σ(28)\mathcal{G}_n = G_n + \frac{1}{\sqrt{3}}\widetilde{G}_n = \left(\frac{q_{n+1}-q_n}{\tau} - \left(1-\frac{\gamma\tau}{2}\right)v_n - \frac{\tau}{2}\phi_n\right)\frac{2}{\sigma} \tag*{(28)}

Using properties of Gaussian white noises and Eq. (6), it is possible to obtain the following properties of Gn\mathcal{G}_n:

⟨Gn⟩=0,⟨Gn2⟩=23,⟨GnGn+1⟩⟨Gn2⟩=14(29)\langle\mathcal{G}_n\rangle= 0,\qquad\langle\mathcal{G}_n^2\rangle= \frac{2}{3},\qquad\frac{\langle\mathcal{G}_n\mathcal{G}_{n+1}\rangle}{\langle\mathcal{G}_n^2\rangle} = \frac{1}{4} \tag*{(29)}

while the time correlation vanishes for time delays larger than τ\tau.

Accuracy of inferred friction coefficients

Table G displays friction coefficient for the different time resolution in the underdamped Langevin benchmark case. We can observe that without using the correcting scheme the value obtained is ≈2/3γ\approx2/3\gamma (coherent with Ref.[3]). In this case, due to the non-ergodicity of the trajectories the error on the friction also impacts the inference of the free energy.

We also show the friction profiles for the fullerenes dimer in water (with modified mass) on Figure S1.

Friction profiles for different Langevin models

Figure S1. Friction profiles for the different Langevin models, for fullerene dimer dynamics in water, at different time resolutions τ\tau using the likelihood correction (the dashed orange curve shows the result without correction).

τ\tau [ps]γ\gamma [ps−1^{-1}]
0.0014.92±0.014.92 \pm0.01
0.001 (no corr.)2.97±0.012.97 \pm0.01
0.0054.73±0.014.73 \pm0.01
0.014.50±0.024.50 \pm0.02
0.024.17±0.024.17 \pm0.02
0.043.81±0.013.81 \pm0.01
expected5.0

Table S1. Friction for the different Langevin models, inferred using the likelihood correction, for the benchmark double-well system: underdamped Langevin trajectories relaxing from the top of a barrier, integrated with a 0.1 fs time step using an Euler-Maruyama integrator with unit mass and γ=5\gamma= 5 ps−2^{-2}. The case where the likelihood correction is not applied is reported as well.

Fullerenes dimer in water with unmodified masses

Figure S2 presents the memory kernel and velocity autocorrelation function (VACF) for a fullerene dimer in water, projected onto the distance between the two centers of mass. The masses of the carbon and oxygen atoms remain unmodified. We observe no clear timescale separation, indicating that the system does not exhibit an underdamped regime.

Memory kernel and VAC

Figure S2. Memory kernel and VAC computed for 10ns in the associative bassin, for unmodified masses system.

This lack of separation explains why none of the free-energy profiles inferred from the underdamped models agree with the expected free energy (see Figure S3).

Free-energy profiles at different time resolutions

Figure S3. Free-energy profiles at different time resolutions τ\tau using the likelihood correction, for unmodified masses system.

References

  1. [1]A. N. Drozdov, Phys. Rev. E 55, 2496 (1997).
  2. [2]E. Vanden-Eijnden and G. Ciccotti, Chem. Phys. Lett. 429, 310 (2006).
  3. [3]F. Ferretti, V. Chardes, T. Mora, A. M. Walczak, and I. Giardina, Phys. Rev. X. 10, 031018 (2020).

Paper details

vlnc:W_u7k6w8kd
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents