322 The Monte Carlo method
Calculating the actual probability for a particular configuration to occur, we find
P=
∏N
l= 3
wj(l)
W(l)
. (10.51)
We see that we are off by a factor
∏
lW
(l), so we must correct for this by storing
this number into aweight factorfor calculating properties of the polymers in the
generating ensemble. The weighting factor thus compensates for the fact that the
actual probability of occurrence does not match(10.50). The method described here
is known as ‘method A’. If we were to take allθangles with an equal probability
of 1/Nθ, whereNθis the number of angles (six in our example), then we should
take for the weights of each polymer
∏N
l= 1 w
(l)
j (check this!). This is known as
‘method B’.
An interesting quantity to look at is the end-to-end distance as a function of the
number of beadsN. In fact, the Rosenbluth algorithm is extremely useful for this
case as it generates polymer populations foralllengths up to the maximum set
in the simulation. We have seen that the polymer corresponds to a self-avoiding
random walk in two dimensions. It turns out that the end-to-end length scales with
Nas
R∝Nν, (10.52)
whereνis an exponent which is 0.75 in two dimensions. The crosses with error
bars in Figure 10.3 show the scaling behaviour as determined in the Rosenbluth
algorithm. For this figure, 10 000 polymers were grown up to a size of 250 beads.
We see that the simulation reproduces the scaling behaviour well for small sizes, but
when the sizes exceed 100, the errors become rather large. This seems surprising
as the population sizes are equal for all polymer lengths, and the statistics for long
polymers should only become better (unless the fluctuations inRincrease with
polymer length). The reason behind these fluctuations is the fact that the algorithm
generally does not suppress high-energy configurations sufficiently; they will be
accepted, but with a low weight. This effect becomes more pronounced for long
chains – therefore we have a large population with only a few polymers dominating
the average, and most members of the population not contributing to better statistics.
A solution to this problem is offered in the ‘pruned–enriched Rosenbluth method’
(PERM) by Grassberger [42], in which the population evolves towards a more
balanced distribution by removing the ‘bad’ configurations from it and replacing
them with copies of the good ones which can then further evolve independently
in the simulation. Before going into details, we consider the standard Rosenbluth
algorithm formulated in a recursive implementation:
Set PolWeight to 1;
ROUTINE AddBead(Polymer, PolWeight, L)