Skip to content

Commit 4aa5e97

Browse files
committed
def one
1 parent 64d83fd commit 4aa5e97

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/network_analysis.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,3 +886,22 @@ function treeweight(t::SimpleDiGraph, g::SimpleDiGraph, distmx::Matrix)
886886
end
887887
prod
888888
end
889+
890+
### DEFICIENCY ONE
891+
892+
"""
893+
satisfiesdeficiencyone(rn::ReactionSystem)
894+
895+
Check if a reaction network obeys the conditions of the deficiency one theorem, which ensures that there is only one equilibrium for every positive stoichiometric compatibility class.
896+
"""
897+
898+
function satisfiesdeficiencyone(rn::ReactionSystem)
899+
δ = deficiency(rn)
900+
δ_l = linkagedeficiencies(rn)
901+
902+
complexes, D = reactioncomplexes(rn)
903+
lcs = linkageclasses(rn); tslcs = terminallinkageclasses(rn)
904+
905+
δ_l .<= 1 && sum(δ_l) = δ && length(lcs) == length(tslcs)
906+
end
907+

0 commit comments

Comments
 (0)