• No se han encontrado resultados

Rather than calculating trajectories, Monte Carlo methods sample an ensemble directly, with the number of times an area of phase space visited in proportion to its probability in the underlying ensemble. This is done as a stochastic (hence Monte Carlo) process, with a Markov chain of configurations, with each link generated by a perturbation of the preceding configuration.

2.5.1 Move Selection Criteria in the canonical ensemble

Monte Carlo schemes are most straightforward in the (N, V, T) ensemble — it is this ensemble for which the earliest and still most common techniques were developed [Metropolis et al., 1953]. In this section I provide an overview.

A Markov chain is defined by the transition probabilities between each state. In the continuous case these can be specified by a probability density function. A suitable choice of probability density function for the transitions ensures the exis- tence of a stationary probability density function for the states — a single function describing how likely the chain is to be in a region of phase space at an arbitrary point along the chain. A sufficient condition for the existence of such a stationary probability density functionπ is detailed balance. If, for any two states ri,rj, with transition probabilities pM(i→ j), pM(j → i), detailed balance holds if a valid π can be constructed such that:

πi∗pM(i→j) =πj∗pM(j→i) (2.26) The goal is to ensure that the stationary probability density corresponds to the probability density function of the (N, V, T) ensemble. Neglecting the contribution

of the momenta, that density function is given by: f(ri) =

exp(−βU(ri))

Q(N, V, T) (2.27)

By dividing the transition probability into the product ofpG(i→j), the probability of generating the move from ri to rj, and pA(i → j), the probability of accepting the move then becomes:

exp(−βU(ri))

Q(N, V, T) ∗(pG(i→j)pA(i→j)) =

exp(−βU(rj))

Q(N, V, T) ∗(pG(j→i)pA(j→i)) (2.28) The key insight of the Monte Carlo algorithm is that when transitioning between states it is not necessary to fully evaluate the partition function — it is only nec- essary to calculate the ratio between the probability density function of two states. Rearranging gives:

pA(i→j)

pA(j→i) =

pG(j→i)

pG(i→j)exp (−β(U(rj)−U(ri))) (2.29) This equation can be further simplified by ensuring that the move generation prob- abilities are chosen such thatpG(i→j) is equal to pG(j→ i). The only remaining task is to choose acceptance probabilities that balance the equation. While other choices are possible, the most common form is:

pA(i→j) = (

1 ifU(rj)−U(ri)<0

exp (−β(U(rj)−U(ri))) ifU(rj)−U(ri)>0

(2.30)

Thus MC simulations proceed by generating a move, evaluating the energy difference of that move, definitely accepting the move if it lowers the energy, and accepting it with finite probability if it increases the energy.

Often situations arise where the probability of accepting a move is very low as most of the moves entail a large increase in energy. Sampling can sometimes be accelerated during a MC simulation by applying a configuration bias. Rather than choosing moves so that the probability of selecting the move is the same as for the backwards move, one chooses moves such that the probability of generating the forwards and backwards move can be calculated explicitly. These quantities can then be substituted into equation 2.30, and detailed balance preserved. Such a configuration bias MC (CBMC) scheme is used in the Ion Site Monte Carlo (ISMC)

code described in chapter 6.

2.5.2 Monte Carlo Sampling in other ensembles

The same principles are followed when sampling other ensembles: the full partition function is not evaluated, as it is only necessary to calculate the ratio of the proba- bilities of two states. Unlike molecular dynamics, the grand canonical ensemble can be sampled by Monte Carlo techniques, using the additional move type of particle creation or deletion.

2.5.3 Parallel Tempering

In recent years the adaptation of molecular simulation techniques to parallel com- puter architectures has been vital to their continued development, enabling the study of ever larger systems. For MD codes this has chiefly precoded by dividing up the calculation of the forces among cores, and this can be done reasonably efficiently. In MC codes the moves inherently proceed one at a time, and the energy change resulting from a single move cannot typically be sped up significantly through par- allelisation. An alternative technique is parallel tempering (reviewed extensively by Earl and Deem [2005]). Here different processes run the same MC simulation at different temperatures. At random intervals, an additional move type of replica exchange is attempted. This entails two processes swapping the entire state of the system, with finite probability:

p= min 1,exp 1 kBTi − 1 kBTj (Ei−Ej) (2.31)

Thus if the higher temperature system has lower energy the move is always accepted, else the move is accepted with finite probability. Simulations at higher temperature will sample configurations more rapidly as more moves will be accepted, crossing en- ergy barriers which are in practice insurmountable to lower temperature simulations. By allowing periodic swaps between the low and high temperature simulations, the low temperature simulation can gain access to the other side of these barriers, accel- erating the sampling. Parallel tempering can also be employed in MD simulations through replica exchange MD (REMD) [Sugita and Okamoto, 1999]. As with the CBMC technique, parallel tempering is employed in this work in the ISMC technique described in chapter 6.

Documento similar