Home▸Materials Science▸Polymer Chain 2D: Worm-Like-Chain Langevin Dynamics & Live Flory-Exponent Fit

Polymer Chain 2D: Worm-Like-Chain Langevin Dynamics & Live Flory-Exponent Fit

A real overdamped Langevin (Brownian-dynamics) integration of a semiflexible worm-like polymer chain in 2D, with bending stiffness set by persistence length. Five chain lengths run in parallel and the simulator fits a live log-log Flory exponent from their measured radii of gyration.

Materials Science2DModerate60 FPS⇄ 3D version
2d-polymer-chain ↗ Open standalone

This simulator runs a real two-dimensional overdamped Langevin (Brownian-dynamics) integration of a semiflexible worm-like polymer chain — harmonic bond springs plus a discretized Kratky–Porod bending force set by a persistence length, driven by genuine Gaussian thermal noise every animation frame. Rather than showing one chain length in isolation, five independent chains of N = 8, 16, 32, 64 and 128 beads are integrated in parallel under identical stiffness and temperature settings, and the simulator measures each one's own radius of gyration live, averages it over the running trajectory, and fits a least-squares log-log line through Rg(N) to extract the effective Flory scaling exponent as it converges in real time. Adjust the persistence length to move the chain between rod-like and random-coil behaviour and watch the fitted exponent track the crossover.

About this simulation

This simulation integrates five worm-like chains at once — N = 8, 16, 32, 64 and 128 beads — as a real overdamped Langevin process: harmonic bonds plus a discretized bending force set by the persistence length ℓp, driven by genuine Gaussian thermal noise every step. Instead of a single chain's Rg distribution, the simulator fits a live log-log regression of Rg against N across all five running lengths to measure the Flory exponent ν as it converges.

🔬 What it shows

The large canvas displays the N=128 chain evolving under real bonded and bending forces, with its instantaneous radius of gyration drawn as a dashed circle. The lower canvas plots ln Rg against ln N for all five running chain lengths and draws the least-squares fit line, reporting the fitted exponent ν live.

🎮 How to use

Raise persistence length ℓp/b to stiffen the chain toward rod-like behaviour, or lower it toward a floppy random coil. Raise temperature to add more thermal fluctuation. Use Reset chains & scaling fit whenever you change ℓp to start a fresh set of running averages.

💡 Did you know?

Double-stranded DNA has a persistence length of roughly 50 nm — about 150 base pairs — which is why short DNA fragments behave like stiff rods while long genomic DNA coils up exactly like the flexible limit shown here once N grows past ℓp.

Frequently asked questions

What is a worm-like chain, and how is it different from a freely-jointed chain?

A freely-jointed chain has bond directions that are completely uncorrelated from one segment to the next. A worm-like chain (WLC) instead has a bending energy that resists sharp turns, so nearby bond directions stay correlated over a characteristic length called the persistence length ℓp. Over distances much longer than ℓp, a worm-like chain behaves like a random walk again; over distances shorter than ℓp, it looks like a stiff rod.

How does this simulation actually move the chain?

Every animation frame runs several Langevin (Brownian-dynamics) sub-steps: each bead feels a harmonic spring force from its neighbours (keeping bond lengths near their rest value), a discretized Kratky–Porod bending force proportional to the local curvature (rᵢ₋₁−2rᵢ+rᵢ₊₁) scaled by the bending modulus, and independent Gaussian random kicks scaled by the temperature. This is numerically integrated, not pre-baked.

What does the log-log Rg-vs-N plot measure?

Five chains of different lengths (8 to 128 beads) run under identical stiffness and temperature. As each accumulates samples of its own radius of gyration, the simulator plots ln(mean Rg) against ln(N) for all five and fits a straight line through them by least squares — the slope of that line is the effective Flory exponent ν in Rg ~ Nν, measured directly from the running simulation rather than assumed.

Why does the fitted exponent depend on persistence length?

When the persistence length ℓp is small compared to the chain length, bending stiffness only matters locally and the chain scales like an ideal random coil with ν≈0.5. When ℓp is comparable to or larger than the number of bonds, even the longest chain in the ensemble still looks mostly straight, pulling the fitted exponent toward the rod-like limit ν≈1 until enough beads are added for the coil regime to reappear.

Where does this physics show up in the real world?

The worm-like chain model is the standard description of double-stranded DNA (persistence length ≈ 50 nm), unfolded or partially folded protein backbones, and semiflexible cytoskeletal filaments like actin and microtubules. The same rod-to-coil crossover measured here by the live exponent fit governs how DNA is packaged in chromatin, how stiff biopolymers respond to stretching in single-molecule experiments, and why short synthetic polymers can behave very differently from long ones of the same chemistry.

⚙ Under the hood

A real overdamped Langevin (Brownian-dynamics) integration of a semiflexible worm-like polymer chain in 2D, with bending stiffness set by persistence length. Five chain lengths run in parallel and the simulator fits a live log-log Flory exponent from their measured radii of gyration.

polymerworm-like chainpersistence lengthlangevin dynamicsbrownian dynamicsradius of gyrationflory exponentsoft matter

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)