Package Bio :: Package Pathway :: Class Reaction
[hide private]
[frames] | no frames]

Class Reaction

source code

object --+
         |
        Reaction

Abstraction for a biochemical transformation.

This class represents a (potentially reversible) biochemical
transformation of the type:

  a S1 + b S2 + ... --> c P1 + d P2 + ...

where
- a, b, c, d ... are positive numeric stochiometric coefficients,
- S1, S2, ... are substrates
- P1, P2, ... are products

A Reaction should be viewed as the net result of one or more individual
reaction steps, where each step is potentially facilitated by a different
catalyst. Support for 'Reaction algebra' will be added at some point in
the future.

Attributes:

reactants   -- map of involved species to their stochiometric coefficients:
                 reactants[S] = stochiometric constant for S
catalysts   -- list of tuples of catalysts required for this reaction
reversible  -- true iff reaction is reversible
data        -- reference to arbitrary additional data

Invariants:

for all S in reactants: reactants[S] != 0
for all C in catalysts: catalysts[C] != 0

Instance Methods [hide private]
 
__init__(self, reactants={}, catalysts=[], reversible=0, data=None)
Initializes a new Reaction object.
source code
 
__eq__(self, r)
Returns true iff self is equal to r.
source code
 
__ne__(self, r)
Returns true iff self is not equal to r.
source code
 
__hash__(self)
Returns a hashcode for self.
source code
 
__repr__(self)
Returns a debugging string representation of self.
source code
 
__str__(self)
Returns a string representation of self.
source code
 
reverse(self)
Returns a new Reaction that is the reverse of self.
source code
 
species(self)
Returns a list of all Species involved in self.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, reactants={}, catalysts=[], reversible=0, data=None)
(Constructor)

source code 
Initializes a new Reaction object.

Overrides: object.__init__

__hash__(self)
(Hashing function)

source code 
Returns a hashcode for self.

Overrides: object.__hash__

__repr__(self)
(Representation operator)

source code 
Returns a debugging string representation of self.

Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
Returns a string representation of self.

Overrides: object.__str__