JuliaCon 2026

Computing transport coefficients using Molly.jl
2026-08-13 , Room 2

Transport coefficients are quantities measuring sensitivities in various fluxes for equilibrium molecular systems subject to thermodynamic forcings driving them out of equilibrium. Typical examples are diffusivity, shear viscosity or thermal conductivity, which enter as parameters in macroscopic models of fluids and materials. Unfortunately, these are notoriously difficult to compute, and there is still a need to develop more efficient algorithms.

We will present three algorithms to compute transport coefficients in stochastic MD: the Green-Kubo method, the nonequilibrium molecular dynamics (NEMD) method, and the constant-flux approach recently proposed in this work.

We discuss how Molly.jl, with its highly extensible design, allows to rapidly implement these methods and assess their relative performance. This leads in particular to discover promising properties of the constant-flux approach, narrowing the gap between mathematical ideas in statistical physics and applications in computational science.

This is joint work with Gabriel Stoltz.


Computing transport coefficients using Molly.jl

Transport coefficients — diffusivity, shear viscosity, thermal conductivity — measure how molecular systems respond to small thermodynamic forcings driving them out of equilibrium. They enter as parameters in macroscopic models such as the Navier–Stokes equations and are essential for bridging atomistic simulations with continuum-scale predictions. Unfortunately, estimating these quantities from molecular dynamics simulations is notoriously expensive: standard methods suffer from large statistical errors and require very long simulation times.

We present three algorithms to compute transport coefficients for systems governed by stochastic (Langevin) dynamics:

  • Green–Kubo: an equilibrium method based on integrated time-correlation functions.
  • NEMD (non-equilibrium molecular dynamics): the standard approach of applying a fixed external forcing and measuring the average flux response.
  • Constant-flux (Norton) method: a recently proposed dual approach (Blassel & Stoltz, J. Stat. Phys., 2024) that instead fixes the flux and measures the average forcing required to maintain it, inverting the usual NEMD philosophy.

We implement the constant-flux method in Molly.jl, via a custom simulator type (NortonSplitting) that constructs flux-preserving splitting schemes, which also give natural estimates of the average forcing. The NEMD and Green–Kubo methods rely on custom interaction types and Molly's built-in logging capabilities.

We discuss how Molly.jl, with its modular design — user-definable simulators, interactions, and loggers — allows all three methods to be implemented with remarkably low overhead, enabling rapid prototyping and benchmarking of novel algorithms. On the test case of shear viscosity for a Lennard–Jones fluid, the constant-flux approach shows promising properties: faster decay of correlations and an anomalous variance concentration rate ( $N^{-5/3}$ vs. the standard $N^{-1}$ ), leading to lower asymptotic variance and better computational efficiency. These findings illustrate how Molly.jl's extensibility helps narrow the gap between mathematical ideas in statistical physics and practical applications in computational science.

I am a postdoctoral researcher in the institute of Mathematics of EPFL working within the MatMat group on data-driven methods in quantum chemistry.

I recently defended my PhD thesis in Mathematics at the CERMICS lab of École Nationale des Ponts et Chaussées, in the MATHERIALS INRIA research project. During my PhD, I studied and constructed algorithms in molecular dynamics to accelerate the sampling of rare events (such as transitions between metastable configurations) and the computation of transport coefficients.