Public API
Documentation for GKMC's public interface.
Contents
Index
Public interface
GKMC — Module
GKMCMain module for GKMC - Graph Kinetic Monte Carlo simulations in Julia.
Public functions
parse_input. Parse an input JSON file and return simulation parameters,MolecularGraphandrate_tables.run_kmc!. Runs one iteration of the Graph Kinetic Monte Carlo simulation.run_simulation. Run all simulation iterations.
Exported types
GKMC.parse_input — Function
parse_input(path::AbstractString)Return a named tuple containing the simulation parameters, a MolecularGraph, and rate_tables.
GKMC.run_kmc! — Function
function run_kmc!(
m::MolecularGraph,
t_stop::Unitful.Time,
rate_tables::Dict;
rng::AbstractRNG = Random.default_rng(),
)Run Kinetic Monte Carlo on graph m up to t_stop, accepting any Unitful time unit.
Return a dictionary containing the final molecule, elapsed time, reaction counts, and aliphatic-substituent analysis.
GKMC.run_simulation — Function
run_simulation(input_file::AbstractString; dev::Bool=false)Run all Kinetic Monte Carlo iterations specified in a JSON input file.
Each iteration starts from a deep copy of the parsed molecule and uses its own random-number generator seeded from the configured seed and iteration index. When dev is true, use eight local worker processes. Otherwise, start workers allocated through the Slurm Workload Manager.
Write the per-iteration results to the configured output file as JSON, and return the collection of per-iteration result dictionaries.
Molecular graphs
GKMC.MolecularGraph — Type
MolecularGraphMolecular graph with carbon atoms and internal energy.
Fields
graph::SimpleGraph{Int}: Covalent carbon framework.carbons::Vector{Carbon}: Carbon atoms in graph order.
-internal_energy::Unitful.Energy: Current internal energy of the molecule.
GKMC.Carbon — Type
CarbonA carbon atom in the molecular graph.
Fields
id::String: Carbon atom identifier (IUPAC naming conventions).substituents::Vector{String}: Attached hydrogen and/or deuterium atoms.
Rate tables
GKMC.RateTable — Type
RateTableA table representing the physical parameters associated with a certain intramolecular reaction.
Fields
Δ::Unitful.Energy: Reaction energy change in eV. For scrambling: $\Delta = E_{\mathrm{product}} - E_{\mathrm{reactant}}$.energies::Vector{Unitful.Energy}: Energy grid in eV.rates::Vector{Unitful.Frequency}: Rate at each energy-grid point.