Skip to content

Commit

Permalink
cleaned up propensity function generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Drawert committed Aug 13, 2014
1 parent c0f5f65 commit 267e1fe
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pyurdme/pyurdme.py
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,6 @@ def create_propensity_file(self, file_name=None):
func += funheader.replace("__NAME__", rname) + "\n{\n"
if self.model.listOfReactions[R].restrict_to == None or (isinstance(self.model.listOfReactions[R].restrict_to, list) and len(self.model.listOfReactions[R].restrict_to) == 0):
func += self.model.listOfReactions[R].propensity_function
func += ';'
else:
func += "if("
if isinstance(self.model.listOfReactions[R].restrict_to, list) and len(self.model.listOfReactions[R].restrict_to) > 0:
Expand All @@ -2032,7 +2031,6 @@ def create_propensity_file(self, file_name=None):
raise URDMEError("When restricting reaction to subdomains, you must specify either a list or an int")
func += "){\n"
func += self.model.listOfReactions[R].propensity_function
func += ';'

func += "\n}else{"
func += "\n\treturn 0.0;}"
Expand Down

0 comments on commit 267e1fe

Please sign in to comment.