5 Basics of Molecular Modeling and Molecular Simulation
221
Thus, we can conduct the importance sampling to a certain integral. This is of
much significance in the MC method, which in its essence performs the importance sampling for the Boltzmann distribution. Instead of choosing configurations
randomly then weighting them with exp(−E/kT ), configurations are chosen with a
probability exp(−E/kT ) and then weighted evenly. The most popular implementation of the MC method is the Metropolis algorithm, which will be illustrated in the
next segment.
5.5.3 Metropolis Algorithm
In most cases, we are not interested in the absolute value of the configuration part of
the partition function, but the averages of some observables in the form of
A =
exp
−βU
r
N
A
r
N
d r
N
exp
−βU
r N
d r N
(5.5.8)
That is to say, the main focus is to figure out the ratio of two integrals. It is possible
to calculate such as ratio through the Metropolis algorithm [7]. The configuration
part of the partition function is
Q ≡
exp
−βU
r
N
d r
N
(5.5.9)
We can denote the probability density by defining
N Q (r
N
) ≡
exp
−βU
r
N
Q
(5.5.10)
To do the sampling, we can assume that we have L total sampling points generated
randomly in the configurational space according to the probability density N Q (r
N
),
and among them there are n i points generated around a point r
N . Thus we have
A ≈
1
L
L
i=1
n i A(r
N
i )
(5.5.11)
The problem now becomes how to generate such sampling points in the configurational space with the probability distribution of the Boltzmann distribution. To
do this, we can firstly prepare the system in the configuration {r
N
}, denoted by o,
having a Boltzmann factor exp[−βU (o)]. Then we can add some small displacement
to the original configuration and generate the trail configuration {r
N
}, denoted by n,
following exp[−βU (n)]. Whether to accept this trail configuration or not is the key
where Metropolis scheme can be applied, which will be demonstrated as follows.
221
Thus, we can conduct the importance sampling to a certain integral. This is of
much significance in the MC method, which in its essence performs the importance sampling for the Boltzmann distribution. Instead of choosing configurations
randomly then weighting them with exp(−E/kT ), configurations are chosen with a
probability exp(−E/kT ) and then weighted evenly. The most popular implementation of the MC method is the Metropolis algorithm, which will be illustrated in the
next segment.
5.5.3 Metropolis Algorithm
In most cases, we are not interested in the absolute value of the configuration part of
the partition function, but the averages of some observables in the form of
A =
exp
−βU
r
N
A
r
N
d r
N
exp
−βU
r N
d r N
(5.5.8)
That is to say, the main focus is to figure out the ratio of two integrals. It is possible
to calculate such as ratio through the Metropolis algorithm [7]. The configuration
part of the partition function is
Q ≡
exp
−βU
r
N
d r
N
(5.5.9)
We can denote the probability density by defining
N Q (r
N
) ≡
exp
−βU
r
N
Q
(5.5.10)
To do the sampling, we can assume that we have L total sampling points generated
randomly in the configurational space according to the probability density N Q (r
N
),
and among them there are n i points generated around a point r
N . Thus we have
A ≈
1
L
L
i=1
n i A(r
N
i )
(5.5.11)
The problem now becomes how to generate such sampling points in the configurational space with the probability distribution of the Boltzmann distribution. To
do this, we can firstly prepare the system in the configuration {r
N
}, denoted by o,
having a Boltzmann factor exp[−βU (o)]. Then we can add some small displacement
to the original configuration and generate the trail configuration {r
N
}, denoted by n,
following exp[−βU (n)]. Whether to accept this trail configuration or not is the key
where Metropolis scheme can be applied, which will be demonstrated as follows.
