Adaptive kinetic Monte Carlo

The adaptive kinetic Monte Carlo (aKMC) method is a method to coarse grain molecular dynamics for rare event systems as described in Henkelman and Jónsson [AK_HJonsson01], Xu and Henkelman [AK_XH08]. A rare event system is one in which the interesting dynamics is governed by short transitions between stable states. The fast vibrational motion within a stable state is considered to be in equilibrium and described statisitcally. A transition between states is treated as first order, since it is a rare event, and the rate of the transition is calculated from the harmonic approximation to transition state theory (hTST).

The hTST approximation of a transition rate is calculated from the energy difference between the saddle point along the minimum energy path for the transition and the initial minimum. The vibrational modes at these points are also used to calculate the prefactor. An hTST rate is of the standard Arrhenius form \(R = v \exp (-\Delta E/kT)\) where \(v\) is the product of all positive modes at the minimum divided by those at the saddle, \(\Delta E\) is the energy barrier, and \(kT\) is the thermal enregy.

To propagate the dynamics within aKMC, a list of all possible rates leading away from the current stable state to any other state is required. Formally, there are an enourmously large number of such transitions (also called processes) available in a typical atomic system, but in fact only the transitions with the fastest rates with the highest probability of happening are required. The search for processes is then limited to those with rates on the same order as the fastest processes found.

The search for possible processes is the primary task of the aKMC simulations. Each client does a minimum mode (minmode) following search from the miminum of the current state and searches for a saddle point which connects from the minimum in the current state to an adjacent state [AK_HJonsson99]. A saddle point is connected to a state if a minimization initiated along the negative mode at the saddle converges to the minimum of that state.

Each client is tasked with one or more such searches. It climbs from the minimum to a saddle, and if successful, it minimizes on either side of the saddle to determine the connecting states. The prefactor for the transition is also calculated by finite difference and the hTST rate is calculated. These data are reported back to the server. A search result is appended as one line, then flushed and synced. A final line with no newline or too few fields is dropped, and the next append cuts that tail off first. A write that stops partway leaves the previous log.

Adaptive (a), or off-lattice KMC [AK_TMBelandH20] works in continuous configuration space. The method builds a rate table from local atomic movements and energy barriers, so atoms can sit off a grid. The confidence scheme and thermal accessibility settings restrict accepted transitions to those that meet the documented thresholds.

The server is reponsible for the time evolution of the system by the KMC algorithm. Each process leading to a new state is tabulated in a rate table and one transition is selected stochastically with a probability proportional to its rate. The transition time is drawn from a first-order distribution for the total rate of escape from the state. A draw that sits a few ulps past the running sum of normalized rates takes the last process, and the step is kept. A draw well past that sum matches no row: the step count does not advance, and the state and the simulation time stay as they were. An empty table, or a table whose rates sum to zero, is the same kind of mismatch.

Adding a process appends one line to the process table, then flushes and syncs it. A final line with no newline or the wrong number of fields is dropped, and the next append cuts that tail off first. A write that stops partway leaves the previous table.

A new state is recorded by appending one line to state_table, then flushing and syncing it. A final line with no newline or the wrong number of fields is dropped, and the next append cuts that tail off first. A write that stops partway leaves the previous table.

A complete tutorial is also provided.

State list

Visited minima live under states/, and states/state_table holds one energy per state. A new run creates the directory and an empty table together. A run that stopped after the directory was created, and before the table existed, resumes: the table is created with an exclusive open when it is absent. A table that is already there is not truncated.

Prepared imbalance

A two-state channel relaxes a prepared population imbalance as \(\exp(-t/\tau)\) with \(\tau = 1/(k_f + k_b)\). Both rates are the harmonic transition-state rates the process table already stores. A saddle that returns to the same basin has no population mode. Its mean return time is \(1/k\). A cluster has no box length, so this time is not converted to a conductivity. The dynamics job keeps its one bath.

Configuration

Start the aKMC server with python -m eon.server. The server accepts [Main] job = akmc. The client has no akmc job, so that token does not run there.

[Main]
job = akmc

[AKMC]
confidence_scheme = old

