The Smoluchowski Diffusion Equation

The Smoluchowski diffusion equation describes the time evolution of the probability density function (PDF) of a particle undergoing overdamped Brownian motion in a potential energy landscape. It is a central equation in statistical mechanics, soft matter physics, and chemical physics.

Its origins trace back to the early 20th century, in the context of the theoretical understanding of Brownian motion. Following the seminal work of Albert Einstein in 1905, who provided a statistical description of diffusion and established a quantitative link between microscopic fluctuations and macroscopic transport, further developments aimed to incorporate external forces and interactions. In 1916, Marian Smoluchowski extended Einstein’s framework by considering particles subjected to systematic forces arising from a potential field. His formulation led to what is now known as the Smoluchowski equation, effectively describing diffusion in the overdamped (high-friction) limit where inertial effects can be neglected. This marked a crucial step toward connecting stochastic motion with deterministic drift. A complementary perspective emerged through the work of Paul Langevin (1908), who introduced a stochastic differential equation for particle motion, explicitly incorporating random forces. The equivalence between the Langevin description and the corresponding evolution equation for probability densities—later formalized as the Fokker–Planck equation—provided a deep and unifying framework. The general mathematical structure of such evolution equations was further clarified by Adriaan Fokker and Max Planck in the early 20th century, leading to the modern formulation of the Fokker–Planck equation. The Smoluchowski equation can be viewed as a specific limit of this more general framework. Later, in the 1940s, Hendrik Anthony Kramers applied these ideas to chemical reaction rates, analyzing barrier crossing in potential landscapes. His work revealed how transition rates depend exponentially on the energy barrier height, establishing the foundation of what is now known as Kramers’ theory—an essential concept for understanding metastability and rare events.

In this note, we consider the one-dimensional (1D) case, where a particle moves along a coordinate r under the influence of a potential of mean force U(r).

Potential of Mean Force

The potential of mean force is related to the equilibrium probability density p_{\text{eq}}(r) by:

U(r) = -k_B T \ln p_{\text{eq}}(r),

where k_B is the Boltzmann constant and T is the temperature.

This definition ensures that the equilibrium distribution satisfies:

p_{\text{eq}}(r) \propto e^{-U(r)/(k_B T)}.

Smoluchowski Equation

The Smoluchowski equation in one dimension reads:

\frac{\partial P(r,t)}{\partial t} = D \frac{\partial^2 P(r,t)}{\partial r^2} + \frac{\partial}{\partial r} \left( \frac{1}{k_B T} \frac{dU(r)}{dr} \, P(r,t) \right),

where:

  • P(r,t) is the probability density,
  • D is the diffusion coefficient,
  • U(r) is the potential of mean force.

Flux Formulation

It is often useful to rewrite the equation as a conservation law:

\frac{\partial P}{\partial t} = -\frac{\partial J}{\partial r},
where the probability flux J(r,t) is given by:

J = -D \left( \frac{\partial P}{\partial r} + \frac{1}{k_B T} \frac{dU}{dr} P \right).

This form clearly separates diffusion and drift contributions.

Separation of Variables

We seek solutions of the form:

P(r,t) = \psi(r) f(t).

Substituting into the Smoluchowski equation gives:

\psi(r) \frac{df}{dt} = D f(t) \frac{d^2 \psi}{dr^2} + f(t)\frac{d}{dr} \left( \frac{1}{k_B T} \frac{dU}{dr} \psi \right).

Dividing by \psi(r) f(t):

\frac{1}{f} \frac{df}{dt} = D \frac{1}{\psi} \frac{d^2 \psi}{dr^2} + \frac{1}{\psi} \frac{d}{dr} \left( \frac{1}{k_B T} \frac{dU}{dr} \psi \right).

Since the left-hand side depends only on time and the right-hand side only on space, both must be equal to a constant -\lambda:

\frac{1}{f} \frac{df}{dt} = -\lambda

