Internal API
Contents
Index
GKMC.carbon_by_idGKMC.dissociate!GKMC.find_aliphatic_carbonGKMC.get_rateGKMC.load_graphGKMC.load_moleculeGKMC.molecule_outputGKMC.possible_reactionsGKMC.rate_at_energyGKMC.read_ratefileGKMC.scramble!GKMC.validate_inputGKMC.validate_ratefileGKMC.validate_rates
Internal Interface
Reaction handling
GKMC.possible_reactions — Function
possible_reactions(m::MolecularGraph)Return a tuple of tuples representing the possible reactions from the current aliphatic site.
GKMC.scramble! — Function
scramble!(m::MolecularGraph, mol::String, source::String, destination::String)Move isotope mol from carbon source to the neighbouring carbon destination.
Return the modified molecular graph m.
Throw an AssertionError if source and destination are not neighbouring carbons, or if the graph does not contain exactly one carbon with either identifier. Throw an ArgumentError if carbon source does not contain isotope mol.
GKMC.dissociate! — Function
dissociate!(m::MolecularGraph, mol::String, source::String)Dissociate isotope mol from carbon source.
Return the modified molecular graph m.
Throw an ArgumentError if carbon source does not contain isotope mol.
Molecular graph helpers
GKMC.carbon_by_id — Function
carbon_by_id(m::MolecularGraph, id::String)Return the Carbon with identifier id.
GKMC.find_aliphatic_carbon — Function
find_aliphatic_carbon(m::MolecularGraph)Return the integer vertex index of the only aliphatic carbon. An aliphatic carbon is identified as a carbon whose graph degree plus number of attached subsituents equals four.
GKMC.load_molecule — Function
load_molecule(path::AbstractString)Return a MolecularGraph from a parsed GraphML XML file.
GKMC.load_graph — Function
load_graph(xgraph::EzXML.Node, ns::Vector{Pair{String,String}})Return a SimpleGraph from a GraphML graph element.
GKMC.molecule_output — Function
molecule_output(m::MolecularGraph)Return a JSON-safe representation of a MolecularGraph.
Rate tables
GKMC.get_rate — Function
get_rate(rate_tables::Dict, reaction::Tuple, energy::Unitful.Energy)Return the rate_at_energy for a specified reaction from a rate_table
GKMC.rate_at_energy — Function
rate_at_energy(rate_table::RateTable, energy::Unitful.Energy)Return the reaction rate at energy by selecting the last energy-grid point not greater than the requested energy.
Throw a DomainError if energy lies outside the rate-table range.
GKMC.read_ratefile — Function
read_ratefile(path::AbstractString)Return a RateTable parsed from a rate-file JSON.
GKMC.validate_rates — Function
validate_rates(
energies::Vector{typeof(1.0u"eV")},
rates::Vector{typeof(1.0u"s^-1")};
path::AbstractString="<unknown>"
)Validate the reaction rates against model constraints.
Return nothing if the rate table is valid.
Throw an ArgumentError if the rate table is empty, the energy and rate arrays have different lengths, the rate table contains non-finite values, the energy grid is not strictly increasing, or a rate is negative.
GKMC.validate_ratefile — Function
validate_ratefile(config::Dict{String,Any}, path::AbstractString)Validate the input against ratefile.schema.json.
Input parsing
GKMC.validate_input — Function
validate_input(config::Dict{String,Any})Validate the input against input.schema.json.