Skip to content

Commit

Permalink
Reaction.model property
Browse files Browse the repository at this point in the history
Fixex #144
  • Loading branch information
aebrahim committed Jan 28, 2015
1 parent 092d11e commit 42f1bef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cobra/core/Reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ def boundary(self):
return "system_boundary"
return None

@property
def model(self):
"""returns the model the reaction is a part of"""
return self._model

def _update_awareness(self):
"""Make sure all metabolites and genes that are associated with
this reaction are aware of it.
Expand All @@ -175,9 +180,8 @@ def _update_awareness(self):
x._reaction.add(self)

def get_model(self):
"""Returns the Model object that this Reaction is associated with.
"""
""".. deprecated :: 0.3.1 use model property instead"""
warn("deprecated, use the model property instead")
return self._model

def remove_from_model(self, model=None, remove_orphans=False):
Expand Down

0 comments on commit 42f1bef

Please sign in to comment.