Monte Carlo (MC) methods refer, in a very general sense,
to any simulation of an arbitrary system
which uses a computer algorithm explicitly dependent on a series of
(pseudo)random numbers (see, for example, [32]).
The name, which derives from the famous Monaco casino,
emphasizes the importance of randomness, or chance, in the method.
MC is particularly important in statistical physics, where systems
have a large number of degrees of freedom and quantities of
interest, such as thermal averages, cannot be computed exactly.
In a system with D degrees of freedom, for example,
the thermal average of a quantity A associated
with each microstate of the system
in equilibrium at absolute temperature T is
given by
| (2.1) |
In the case of very small chains all conformations can be
enumerated and thermal averages (as well as extensive quantities
such as entropy and free energy) can be computed exactly by Eq. 2.2 [13].
For longer chains, however, as the 36mer in the cubic lattice which is
considered in this study, complete enumeration of conformational
space is impossible with present day computers.
In MC simulations this difficulty is solved by replacement of the set of
all conformations in Eq. 2.2 by a representative tractable subset
of M conformations, where M is much smaller than the total number of
conformations, N. An estimate for the thermal average,
is then obtained:
The idea of importance sampling in MC simulations
is to choose the representative set
of conformations not completely at random, but in such a way that the
selection is somehow biased towards conformations that are significantly
populated at equilibrium.
In general, if the probability that a given conformation
appears in the sample representative of conformations is
,
then Eq. 2.3 becomes:
![]() |
(2.4) |
,
then the
Boltzmann factors cancel out and the estimate for the
thermal average becomes:
Samples of representative conformations with this particularly convenient
property, where the probability
of occurrence of a given conformation is proportional to its Boltzmann factor, are
generated in the present study by the Metropolis algorithm [33].
The algorithm constructs a Markov chain of conformations, where the first
conformation,
,
is arbitrarily chosen (e.g., randomly) and
an appropriate probability function,
,
is used to construct each conformation
,
from the previous conformation
.
is the probability of a ``move'' from conformation
to conformation
.
In general, to make such a chain of conformations converge to the desired
canonical distribution it is sufficient (but not necessary) to impose
the condition of detailed balance, according to which the following
equality must hold for any arbitrary pair of conformations,
and
,
is the equilibrium
probability of conformation
The condition of detailed balance given by Eq. 2.6 implies that,
at equilibrium, the average
number of moves
is the same as the average number
of inverse moves
.
As this is true for any two
arbitrary conformations it follows that if the system in
equilibrium is submitted to moves that obey the detailed balance condition there
will be no change in the
probability of any conformation and the system will remain in equilibrium.
It can also be shown (see, for example [32]) that if the system is not
in equilibrium then the ratio between the probabilities of any two conformations
tends to increase if it is initially below its equilibrium value and to decrease
if it is initially above its equilibrium value. It follows that for sufficiently
long simulations the system will reach thermodynamic equilibrium.
It is usually convenient to restrict the possible moves from a particular
conformation only to a restricted number of ``adjacent'' conformations.
The condition of detailed balance (Eq. 2.6) requires the following
for any two conformations
and
:
The rules that determine which conformations are adjacent to any arbitrary conformation are given by the ``move set'' used in the simulation. As long as detailed balance is respected, the particular move set should have no effect on the the equilibrium canonical distribution reached after sufficiently long time but it can have drastic effects on the rate at which this equilibrium distribution is reached. An appropriate move set, where adjacent conformations are not very different from each other, also permits a dynamic interpretation of the Markov chain of conformations generated during the simulation, according to which the number of conformations generated is considered to be proportional to time. According to these considerations, therefore, thermodynamic properties of the system are independent of the particular choice of move set but kinetic properties are not.
The Metropolis algorithm is as follows.
The first conformation is randomly generated. At each point in the construction
of the chain of conformations a move is attempted to the current conformation.
The move is rejected immediately if the local chain conformation is not compatible
with the attempted move or if it violates the excluded volume condition.
If these two conditions are satisfied then the so called Metropolis criterion is applied.
If the difference between
the energy of the resulting conformation and the energy of the
current conformation,
,
is negative (i.e. the energy of
the resulting
conformation is smaller than the energy of the current conformation),
then the resulting conformation
is accepted and it becomes the new conformation in the chain.
If
is positive, however, a (pseudo)random number between 0 and 1, 0<R<1,
is generated and the resulting conformation is only accepted if
.
If
then the
resulting conformation is refused. Whenever the conformation resulting
from the attempted move is refused for any of the three possible reasons,
then the new conformation
of the chain is the same current conformation.
For sequence selection the same algorithm is used but the ``moves'' correspond
to switching the position of two monomers while the conformation is kept fixed [23].
The Metropolis criterion
can be summarized by the following expression for the probability of
acceptance of an attempted conformation:
In the present study averages estimated from long MC trajectories by Eq. 2.5 are
considered to be good estimates for the true thermodynamic average, so that
and the subscript is not used to distinguish estimates from real thermal averages.