Langevin thermostat for robust configurational and kinetic sampling
Oded Farago

TL;DR
This paper reformulates the GJF Langevin thermostat algorithm as a leap frog scheme, enhancing its robustness and accuracy in configurational and kinetic sampling for molecular dynamics, especially at larger time steps.
Contribution
It introduces a new leap frog formulation of the GJF algorithm that improves kinetic and configurational sampling accuracy and robustness in Langevin dynamics simulations.
Findings
Exact temperature estimation for harmonic oscillators at any stable time step.
Robust configurational sampling in strongly non-linear systems.
Enhanced kinetic measure accuracy with the new formulation.
Abstract
We reformulate the algorithm of Gr{\o}nbech-Jensen and Farago (GJF) for Langevin dynamics simulations at constant temperature. The GJF algorithm has become increasingly popular in molecular dynamics simulations because it provides robust (i.e., insensitive to variations in the time step) and accurate configurational sampling of the phase space with larger time steps than other Langevin thermostats. In the original derivation [Mol. Phys. {\bf 111}, 983 (2013)], the algorithm was formulated as a velocity-Verlet type integrator with an in-site velocity variable. Here, we reformulate it as a leap frog scheme with a half-step velocity variable. In contrast to the original form, the reforumlated one also provides robust and accurate estimations of kinetic measures such as the average kinetic energy. We analytically prove that the newly presented algorithm gives the exact configurational and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Langevin thermostat for robust configurational and kinetic sampling
Oded Farago
Department of Chemistry, University of Cambridge, Lensfield Road, Cambridge CB2 1EW, United Kingdom
Department of Biomedical Engineering, Ben-Gurion University of the Negev, Be’er Sheva 85105, Israel
Abstract
We reformulate the algorithm of Grønbech-Jensen and Farago (GJF) for Langevin dynamics simulations at constant temperature. The GJF algorithm has become increasingly popular in molecular dynamics simulations because it provides robust (i.e., insensitive to variations in the time step) and accurate configurational sampling of the phase space with larger time steps than other Langevin thermostats. In the original derivation [Mol. Phys. 111, 983 (2013)], the algorithm was formulated as a velocity-Verlet type integrator with an in-site velocity variable. Here, we reformulate it as a leap frog scheme with a half-step velocity variable. In contrast to the original form, the reforumlated one also provides robust and accurate estimations of kinetic measures such as the average kinetic energy. We analytically prove that the newly presented algorithm gives the exact configurational and kinetic temperatures of a harmonic oscillator for any time step smaller than the Verlet stability limit, and use computer simulations to demonstrate the configurational and kinetic robustness of the algorithm in strongly non-linear systems. This property of the new formulation of the GJF thermostat makes it very attractive for implementation in computer simulations.
I Introduction
One of the prominent approaches for conducting molecular simulations in the canonical ensemble is based on the idea that the statistical ensemble can be sampled by considering the dynamics of each particle in the system to be governed by Langevin equation langevin:1908
[TABLE]
where and denote, respectively, the coordinate and velocity of the particle. Langevin’s equation is essentially Newton’s second law describing the motion of a particle of mass under the action of (i) a deterministic force, , and two additional forces representing the interactions with a heat bath - (ii) a friction force, , where is the friction coefficient, and (iii) Gaussian white noise with zero mean and delta-function auto-correlation risken:book :
[TABLE]
where is Boltzmann’s constant and is the temperature of the heat bath.
In computer simulations the time is discretized in intervals of , and a Langevin “thermostat” algorithm is used for discrete-time integration of Langevin’s equation of motion, yielding a sequence of coordinates and velocities , where . A major problem of thermostat algorithms is the discretization errors that they introduce pbs88 . These cause computed averages of thermodynamic quantities of interest to vary with the time step - an alarming feature that raises concerns about the reliability of the simulation results. A simple test-case for the robustness of an algorithm is the one-dimensional harmonic oscillator where . The average potential energy satisfies , but most popular and widely-implemented algorithms, e.g., BBK bbk84 , Schneider-Stoll ss78 , and van Gunsteren-Berendsen vGB82 thermostats, exhibit systematic deviations from this result. Depending on the method of choice, the integration error of the potential energy may scale as or wang03 . It was only several years ago that two new algorithms were introduced, by Leimkuhler and Matthews (LM) lm12 and by Grønbech-Jensen and Farago (GJF) gjf1 , that reproduce the exact harmonic oscillator potential energy for any time step within the stability limit , where is the frequency of the oscillator.
When conducting a molecular simulations study, one is often interested in measuring the temperature of the simulated system in order to compare it to the target thermodynamic temperature. The most straightforward quantity to calculate for this purpose is the average kinetic energy per degree of freedom, . Unfortunately, the discrete-time variables and are only approximations of their continuous-time counterparts. In contrast to the latters, the formers are not exactly conjugated to each other, which causes the “kinetic” and “configurational” measures of the temperature to be different. This feature is nicely captured by the harmonic oscillator test-case. As mentioned above, the LM and GJF algorithms yield the correct configurational temperature,
[TABLE]
but the kinetic temperature computed by these thermostats exhibits a discretization error and reads
[TABLE]
There exist other thermostats that reproduce the kinetic energy without discretization errors, but no existing algorithm has simultaneously both the correct kinetic and potential energy of the harmonic oscillator. Since the aim of computer simulation studies of molecular systems at equilibrium is phase space sampling, the velocity variable is essentially an auxiliary field and one should favor the use of algorithms like the GJF thermostat, which have been demonstrated to provide robust configurational sampling not only for the harmonic oscillator but also for non-linear molecular systems gjf2 ; gjf3 . Nevertheless, the kinetic energy constitutes a useful and a simple measure for the temperature of the system and, therefore, a question arises on whether it is possible to devise a thermostat featuring both correct potential and kinetic energies of the harmonic oscillator. Here, we show that the GJF algorithm can be reformulated with a different velocity variable which, in contrast to the one in the original formulation, exhibits no discretization errors. We use simulations of a simple toy model to demonstrate the robustness of the newly-defined velocity also in non-linear systems.
II Half-step velocity
Our starting point is the GJF algorithm, which in the velocity-Verlet formulation reads gjf1
[TABLE]
where , and the damping coefficients of the algorithm are given by
[TABLE]
and
[TABLE]
The discrete-time noise,
[TABLE]
is a random Gaussian number satisfying
[TABLE]
where is Kronecker delta.
We now invoke another property of the canonical ensemble, which is the fact that and are statistically independent degrees of freedom, namely . Let us demonstrate that the discrete-time variables in the GJF algorithm satisfy this relation. To show this, we begin by squaring Eq. (6) and taking statistical averages of all terms. Keeping also in mind that , this yields
[TABLE]
Using Eqs. (4), (5), and (12), and the fact that in Eq. (13), yields the equality
[TABLE]
The first term on the r.h.s. of Eq. (14) vanishes because , and we immediately conclude that
[TABLE]
Let us look at the “half-step” velocity variable, , defined by rewriting the frictionless () velocity-Verlet algorithm verlet67 in the following form:
[TABLE]
With the definition of by Eq. (16), the GJF equations (6)-(7) in the velocity-Verlet form, can be converted into the following leap-frog form
[TABLE]
These equations constitute a new formulation of the GJF thermostat, to be henceforth referred to as the GJF-F algorithm. The half-step velocity variable satisfies
[TABLE]
and using Eqs. (4), (5), and (15) we readily find the kinetic energy associated with
[TABLE]
which is exact for any time step (within the stability limit).
With the above derivation, it is easy to define another half-step velocity
[TABLE]
with similar properties. This velocity variable was independently identified recently by Grønbech-Jensen and Grønbech-Jensen (2GJ) 2gj . In order to prove that is a robust velocity variable, we rewrite Eq. (20) in a slightly different form
[TABLE]
Squaring both sides of Eq. (24) and taking averages, we arrive at
[TABLE]
and by using Eqs. (22) and (12) we find that
[TABLE]
From the last result we immediately conclude that for any
[TABLE]
A leap-frog scheme involving can be derived by complementing Eq. (23) with the Strømer-Verlet form of the GJF algorithm (see Eq. (11) in ref. gjf2 )
[TABLE]
which, together with the relationship , leads to the following set of equations
[TABLE]
This scheme was presented in ref. 2gj and was termed the GJF-2GJ algorithm.
III Simulations of a non-linear model
To test the robustness of the new velocity variables beyond the harmonic oscillator test case, we consider the non-linear model presented in ref. gjf3 of a particle moving in a one-dimensional potential , with , and [see fig. 1(a)]. In ref. gjf3 , this model provided a demonstration for the superiority of the GJF algorithm over classical popular thermostats (BBK, SS, vGB) in configurational sampling. This was done by computing the configurational temperature defined by
[TABLE]
We now wish to also measure the kinetic temperature
[TABLE]
and explore the dependence of this quantity of the simulation time step . Our simulation results for the dependence of the configurational and kinetic temperatures on are summarized in figs. 1(b)-(d). In the simulations we set and (the thermodynamic temperature), and use three different values of : [fig. 1(b)], [1(c)], [1(d)]. Based on the simulation results for this model in ref. gjf3 , we restrict the simulations to the range at which the GJF algorithm exhibits accurate configurational sampling. For , discrepancies between and in the low friction simulations become noticeable (relative error ). We measure the configurational temperature, [denoted by black circles in figs. 1(b)-(d)], and three kinetic temperatures (red squared), (green diamonds), (blue triangles) corresponding, respectively, to the in-site velocity defined in the original velocity-Velret GJF algorithm [Eq. (7)], and the two half-step velocities [Eq. (19)] and [Eq. (29)] introduced in the GJF-F and GJF-2GJ leap-frog formulations of the GJF algorithm. The simulation results in figs. 1(b)-(d) clearly demonstrate the difference between the in-site and half-step velocity variables. While the kinetic temperature associated with the former tends to decrease with , the kinetic energy of the latters remains extremely close to the average thermodynamic kinetic energy () for any time step within the range simulated herein. These results corroborate the intuition from the harmonic oscillator analysis that the half-step discrete-time velocity variables and are robust to time step variations also in non-linear systems. This conclusion agrees with the recent findings reported in ref. 2gj , where the robustness of the half-step velocity was demonstrated in simulations of three-dimensional Lennard-Jones systems.
IV Summary
We have introduced the GJF-F algorithm, Eqs. (19)-(20), which is a new formulation of the GJF algorithm for Langevin dynamics simulations. In this formulation, the GJF thermostat is represented as a leap-frog scheme with half-step velocity . In contrast to the in-site velocity variable appearing in the original GJF algorithm, the half-step velocity in the new GJF-F algorithm exhibits robustness to time step variations when applied to the harmonic oscillator problem. Computer simulations demonstrate that this feature of the half-step velocity is also observed in strongly non-linear systems. Thus, the newly-presented method allows for both accurate configurational and kinetic sampling of canonical ensembles. This makes the method very attractive for implementation in computer simulations. On the one hand, it generates the same trajectories, , like the GJF algorithm and thus provides high quality configurational sampling with larger time steps compared to other popular Langevin thermostats. On the other hand, it also provides robust kinetic sampling, which offers a convenient way to assessing the temperature of the simulated system via the average kinetic energy.
Acknowledgments: I thank Niels Grønbech-Jensen for stimulating discussions, especially related to the differences between on-site and half-step velocities. This work was supported by the Israel Science Foundation (ISF) through Grant No. 991/17.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1(1) P. Langevin, On the theory of Brownian motion, C. R. Acad. Sci. (Paris) 146 , 530 (1908).
- 2(2) ] H. Risken, The Fokker-Planck Equation (Springer, Berlin, 1984).
- 3(3) R. W. Pastor, B. R. Brooks, and A. Szabo, An analysis of the accuracy of Langevin and molecular dynamics algorithms, Mol. Phys. 65 , 1409 (1988).
- 4(4) A. Brünger, C. L. Brooks, and M. Karplus, Stochastic boundary conditions for molecular dynamics simulations of ST 2 water, Chem. Phys. Lett. 105 , 495 (1984).
- 5(5) T. Schneider and E. Stoll, Molecular-dynamics study of a three-dimensional one-component model for distortive phase transitions, Phys. Rev. B 17 , 1302 (1978).
- 6(6) W. F. van Gunsteren and H. J. C. Berendsen, Algorithms for Brownian dynamics, Mol. Phys. 45 , 637 (1982).
- 7(7) W. Wang and R. D. Skeel, Analysis of a few numerical integration methods for the Langevin equation, Mol. Phys. 101 , 2149 (2003).
- 8(8) B. Leimkuhler and C. Matthews, Rational construction of stochastic numerical methods for molecular sampling, Appl. Math. Res. Express 2013 , 34 (2012).
