@@ -478,12 +478,12 @@ end
478
478
# additional information of the full network, find the reactions, species, and parameters
479
479
# that constitute the corresponding sub-reaction network.
480
480
function subnetworkmapping (linkageclass, allrxs, complextorxsmap, p)
481
- # Finds the reactions that are part of teh sub-reaction network.
482
- rxinds = sort! (collect (Set (rxidx for rcidx in linkageclass
483
- for rxidx in complextorxsmap[rcidx])))
484
- rxs = allrxs[rxinds]
485
- specset = Set (s for rx in rxs for s in rx. substrates if ! isconstant (s))
486
- for rx in rxs
481
+ # Finds the reactions that are part of the`` sub-reaction network.
482
+ rxinds = sort! (collect (Set (
483
+ rxidx for rcidx in linkageclass for rxidx in complextorxsmap[rcidx])))
484
+ newrxs = allrxs[rxinds]
485
+ specset = Set (s for rx in newrxs for s in rx. substrates if ! isconstant (s))
486
+ for rx in newrxs
487
487
for product in rx. products
488
488
! isconstant (product) && push! (specset, product)
489
489
end
@@ -531,7 +531,7 @@ function subnetworks(rs::ReactionSystem)
531
531
newrxs, newspecs, newps = subnetworkmapping (lcs[i], rxs, complextorxsmap, p)
532
532
newname = Symbol (nameof (rs), " _" , i)
533
533
push! (subnetworks,
534
- ReactionSystem (reacs , t, specs , newps; name = newname, spatial_ivs))
534
+ ReactionSystem (newrxs , t, newspecs , newps; name = newname, spatial_ivs))
535
535
end
536
536
subnetworks
537
537
end
0 commit comments