eon/config.yaml names this section [AKMC]. The server lowercases a heading only to test whether the section is known. That test accepts [akmc]. The server reads [AKMC]. A section whose name differs from a known one only by case, such as [akmc], is rejected when the configuration is read. On the server, confidence_scheme defaults to old. The schema class below defaults confidence_scheme to new. confidence_scheme = amsel takes the score from the amsel package, and [amsel] state_confidence selects it. See the coarse-graining page.

pydantic model eon.schema.AKMCConfig[source]
Fields:
  • confidence (float)

  • server_side_process_search (bool)

  • thermally_accessible_window (float)

  • thermally_accessible_buffer (float)

  • max_kmc_steps (int)

  • confidence_scheme (Literal['old', 'new', 'sampling', 'dynamics', 'amsel'])

  • confidence_correction (bool)

  • max_rate (float)

  • eq_rate (float)

field confidence: float = 0.99

The confidence (out of 1.0) criterion for moving to the next state.

If true, the server does not send out “process_search” jobs. Instead, it manages individual dimer, minimization, and Hessian calculations. This option is usually used when a single “process_search” job will take a long time (hours or longer).

field thermally_accessible_window: float = 20.0

Processes with barriers within this number of kT above the lowest barrier will be used in the rate table and for confidence calculations.

field thermally_accessible_buffer: float = 0.0

Processes with barriers of thermally_accessible_window + thermally_accessible_buffer will be stored, in the event that they are thermally accessible later, but are not used in the rate table or for the confidence calculations. Processes with barriers higher than the sum of these two values will be discarded.

field max_kmc_steps: int = 0

The maximum number of KMC transitions in a row. In MPI or continuous mode, eOn will exit after performing this many KMC steps. If this is set to 0, eOn will run forever.

field confidence_scheme: Literal['old', 'new', 'sampling', 'dynamics', 'amsel'] = 'new'

Options: - old: Traditional confidence scheme based on the number of unique processes (\(Nf\)) and the number of searches (\(Ns\)). - new: Enhanced confidence scheme using a mathematical function to account for the ratio of \(Nf\) to \(Ns\). - sampling: Confidence based on sampling probabilities derived from the repeat counts of processes. - dynamics: Confidence derived from molecular dynamics, considering time extrapolation and rates at different temperatures. - amsel: The score eon.schema.AmselConfig.state_confidence names, from the amsel package.

The scheme used for confidence calculation.

field confidence_correction: bool = False

If true, applies a correction to the confidence calculation.

field max_rate: float = 0.0

Sets the maximum allowable rate for a process. If a calculated rate exceeds this value, it is capped to prevent exceedingly high rates from dominating the simulation. This helps in maintaining numerical stability and realistic dynamics in the simulation.

field eq_rate: float = 0.0

Sets the equilibrium rate. If the forward and reverse rates exceed this value, they are adjusted to maintain equilibrium conditions. This prevents exceedingly high rates from dominating the simulation and ensures that both forward and reverse processes are considered symmetrically.

References

[AK_HJonsson99]

Graeme Henkelman and Hannes Jónsson. A dimer method for finding saddle points on high dimensional potential surfaces using only first derivatives. The Journal of Chemical Physics, 111(15):7010–7022, October 1999. doi:10.1063/1.480097.

[AK_HJonsson01]

Graeme Henkelman and Hannes Jónsson. Long time scale kinetic Monte Carlo simulations without lattice approximation and predefined event table. The Journal of Chemical Physics, 115(21):9657–9666, November 2001. doi:10.1063/1.1415500.

[AK_TMBelandH20]

Mickaël Trochet, Normand Mousseau, Laurent Karim Béland, and Graeme Henkelman. Off-Lattice Kinetic Monte Carlo Methods. In Wanda Andreoni and Sidney Yip, editors, Handbook of Materials Modeling: Methods: Theory and Modeling, pages 715–743. Springer International Publishing, Cham, 2020. doi:10.1007/978-3-319-44677-6_29.

[AK_XH08]

Lijun Xu and Graeme Henkelman. Adaptive kinetic Monte Carlo for first-principles accelerated dynamics. The Journal of Chemical Physics, 129(11):114104, September 2008. doi:10.1063/1.2976010.