Skip to content

Commit dc3cd73

Browse files
authored
Merge pull request #110 from isaacsas/more-network-query
Further network query functions
2 parents 4f8ea72 + 733d4db commit dc3cd73

File tree

3 files changed

+364
-37
lines changed

3 files changed

+364
-37
lines changed

src/DiffEqBiological.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ export @reaction_network, @reaction_func, @min_reaction_network
2525

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

3233
# functions to add mathematical equations to the network

src/massaction_jump_utils.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

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

9898
jtos_vec
@@ -125,7 +125,7 @@ function depgraph_from_network(rn, jset, rxidxs_to_jidxs, spec_to_dep_jumps)
125125
jidx = rxidxs_to_jidxs[rx]
126126

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

130130
# rx changes spec, hence rxs depending on spec depend on rx
131131
for (spec,stoch) in net_stoich

0 commit comments

Comments
 (0)