Computational Physics

(Rick Simeone) #1

324 The Monte Carlo method


of their ‘parent’. This causes the total weight of this conformation in the population
to be constant. Suppose we have an upper limit (called ‘UpLim’) of the weight
above which polymers are enriched. The recursive code would then contain the
following lines:


IF (PolWeight>UpLim) THEN
NewWeight = 0.5*PolWeight;
AddBead(Polymer, NewWeight, L+1);
NewWeight = 0.5*PolWeight;
AddBead(Polymer, NewWeight, L+1);
END IF

This does precisely what we want. Note the copy we have made of PolWeight
into NewWeight. This is necessary when the call to AddBead would change its
PolWeight variable on exit; this depends on the type of call and on the possibilities
offered by the computer language.
Next we consider pruning. This means we must remove weak members from
the population, but we are not allowed to change the distribution. This is realised
by removing weak polymers with probability 1/2, and multiplying the weight of
those that happen not to be removed by a factor of 2. The criterion for removal
is determined by a lowest weight LowLim. This is done in the following piece of
code:


IF (PolWeight<LowLim) THEN
Choose random number R uniformly between 0 and 1;
IF (R<0.5) THEN
NewWeight = 2*PolWeight;
AddBead(Polymer, NewWeight, L+1);
END IF;
END IF

The choice of UpLim and LowLim determine whether the population will grow,
shrink or remain stationary. The right choice depends on the average weight
‘AvWeight’ at stepLof the procedure. This average is updated for every new
polymer reaching this length. UpLim and LowLim are then taken as multiples of
the ratio of this average weight and the weight ‘Weight3’ at the shortest length (3
beads):


UpLim=α∗AvWeight/Weight3. (10.53)

and similar for LowLim. A good value forαfor UpLim is 2, and for LowLim we
take 1.2. The values ofαmay depend on the levelL. It is possible to remove this
dependence by multiplying the polymer weight by a constant at each addition step.

Free download pdf