D \frac{d^2 \psi}{dr^2} + \frac{d}{dr} \left( \frac{1}{k_B T} \frac{dU}{dr} \psi \right) = -\lambda \psi.

The time-dependent solution is:

f(t) = e^{-\lambda t}.

Eigenvalue Problem and Transformation

The spatial equation is not Hermitian in its original form. To transform it into a symmetric operator, we define:

\psi(r) = e^{-\frac{U(r)}{2k_B T}} \, \phi(r).

Substituting this into the spatial equation leads to a Schrödinger-like eigenvalue problem:

-D \frac{d^2 \phi}{dr^2} + V_{\text{eff}}(r)\phi \lambda \phi,= \lambda \phi

where the effective potential is:

V_{\text{eff}}(r)= \frac{D}{4(k_B T)^2} \left( \frac{dU}{dr} \right)^2 - \frac{D}{2k_B T} \frac{d^2 U}{dr^2}.

General Solution

The general solution can be written as a spectral expansion:

P(r,t) = \sum_{n} c_n \, \psi_n(r) e^{-\lambda_n t},

where:

  • \psi_n(r) are eigenfunctions,
  • \lambda_n are eigenvalues,
  • c_n are determined by the initial condition.

Numerical Solution

For most potentials, analytical solutions are not available, and numerical methods are required. We discretize space as r_i = i \Delta r and time as t_n = n \Delta t. Using the flux formulation, we define:


J_{i+\frac{1}{2}} = D \left[ \frac{P_{i+1} - P_i}{\Delta r} + \frac{1}{k_B T} \left( \frac{dU}{dr} \right){i+\frac{1}{2}} \frac{P{i+1} + P_i}{2} \right].

The update equation becomes:

P_i^{n+1} P_i^n \frac{\Delta t}{\Delta r} \left( J_{i+\frac{1}{2}}^n - J_{i-\frac{1}{2}}^n \right).

The time step must satisfy a diffusion stability condition:

\Delta t \lesssim \frac{\Delta r^2}{2D}.

Example: Diffusion in a Double-Well Potential

A paradigmatic example illustrating the dynamics governed by the Smoluchowski equation is diffusion in a double-well potential. This system exhibits metastability and barrier-crossing dynamics, which are central in many physical, chemical, and biological processes. A simple symmetric double-well potential can be defined as:

U(r) = a r^4 - b r^2,
with a > 0 and b > 0.

This potential has:

  • two minima at r = \pm \sqrt{\frac{b}{2a}},
  • a maximum (energy barrier) at r = 0.

The barrier height is given by:

\Delta U = \frac{b^2}{4a}.

The particle tends to localize in one of the two wells due to thermal fluctuations. Occasionally, it acquires enough thermal energy to cross the barrier and transition to the other well.

This process is governed by the competition between:

  • thermal energy k_B T,
  • barrier height \Delta U.

The stationary solution of the Smoluchowski equation is:

P_{\text{eq}}(r) \propto e^{-U(r)/(k_B T)}.

For the double-well potential, this results in a bimodal distribution with two peaks at the minima.

The time-dependent solution can be expressed as:

P(r,t) = \sum_n c_n \psi_n(r) e^{-\lambda_n t}.

In a double-well system, the spectrum has a characteristic structure:

  • \lambda_0 = 0 corresponds to equilibrium,
  • \lambda_1 is very small and governs transitions between wells,
  • higher eigenvalues correspond to fast intra-well relaxation.

The slowest timescale,

\tau \sim \frac{1}{\lambda_1}, is associated with barrier crossing.

In the limit of a high barrier (\Delta U \gg k_B T), the transition rate between wells is approximately given by Kramers’ formula:

k \approx \frac{D}{2\pi} \sqrt{ \left| \frac{U''(r_{\text{max}})}{U''(r_{\text{min}})} \right| }, e^{-\Delta U/(k_B T)},

where:

  • r_{\text{min}} is the position of a minimum,
  • r_{\text{max}} is the position of the barrier top.

