332 The Monte Carlo method
Taking the derivative ofS =kBlnwith respect to energy then leads to the
following expression for the temperature:
1
kB
1
T
=
1
kB
∂S
∂E
=
3 N− 5
2
∫
(E−V)(^3 N−^7 )/^2 d^3 NR
∫
(E−V)(^3 N−^5 )/^2 d^3 NR
=
3 N− 5
2
〈
1
E−V
〉
=
3 N− 5
2
〈
1
K
〉
. (10.71)
The difference between this expression for the temperature and that obtained
from the equipartition theorem is of the order of 1/N, so it is not obvious why
people bother about subtracting the 3 from the total number of degrees of freedom
when the adopted convention still differs by an order of 1/Nfrom the correct value.
However, the good reason for sticking to this convention is that it is adopted in most
of the MD codes.
We now consider the question how properties obtained in, say, the canonical
ensemble, compare with those obtained in the microcanonical ensemble. When
we calculate the expectation value of some physical property in one ensemble
for particular values of the system parameters, we can measure the expectation
values of the variables conjugate to the system parameters and then evaluate the
expectation value of the property at hand in any other ensemble. As we have already
noted in the beginning of this section, the differences between values obtained in
different ensembles will be of the order of 1/N. To be specific, we may perform
a molecular dynamics simulation in the microcanonical ensemble at some energy
E∗and calculate some configurational average. If on the other hand we calculate
the same configurational average in a canonical Monte Carlo simulation, we should
find differences of order 1/N. We shall now show that it is possible to calculate this
difference analytically if the quantity under consideration is the total energy.
The expectation value of the total energy in the canonical ensemble is
〈E〉=
∑
iEie
−βEi
∑
ie−βEi
. (10.72)
The sum can be rewritten when we collect terms with the same energy. According
to the definition of entropy we have exp[S(E)/kB]states at energyE:
〈E〉=
∫
Ee−βE+S(E)/kBdE
∫
e−βE+S(E)/kBdE
. (10.73)
We can approximate the termρ(E)=exp[−βE+S(E)/kB]as follows:
ρ(E)≈exp
[
−βE∗+S(E∗)/kB+
E^2
2 kB
∂^2 S(E∗)
∂E^2
+E
∂S(E∗)
∂E
+
E^3
6 kB