Coarse graining¶
In aKMC simulations where there are vastly different rates, the simulation can
get stuck in a group of states connected by relatively fast rates. Exploring
slower transitions can take a prohibitively large number of KMC steps.
eOn implements two methods that skip those fast recrossings.
Note
AS-KMC and MCAMC cannot be used simultaneously.
Monte Carlo with Absorbing Markov Chains (MCAMC)¶
The first method, projective dynamics, described in Novotny [CG_Nov01], groups states that are joined by fast rates into “superbasins”. Information about transitions between states in a superbasin is lost, but the rates for transitions across a superbasin are correct.
Accelerated Superbasin Kinetic Monte Carlo (AS-KMC)¶
The second method, accelerated superbasin kinetic Monte Carlo (AS-KMC) of Voter [CG_Vot97], artificially raises low barriers. The dynamics between states connected by fast rates are simulated, but an error is introduced in the dynamics direction and time.
The basic process of AS-KMC involves gradually raising process barriers found to be inside of a superbasin such that exiting from the basin gradually becomes more likely. The method is designed to raise all the barriers in the superbasin simultaneously. Once a particular barrier has been crossed a certain number of times, \(N_f\) (more on determining \(N_f\) shortly), a check is performed to determine whether or not the current state is part of a superbasin. This is called the Superbasin Criterion.
In the Superbasin Criterion, a search is performed, originating at the current state and proceeding outward through all low-barrier processes to adjacent states, and then through all low-barrier processes from each of these states, etc. For each low-barrier process found, if the process has been followed fewer than \(N_f\) times, the Superbasin Criterion fails and no barriers are raised.
Thus, in the outward-expanding search from the originating state, the search continues until either a low-barrier process has been seen fewer than \(N_f\) times (and the Criterion fails) or until all connected low-barrier processes have been found and have been crossed at least \(N_f\) times (the edges of the superbasin are then defined and the Criterion passes). If the Superbasin Criterion passes, all the low-barrier processes (each of which as been crossed \(N_f\) times) are raised.
Several parameters dictate the functioning of the AS-KMC method. These
parameters dictate how much the barriers are raised each time the Superbasin
Criterion
passes(eon.schema.CoarseGrainingConfig.askmc_barrier_raise_param), what
defines a “low-barrier” for use in the Superbasin
Criterion(eon.schema.CoarseGrainingConfig.askmc_high_barrier_def), and
the approximate amount of error the user might expect in eventual superbasin
exit direction and time compared to normal KMC simulation
(eon.schema.CoarseGrainingConfig.askmc_confidence).
amsel discover_decide¶
[amsel] discover_decide = true runs on the current state’s process table.
The state list can hold one state. use_mcamc stays off.
use_mcamc is not required. The repeat-count
confidence scheme does not hold this step. A run that leaves
discover_decide off still waits for confidence under
confidence_scheme.
A barrier strictly below e_min_init counts as an in-basin edge. A barrier
at or above e_min_init counts as an exit. On Si6N8 isomer 1 the back
barrier is 0.20 eV and the flip-out barrier is 0.30 eV. With e_min_init
at 0.25 eV the 0.20 eV edge stays in the basin and the 0.30 eV edge leaves.
A table that has only the 0.30 eV saddle, and no faster edge, still leaves.
The transient set is that state. The product is absorbing. A product column
of -1 is that same exit: the label sent to amsel is a 32-bit id at or above
2147483648, and the hop creates the product state from the process id.
The basin comes from amsel.discover_decide_status when a faster edge is
present. The exit time and the exit channel come from the mean-rate method
(MRM) or from first-passage-time analysis (FPTA). debug_use_mean_time
selects MRM. The mean exit time is the MRM value tau_total. Otherwise,
FPTA draws one first-passage time. Both kernels live in the amsel
package. With that package absent, the log line reads
amsel discover_decide status=unavailable and no step is taken until the
confidence threshold is met. Once that threshold is met, the step is
ordinary kinetic Monte Carlo.
[amsel]
discover_decide = true
e_min_init = 0.25
e_min_step = 0.05
e_min_floor = 0.05
cv_threshold = 10.0
on_error = fallback_single
One status list:
unavailable,availableoff:amseldid not import, oron_errorisunavailable_mcamcafter a failed callfallback_single,availableon: the call failed andon_errorisfallback_single; the step stays ordinary kinetic Monte Carloacceptedorretightened: one basin, and the exit comes from MRM or FPTAsplit_required: the exit is the primary basin that contains the entry staterejected_no_metastable_basin: no basin, and the step stays ordinary kinetic Monte Carlo
unavailable together with available on sits outside this list.
- pydantic model eon.schema.AmselConfig[source]¶
[amsel]keys. Field names and defaults matcheon/config.yaml.- Fields:
discover_decide (bool)e_min_init (float)e_min_step (float)e_min_floor (float)cv_threshold (float)on_error (Literal['fallback_single', 'unavailable_mcamc', 'raise'])
- field discover_decide: bool = False¶
Independent of
eon.schema.CoarseGrainingConfig.use_mcamc. The repeat-count confidence scheme does not hold this step. A barrier strictly belowe_min_initis an in-basin edge. A barrier at or abovee_min_initis an exit. A table with no faster edge still leaves: the transient set is the entry state. The exit time and the exit channel come from the mean-rate method (MRM) or from first-passage-time analysis (FPTA). Those kernels are theamselpackage. When that package is absent the log line isamsel discover_decide status=unavailableand no step is taken until the confidence threshold is met. A product column of -1 is still an exit: the absorbing label is a 32-bit id, and the hop creates the product state from the process id.Call amsel discover_decide on the current state’s process table at each KMC step, without waiting for the repeat-count confidence.
- field e_min_init: float = 0.5¶
Initial transition-state cutoff in eV. A barrier strictly below this cutoff stays inside the basin.
- field e_min_step: float = 0.05¶
Step, in eV, by which discover_decide lowers the cutoff when it retightens the basin.
- field e_min_floor: float = 0.05¶
Lowest transition-state cutoff, in eV, that discover_decide will use.
- field on_error: Literal['fallback_single', 'unavailable_mcamc', 'raise'] = 'fallback_single'¶
fallback_singlereturns statusfallback_singlewithavailabletrue, and the step is ordinary KMC.unavailable_mcamcreturns statusunavailablewithavailablefalse.raisere-raises the exception.unavailablewithavailabletrue is not a status this model names.Result of a failed amsel call.
With use_mcamc on as well, an accepted basin still leaves through MRM or
FPTA. A rejected basin falls through to the MCAMC superbasin step.
split_required on that MCAMC object keeps the entry state and writes the
reduced member list.
Configuration¶
[Coarse Graining]
- pydantic model eon.schema.CoarseGrainingConfig[source]¶
- Fields:
use_mcamc (bool)state_file (str)superbasin_scheme (Literal['energy_level', 'transition_counting', 'rate'])max_size (int)number_of_transitions (int)energy_increment (float)rate_threshold (float)superbasin_confidence (bool)use_askmc (bool)askmc_confidence (float)askmc_barrier_raise_param (float)askmc_high_barrier_def (float)askmc_barrier_test_on (bool)askmc_connections_test_on (bool | None)
- field use_mcamc: bool = False¶
Mutually exclusive with
eon.schema.CoarseGrainingConfig.use_askmc.This option determines whether the Monte Carlo with Absorbing Markov Chains (MCAMC) coarse graining method will be used.
- field state_file: str = 'superbasin'¶
File name for the state-specific data stored within each of the state directories.
- field superbasin_scheme: Literal['energy_level', 'transition_counting', 'rate'] = 'transition_counting'¶
- Options:
transition_counting: Counts the number of times that the simulation has transitioned between a given pair of states. After a critical number of transitions have occurred, the pair of states are merged to form a superbasin.energy_level: States are merged based on energy levels filling up existing basins.rate: States are merged based only on rate criteria.
MCAMC provides a method for calculating transition rates across superbasins. An additional method is needed in order to decide when to combine states into a superbasin.
- field max_size: int = 0¶
The maximal number of states that will be merged together. If 0, there is no limit.
- field number_of_transitions: int = 5¶
Only used if
eon.schema.CoarseGrainingConfig.superbasin_schemeistransition_counting.This is the number of transitions that must occur between two states before they are merged into a superbasin.
- field energy_increment: float = 0.01¶
Only used if
eon.schema.CoarseGrainingConfig.superbasin_schemeisenergy_level.The first time each state is visited, it is assigned an energy level first equal to the energy of the minimum. Every time the state is visited again by the Monte Carlo simulation, the energy level is increased by this amount.
- field rate_threshold: float = 1000000000.0¶
Only used if
eon.schema.CoarseGrainingConfig.superbasin_schemeisrate.Any state with a rate (in 1/time) greater than this is merged into a single basin.
- field superbasin_confidence: bool = True¶
Superbasin KMC steps only consider exit processes from the superbasin. As fast processes get absorbed more and more into the superbasin, the relevant exit processes have higher and higher barriers. The confidence to have found all relevant processes leading away from a state is heavily influenced by the fast processes, that no longer exit the superbasin. To make sure that the confidence is adequately high for the barrier energies leaving the superbasin, additional searches need to be performed. This setting (which defaults to true) enables these additional searches. The searches are marked in states/<state_number>/search_results.txt by appending the number of the superbasin in which the search was performed in brackets. In general, this option should not be disabled! It exists only for debug purposes and cases where the user is sure that the additional searches are not needed.
Superbasin KMC confidence.
- field use_askmc: bool = False¶
Mutually exclusive with
eon.schema.CoarseGrainingConfig.use_mcamc.This option determines whether the AS-KMC coarse graining method will be used.
- field askmc_confidence: float = 0.9¶
The confidence for AS-KMC. This value determines the accuracy of the direction of the dynamics trajectory.
- field askmc_barrier_raise_param: float = 1.5¶
This parameter sets how much the barriers are raised during AS-KMC.
- field askmc_high_barrier_def: float = 2.0¶
This parameter sets how high a barrier must be to be considered ‘high’ in AS-KMC.
- field askmc_barrier_test_on: bool = True¶
Because the implemented Superbasin Criterion actually only considers processes which have been passed over at least once, there is some chance that a low-barrier process in a superbasin might have not been visited at all while all other low-barrier processes have been visited at least \(N_f\) times. This is unlikely, but this test verifies that such has not happened, considering even processes which have not been visited when determining if the Superbasin Criterion has first, because the implemented Superbasin Criterion actually only considers processes which have been passed over at least once, there is some chance that a low-barrier process in a superbasin might have not been visited at all while all other low-barrier processes have been visited at least \(N_f\) times. This is unlikely, but this test verifies that such has not happened, considering even processes which have not been visited when determining if the Superbasin Criterion has passed. This check should not add significant overhead.
This test verifies that no low-barrier process in a superbasin has been missed, considering even processes which have not been visited.
- field askmc_connections_test_on: bool | None = False¶
This parameter determines whether to ensure that there are no processes which connect states in the defined superbasin which have not been visited yet and which have a low-barrier. This check is somewhat more computationally expensive than the previous because structure comparisons have to be made when finding product states of unvisited processes.
Ensures that there are no processes which connect states in the defined superbasin which have not been visited yet and which have a low-barrier.
References¶
M. A. Novotny. A Tutorial on Advanced Dynamic Monte Carlo Methods for Systems with Discrete State Spaces, pages 153–210. WORLD SCIENTIFIC, April 2001. doi:10.1142/9789812811578_0003.
Arthur F. Voter. Hyperdynamics: Accelerated Molecular Dynamics of Infrequent Events. Physical Review Letters, 78(20):3908–3911, May 1997. doi:10.1103/PhysRevLett.78.3908.