Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/DiffEqBiological.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ export @reaction_network, @reaction_func, @min_reaction_network

# functions to query network properties
export speciesmap, paramsmap, numspecies, numreactions, numparams
export odeexprs, jacobianexprs, noiseexprs, jumpexprs
export get_substrate_stoich, get_net_stoich
export oderhsfun, jacfun, paramjacfun, odefun, noisefun, sdefun, jumps, regularjumps
export odeexprs, jacobianexprs, noiseexprs, jumpexprs, rateexpr, oderatelawexpr, ssaratelawexpr
export substratestoich, productstoich, netstoich, ismassaction, dependants, dependents, substrates, products
export rxtospecies_depgraph, speciestorx_depgraph, rxtorx_depgraph

# functions to add mathematical equations to the network
Expand Down
8 changes: 4 additions & 4 deletions src/massaction_jump_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# given a ReactionStruct and a species map construct a MassActionJump
function make_majump(rs, specmap, ratemap, params, param_context)
reactant_stoich = get_substrate_stoich(rs, specmap)
net_stoich = get_net_stoich(rs, specmap)
reactant_stoich = substratestoich(rs, specmap)
net_stoich = netstoich(rs, specmap)
if isempty(net_stoich)
error("Empty net stoichiometry vectors for mass action reactions are not allowed.")
end
Expand Down Expand Up @@ -92,7 +92,7 @@ function jump_to_dep_specs_map(rn, rxidxs_jidxs)
jtos_vec = Vector{Vector{valtype(specmap)}}(undef, numrxs)
for rx in 1:numrxs
jidx = rxidxs_jidxs[rx]
jtos_vec[jidx] = sort!( [ns.first for ns in get_net_stoich(rn.reactions[rx], specmap)] )
jtos_vec[jidx] = sort!( [ns.first for ns in netstoich(rn.reactions[rx], specmap)] )
end

jtos_vec
Expand Down Expand Up @@ -125,7 +125,7 @@ function depgraph_from_network(rn, jset, rxidxs_to_jidxs, spec_to_dep_jumps)
jidx = rxidxs_to_jidxs[rx]

# get the net reaction stoichiometry
net_stoich = get_net_stoich(rn.reactions[rx], speciesmap(rn))
net_stoich = netstoich(rn.reactions[rx], speciesmap(rn))

# rx changes spec, hence rxs depending on spec depend on rx
for (spec,stoch) in net_stoich
Expand Down
Loading