Langevin dynamics

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description In physics, Langevin dynamics is an approach to the mathematical modeling of the dynamics of molecular systems using the Langevin equation. It was originally developed by French physicist Paul Langevin. The approach is characterized by the use of simplified models while accounting for omitted degrees of freedom by the use of stochastic differential equations. Langevin dynamics simulations are a kind of Monte Carlo simulation.[1]

Overview

Real world molecular systems occur in air or solvents, rather than in isolation, in a vacuum. Jostling of solvent or air molecules causes friction, and the occasional high velocity collision will perturb the system. Langevin dynamics attempts to extend molecular dynamics to allow for these effects. Also, Langevin dynamics allows temperature to be controlled as with a thermostat, thus approximating the canonical ensemble.

Langevin dynamics mimics the viscous aspect of a solvent. It does not fully model an implicit solvent; specifically, the model does not account for the electrostatic screening and also not for the hydrophobic effect. For denser solvents, hydrodynamic interactions are not captured via Langevin dynamics.

For a system of N particles with masses M, with coordinates X=X(t) that constitute a time-dependent random variable, the resulting Langevin equation is[2][3] M𝐗¨=U(𝐗)γM𝐗˙+2MγkBT𝐑(t), where U(𝐗) is the particle interaction potential; is the gradient operator such that U(𝐗) is the force calculated from the particle interaction potentials; the dot is a time derivative such that 𝐗˙ is the velocity and 𝐗¨ is the acceleration; γ is the damping constant (units of reciprocal time), also known as the collision frequency; T is the temperature, kB is the Boltzmann constant; and 𝐑(t) is a delta-correlated stationary Gaussian process with zero-mean, called Gaussian white noise, satisfying 𝐑(t)=0 𝐑(t)𝐑(t)=δ(tt)

Here, δ is the Dirac delta.

Stochastic Differential Formulation

Considering the covariance of standard Brownian motion or Wiener process Wt, we can find that

𝔼(WtWτ)=min(t,τ)

Define the covariance matrix of the derivative as 𝔼(Wt˙Wτ˙)=tτ𝔼(WtWτ)=tτmin(t,τ)=δ(tτ) So under the sense of covariance we can say that

dWt=𝐑(t)dt Without loss of generality, let the mass M=1, σ=MγkBT, then the original SDE will become d𝐗˙=U(𝐗)dtγd𝐗+2σd𝐖(t)

Overdamped Langevin dynamics

If the main objective is to control temperature, care should be exercised to use a small damping constant γ. As γ grows, it spans from the inertial all the way to the diffusive (Brownian) regime. The Langevin dynamics limit of non-inertia is commonly described as Brownian dynamics. Brownian dynamics can be considered as overdamped Langevin dynamics, i.e. Langevin dynamics where no average acceleration takes place. Under this limit we have dX˙=0, the original SDE then will becomes

d𝐗=1γU(𝐗)dt+2σγd𝐖(t)

The translational Langevin equation can be solved using various numerical methods [4][5] with differences in the sophistication of analytical solutions, the allowed time-steps, time-reversibility (symplectic methods), in the limit of zero friction, etc.

The Langevin equation can be generalized to rotational dynamics of molecules, Brownian particles, etc. A standard (according to NIST[6]) way to do it is to leverage a quaternion-based description of the stochastic rotational motion.[7][8]

Applications

Langevin thermostat

Langevin thermostat[9] is a type of Thermostat algorithm in molecular dynamics, which is used to simulate a canonical ensemble (NVT) under a desired temperature. It integrates the following Langevin equation of motion:

M𝐗¨=U(𝐗)γ𝐗˙+2γkBTR(t)

U(𝐗) is the deterministic force term; γ is the friction coefficient and γX˙ is the friction or damping term; the last term is the random force term (kB: Boltzmann constant, T: temperature). This equation allows the system to couple with an imaginary "heat bath": the kinetic energy of the system dissipates from the friction/damping term, and gain from random force/fluctuation; the strength of coupling is controlled by γ. This equation can be simulated with SDE solvers such as Euler–Maruyama method, where the random force term is replaced by a Gaussian random number in every integration step (variance σ2=2γkBT/Δt, Δt: time step), or Langevin Leapfrog integration, etc. This method is also known as Langevin Integrator.[10]

