MEDYAN.addreactioncallback!

Tuple{MEDYAN.SysDef, AbstractString, Float64, Int64, Any}

addreactioncallback!(s::SysDef, reactantexpr::AbstractString, rate::Float64, invvolumepower::Int, callback)::SysDef

Like addreaction! but also adds callback. callback is called when the reaction happens with input of MEDYAN.Context and Int the chem_voxel id where the reaction happened.

The callback should handle updating species counts.

MEDYAN.errorcheck_addcallback(callback,s::SysDef) can optionally be overloaded to add errorchecking when the callback is added.