ReactLD.jl is a Julia package for performing stochastic simulations of particle-based reactive Brownian and Langevin dynamics using the Stochastic Simulation Algorithm (SSA).
This project focuses on the fundamental reversible reaction A + B ⇌ C but the methodology can be extended to more general reactions (see our paper below for details).
We consider randomly diffusing particles of species A, B, or C that evolve according to either:
-
Brownian Dynamics (BDs):
$$\dot{X}_t = \sqrt{2D} \dot{W}_t$$ -
Langevine Dynamics (LDs):
$$\dot{X}_t = V_t, \quad \dot{V}_t = -\beta V_t + \beta \sqrt{2D} \dot{W}_t,$$
where
Prerequisites
- Julia (v1.0 or later) installed on your system.
- Git installed.
- Clone the repository
git clone https://github.com/chenyaomath/ReactLD.jl.git
cd ReactLD.jl
- Install the packages in Julia
cd env
julia setup.jl
The repository contains several subfolders for running simulations of the A + B ⇌ C reaction:
AB_C_V_large/
andAB_C_V_small/
: Langevin Dynamics simulations in large/small domainsAB_C_X_large/
andAB_C_X_small/
: Brownian Dynamics simulations in large/small domains
To run a simulation, use the following command (customize the parameters as needed):
nohup JULIA_NUM_THREADS=5 julia ReactLD.jl --num_sim 11000 --beta 1.0e19 --time_step 1.0e-7 > ABCV_sim11000_beta1.0e19_time_step1.0e-7_24072210.log 2>&1 &
![]() |
![]() |
---|---|
Convergence of Reactive LDs to BDs | Error between Reactive LDs and BDs as β → ∞ |
If you use this package in your work, please cite the following paper. Open-source development in academia depends heavily on proper attribution. Also, consider starring the repository—this helps us demonstrate impact and secure funding:
@misc{isaacson2025macroscopicallyconsistentreactivelangevin,
title = {A Macroscopically Consistent Reactive Langevin Dynamics Model},
author = {Samuel A. Isaacson and Qianhan Liu and Konstantinos Spiliopoulos and Chen Yao},
year = {2025},
eprint = {2501.09868},
archivePrefix = {arXiv},
primaryClass = {physics.bio-ph},
url = {https://arxiv.org/abs/2501.09868}
}