Kinetica.jl API
Utilities
Kinetica.tconvert — Functiontconvert(t<:Real, from_unit::String, to_unit::String)Converts a time from one unit (from_unit) to another (to_unit).
Supported units (with accepted abbreviations) are:
picoseconds(ps)nanoseconds(ns)microseconds(us)milliseconds(ms)seconds(s)minutes(mins)hours(hrs)daysmonths(mts)years(yrs)
Will throw an error if unsupported units are provided.
tconvert(from_unit::String, to_unit::String)Returns tconvert(1.0, from_unit, to_unit).
Useful for just getting a conversion factor between time units, rather than converting a specific time directly.
tconvert(t::Vector{<:Real}, from_unit::String, to_unit::String)Converts a vector of times from one unit (from_unit) to another (to_unit).
Supported units (with accepted abbreviations) are:
picoseconds(ps)nanoseconds(ns)microseconds(us)milliseconds(ms)seconds(s)minutes(mins)hours(hrs)daysmonths(mts)years(yrs)
Will throw an error if unsupported units are provided.
Kinetica.create_savepoints — Functioncreate_savepoints(start, stop, step)Creates a range of savepoints, ensuring that the final time is included.
Safely modifies step to account for small floating point errors introduced by calling tconvert.
Kinetica.format_rxn — Functionformat_rxn(sd::SpeciesData, rd::RxData, rid::Int[, display_level=false])Nicely formats a string describing the reaction at rid.
If the keyword argument display_level is true, additionally annotates the reaction with the level in which it was discovered.
Kinetica.print_rxn — Functionprint_rxn(sd::SpeciesData, rd::RxData, rid::Int[, display_level=false])Prints the reaction at ID rid with SMILES names for species.
If the keyword argument display_level is true, additionally annotates the reaction with the level in which it was discovered.
Logging
Kinetica.start_log — Functionstart_log(logdir::String[, label::String="Kinetica", min_level=logging.Info])Creates a SimpleLogger for logging to a file in logdir.
Filename of the log can be customised using label. All new logfiles will have dates attached.
Example
# Creates a new logfile in `logdir/MyLog_yymmdd-HHMMSS.log`
logger = start_log(logdir; label="MyLog")Kinetica.end_log — Functionend_log(logger<:AbstractLogger)
end_log(logger::MinLevelLogger)Closes the IOStream attached to logger.
Kinetica.flush_log — Functionflush_log()Flushes the IOStream attached to the currently scoped logger.