if isinstance(pattern_list, MonomerPattern):
pattern_list = [pattern_list]
if not all([isinstance(p, MonomerPattern) for p in pattern_list]):
raise Exception("Observable must be a list of MonomerPatterns")
self.observables.append( (name, pattern_list) )
def __repr__(self):
return "%s( \\\n monomers=%s \\\n compartments=%s\\\n parameters=%s\\\n rules=%s\\\n)" % \
After Change
try:
reaction_pattern = as_reaction_pattern(reaction_pattern)
except InvalidReactionPatternException as e:
raise type(e)("Observable does not look like a reaction pattern")
self.observables.append( (name, reaction_pattern) )
def __repr__(self):
return "%s( \\\n monomers=%s \\\n compartments=%s\\\n parameters=%s\\\n rules=%s\\\n)" % \