Langevin Monte Carlo

The overdamped Langevin equation gives

d𝐱t=DkBT𝐱U(𝐱t)dt+2DdWt

Here, D=kBT/γ is the diffusion coefficient from Einstein relation. As proven with Fokker-Planck equation, under appropriate conditions, the stationary distribution of 𝐱t is Boltzmann distribution p(𝐱)eU(𝐱)/kBT.

Since that logp(𝐱)=U(𝐱)/kBT, this equation is equivalent to the following form:

d𝐱t=ϵ𝐱logp(𝐱t)dt+2ϵdWt

And the distribution of 𝐱t(t) follows p(𝐱). In other words, Langevin dynamics drives particles towards a stationary distribution p(𝐱) along a gradient flow, due to the logp(𝐱) term, while still allowing for some random fluctuations. This provides a Markov Chain Monte Carlo method that can be used to sample data 𝐱 from a target distribution p(𝐱), known as Langevin Monte Carlo.

In many applications, we have a desired distribution p(𝐱) from which we would like to sample 𝐱, but direct sampling might be challenging or inefficient. Langevin Monte Carlo offers another way to sample 𝐱p(𝐱) by sampling a Markov chain in accordance with the Langevin dynamics whose stationary state is p(𝐱). The Metropolis-adjusted Langevin algorithm (MALA) is an example : Given a current state 𝐱t, the MALA method proposes a new state x~t+1 using the Langevin dynamics above. The proposal is then accepted or rejected based on the Metropolis-Hastings algorithm. The incorporation of the Langevin dynamics in the choice of x~t+1 provides greater computational efficiency, since the dynamics drive the particles into regions of higher p(𝐱) probability and are thus more likely to be accepted. Read more in Metropolis-adjusted Langevin algorithm.

Score-based generative model

Langevin dynamics is one of the basis of score-based generative models.[11][12] From (overdamped) Langevin dynamics,

d𝐱t=ϵ𝐱logp(𝐱t)dt+2ϵdWt

A generative model aims to generate samples that follow (unknown data distribution) p(𝐱). To achieve that, a score-based model learns an approximate score function 𝐬θ(𝐱)𝐱logp(𝐱) (a process called score matching). With access to a score function, samples are generated by the following iteration,[11][12]

𝐱i+1𝐱i+ϵ𝐱logp(𝐱i)+2ϵ𝐳i,i=0,1,,K

with 𝐳iN(0,1). As ϵ0 and K, the generated 𝐱K converge to the target distribution p(𝐱). Score-based models use 𝐬θ(𝐱)𝐱logp(𝐱) as an approximation.[11]

Relation to Other Theories

Klein-Kramers equation

As a stochastic differential equation(SDE), Langevin dynamics equation, has its corresponding partial differential equation(PDE), Klein-Kramers equation, a special Fokker–Planck equation that governs the probability distribution of the particles in the phase space. The original Langevin dynamics equation can be reformulated as the following first order SDEs: d𝐗=𝐏dt d𝐏=γ𝐏dtU(𝐗)dt+2σd𝐖(t) Now consider the following cases and their law of (𝐗,𝐏):

1.d𝐗=𝐏dt,d𝐏=γ𝐏dtU(𝐗)dt+2σd𝐖(t) with (𝐗0,𝐏0)ρ0

2. ρt=𝐏𝐗ρ+𝐏(γ𝐏ρ+𝐗U(𝐗)ρ)+𝐏2(σT2ρ) with ρ(t=0,𝐗,𝐏)=ρ0

Consider a general function of momentum and position

Ψt=Ψ(𝐗,𝐏)

The expectation value of the function will be

𝔼[Ψt]=ρ(t,𝐗,𝐏)Ψ(𝐗,𝐏)d𝐏d𝐗