This expression highlights the exponential dependence of the transition rate on the barrier height.

The code for this example is reported in the appendix.

Applications

Double-well diffusion models appear in many contexts:

  • chemical reactions (reactant $\leftrightarrow$ product),
  • protein conformational changes,
  • bistable systems in soft matter,
  • stochastic resonance and noise-driven switching.

Conclusion

The Smoluchowski equation provides a powerful framework to describe diffusion in a potential landscape. While analytical solutions exist only for simple potentials, the equation admits a spectral decomposition that reveals the relaxation dynamics of the system.

In practice, numerical methods based on conservative discretizations of the probability flux are essential for studying realistic systems.

APPENDIX

The Python program for the simulation of the barrier crossing in a double-well potential.

# ================================================================
#  Barrier Crossing in a Double-Well Potential
#  ---------------------------------------------------------------
#  Numerical solution of a 1D diffusion (Fokker–Planck) equation
#  in an external potential landscape.
#
#  The program simulates the time evolution of a probability
#  density P(r,t) under the influence of:
#      - Diffusion
#      - External potential U(r)
#
#  Physical Model
#  --------------
#  The system is described by the Fokker–Planck equation:
#
#      ∂P/∂t = ∂/∂r [ D ( ∂P/∂r + (1/kBT) P ∂U/∂r ) ]
#
#  where:
#      P(r,t)  : probability density
#      D       : diffusion coefficient
#      U(r)    : external potential (double-well)
#      kBT     : thermal energy
#
#  The potential U(r) is chosen as a symmetric double-well:
#
#      U(r) = a (r^2 - b)^2
#
#  This creates two stable minima separated by an energy barrier.
#
#  Numerical Method
#  ----------------
#  - Spatial discretization: finite differences
#  - Time integration: explicit Euler scheme
#  - Boundary conditions: absorbing (P = 0 at boundaries)
#
#  Features
#  --------
#  - Simulation of metastability and barrier crossing
#  - Visualization of probability evolution over time
#  - Comparison with equilibrium Boltzmann distribution
#  - Overlay of potential energy landscape
#  - Optional saving of figures for publication
#
#  Physical Insight
#  ----------------
#  - Fast relaxation occurs within each well
#  - Slow transitions occur across the barrier
#  - Timescale separation depends exponentially on barrier height:
#
#        τ  ~  exp(ΔU / kBT)
#
# ================================================================
#  Author: D. Roccatano
#  This code was developed with the assistance of OpenAI ChatGPT
#  (version GPT-5.3, 2026) for code generation and explanations.
#
#  Date: 2025
#  License: MIT
# ================================================================

import numpy as np
import matplotlib.pyplot as plt

# ----------------------------
# Parameters (tuned for Kramers regime)
# ----------------------------
N = 300
L = 3.0
#D = 0.2
kBT = 0.3
Tmax = 10.0
dt = 1e-4
steps = int(Tmax/dt)

a = 1.0
#b = 4.0

kBT = 0.5
b = 2.5
D = 0.5

# ----------------------------
# Grid
# ----------------------------
r = np.linspace(-L, L, N)
dr = r[1] - r[0]

# ----------------------------
# Potential
# ----------------------------
U = a*r**4 - b*r**2
dU = 4*a*r**3 - 2*b*r

# ----------------------------
# Initial condition (left well)
# ----------------------------
P = np.exp(-(r + 1.5)**2 / 0.02)
P /= np.sum(P)*dr

# ----------------------------
# Store snapshots
# ----------------------------
snapshots = []
times = []

snapshot_steps = np.linspace(0, steps-1, 6, dtype=int)

