Rubber band dynamics I: Random walk

(Sethna, “Entropy, Order Parameters, and Complexity”, ex. XXX)
© 2024, James P. Sethna, all rights reserved.

Exercise 5.12 introduced an entropic model for a rubber band -  𝑁 segments of length  d pointing forward and backward at random. Here we shall consider the fluctuations of this entropic rubber band, as the individual segments flip back and forth. We shall also examine how it evolves when its endpoint is pulled by an external parabolic potential.

How does the length evolve in time, in the absence of a force from the parabolic potential? Consider flipping one of the segments at random. If we choose one of the  𝑛+ segments pointing forward, flipping it will decrease the length  𝐿 by  2𝑑. Conversely, flipping one of the  𝑛− = 𝑁−𝑛+ segments will increase the length. For convenience, let us set  𝑑=1 for the simulation. We also measure time in sweeps (attempting to flip each segment once), so  Δ𝑡=1/𝑁 each time a step in our random walk is taken.

(a) What are  𝑛+ and  𝑛− in terms of  𝐿 and  𝑁? Write a routine flip(L,N) that, with probability  𝑛+/𝑁 returns  𝐿−2, and with probability  𝑛−/𝑁 returns  𝐿+2. Assume our chain starts out with its endpoint at the origin,  𝐿=0. Plot the evolution of the length with time, for a chain length  𝑁=100 and for  10,000 steps (to time  𝑡=100). Does the random walk drift away at long times?

Your answer here (or in a separate writeup).

flip[L_,N_] := If[Random[]<..., L+2., ...]

n = 100;
tmax = 100;
steps = n tmax;
trajL = NestList[flip[#,n]&, 0, steps];
trajectory = Table[{step/n,trajL[[...]]},{step,1.,...}];
ListPlot[..., Joined->True, PlotRange->All]

In Exercise 5.12, we calculated the spring constant  𝐾 for the entropic chain. Examine your solution (or the answer key) for that exercise. At a temperature  𝑇, our rubber band should mostly explore only configurations where the free energy  (1/2)𝐾 𝐿^2 is not much larger than  𝑇.

(b) Use equipartition and $K$ from Exercise 5.12 to derive a formula for the average mean square ⟨𝐿^2⟩ expected for a chain of length  𝑁. Compare this with that of your simulated random walk. (Hint: Your answer should not depend on the temperature!  And the equipartition answer should agree with the length of a random walk with stepsize ±1.)

Your answer here (or in a separate writeup).

Print["Mean square is ", Mean[...], " compared to analytical answer = ", ...]

Rubber band stretched by weight on a hill. We place the endpoint of the spring (disk at 𝐿) in a parabolic potential−(1/2)𝛼 𝐿^2,as suggested by this schematic diagram.

We could now add an external constant force  𝐹, and see the spring stretch numerically, as we studied theoretically in Exercises 5.12, 6,16, and 6.17. Instead, let us consider adding a repulsive external quadratic potential  𝐸(𝐿)=−(1/2) 𝛼𝐿^2 to the endpoint. (This will be motivated later as the interaction between spins in an infinite-range Ising model.) For simplicity, we shall measure energies in units of  𝑘𝐵 𝑇, or equivalently we set  𝑘𝐵 𝑇 = 1.

Now, when we flip a segment, we increase or decrease the energy from  𝐸(𝐿) to  𝐸(𝐿±2). It is natural to do this by equilibrating the two orientations of the segment, the ‘heat bath’ algorithm. (As it happens, our method in part (a) implements the ‘Metropolis’ algorithm.) Let us focus first on equilibrating a rightward-pointing segment. We want the segment directions after the step to have relative probabilities given by the Boltzmann distribution, which depends on  𝐸(𝐿)−𝐸(𝐿−2).

(c) What is the partition function  𝑍 for the two states of an initially rightward-pointing segment? What is the probability that it will shift to point left?

Your answer here.

Our rubber band only has even lengths. Let  𝐿 be an even integer, and  𝑃+(𝐿) be the probability that a chain of length  𝐿 will flip one of its leftward-pointing segments to make it shift to a length  𝐿+2. Similarly, let  𝑃−(𝐿) be the probability per flip that  𝐿 will shift to  𝐿−2.

(d) If a random segment is chosen, what is the net probability that a rightward-pointing segment is chosen to equilibrate? Show that
        𝑃+(𝐿)=(𝑁−𝐿)/(2𝑁) (1/(1+exp(𝐸(𝐿+2)−𝐸(𝐿)))
        𝑃-(𝐿)=(𝑁+𝐿)/(2𝑁) (1/(1+exp(𝐸(𝐿-2)−𝐸(𝐿)))
Show that, for no external force, the heat bath time step does nothing half the time. (The Metropolis algorithm of part (a) is more efficient, but less physical.)

Your answer here.

(e) Adapt your routine to flip(L,N, 𝛼), that with probability  𝑃+(𝐿) returns  𝐿+2, with probability  𝑃−(𝐿) returns  𝐿−2, and otherwise returns  𝐿. Check it by running with  𝛼=0. Explore different values of  𝛼. At what value  𝛼𝑐 does the external repulsion balance the entropic spring force? Does the behavior change qualitatively as you go above  𝛼𝑐?

energy[L_,α_] := -...
(* Flips of down spins to up, from length L to L+2. The rate of flipping from L to right is Pplus[L] *)
Pplus[L_,N_,α_] := ... (1/(1+Exp[energy[...]-energy[...]]))
(* Flips of up spins to down, from length L to L-2 *)
Pminus[L_,N_,α_] := ...
HeatBathFlip[L_,N_,α_] := Block[{r = Random[]},If[r<Pplus[L,N,α], ..., If[r<Pplus[...]+Pminus[...], ..., ...]]]

n = 100;
α = 0.;
tMax = 100;
steps = n tMax;
trajL = NestList[...];
trajectory = ...
ListPlot[...]

n = 100;
α = ...;
tMax = 100;
...
...

Your answer here (or in a separate writeup).