cleanup
This commit is contained in:
@@ -323,7 +323,9 @@ class ReactionSystemWithConcentrationsParam(ReactionSystem):
|
||||
if command in self.max_conc_per_ent:
|
||||
max_cmd_c = self.max_conc_per_ent[command]
|
||||
else:
|
||||
print("WARNING:\n\tThere is no maximal concentration level defined for " + self.get_entity_name(command))
|
||||
print(
|
||||
"WARNING:\n\tThere is no maximal concentration level defined for "
|
||||
+ self.get_entity_name(command))
|
||||
print("\tThis is a very bad idea -- expect degraded performance\n")
|
||||
|
||||
for l in range(1, max_cmd_c + 1):
|
||||
@@ -342,12 +344,16 @@ class ReactionSystemWithConcentrationsParam(ReactionSystem):
|
||||
new_products = []
|
||||
succ_value = i + l
|
||||
for j in range(1, succ_value + 1):
|
||||
if j > self.max_concentration: break
|
||||
if j > self.max_concentration:
|
||||
break
|
||||
new_p = param_ent_name + "#" + str(j)
|
||||
rs.ensure_bg_set_entity(new_p)
|
||||
new_products.append(new_p)
|
||||
if new_products != []:
|
||||
rs.add_reaction(set(new_reactants + [pre_conc,cmd_ent]), set(new_inhibitors), set(new_products))
|
||||
rs.add_reaction(
|
||||
set(new_reactants + [pre_conc, cmd_ent]),
|
||||
set(new_inhibitors),
|
||||
set(new_products))
|
||||
|
||||
elif r_type == "dec":
|
||||
for i in range(1, self.max_concentration + 1):
|
||||
@@ -356,15 +362,20 @@ class ReactionSystemWithConcentrationsParam(ReactionSystem):
|
||||
new_products = []
|
||||
succ_value = i - l
|
||||
for j in range(1, succ_value + 1):
|
||||
if j > self.max_concentration: break
|
||||
if j > self.max_concentration:
|
||||
break
|
||||
new_p = param_ent_name + "#" + str(j)
|
||||
rs.ensure_bg_set_entity(new_p)
|
||||
new_products.append(new_p)
|
||||
if new_products != []:
|
||||
rs.add_reaction(set(new_reactants + [pre_conc,cmd_ent]), set(new_inhibitors), set(new_products))
|
||||
rs.add_reaction(
|
||||
set(new_reactants + [pre_conc, cmd_ent]),
|
||||
set(new_inhibitors),
|
||||
set(new_products))
|
||||
|
||||
else:
|
||||
raise RuntimeError("Unknown meta-reaction type: " + repr(r_type))
|
||||
raise RuntimeError(
|
||||
"Unknown meta-reaction type: " + repr(r_type))
|
||||
|
||||
for ent, inhibitors in self.permanent_entities.items():
|
||||
|
||||
@@ -372,7 +383,9 @@ class ReactionSystemWithConcentrationsParam(ReactionSystem):
|
||||
if ent in self.max_conc_per_ent:
|
||||
max_c = self.max_conc_per_ent[ent]
|
||||
else:
|
||||
print("WARNING:\n\tThere is no maximal concentration level defined for " + self.get_entity_name(ent))
|
||||
print(
|
||||
"WARNING:\n\tThere is no maximal concentration level defined for "
|
||||
+ self.get_entity_name(ent))
|
||||
print("\tThis is a very bad idea -- expect degraded performance\n")
|
||||
|
||||
def e_value(i):
|
||||
|
||||
Reference in New Issue
Block a user