# ----------------------------
# Time evolution
# ----------------------------
for n in range(steps):

    J = np.zeros(N)

    for i in range(1, N-1):
        dU_half = 0.5*(dU[i] + dU[i+1])
        P_half = 0.5*(P[i] + P[i+1])
        dP = (P[i+1] - P[i])/dr

        J[i] = -D*(dP + (1.0/kBT)*dU_half*P_half)

    # reflecting boundaries
    J[0] = 0.0
    J[-1] = 0.0

    P_new = P.copy()
    for i in range(1, N-1):
        P_new[i] = P[i] - dt/dr*(J[i] - J[i-1])

    P_new /= np.sum(P_new)*dr
    P = P_new

    if n in snapshot_steps:
        snapshots.append(P.copy())
        times.append(n*dt)

# ----------------------------
# Plot
# ----------------------------
fig, ax1 = plt.subplots(figsize=(6,4))

for i, snap in enumerate(snapshots):
    ax1.plot(r, snap, label=f"t={times[i]:.2f}")

# equilibrium
Peq = np.exp(-U/kBT)
Peq /= np.sum(Peq)*dr
ax1.plot(r, Peq, '--', linewidth=2, label="Equilibrium")

ax1.set_xlabel("r")
ax1.set_ylabel("P(r,t)")
ax1.legend(fontsize=8)

# potential (scaled)
ax2 = ax1.twinx()
ax2.plot(r, U/kBT, 'k', linewidth=2)
ax2.set_ylabel("U(r) / kBT")

plt.title("Barrier Crossing in a Double-Well Potential")

plt.tight_layout()
plt.savefig("double_well_barrier_crossing.png", dpi=300)
plt.show()
plt.show()

Understanding the Discrete Fourier Transform in Signal Analysis

In previous posts on this blog I have already introduced the Fourier series and the Fourier transform, following their historical development from Joseph Fourier’s original work on heat conduction to their modern role in physics, engineering, and signal analysis. Rather than repeating that material here, I will take it as a starting point.

When we look at a signal — a sound wave, a vibration, or even a curve drawn by hand — we usually perceive it as a function of time or space. However, very often the most relevant information is not immediately visible in this representation. It is hidden in the frequencies that compose the signal, and in how strongly each of them contributes.

This is precisely the idea behind the Discrete Fourier Transform (DFT): to decompose a discrete signal into a finite sum of harmonic components, each characterized by an amplitude and a phase. Conceptually, the DFT is not a new theory, but a practical bridge between the continuous Fourier framework and the realities of digital data, measurements, and numerical simulations.

Rather than starting from abstract formulas, in this post I adopt a visual and experimental approach. The discussion is supported by an interactive program that allows one to draw an arbitrary signal and explore its harmonic content, and by a practical electronics project where Fourier analysis is applied to real sound and noise signals.

Continue reading

Retro Programming Nostalgia VIII: 1926-2026 l’equazione di Schrödinger e la struttura elettronica dell’atomo d’idrogeno

Quest’anno ricorre l’anniversario della pubblicazione dell’articolo di Edwin Schrödinger (1887-1961) in cui viene introdotta la sua famosa equazione. Prendendo spunto da questa occasione, ho ripescato e rinnovato uno dei miei antichi progetti di programmazione in BASIC con i miei microcomputer negli anni ’80. Di nuovo il microcomputer era il mio amato Phillips MSX, di cui ho parlato in altri blog. Studiando chimica, non potevo non essere attratto dalla bellezza e dall’eleganza delle soluzioni dell’equazione di Schrödinger per l’atomo d’idrogeno. Inspirato dal libro (S. Marseglia, La Chimica col personal computer pubblicato dalla Muzzio) in cui mostrava alcuni esempi di programmi in BASIC per la chimica, decisi di imbarcarmi nell’impresa e usare l’MSX e poi l’Amiga Basic Basic per provare a riprodurre le bellissime visualizzazioni degli orbitali molecolari che vedevo nei libri di chimica universitari. Ma prima di questo vediamo di tornare a contenuto dell’articolo di Schrödinger.

Continue reading

Bringing FRET and Molecular Dynamics Together to Understand Flexible Peptides

