get_max_concentration_level function
This commit is contained in:
@@ -394,6 +394,7 @@ class ReactionSystemWithConcentrations(ReactionSystem):
|
|||||||
name,def_max_conc = e
|
name,def_max_conc = e
|
||||||
elif type(e) is str:
|
elif type(e) is str:
|
||||||
name = e
|
name = e
|
||||||
|
print("\n\nWARNING: no maximal concentration level specified for:", e, "\n\n")
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("Bad entity type when adding background set element")
|
raise RuntimeError("Bad entity type when adding background set element")
|
||||||
|
|
||||||
@@ -408,6 +409,13 @@ class ReactionSystemWithConcentrations(ReactionSystem):
|
|||||||
if self.max_concentration < def_max_conc:
|
if self.max_concentration < def_max_conc:
|
||||||
self.max_concentration = def_max_conc
|
self.max_concentration = def_max_conc
|
||||||
|
|
||||||
|
def get_max_concentration_level(self, e):
|
||||||
|
|
||||||
|
if e in self.max_conc_per_ent:
|
||||||
|
return self.max_conc_per_ent[e]
|
||||||
|
else:
|
||||||
|
return self.max_concentration
|
||||||
|
|
||||||
def is_valid_entity_with_concentration(self, e):
|
def is_valid_entity_with_concentration(self, e):
|
||||||
"""Sanity check for entities with concentration"""
|
"""Sanity check for entities with concentration"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user