Tutorial T12: Kremer–Grest Polymer Melts: Rouse Dynamics, Entanglement Onset, and Checkpoint Restarts
Scripts: tutorials/T12_kremer_grest_polymers/run.jl · analyze.jl · plot.py
Dense melts of linear polymers test macromolecular dynamics because topological non-crossability progressively slows chain motion as the degree of polymerization
This tutorial covers polymer topology, bending stiffness, and multi-stage checkpoint restarts in ParticleDynamics v1.2.0:
Canonical Kremer–Grest melt via the high-level Workflow API:
WCA(epsilon=1.0, sigma=1.0, exclude_bonded_pairs=false)paired withFENEBondForce(k=30.0, R0=1.5)onTopology(bonds=...), integrated withBAOABFast()+Langevin(gamma=0.5, kT=1.0)at timestep .Auhl-style rapid melt equilibration (
Auhl et al. 2003): Correlated non-reversing chains sampled from the isolated-triplet 1–3 WCA + bending Boltzmann distribution, rigid-chain center-of-mass Monte Carlo pre-packing, and a stagedSoftRepulsiveWCApush-off for rapid conformational equilibration.Semi-flexible chain extension via
CosineSquaredAngleForce: AddingCosineSquaredAngleForce(k=k_bend, theta0=pi)onTopology(bonds=..., angles=...)across at identical , comparing melt conformations against Freely Rotating Chain (FRC), Wormlike Chain (WLC), and isolated-triplet 1–3 WCA references while monitoring melt isotropy ( ).Multi-stage
GSDWriter(..., write_unwrapped=true)ParticleSystem.from_gsdcheckpoint/restart continuation: Splitting the ( -step) production run (chains beads beads) into two chained stages separated by an on-disk GSD checkpoint, documenting unwrapped-coordinate restoration and verifying checkpoint reload regression parity ( 0.0position/velocity/unwrapped mismatch, ) alongside Stage 1Stage 2 ensemble continuity.
Trajectory Visualization
tutorials/render_movies.py --targets T12).
1. Physical Model, Equilibration Strategy & Scaling Observables
All quantities are reported in reduced Lennard-Jones units (
Finite-size & entanglement-regime caveats for N = 100
Weakly entangled crossover (
): With modern PPA entanglement length (Everaers et al. 2004; Sukumaran et al. 2005; Hoy, Foteinopoulou & Kröger 2009; Hsu & Kremer 2016), represents entanglement onset rather than deeply entangled reptation. No asymptoticregime develops (minimum logarithmic slope ), and intersecting a forcedasymptote with the Rouse shelf to extract is not physically meaningful at .Periodic box size (
): Forchains beads beads at , the cubic box length is ( ). Chains can therefore interact with their own periodic images under the minimum-image convention; larger systems ( ) are required for thermodynamic-limit static and dynamic studies (e.g., Hsu & Kremer 2016).
Canonical Kremer–Grest & Semi-Flexible Potentials
Every pair of beads, including covalently bonded neighbors (exclude_bonded_pairs=false), interacts via the purely repulsive Weeks–Chandler–Andersen (WCA) potential:
Adjacent monomers along each chain are connected by the finitely extensible nonlinear elastic (FENE) spring:
Because
For semi-flexible melts, we attach CosineSquaredAngleForce(k=k_bend, theta0=pi) to every consecutive bond triple
For an isolated three-bead triplet with 1–3 WCA repulsion at
and the Markovian Freely Rotating Chain (FRC) model relates a nearest-neighbor cosine
Why the isolated 1–3 WCA FRC formula does not explain flexible-melt C_∞
At
Dense melt packing compresses local bond angles from
down to the measured melt value ( at ).Plugging the measured
into the FRC formula yields , significantly below the measured ( , ).
As established by Hsu & Kremer (2016), flexible polymer melts deviate markedly from the Markovian FRC model because intramolecular correlation-hole and melt-packing back-folding correlations persist beyond nearest-neighbor bonds. At higher bending stiffness (
Conformational & Dynamical Observables
Internal Distances & Coil Geometry (Auhl et al. 2003): Using minimum-image chain-walk reconstruction along each chain, we measure
, global , , , the Gaussian coil ratio (ideal ), internal distance scaling , bond-vector autocorrelation , integral persistence length , and global nematic order .Kremer–Grest Mean-Square Displacements (
): From continuous unwrapped trajectories (with global system center-of-mass drift subtracted), averaging over the central inner monomers of each chain (beads for ; beads for ) and sliding multi-origin lag times:The Rouse-normalized diagnostic
and the local logarithmic slope separate unentangled Rouse chains (which turn upward into Fickian diffusion) from chains at entanglement onset (which dip below the Rouse shelf with before rebounding).
2. ParticleDynamics v1.2.0 Polymer and Checkpoint API Walkthrough
Canonical Kremer–Grest & Semi-Flexible Forces
Passing exclude_bonded_pairs=false to WCA is required for Kremer–Grest polymers so the repulsive WCA core acts on FENE-bonded pairs as well (preventing bond collapse). Adding bending stiffness requires only appending CosineSquaredAngleForce and populating Topology.angles:
topo = k_bend > 0.0 ? Topology(bonds=bonds, angles=angles) : Topology(bonds=bonds)
system = ParticleSystem(
positions;
box=PeriodicBox((L, L, L)),
types=[:B],
typeids=fill(Int32(1), M * NB),
masses=1.0,
velocities=velocities,
topology=topo,
)
wca = WCA(
epsilon=1.0, sigma=1.0, pairs=:neighborlist,
neighborlist=CellList(buffer=0.4, capacity=64, rebuild_interval=10),
exclude_bonded_pairs=false, # WCA acts on bonded pairs too (canonical KG)
)
fene = FENEBondForce(k=30.0, R0=1.5)
forces = k_bend > 0.0 ? Force[wca, fene, CosineSquaredAngleForce(k=k_bend, theta0=pi)] :
Force[wca, fene]Dual-Schedule Unwrapped Trajectories (Every + Between)
To resolve GSDWriter(..., write_unwrapped=true) writers concurrently: a coarse Every(8_000) writer for the full Between(0, 32_000; every=80) burst writer that stops after run! batch full 8_000-step step_many! GPU chunks thereafter:
sim_s1 = Simulation(
sys_ent;
groups=Groups(all_grp),
integrator=Integrator(
dt=0.005, scheme=BAOABFast(), forces=forces,
methods=[Langevin(all_grp; gamma=0.5, kT=1.0)],
),
observables=Observable[thermo, press],
writers=Writer[
TableWriter(stage1_csv; every=4_000, observables=[
thermo => [:temperature, :kinetic_energy, :potential_energy, :total_energy],
press => [:pressure],
]),
GSDWriter(stage1_gsd; every=8_000, write_start=true, write_unwrapped=true, diameter=1.0),
GSDWriter(burst_gsd; schedule=Between(0, 32_000; every=80),
write_start=true, write_unwrapped=true, diameter=1.0),
],
precision=Float32,
)
run!(sim_s1, Stage(:ent_stage1, steps=3_000_000; reset_step=0, progress=false))GSD Checkpoint Restart Idiom (ParticleSystem.from_gsd + Unwrapped Continuity)
ParticleSystem.from_gsd(stage1_gsd; frame=-1) restores wrapped positions, velocities, periodic box, masses, bond topology, metadata[:step], and the stored particles/position_unwrapped and particles/image chunks. During prepare!(sim_s2), ParticleDynamics initializes state(sim_s2).r{x,y,z}_unwrap via initialize_unwrapped_from_bonds!, which makes each chain contiguous but resets its root periodic image to (0, 0, 0). Copying the stored position_unwrapped array into state(sim_s2) immediately after prepare!(sim_s2) preserves periodic-image history and continuous unwrapped MSDs across the restart boundary. In ParticleDynamics v1.2.0, rx_unwrap, ry_unwrap, and rz_unwrap are always stored in Float64 even when precision=Float32, preserving unwrapped-coordinate and MSD precision across long entangled trajectories:
sys_ckpt = ParticleSystem.from_gsd(stage1_gsd; frame=-1)
sim_s2 = Simulation(
sys_ckpt;
groups=Groups(all_grp),
integrator=Integrator(
dt=0.005, scheme=BAOABFast(), forces=forces,
methods=[Langevin(all_grp; gamma=0.5, kT=1.0)],
),
observables=Observable[thermo_b2, press_b2],
writers=Writer[
TableWriter(stage2_csv; every=4_000, observables=[...]),
GSDWriter(stage2_gsd; every=8_000, write_start=true, write_unwrapped=true, diameter=1.0),
],
precision=Float32,
)
prepare!(sim_s2)
# Restore unwrapped coordinates from checkpoint metadata (continuous periodic images)
pos_u = sys_ckpt.metadata[:particle_properties][:position_unwrapped]
st2 = state(sim_s2)
T2 = eltype(st2.rx_unwrap)
copyto!(st2.rx_unwrap, T2.(pos_u[:, 1]))
copyto!(st2.ry_unwrap, T2.(pos_u[:, 2]))
copyto!(st2.rz_unwrap, T2.(pos_u[:, 3]))
run!(sim_s2, Stage(:ent_stage2, steps=3_000_000; progress=false))3. Results & Visual Verification
FENE Bond Integrity, Melt Equilibration & Semi-Flexible Stiffening

FENE + WCA bond integrity & restart invariance (Panel a): Across all melts (
, Stage 1 & Stage 2, and semi-flexible ), the bond-length distributions collapse onto a narrow peak with (KG reference ). Across steps of the melt, the global maximum bond length remains (suppressing bond crossings), and Stage 1 and Stage 2 distributions superimpose.Equilibrated
internal distance plateau & FRC deviation (Panel b): With Auhl-style correlated chain generation and rigid-chain MC pre-packing, rises smoothly from ( ) to a plateau , matching Kremer & Grest (1990) ( ) and Auhl et al. (2003) ( ). The Gaussian coil ratios are ( , vs. ) for and ( , ) for . Note that the Markovian FRC curve evaluated with the measured melt cosine plateaus at , sitting ( ) below the melt plateau due to intramolecular correlation-hole / back-folding effects (Hsu & Kremer 2016).Semi-flexible stiffening via
CosineSquaredAngleForce(Panels c & d): Turning onCosineSquaredAngleForce(k=k_bend, theta0=pi)across stiffens the melt monotonically from and raises the integral persistence length from to while maintaining melt isotropy ( ). At higher stiffness ( ), the explicit bending energy outweighs local melt-packing angle compression, bringing measured close to the isolated-triplet 1–3 WCA value ( vs. at ; vs. at ).
Rouse Dynamics, Entanglement Onset & Checkpoint Audit

Monomer & COM MSDs across 4.5 decades (Panel a): At short times (
), for and superimpose (chain-length-independent local Rouse dynamics). Above , they separate:The unentangled
melt follows Rouse scaling ( ) directly into Fickian diffusion ( , ), with center-of-mass diffusivity ( , or relative to Kremer & Grest 1990 Table II ), while saturates at .The
melt ( chains beads, stitched across Stage 1 + Stage 2 over ) slows down below Rouse scaling ( ) to a minimum effective slope over (consistent with Kremer & Grest 1990 Fig. 12 for ). Because ( ), the chain never reaches an asymptotic reptation regime.
Rouse-normalized diagnostic
& local exponent (Panels b & c): While rises above its Rouse shelf into Fickian growth, exhibits a downturn below its Rouse shelf ( , ratio ), reflecting sub-Rouse slowing down at the onset of entanglement. Rather than extracting a forced intersection (which is not physically well-defined at where contour-length fluctuations and the Rouse crossover overlap), we report and the downturn directly as entanglement-onset observables.GSD checkpoint restart software audit (Panel d): Across the Stage 1
ParticleSystem.from_gsd Stage 2 boundary at (step = 3,000,000), wrapped positions, velocities, unwrapped coordinates, periodic images, bond topology, and step counter reload with0.0discrepancy, live GPU potential energy agrees to per bead, Stage 1 vs. Stage 2 ensemble means are statistically consistent ( , ), and single-interval unwrapped bead displacements across show no periodic-image jump ( vs. interior fluctuations).
4. Quantitative Production Summary
Production parameters (NVIDIA RTX A5000, Float32, BAOABFast(),
Short flexible (
, beads): eq + prod ( steps, GSD frames + burst frames).Entanglement-onset flexible (
, beads, ): eq + Stage 1 + GSD checkpoint restart + Stage 2 = ( prod steps, GSD frames + burst frames). Finite-size note: .Semi-flexible (
, beads): , eq + prod ( steps each).
Conformations & Semi-Flexible Chain Stiffening
| Melt | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Flexible Rouse | ||||||||||
| Entanglement onset (S1+S2) | ||||||||||
| Semi-flexible | ||||||||||
| Semi-flexible | ||||||||||
| Semi-flexible |
Software & Checkpoint Regression Checks
| Software / Regression Check | Measured (ParticleDynamics) | Expected | Status |
|---|---|---|---|
| Global max bond length | CHECK_OK | ||
GSD checkpoint reload (ParticleSystem.from_gsd) | 0.0, identical step, bonds, image | CHECK_OK | |
| Live GPU potential energy reload parity | CHECK_OK | ||
| Unwrapped boundary single-interval MSD continuity | CHECK_OK |
Physical Validation & Quantitative Diagnostics
| Physical Metric / Diagnostic | Measured (ParticleDynamics) | Reference / Context | Category |
|---|---|---|---|
| Mean FENE+WCA bond length | Validation (PASS) | ||
| Gaussian coil ratio | Ideal Gaussian | Validation (PASS) | |
| Internal-distance plateau | Validation (PASS) | ||
| Stage 1 | Statistically consistent ( | Validation (PASS) | |
| Unentangled | Rouse | Validation (PASS) | |
| Entanglement-onset | Sub-Rouse onset at | Validation (PASS) | |
| Semi-flexible stiffening | Monotonically increasing, isotropic | Validation (PASS) | |
| Unentangled | KG 1990 Table II: | Diagnostic | |
| Melt | Correlation-hole deviation from FRC (Hsu & Kremer 2016) | Diagnostic | |
| Finite-size periodic box ratio ( | Diagnostic |
5. Running the Tutorial
# Quick GPU smoke verification (compact N=20/60 melts + restart audit + semi-flexible, < 60 s warm compute)
TUTORIAL_FAST=1 julia --project tutorials/T12_kremer_grest_polymers/run.jl
TUTORIAL_FAST=1 julia --project tutorials/T12_kremer_grest_polymers/analyze.jl
# Full production validation (N=20 Rouse, N=100 30,000 tau two-stage restart, k_bend=0/2/4/8)
julia --project tutorials/T12_kremer_grest_polymers/run.jl
julia --project tutorials/T12_kremer_grest_polymers/analyze.jl
# Regenerate 300-DPI documentation figures
python3 tutorials/T12_kremer_grest_polymers/plot.pyReferences
K. Kremer & G. S. Grest, "Dynamics of entangled linear polymer melts: A molecular-dynamics simulation," J. Chem. Phys. 92, 5057–5086 (1990).
R. Auhl, R. Everaers, G. S. Grest, K. Kremer & S. J. Plimpton, "Equilibration of long chain polymer melts in computer simulations," J. Chem. Phys. 119, 12718–12728 (2003).
R. Everaers, S. K. Sukumaran, G. S. Grest, C. Svaneborg, A. Sivasubramanian & K. Kremer, "Rheology and microscopic topology of entangled polymeric liquids," Science 303, 823–826 (2004).
S. K. Sukumaran, G. S. Grest, K. Kremer & R. Everaers, "Identifying the primitive path mesh in entangled polymer liquids," J. Polym. Sci. B: Polym. Phys. 43, 917–933 (2005).
R. S. Hoy, K. Foteinopoulou & M. Kröger, "Topological analysis of polymeric melts: Chain-length effects and fast-converging estimators for entanglement length," Phys. Rev. E 80, 031803 (2009).
M. Pütz, K. Kremer & G. S. Grest, "What is the entanglement length in a polymer melt?" Europhys. Lett. 49, 735–741 (2000).
M. Doi & S. F. Edwards, The Theory of Polymer Dynamics, Oxford University Press (1986).
H.-P. Hsu & K. Kremer, "Static and dynamic properties of large polymer melts in equilibrium," J. Chem. Phys. 144, 154907 (2016).