Important structural components of proteins, like linker loops and intrinsically disordered regions, are highly flexible and constantly change shape in solution. These flexible protein regions — especially those containing glycine- and serine-rich segments — do not behave like neatly folded proteins. They fluctuate, breathe, and explore broad conformational landscapes. These motions can often be central to biological function. But capturing them consistently, both structurally and dynamically, remains challenging. To understand the physics of this flexibility, we often turn to short model peptides that isolate the essential ingredients of chain dynamics. In an earlier work, we explored glycine- and serine-rich octapeptides using molecular dynamics (MD) simulations in combination with concepts from FRET (Förster Resonance Energy Transfer) spectroscopy. The goal was to understand how flexible chains fluctuate and how these fluctuations are reflected in experimentally measurable distances.

In a new publication in The Journal of Physical Chemistry B [1], we have built directly on that foundation, but push the idea further toward quantitative integration between simulation and experiment. At the center of both studies is a small but powerful fluorescent probe: 2,3-diazabicyclo[2.2.2]oct-2-ene (DBO). Paired with tryptophan, DBO enables measurements of extremely short intramolecular distances. Because it is compact and minimally perturbing, it is particularly well suited for probing flexible peptides that would be difficult to characterize using larger fluorophores. In the earlier work, the focus was primarily on understanding conformational ensembles and distance distributions.

In this new study, the Dbo model has been upgraded to the more recent version of the GROMOS force field (54A7), and using extensive MD simulations, we have verified whether the new model can more quantitatively reproduce both structural and kinetic FRET experimental observables. In particular, we combined time-resolved FRET experiments with microsecond-scale MD simulations to study model peptides of the form Trp–(GS)n–Dbo and Trp–(PP)n–Dbo with n=0,1,2,3, where the glycine–serine sequences represent highly flexible chains, and the polyproline sequences provide a more rigid reference.

The results of the simulations showed:

  • Simulated end-to-end distances agree with FRET-derived experimental values within 5% for the flexible (GS)_npeptides.
  • Contact formation kinetics (looping rates) quantitatively match experiment once solvent viscosity is properly accounted for.
  • The relationship between chain flexibility and fluorophore separation is systematically captured.

Beyond equilibrium averages, we also analyzed time correlations and dynamical fluctuations, linking conformational free-energy landscapes to experimentally observable FRET signals.

Instead, it demonstrates that combining equilibrium FRET distances and time-resolved kinetic data provides a stringent benchmark for simulation models of flexible peptides. Furthermore, this integrated FRET–MD framework with the improved Dbo model can be applied to:

  • Flexible linkers in multidomain proteins
  • Intrinsically disordered protein segments
  • Small proteins undergoing conformational adaptation

REFERENCE

[1] D. Roccatano . Quantitative Integration of FRET and Molecular Dynamics for Modeling Flexible Peptides. J. Phys. Chem. B, (2026-02-27)
doi: https://doi.org/10.1021/acs.jpcb.5c08148

Christmas 2025: Growing Christmas Trees from Factorials

Christmas is a time for traditions, decorations, and—at least for some of us—quiet moments spent playing with ideas. In that spirit, this post is a small seasonal diversion: a recreational exploration of large factorial numbers, their historical computation, and an unusual way to see them. The inspiration comes from an old but delightful article by the great recreational mathematician  Martin Gardner, titled “In which a computer prints out mammoth polygonal factorials” (Scientific American, August 1967), in which he discusses the astonishing growth of the function

n! = 1 \cdot 2 \cdot 3 \cdots n

and the surprising difficulty computers once faced when trying to compute it for even modest values of n.

In this post, I will briefly describe the Smith bin algorithm for computing large factorials and present the result for the number 2025, arranged in a geometric form. After all, if numbers are going to grow explosively, why not let them grow into Christmas trees for 2025?

Continue reading

Principal Component Analysis: Key to Analyzing Biomolecular Dynamics

I have recently written, for WIREs Computational Molecular Science, a review article on the use of Principal Component Analysis (PCA) in the study of dynamical systems, with a particular focus on molecular dynamics (MD) simulations of biomolecules [1]. The aim of this work is to provide a clear and practical overview of how PCA has become a central tool for extracting meaningful collective motions from high-dimensional simulation data, and how modern methodological extensions continue to expand its capabilities.

