next up previous
Next: 6.3 Molecular Dynamics Simulation Up: 6. Simulation and Statistical Previous: 6.1.2 Technical Matters


6.2 Monte Carlo Method

In a canonical average such as
\begin{displaymath}
\langle a \rangle_{NVT} = \frac{1}{Q}\,
\int a(\mbox{$\bf 1$...
...f 1$}..\mbox{$\bf N$})/kT\}\, d\mbox{$\bf 1$}..d\mbox{$\bf N$}
\end{displaymath} (6.3)

the denominator $Q \equiv \int \exp\{-E(\mbox{$\bf 1$}..\mbox{$\bf N$})/kT\}\,
d\mbox{$\bf 1$}..d\mbox{$\bf N$}
$ is usually unknown.

In the section on ``Biased Random Walks'' we learned that this is no hindrance for the calculation of averages:

Writing, for a certain $N$-particle configuration, $\mbox{$\bf\Gamma$}_{c} \equiv \left\{\mbox{$\bf 1$}..\mbox{$\bf N$} \right\}$, we generate a Markov chain of, say, $K$ configurations $\{ \mbox{$\bf\Gamma$}_{c}(k),\,k=1,\dots K\}$ such that the relative frequency of a configuration in the chain is proportional to the corresponding Boltzmann factor. An estimate for the mean value $\langle a \rangle$ is then

\begin{displaymath}
\langle a \rangle = \frac{1}{K} \sum_{k=1}^{K}a \left[ \mbox{$\bf\Gamma$}_{c}(k)
\right]
\end{displaymath}

Here is the procedure due to N. METROPOLIS:
Figure 6.2: Statistical-mechanical Monte Carlo for a model fluid with continuous potential
\fbox{
\begin{minipage}{510pt}
{\bf Metropolis Monte Carlo:}
\mbox{}\\ *[1ex]
...
...is symmetrical about $0$,
such as a Gauss distribution, will do.
\end{minipage}}


In the case of hard disks or spheres the 3rd step in the above recipe must be modified. Values of $E(k)$ and $E'$ are then restricted to $0$ or $\infty$, with Boltzmann factors $1$ or $0$, respectively. Here is the modified part of the MC procedure:

Figure 6.3: Monte Carlo for hard spheres
\fbox{\begin{minipage}{510pt}
Let $\mbox{$\bf \Gamma$}_{c}(k) \equiv \left\{ \m...
...$\bf \Gamma$}_{c}(k+1)=\mbox{$\bf \Gamma$}_{c}'\;$.
\end{itemize}\end{minipage}}


Yet another modification is needed for spin systems:

Figure 6.4: Monte Carlo simulation on an Ising lattice
\fbox{ \begin{minipage}{510pt}
Let $\mbox{$\bf \Gamma$}_{c}(k)\equiv \left\{ \s...
...a_{i}$\ unchanged:
$\sigma_{i}(k+1)=\sigma_{i}(k)$.
\end{itemize}\end{minipage}}


PROJECT MC (FLUID): Write a subroutine MCSTEP which performs the basic Monte Carlo step as described in Fig. 6.2: selecting at random one of the LJ particles that were placed on a lattice by STARTCONFIG, displace it slightly and apply the PBC; then compute the new potential energy (using NIC!) and check whether the modified configuration is accepted or not, given a specific temperature $T^{*}$; if accepted, the next configuration is the modified one, otherwise the old configuration is retained for another step.

Write a main routine to combine the subroutines STARTCONF, ENERGY, and MCSTEP into a working MC program.


PROJECT MC (LATTICE): Let $N=n.n$ spins $\sigma_{i}= \pm 1; \; i=1, \dots N$ be situated on the vertices of a two-dimensional square lattice. The interaction energy is defined by

\begin{displaymath}
E = \sum_{i} E_{i} = -\frac{1}{2} \sum_{i=1}^{N} \sum_{j=1}^{4} \sigma_{i}
\sigma_{j}
\end{displaymath}

where the sum over $j\/$ involves the 4 nearest neighbors of spin $i$. Periodic boundary conditions are assumed

next up previous
Next: 6.3 Molecular Dynamics Simulation Up: 6. Simulation and Statistical Previous: 6.1.2 Technical Matters
Franz J. Vesely Oct 2005
See also:
"Computational Physics - An Introduction," Kluwer-Plenum 2001