Public API

Documentation for GKMC's public interface.

Contents

Index

Public interface

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.

source
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.

source

Molecular graphs

GKMC.MolecularGraph — Type
MolecularGraph

Molecular 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.

source
GKMC.Carbon — Type
Carbon

A carbon atom in the molecular graph.

Fields

  • id::String: Carbon atom identifier (IUPAC naming conventions).
  • substituents::Vector{String}: Attached hydrogen and/or deuterium atoms.
source

Rate tables

GKMC.RateTable — Type
RateTable

A 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.
source