vix.ing · top · new · best · stats · spec

Collective dynamics of trail-interacting particles

2025/12/03 by Paul Pineau, Samuel Bell, Pineau, Paul +5
Materials Science · Mathematics · Physics and Astronomy · #FOS: Physical sciences #Material Dynamics and Properties #Mathematical Biology Tumor Growth #Mathematical Physics (math-ph) #Micro and Nano Robotics #Statistical Mechanics (cond-mat.stat-mech)

paper · pdf · doi:10.48550/arxiv.2512.03950

openalex publication_date 2025/12/03 · openalex created_date 2025/12/05 · openalex updated_date 2026/07/28

Abstract

Collective Dynamics of Trail-Interacting Particles This repository accompanies the paper on the collective dynamics of trail-interacting particles. It contains the simulation code (Julia), analytical derivations (Mathematica), and plotting notebooks (Python/Jupyter) needed to reproduce the results. Repository Structure <currentdirectory>/├── JuliaDRWs/ # 1D simulations│ ├── DRWsEngine.jl # Core engine: data structures, Gillespie stepper│ ├── Trajectories.jl # Mid-level routines: observables, I/O│ ├── Launchingfunctions.jl # High-level launchers (steady states, DSF, …)│ └── Launchingfile.jl # Entry point — edit parameters and run this│├── 2dJuliaDRWs/ # 2D simulations (L×L periodic grid)│ ├── 2dDRWsEngine.jl # Core engine for the 2D model│ ├── 2dTrajectories.jl # Mid-level routines for 2D│ ├── 2dLaunchingfunctions.jl # High-level launchers for 2D│ ├── 2dLaunchingfile.jl # Entry point for 2D│ └── Launch.sh # SLURM batch script (HPC cluster)│├── Collectivedynamicsoftrailinteractingparticles.nb # Mathematica notebook for the caclulations done in the paper└── Notebookplotsarticle.ipynb # Python notebook — figures for the paper Physical Model Particles perform continuous-time random walks on a periodic 1D chain (or 2D square lattice) of N sites. Each particle leaves a *trail* (local time / deposition count φi) that biases the jump rates of all particles. The jump rate from site i to a neighbouring site j is: r(i → j) = 2 ktr (w(j))/(w(i) + w(j)), w(n) = e-h n where n is the local trail depth and h is the **interaction strength**: | Sign of h | Interpretation | BE CAREFUL, THE SIGN OF h IS THE OPPOSITE IN THE MAIN TEXT.|-------------|----------------|| h < 0 | Repulsive trails — particles avoid previously visited sites || h > 0 | Attractive trails — particles are drawn to previously visited sites | > **Note:** the sign convention of h in the code is the **opposite** of the one used in the paper. Set `h = -0.1` in the code to match h = +0.1 in the paper. In addition to hopping, each particle deposits at rate kd, incrementing φi by 1. Events are selected with a Gillespie (continuous-time Monte Carlo) algorithm accelerated by a waypoint / row-waypoint data structure that reduces the event-selection cost to O(√(Nsites)) per step. Prerequisites ### Julia (≥ 1.9) Install the required packages once: ```juliausing PkgPkg.add(["Random", "FFTW", "LinearAlgebra", "CSV", "DataFrames", "NPZ", "BenchmarkTools", "ThreadsX", "Dates", "Printf"])``` ### Python (for the plotting notebook) ```bashpip install numpy matplotlib scipy pandas jupyter``` Quick Start 1D simulations Open `JuliaDRWs/Launchingfile.jl`, adjust the parameters at the top: ```juliaNsites = 256 # Number of lattice sitesh = -0.1 # Interaction strength (h < 0 ↔ repulsive; note sign convention above)ktr = 1.0 # Hopping ratekd = 1.0 # Deposition raterho0 = 1.0 # Mean particle densityNsims = 100 # Number of independent realisations``` Then run from the terminal: ```bashjulia JuliaDRWs/Launchingfile.jl``` Uncomment the desired launcher call to choose the workflow. 2D simulations Same workflow with `2dJuliaDRWs/2dLaunchingfile.jl`. The grid size is controlled by parameter `L` (total sites = L2). ```bashjulia 2dJuliaDRWs/2dLaunchingfile.jl``` ### HPC cluster (SLURM) `2dJuliaDRWs/Launch.sh` is a ready-made SLURM array job script. Adjust the partition and memory settings to match your cluster, then submit with: ```bashsbatch 2dJuliaDRWs/Launch.sh``` --- ## Available Workflows | Function | Description ||---|---|| `GenerateSteadyStatehnegative` | Run until the repulsive (h<0) steady state is reached and save density + local time || `LaunchGeneratePermanentStatehpositive` | Find the permanent (frozen) state for attractive trails (h>0) || `LaunchDSF` | Compute the **dynamic structure factor** S(q,ω) from previously saved steady-state snapshots || `LaunchSnappedSF` | Record the structure factor S(q) at regular step intervals (time-resolved) || `LaunchSnappedSFPoisson` | Same as above but starting from a Poisson-distributed initial condition || `maketrajectoriesfromgivendensity` | Generate full particle trajectories for visualisation / videos | All output data are saved automatically in organised subdirectories under the folder from which the script is run, following the naming convention: ```<Observable>/<signh>/From<InitialCondition>/h=<h>/ktr=<ktr>kd=<kd>/rho=<rho>Nsites=<N>nsim=<Nsims>/``` --- ## Output Format Results are written as CSV files (via `CSV.jl` / `DataFrames.jl`) and `.npy` arrays (via `NPZ.jl`): | File | Content ||---|---|| `density.csv` | Particle density field ρi for each simulation || `localtime.csv` | Trail field φi for each simulation || `time.csv` | Physical time reached at the end of each run || `Sqw.csv` | Dynamic structure factor S(q,ω) || `SFrho.csv` / `SFphi.csv` | Static structure factors of ρ and φ | Mathematica Notebook Wolfram Mathematica ≥ 14 is required to open and evaluate the `.nb` file. `Collectivedynamicsoftrailinteractingparticles.nb` derives analytical results presented in the paper, including: - The Green function of the linearised hydrodynamic equation - The density and trail structure factor S(q) - The scaling solution in 2d Plotting Notebook `Notebookplotsarticle.ipynb` loads the simulation data and reproduces the figures in the paper. Citation If you use this code, please cite: > *Collective Dynamics of Trail-Interacting Particles*, (authors), (journal), (year). DOI: ... License This project is released under the Creative Commons Attribution 4.0 International License

Citations

Related