Taking derivative with respect to time t, and applying Itô's formula, we have 𝔼[ddtΨ(𝐗,𝐏)]=𝔼[𝐗Ψd𝐗dt+𝐏Ψd𝐏dt+σT2𝐏2Ψ1dt(d𝐖(t))2] which can be simplified to (tρ)Ψ(𝐗,𝐏)d𝐗d𝐏=𝔼[(𝐗Ψ)𝐏+𝐏Ψ(γ𝐏𝐗U(𝐗))+σT2𝐏2Ψ] Integration by parts on right hand side, due to vanishing density for infinite momentum or velocity we have (tρ)Ψ(𝐗,𝐏)d𝐗d𝐏=(𝐏𝐗ρ+𝐏(γ𝐏ρ+𝐗U(𝐗)ρ)+𝐏2(σT2ρ))Ψ(𝐗,𝐏)d𝐗d𝐏 This equation holds for arbitrary $\Psi$, so we require the density to satisfy ρt=𝐏𝐗ρ+𝐏(γ𝐏ρ+𝐗U(𝐗)ρ)+𝐏2(σT2ρ) This equation is called the Klein-Kramers equation, a special version of Fokker Planck equation. It's a partial differential equation that describes the evolution of probability density of the system in the phase space.

Fokker Planck equation

For the overdamped limit, we have d𝐏=0, so the evolution of system can be reduced to the position subspace. Following similar logic we can prove that the SDE for position, d𝐗=1γU(𝐗)dt+2σγ𝐑(t)dt corresponds to the Fokker Planck equation for probability density ρ(t,𝐗)t=𝐗(1γ𝐗U(𝐗)ρ(t,𝐗))+Δ𝐗(σ2γ2ρ(t,𝐗))

Fluctuation-dissipation theorem

Consider Langevin dynamics of a free particle (i.e. U(𝐗)=0), then the equation for momentum will become

d𝐏=1γ𝐏dt+2σγd𝐖t

the analytical solution to this SDE is

𝐏=𝐏0et/γ+2σγ0te(tt)/γd𝐖t thus the average value of second moment of momentum will becomes (here we apply the Itô isometry) 𝔼(𝐏2)=𝐏02e2t/γ+σ2γ(1e2t/γ)tσ2γ That is, the limiting behavior when time approaches positive infinity, the momentum fluctuation of this system is related to the energy dissipation (friction term parameter γ) of this system. Combining this result with Equipartition theorem, which relates the average value of kinetic energy of particles with temperature

v2=kBT

we can determines the value of the variance σ in applications like Langevin thermostat.

σ2/γ=kBTσ=kBTγ This is consistent with the original definition assuming M=1.

Path Integral

Path Integral Formulation comes from Quantum Mechanics. But for a Langevin SDE we can also induce a corresponding path integral. Considering the following Overdamped Langevin equation under, where without loss of generality we take γ=σ=1,

dX=U(X)dt+2dWt

Discretize and define tn=nΔt, we get

Xn+1Xn+U(X)Δt=2(WtnWtn1)𝒩(0,2Δt) Therefore the propagation probability will be P(Xn+1|Xn)=dξ12πΔteξ24Δtδ(Xn+1Xn+U(X)Δtξ) Applying Fourier Transform of delta function, and we will get P=dk2πeik(Xn+1Xn+U(X)Δt)dξ12πΔteξ24Δteikξ The second part is a Gaussian Integral, which yields P=dk2πeik(Xn+1Xn+U(X)Δt)ek2Δt Now consider the probability from initial X0 to final Xn. P(𝐗n|𝐗0)=12πiN1dkie(iki(X˙+U(X))ki2)Δt take the limit of Δt0,we will get P(𝐗n|𝐗0)=𝒟[k]e0tn(ik(X˙+U(X))k2)dt

See also

References

Template:Reflist

External links

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "Citation/CS1".
  5. Script error: No such module "Citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "Citation/CS1".
  8. Script error: No such module "Citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. a b c Script error: No such module "citation/CS1".
  12. a b Script error: No such module "citation/CS1".