Kinetica.jl API

Utilities

Kinetica.tconvertFunction
tconvert(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)
  • days
  • months (mts)
  • years (yrs)

Will throw an error if unsupported units are provided.

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

source
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)
  • days
  • months (mts)
  • years (yrs)

Will throw an error if unsupported units are provided.

source
Kinetica.create_savepointsFunction
create_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.

source
Kinetica.format_rxnFunction
format_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.

source
Kinetica.print_rxnFunction
print_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.

source

Logging

Kinetica.start_logFunction
start_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")
source
Kinetica.end_logFunction
end_log(logger<:AbstractLogger)
end_log(logger::MinLevelLogger)

Closes the IOStream attached to logger.

source