aebrahim/cobrapy — pull request #1 by zakandrewking (2014-05-01 23:08:20+00:00)
Title: Convenience functions for objective and bounds

Two new convenience functions. (1) Update the model objective:

```python
model.change_objective('ACALD')
print [(x.id, x.objective_coefficient) for x in model.reactions if x.objective_coefficient!=0]
# returns: [('ACALD', 1.0)]

model.change_objective(model.reactions.ACACCT)
print [(x.id, x.objective_coefficient) for x in model.reactions if x.objective_coefficient!=0]
# returns: [('ACACCT', 1.0)]

model.change_objective({'PFL': 2, 'EX_glc_e': 1})
print [(x.id, x.objective_coefficient) for x in model.reactions if x.objective_coefficient!=0]
# returns: [('EX_glc_e', 1), ('PFL', 2)]
```

(2) Make upper and lower bounds of a reaction zero:

```python
model.reactions.PFL.knock_out()
print (model.reactions.PFL.upper_bound, model.reactions.PFL.lower_bound)
# returns: (0, 0)
```