Catalyst.jl - what's the best way to extract interpolation from the reaction_network

Hi!

If I want to extract and plot the interpolating variable - $d_rate (temporal dynamic profile) from this example code, does catalyst.jl have any built-in function so that I can extract the results directly, instead of re-write and re-calculate? Thanks!

@species X1(t) X2(t) X12(t)
@parameters a b c
d_rate = c * X1 * X2
rn = @reaction_network begin
    a, X1 --> 0
    b, X2 --> 0
    $d_rate, X1 + X2 => X12
end

Are you looking for sol[d_rate] or the interpolating function sol(t; idxs = d_rate) from the solution?

1 Like

Thanks!! Yes, I was looking for sol[d_rate]