Reaction
PyCellChemistry documentation index
/Users/lidia/main/research/acbook/web/website/ac-home/pycellchem/pycellchem-2.0/src/artchem/Reaction.py

#---------------------------------------------------------------------------
#
# Reaction.py: explicit representation of chemical reactions using multisets
#
# class Reaction: a reaction made of an educt multiset, a product
# multiset and a rate coefficient k
# class ReactionQueue: a FIFO queue of reactions
#
# by Lidia Yamamoto, Univ. Basel, Switzerland, January 2010
# June 2013: adapted to the PyCellChemistry package
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Copyright (C) 2015 Lidia A. R. Yamamoto
# Contact: http://www.artificial-chemistries.org/
#
# This file is part of PyCellChemistry.
#
# PyCellChemistry is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3, as published by the Free Software Foundation.
#
# PyCellChemistry is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyCellChemistry, see file COPYING. If not, see
# http://www.gnu.org/licenses/
#


Modules
sys


Classes
Reaction
collections.deque(__builtin__.object)
ReactionQueue


class Reaction
Methods defined here:
__init__(self, edmset, prmset, k=1.0)
create a new reaction with given educt multiset edmset,
product multiset prmset, and macroscopic kinetic coefficient k
add_educt(self, mol, mult=1)
add 'mult' copies of molecule 'mol' to the educt multiset
add_product(self, mol, mult=1)
add 'mult' copies of molecule 'mol' to the product multiset
del_educt(self, mol='', mult=1)
delete 'mult' copies of molecule 'mol' from the educt multiset
del_product(self, mol='', mult=1)
delete 'mult' copies of molecule 'mol' from the product multiset
get_coefficient(self)
get the kinetic coefficient of the reaction
get_educts(self)
returns (a reference to) the educt multiset
get_products(self)
returns (a reference to) the product multiset
set_coefficient(self, k)
set the kinetic coefficient of the reaction to k
trace(self)
print reaction, for debug purposes


class ReactionQueue(collections.deque)
Method resolution order:
ReactionQueue
collections.deque
__builtin__.object

Methods defined here:
add(self, reaction)
add reaction to list; returns position of reaction in queue
empty(self)
True if the reaction list is empty
nreactions(self)
total number of reactions in the list
peek(self, i=0)
returns (a reference to) the reaction at position i
remove(self)
remove first reaction from list
trace(self)
print reaction list, for debugging
update(self, i, reaction)
update the reaction at position i with the new reaction
object provided

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)

Methods inherited from collections.deque:
__copy__(...)
Return a shallow copy of a deque.
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__gt__(...)
x.__gt__(y) <==> x>y
__iadd__(...)
x.__iadd__(y) <==> x+=y
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
__reduce__(...)
Return state information for pickling.
__repr__(...)
x.__repr__() <==> repr(x)
__reversed__(...)
D.__reversed__() -- return a reverse iterator over the deque
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
__sizeof__(...)
D.__sizeof__() -- size of D in memory, in bytes
append(...)
Add an element to the right side of the deque.
appendleft(...)
Add an element to the left side of the deque.
clear(...)
Remove all elements from the deque.
count(...)
D.count(value) -> integer -- return number of occurrences of value
extend(...)
Extend the right side of the deque with elements from the iterable
extendleft(...)
Extend the left side of the deque with elements from the iterable
pop(...)
Remove and return the rightmost element.
popleft(...)
Remove and return the leftmost element.
reverse(...)
D.reverse() -- reverse *IN PLACE*
rotate(...)
Rotate the deque n steps to the right (default n=1). If n is negative, rotates left.

Data descriptors inherited from collections.deque:
maxlen
maximum size of a deque or None if unbounded

Data and other attributes inherited from collections.deque:
__hash__ = None
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T


Generated automatically by pydoc, July 10, 2015