vivarium.library.polymerize module

class vivarium.library.polymerize.BindingSite(config)[source]

Bases: vivarium.library.datum.Datum

defaults = {'length': 0, 'position': 0, 'thresholds': {}}
state_when(levels)[source]

Provide the binding state for the given levels of factors.

class vivarium.library.polymerize.Elongation(sequence, templates, limits, symbol_to_monomer, elongation=0)[source]

Bases: object

complete()[source]
elongate_to(now, rate, limits, polymerases)[source]

Track increments of time and accumulate partial elongations, emitting the full elongation once a unit is attained.

Returns number of polymerases that terminated this step, and the updated monomer limits after all elongations.

step(interval, limits, polymerases)[source]
store_partial(interval)[source]
class vivarium.library.polymerize.Polymerase(config)[source]

Bases: vivarium.library.datum.Datum

bind()[source]
complete()[source]
defaults = {'id': 0, 'position': 0, 'state': None, 'template': None, 'template_index': 0, 'terminator': 0}
is_bound()[source]
is_complete()[source]
is_occluding()[source]
is_polymerizing()[source]
is_unoccluding(occlusion)[source]
start_polymerizing()[source]
unocclude()[source]
class vivarium.library.polymerize.Template(config)[source]

Bases: vivarium.library.datum.Datum

absolute_position(relative_position)[source]
binding_state(levels)[source]
choose_product()[source]
choose_terminator(index=0)[source]
defaults = {'direction': 1, 'id': None, 'position': 0, 'sites': [], 'terminators': []}
last_terminator()[source]
next_terminator(position)[source]
products()[source]
schema = {'sites': <class 'vivarium.library.polymerize.BindingSite'>, 'terminators': <class 'vivarium.library.polymerize.Terminator'>}
strength_from(terminator_index)[source]
terminates_at(index=0)[source]
class vivarium.library.polymerize.Terminator(config)[source]

Bases: vivarium.library.datum.Datum

between(before, after)[source]
defaults = {'position': 0, 'products': [], 'strength': 0}
vivarium.library.polymerize.add_merge(ds)[source]

Given a list of dicts, sum the values of each key.

vivarium.library.polymerize.all_products(templates)[source]
vivarium.library.polymerize.build_double_rates(affinities, advancement)[source]
vivarium.library.polymerize.build_double_stoichiometry(promoter_count)[source]

Builds a stoichiometry for the given promoters. There are two states per promoter, open and bound, and two reactions per promoter, binding and unbinding. In addition there is a single substrate for available RNAP in the final index.

Here we are assuming

vivarium.library.polymerize.build_stoichiometry(promoter_count)[source]

Builds a stoichiometry for the given promoters. There are two states per promoter, open and bound, and two reactions per promoter, binding and unbinding. In addition there is a single substrate for available RNAP in the final index.

Here we are assuming

vivarium.library.polymerize.flatten(l)[source]
Flatten a list by one level:

[[1, 2, 3], [[4, 5], 6], [7]] –> [1, 2, 3, [4, 5], 6, 7]

vivarium.library.polymerize.generate_template(id, length, products)[source]
vivarium.library.polymerize.kinetics(E, S, kcat, km)[source]
vivarium.library.polymerize.polymerize_step(sequences, polymerases, templates, symbol_to_monomer, monomer_limits)[source]
vivarium.library.polymerize.polymerize_to(sequences, polymerases, templates, additions, symbol_to_monomer, monomer_limits)[source]
vivarium.library.polymerize.template_products(config)[source]