From 270c0c86ed11bf904ddcf27d73a280134fd6999e Mon Sep 17 00:00:00 2001 From: Artur Meski Date: Thu, 10 Mar 2016 15:00:28 +0100 Subject: [PATCH] get_max_concentration_level function --- rctsys.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rctsys.py b/rctsys.py index 73d0f53..8a494b4 100755 --- a/rctsys.py +++ b/rctsys.py @@ -394,6 +394,7 @@ class ReactionSystemWithConcentrations(ReactionSystem): name,def_max_conc = e elif type(e) is str: name = e + print("\n\nWARNING: no maximal concentration level specified for:", e, "\n\n") else: raise RuntimeError("Bad entity type when adding background set element") @@ -408,6 +409,13 @@ class ReactionSystemWithConcentrations(ReactionSystem): if 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): """Sanity check for entities with concentration"""