7. Kinetic Monte Carlo Method
The method to solve large systems is called kinetic Monte Carlo, invented by Gillespie.
8. Goal of Kinetic Monte Carlo
The goal is to sample from the true probability density P(t) without explicitly computing it. This is analogous to sampling from the Boltzmann distribution in Monte Carlo Metropolis without explicitly writing down the density.
9. Approach
The approach is to trace individual trajectories of the system. At any moment, for the actual state (NA, NB, NC), we examine what may occur in a small time interval. We select the time interval so that either nothing happens or only one event does (e.g., one reaction).
10. Uranium Example
Example: Begin with a single atom. Compute the probability that it decays during a small time interval. Generate a random number to determine whether it decayed or not. If not, try again. If yes, it's lost. This forms a single possible trajectory. Repeating this many times provides different possible paths (e.g., lived 3 years and 14 minutes), which sample from the actual probability density.
11. The Gillespie Algorithm
The Gillespie algorithm calculates the:
- Time until the next event
- What that event is
12. Steps of the Gillespie Algorithm
- Calculate the rates of all conceivable events that may occur from the current state.
- Add up these rates to obtain the total rate 'a', the expected rate per second for any event to occur. In the example of uranium with 100 atoms, 'a' is 100 times as fast as the decay of one atom. The greater the number of molecules you have, the greater the overall rate 'a', and the sooner something will be predicted to occur. This overall rate 'a' must be recalculated every time an event occurs since the state (counts of molecules) has altered.
- Determine the time step (delta t, also referred to as tau) to the next event occurrence. This duration is calculated using a random number R1 (0 to 1) and the sum rate 'a' through the equation: delta t = (1/a) * log(1/R1). This equation yields a longer period if 'a' is small (less probable for an event occurrence) and shorter if 'a' is big.
- Find which particular event occurred by taking another random number R2 (between 0 and 1). Enumerate all possible events (e.g., forward reaction A+B->C, reverse reaction C->A+B) and their rates.
- The probability of a particular process (Process 1) occurring is its rate divided by the overall rate 'a'. If R2 is below this ratio of probabilities for Process 1, then Process 1 occurs. If you have more than one process, you divide up the range proportionally with regard to relative probabilities (rates/a) and determine into which range R2 belongs.
- Change the system state (the counts of molecules NA, NB, NC) based on the selected event. For instance, if the forward reaction A+B->C occurred, reduce NA and NB by one and increase NC by one.
- Repeat the process: Recalculate the total rate 'a' in terms of the new state, calculate the time to the next event, find which event occurs, change the state, and so on. This produces one trajectory or simulation run.
13. With Kinetic Monte Carlo
- One simulation run gives one sample trajectory of what may occur.
- To interpret the probability distribution P(t), one needs to perform multiple simulations (trajectories) from the initial conditions. Storing the outcome of the simulations (states at various times) permits the construction of histograms and the study of the probability distribution. These trajectories are draws from P(t).
- Kinetic Monte Carlo (the Gillespie algorithm) is relatively straightforward (a three-step process carried out by the computer) and widely applied, even in problems where the master equation might be solved analytically, as it is simpler to do.