Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Final Project: Simulating Chemical Reactions with Langevin Dynamics

Scientific Motivation**

Many chemical and biological reactions involve crossing energy barriers due to thermal fluctuations. These processes can be understood as stochastic dynamics over a potential energy landscape, where the system hops from one stable state (reactant) to another (product).

In this project, you’ll simulate a 1D model reaction using Langevin dynamics:

  • The particle represents a reactant molecule.

  • The potential energy landscape represents the reaction coordinate, e.g., reactant → transition state → product.

  • The particle’s crossings of the barrier represent reaction events.

This is a numerical experiment in thermal activation and a testbed for rate theory.

Project Objectiv

Simulate a 1D chemical reaction using Langevin dynamics, estimate the reaction rate constant using multiple approaches, and compare your results to Kramers’ theory.

Tasks

1. Define the Potential Energy Surface

Use a double-well potential to represent a reaction:

V(x)=a(x21)2 V(x) = a(x^2 - 1)^2

  • Minima at x=±1 x = \pm 1 (reactant and product)

  • Barrier at x=0 x = 0 , height ΔV=a \Delta V = a

  • Example: a=2 a = 2 gives ΔV=2 \Delta V = 2

You can also try asymmetric wells or multi-barrier landscapes later.

2. Implement Langevin Dynamics

Use the Langevin equation for a particle in a potential:

mx¨=γx˙dVdx+2γkBTη(t) m \ddot{x} = -\gamma \dot{x} - \frac{dV}{dx} + \sqrt{2 \gamma k_B T} \, \eta(t)

  • η(t)\eta(t) is Gaussian white noise

  • Use BAOAB scheme (or Euler-Maruyama for simplicity)

Parameters:

  • Mass m=1 m = 1

  • Friction γ=1.0 \gamma = 1.0

  • Temperature T=0.25 to 1.0 T = 0.25 \text{ to } 1.0

  • Time step dt=0.01 dt = 0.01

  • Simulate long enough to observe many transitions

3. Label States and Count Transitions

  • Define:

    • Left well: x<0 x < 0

    • Right well: x>0 x > 0

  • Count the number of times the particle switches wells

  • Compute:

k=Number of transitionsTotal time k = \frac{\text{Number of transitions}}{\text{Total time}}

This is your empirical rate constant.

4. Compare to Kramers’ Theory

Kramers’ estimate of the rate constant is:

kKramers=ω0ωb2πγeβΔV k_{\text{Kramers}} = \frac{\omega_0 \omega_b}{2\pi \gamma} e^{-\beta \Delta V}

  • ω0\omega_0: curvature at the well bottom (from second derivative of V(x) V(x) )

  • ωb\omega_b: curvature at the barrier top

  • ΔV\Delta V: barrier height

Compare your simulated k k to this analytical expression at various temperatures.

5. Correlation Function Method

Define the population indicator:

h(x)={1,x>00,x<0 h(x) = \begin{cases} 1, & x > 0 \\ 0, & x < 0 \end{cases}

Compute the autocorrelation function:

C(t)=h(0)h(t)ekt C(t) = \langle h(0) h(t) \rangle \sim e^{-kt}

Fit C(t) C(t) to extract the rate constant.

Challenges (Optional)

  • Try asymmetric double-well: V(x)=a(x21)2+δxV(x) = a(x^2 - 1)^2 + \delta x

  • Compute the mean first passage time from one well to the other

  • Vary friction γ\gamma to observe turnover behavior in Kramers’ theory

  • Simulate in 2D or on rugged landscapes

Learning Outcomes

  • Understand the connection between stochastic dynamics and chemical reaction rates

  • Explore rare event sampling and its challenges

  • Learn to extract kinetic information from trajectories

  • See how temperature and friction affect barrier crossing

💡 Starter Parameters

ParameterValue
Potentiala=2.0 a = 2.0
γ \gamma 1.0
T T 0.25–1.0
dt dt 0.01
ttotal t_{\text{total}} 104 10^4 106 10^6 steps