Continue reading

RaPenduLa: Una Video piattaforma Fai-Da-Te Per Studiare Oscillazioni Meccaniche

Qualche giorno fa ho pubblicato un nuovo progetto educativo sul mio sito Instructables. Il dispositivo, che ho battezzato RaPenduLa (dalle iniziali in inglese di RaspPi Pendulum Laboratory), è stato ribattezzato in italiano CAMPO (Computer Analisi Moto Pendolare Oscillante) grazie a un suggerimento di ChatGPT. Ma, come direbbe Shakespeare, ‘What’s in a name? That which we call a rose by any other name would smell as sweet’: il cuore del progetto è infatti una piattaforma video per lo studio delle oscillazioni meccaniche. Utilizzando un Raspberry Pi Zero W2 dotato di modulo fotocamera, il sistema registra ad alta velocità il movimento dei pendoli. Poi, con un’analisi video basata su Python e OpenCV, RaPenduLa è in grado di tracciare il percorso preciso della punta del pendolo, visualizzandone il comportamento oscillatorio in 2D.

Continue reading

Easter 2025: Exploring Egg-Shaped Billiards

It has become a recurrent habit for me to write a blog on the shape of eggs to wish you a Happy Easter. Not repeating oneself and finding a new interesting topic is a brainstorming exercise of lateral thinking and a systematic search in literature to find an interesting connection. This year, I wanted to explore an idea that has been lurching in my mind for some time for other reasons: billiards.

I used to play snooker from time to time with some old friends. I am a far cry from being even an amateur in the billiard games, but I had a lot of fun verifying the laws of mechanics on a green table. I soon discovered that studying the dynamics of bouncing collision of an ideal cue ball in billiards of different shapes keeps brilliant mathematicians and physicists engaged in recreational academic studies and important theoretical implications.

Continue reading

I received a surprise gift, and I want to express my gratitude for your support!

Today, I was pleasantly surprised by a message from WordPress. It announced that a very generous reader had gifted a subscription. This gift covers the cost of my personal plan and website domain.

First and foremost, I want to express my heartfelt thanks to this undisclosed reader for their generosity. You are the first to make such a donation. Your support has given me a great boost of encouragement to continue writing. If you wish, I would be happy to acknowledge you on this page.

This blog began as a personal space to share my work as an educator and scientist. Over time, it has also become a place for reflections on my past experiences and long-standing hobbies. I enjoy exploring a wide range of scientific topics that spark my curiosity, and I write simply for the joy of sharing my enthusiasm for science. My endless curiosity drives my fascination with the natural world and the universe around us. I started this journey with no particular expectations—just personal fulfillment. Now, I’m delighted to see the readership growing and grateful that some of you find this blog valuable enough to support it.

I have written this post in English. I do not know the donor’s primary language. This ensures my gratitude reaches you. If English is not your main language, inform me. I am happy to express my thanks in Italian or German.
Spero tuttavia che il mio messaggio sia chiaro anche ai tanti connazionali che leggono le mie pagine in italiano o ai lettori di lingue latine che possono comprenderlo, e li ringrazio di cuore.

Und ich hoffe auch, dass viele deutschsprachige Leser meine Seiten auf Deutsch verstehen können – so gut es geht! 😊

RaPenduLa: A DIY Video Platform for Exploring Mechanical Oscillations

I have recently published another educational project on my Instructables website. I called the device RaPenduLa for the RaspPi Pendulum Laboratory, and it is a video platform for studying mechanical oscillations. It uses a Raspberry Pi Zero W2 equipped with a camera module to record the motion of pendulums at high speed. The interesting part happens through video analysis: using Python and the fantastic OpenCV library, RaPenduLa can track the precise path of a pendulum’s tip and help visualize its oscillatory behavior in two dimensions.

Continue reading