Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Jul 14, 2024
1 parent 61fb536 commit d1cb46b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/network_analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,12 @@ end
# additional information of the full network, find the reactions, species, and parameters
# that constitute the corresponding sub-reaction network.
function subnetworkmapping(linkageclass, allrxs, complextorxsmap, p)
# Finds the reactions that are part of teh sub-reaction network.
rxinds = sort!(collect(Set(rxidx for rcidx in linkageclass
for rxidx in complextorxsmap[rcidx])))
rxs = allrxs[rxinds]
specset = Set(s for rx in rxs for s in rx.substrates if !isconstant(s))
for rx in rxs
# Finds the reactions that are part of the`` sub-reaction network.
rxinds = sort!(collect(Set(
rxidx for rcidx in linkageclass for rxidx in complextorxsmap[rcidx])))
newrxs = allrxs[rxinds]
specset = Set(s for rx in newrxs for s in rx.substrates if !isconstant(s))
for rx in newrxs
for product in rx.products
!isconstant(product) && push!(specset, product)
end
Expand Down Expand Up @@ -531,7 +531,7 @@ function subnetworks(rs::ReactionSystem)
newrxs, newspecs, newps = subnetworkmapping(lcs[i], rxs, complextorxsmap, p)
newname = Symbol(nameof(rs), "_", i)
push!(subnetworks,
ReactionSystem(reacs, t, specs, newps; name = newname, spatial_ivs))
ReactionSystem(newrxs, t, newspecs, newps; name = newname, spatial_ivs))
end
subnetworks
end
Expand Down

0 comments on commit d1cb46b

Please sign in to comment.