Monte Carlo Simulations (MC)
Introduction to Monte Carlo
Methods which make use of random numbers are often called Monte Carlo Methods named after the Casino Monte Carlo in Monaco which has long been famous for games of chance. MC methods vary, bute tend to follow a particular pattern:
- Define a domain of possible inputs
- Generate inputs randomly from a probability distribution
- Perform a deterministic computation on the inputs.
- Aggregate the results.
Math Foundation of MC Methods
1. Law of Large Numbers (LLN)
Assume \(\xi_1, \xi_2, ..., \xi_n\) is a random i.i.d. variable series, with math expectation \(E(xi_i) = \mu\). Then for arbitrary \(\epsilon > 0\), there is: \begin{equation} \lim_{n \to \infty} p \lbrace |\frac{1}{n}\sum_{i=1}^{n} \xi_i-\mu| < \epsilon \rbrace = 1. \end{equation} This means when \(n\) goes large, the average of samples convert to math expectation.
2. Central Limit Theorem (CLT)
In addition to above, if the square difference \(D(\xi_i) = \sigma^2\), then for arbitrary real number \(\lambda\): \begin{equation} \lim_{n \to \infty} p \lbrace \frac{\frac{1}{n}\sum_{i=1}^n \xi_i-\mu}{\sigma / \sqrt{n}} < \lambda \rbrace = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\lambda e^{-(x^2 /2)} dx, \end{equation} which means when \(n\) goes large, the mean value of i.i.d. random variables approximately follows a normal distribution with average \(\mu\) and square difference \(\sigma^2 /n\).
MC Ebaluation of Statistical Mechanics Integrals
Ensemble average of quantity \(A(r,p)\) can be calculated for a given distribution function. For \(NVT\) ensemble we have distribution function \(\rho (r,p)\), \begin{equation} \rho (\vec r^N, \vec p^N)=\frac{1}{Z}\text{exp}(-\frac{E(\vec r^N, \vec p^N)}{k_B T}) \end{equation} \begin{equation} \langle A(\vec r^N,\vec p^N)\rangle = \int A(\vec r^N, \vec p^N) \rho (\vec r^N,\vec p^N)d\vec r^N d\vec p^N. \end{equation} Energy can always be expressed as a sum of kinetic and potential contributions. The contribution of the kinetic part is trivial and we can consider intrgral in only configuration \(3N\) dimensional space, where \(Z\) is configurational integral. \begin{equation} \langle A(\vec r^N)\rangle = \frac{1}{Z} \int A(\vec r^N)\text{exp}\left -\frac{U(\vec r^N)}{k_B T} \right d\vec r^N \end{equation} \begin{equation} Z=\int e^{-\frac{U(\vec r^N)}{k_B T}} d\vec r^N \end{equation}
Statistical-mechanics integrals typically have significant contributions only from very small fractions of the 3N space. So random sampling of the configurational space is highly inefficient.