biocrnpyler.mechanisms.enzyme

Classes

BasicCatalysis([name, mechanism_type])

Basic catalytic mechanism for irreversible substrate conversion.

BasicProduction([name, mechanism_type])

Basic catalytic production mechanism with optional substrate.

MichaelisMenten([name, mechanism_type])

Standard Michaelis-Menten enzyme kinetics mechanism.

MichaelisMentenCopy([name, mechanism_type])

Michaelis-Menten kinetics with substrate preservation.

MichaelisMentenReversible([name, mechanism_type])

Reversible Michaelis-Menten kinetics with product binding.

class biocrnpyler.mechanisms.enzyme.BasicCatalysis(name: str = 'basic_catalysis', mechanism_type: str = 'catalysis')[source]

Basic catalytic mechanism for irreversible substrate conversion.

A ‘catalysis’ mechanism where a catalyst (enzyme) converts a substrate into a product in a single irreversible step. The catalyst is not consumed in the reaction and can continue to catalyze additional conversions.

The catalytic reaction is given by

S + C –> P + C

where S is the substrate, C is the catalyst (enzyme), and P is the product.

Parameters:
namestr, default=’basic_catalysis’

Name identifier for this mechanism instance.

mechanism_typestr, default=’catalysis’

Type classification of this mechanism.

Attributes:
namestr

Name of the mechanism instance.

mechanism_typestr

Type classification (‘catalysis’).

See also

BasicProduction

Catalytic production without substrate consumption.

MichaelisMenten

Two-step enzyme kinetics with complex formation.

Mechanism

Base class for all mechanisms.

Notes

This mechanism generates a single irreversible mass-action reaction with rate constant ‘kcat’. Unlike Michaelis-Menten kinetics, there is no explicit enzyme-substrate complex formation; the reaction proceeds in a single catalytic step.

Common applications include:

  • Simplified enzyme kinetics models

  • Catalytic degradation reactions

  • Rate-limiting steps in metabolic pathways

Required parameters for this mechanism:

  • ‘kcat’ : Catalytic rate constant for substrate conversion

Examples

Model enzymatic degradation of a substrate:

>>> enzyme = bcp.Enzyme('E', substrates=['S'], products=['P'])
>>> mixture = bcp.Mixture(
...     components=[enzyme],
...     mechanisms={'catalysis': bcp.BasicCatalysis()},
...     parameters={'kcat': 1.0}
... )
>>> mixture.compile_crn()
update_reactions(enzyme, substrate, product, component=None, part_id=None, kcat=None)[source]

Generate reactions for basic catalysis.

Creates a single irreversible mass-action reaction for catalytic conversion of substrate to product.

Parameters:
enzymeSpecies

The catalyst species that facilitates the reaction.

substrateSpecies

The substrate species to be converted.

productSpecies

The product species. Can be None for degradation reactions.

componentComponent, optional

Component containing parameter values. Required if kcat is not provided directly.

part_idstr, optional

Identifier for parameter lookup. If None, defaults to component.name.

kcatParameter or float, optional

Catalytic rate constant. If None, retrieved from component parameters.

Returns:
list of Reaction

List containing a single irreversible mass-action reaction: enzyme + substrate –> enzyme + product.

Raises:
ValueError

If component is None and kcat is not provided.

Notes

The reaction follows mass-action kinetics with rate constant ‘kcat’. The enzyme appears on both sides of the reaction as it acts as a catalyst and is not consumed.

update_species(enzyme, substrate, product=None)[source]

Generate species for basic catalysis.

Creates the list of species involved in the catalytic reaction: enzyme, substrate, and optionally the product.

Parameters:
enzymeSpecies

The catalyst species that facilitates the reaction.

substrateSpecies

The substrate species to be converted.

productSpecies, optional

The product species. If None, only enzyme and substrate are returned (useful for degradation reactions where no explicit product is tracked).

Returns:
list of Species

List containing [enzyme, substrate] if product is None, or [enzyme, substrate, product] otherwise.

class biocrnpyler.mechanisms.enzyme.BasicProduction(name='basic_production', mechanism_type='catalysis')[source]

Basic catalytic production mechanism with optional substrate.

A ‘catalysis’ mechanism where a catalyst (enzyme) produces a product. Optionally, a substrate can be consumed during production, allowing for both pure production (C –> P + C) and production with substrate consumption (S + C –> P + C).

The production reaction can be either:

C –> P + C (pure production, no substrate)

or

S + C –> P + C (production with substrate consumption)

where S is the substrate, C is the catalyst (enzyme), and P is the product.

Parameters:
namestr, default=’basic_production’

Name identifier for this mechanism instance.

mechanism_typestr, default=’catalysis’

Type classification of this mechanism.

Attributes:
namestr

Name of the mechanism instance.

mechanism_typestr

Type classification (‘catalysis’).

See also

BasicCatalysis

Catalytic conversion requiring a substrate.

MichaelisMentenCopy

Two-step kinetics preserving the substrate.

Mechanism

Base class for all mechanisms.

Notes

This mechanism generates a single irreversible mass-action reaction with rate constant ‘kcat’. The catalyst is not consumed and appears on both sides of the reaction.

Common applications include:

  • Constitutive gene expression (transcription/translation)

  • Enzymatic synthesis reactions

  • Autocatalytic production processes

Required parameters for this mechanism:

  • ‘kcat’ : Catalytic rate constant for product formation

The flexibility to include or exclude substrates makes this mechanism useful for modeling both simple production (e.g., constitutive protein expression) and production coupled with substrate consumption (e.g., enzymatic synthesis from precursors).

Examples

Model constitutive protein production from a gene:

>>> gene = bcp.DNA('gfp')
>>> protein = bcp.Protein('GFP')
>>> expression = bcp.Enzyme(gene, substrates=[], products=[protein])
>>> mixture = bcp.Mixture(
...     components=[expression],
...     mechanisms={'catalysis': bcp.BasicProduction()},
...     parameters={'kcat': 0.01}
... )
>>> mixture.compile_crn()
Species = dna_gfp, protein_GFP
Reactions = [
    dna[gene] --> dna[gene]+protein[protein]
]
update_reactions(enzyme, substrate, product, component=None, part_id=None, kcat=None)[source]

Generate reactions for basic production.

Creates a single irreversible mass-action reaction for catalytic production, with or without substrate consumption.

Parameters:
enzymeSpecies

The catalyst species that facilitates production.

substrateSpecies

The substrate species. Can be None for pure production without substrate consumption.

productSpecies

The product species. Can be None if no explicit product is tracked.

componentComponent, optional

Component containing parameter values. Required if kcat is not provided directly.

part_idstr, optional

Identifier for parameter lookup. If None, defaults to component.name.

kcatParameter or float, optional

Catalytic rate constant. If None, retrieved from component parameters.

Returns:
list of Reaction

List containing a single irreversible mass-action reaction. If substrate is None: enzyme –> enzyme + product. If substrate is provided: enzyme + substrate –> enzyme + product.

Raises:
ValueError

If component is None and kcat is not provided.

Notes

The enzyme appears on both sides of the reaction as it acts as a catalyst and is not consumed. The substrate, if provided, is consumed in the reaction.

update_species(enzyme, substrate=None, product=None)[source]

Generate species for basic production.

Creates the list of species involved in the production reaction: enzyme, and optionally substrate and product.

Parameters:
enzymeSpecies

The catalyst species that facilitates production.

substrateSpecies, optional

The substrate species to be consumed. If None, production occurs without substrate consumption.

productSpecies, optional

The product species. If None, only enzyme (and substrate if provided) are returned.

Returns:
list of Species

List containing enzyme and any non-None substrate and product species. Order is [enzyme, product, substrate] if all are provided.

class biocrnpyler.mechanisms.enzyme.MichaelisMenten(name='michaelis_menten', mechanism_type='catalysis')[source]

Standard Michaelis-Menten enzyme kinetics mechanism.

A ‘catalysis’ mechanism implementing classical Michaelis-Menten enzyme kinetics with explicit enzyme-substrate complex formation. The substrate binds reversibly to the enzyme to form a complex, which then irreversibly converts to product and releases the enzyme.

The reaction scheme is

S + E <–> S:E –> E + P

where S is the substrate, E is the enzyme, S:E is the enzyme-substrate complex, and P is the product.

Parameters:
namestr, default=’michaelis_menten’

Name identifier for this mechanism instance.

mechanism_typestr, default=’catalysis’

Type classification of this mechanism.

Attributes:
namestr

Name of the mechanism instance.

mechanism_typestr

Type classification (‘catalysis’).

See also

BasicCatalysis

Single-step catalysis without complex formation.

MichaelisMentenCopy

Michaelis-Menten preserving substrate.

MichaelisMentenReversible

Michaelis-Menten with product binding.

Mechanism

Base class for all mechanisms.

Notes

This mechanism generates two mass-action reactions:

  1. Reversible binding: S + E <–> S:E (rates ‘kb’ and ‘ku’)

  2. Irreversible catalysis: S:E –> E + P (rate ‘kcat’)

Common applications include:

  • Enzyme-catalyzed reactions in metabolic pathways

  • Protein degradation by proteases

  • Drug metabolism by cytochrome P450 enzymes

  • Any enzymatic process following Michaelis-Menten kinetics

Required parameters for this mechanism:

  • ‘kb’ : Binding rate constant for enzyme-substrate association

  • ‘ku’ : Unbinding rate constant for enzyme-substrate dissociation

  • ‘kcat’ : Catalytic rate constant for product formation

The mechanism can also model degradation reactions by setting product to None, resulting in: S + E <–> S:E –> E.

Examples

Model enzyme-catalyzed substrate conversion:

>>> substrate = bcp.Species('S')
>>> product = bcp.Species('P')
>>> enzyme = bcp.Enzyme('E', substrates=[substrate], products=[product])
>>> mixture = bcp.Mixture(
...     components=[enzyme],
...     mechanisms={'catalysis': bcp.MichaelisMenten()},
...     parameters={'kb': 1.0, 'ku': 0.1, 'kcat': 0.5}
... )
>>> mixture.compile_crn()
Species = protein_E, S, P, complex_S_protein_E_
Reactions = [
   S+protein[E] <--> complex[S:protein[E]]
   complex[S:protein[E]] --> P+protein[E]
]

Model enzymatic degradation:

>>> degradase = bcp.Protein('degradase')
>>> target = bcp.Protein('target')
>>> degrader = bcp.Enzyme(degradase, substrates=[target], products=[])
>>> mixture = bcp.Mixture(
...     components=[degrader],
...     mechanisms={'catalysis': bcp.MichaelisMenten()},
...     parameters={'kb': 1.0, 'ku': 0.1, 'kcat': 0.2}
... )
update_reactions(enzyme, substrate, product, component=None, part_id=None, complex=None, kb=None, ku=None, kcat=None)[source]

Generate reactions for Michaelis-Menten kinetics.

Creates two mass-action reactions implementing Michaelis-Menten enzyme kinetics: reversible enzyme-substrate binding and irreversible catalytic conversion.

Parameters:
enzymeSpecies

The enzyme species that catalyzes the reaction.

substrateSpecies

The substrate species to be converted.

productSpecies

The product species. Can be None for degradation reactions.

componentComponent, optional

Component containing parameter values. Required if kb, ku, or kcat are not provided directly.

part_idstr, optional

Identifier for parameter lookup. If None, defaults to component.name.

complexSpecies, optional

Pre-specified enzyme-substrate complex. If None, automatically creates a Complex([substrate, enzyme]).

kbParameter or float, optional

Forward binding rate constant. If None, retrieved from component parameters.

kuParameter or float, optional

Reverse unbinding rate constant. If None, retrieved from component parameters.

kcatParameter or float, optional

Catalytic rate constant. If None, retrieved from component parameters.

Returns:
list of Reaction

List containing two reactions: [binding_reaction, catalysis_reaction].

Raises:
ValueError

If component is None and any of kb, ku, or kcat is not provided.

Notes

The mechanism generates the following reactions:

  1. S + E <–> S:E (binding, rates ‘kb’ and ‘ku’)

  2. S:E –> E + P (catalysis, rate ‘kcat’)

For degradation (product is None):

  1. S:E –> E (degradation, rate ‘kcat’)

update_species(enzyme, substrate, product=None, complex=None)[source]

Generate species for Michaelis-Menten kinetics.

Creates the species involved in Michaelis-Menten enzyme kinetics: enzyme, substrate, enzyme-substrate complex, and optionally the product.

Parameters:
enzymeSpecies

The enzyme species that catalyzes the reaction.

substrateSpecies

The substrate species to be converted.

productSpecies, optional

The product species. If None, only enzyme, substrate, and complex are returned (useful for degradation reactions).

complexSpecies, optional

Pre-specified enzyme-substrate complex. If None, automatically creates a Complex([substrate, enzyme]).

Returns:
list of Species

List containing [enzyme, substrate, complex] if product is None, or [enzyme, substrate, product, complex] otherwise.

Notes

The complex is automatically generated as a Complex object containing the substrate and enzyme if not explicitly provided.

class biocrnpyler.mechanisms.enzyme.MichaelisMentenCopy(name='michaelis_menten_copy', mechanism_type='copy')[source]

Michaelis-Menten kinetics with substrate preservation.

A ‘copy’ mechanism implementing Michaelis-Menten enzyme kinetics where the substrate is not consumed during the reaction. Instead, the substrate acts as a template that is copied or read, producing a product while preserving the original substrate.

The reaction scheme is

S + E <–> S:E –> S + E + P

where S is the substrate (template), E is the enzyme, S:E is the enzyme-substrate complex, and P is the product.

Parameters:
namestr, default=’michaelis_menten_copy’

Name identifier for this mechanism instance.

mechanism_typestr, default=’copy’

Type classification of this mechanism.

Attributes:
namestr

Name of the mechanism instance.

mechanism_typestr

Type classification (‘copy’).

See also

MichaelisMenten

Standard Michaelis-Menten consuming substrate.

BasicProduction

Simpler production without complex formation.

Mechanism

Base class for all mechanisms.

Notes

This mechanism generates two mass-action reactions:

  1. Reversible binding: S + E <–> S:E (rates ‘kb’ and ‘ku’)

  2. Catalytic copying: S:E –> S + E + P (rate ‘kcat’)

Common applications include:

  • Gene transcription (DNA template produces RNA)

  • Translation (mRNA template produces protein)

  • DNA replication

  • Any process where a template is read without being consumed

Required parameters for this mechanism:

  • ‘kb’ : Binding rate constant for enzyme-substrate association

  • ‘ku’ : Unbinding rate constant for enzyme-substrate dissociation

  • ‘kcat’ : Catalytic rate constant for product formation

The key difference from standard Michaelis-Menten is that the substrate appears on both sides of the catalytic step, making it a true copying or templating mechanism rather than a conversion.

Examples

Model translation with component:

>>> mrna = bcp.Species('mRNA')
>>> ribosome = bcp.Species('Ribo')
>>> protein = bcp.species('GFP')
>>> comp = bcp.Enzyme(
...     ribosome, substrates=[mrna], products=[protein],
...     parameters={'kb': 2.0, 'ku': 0.2, 'kcat': 0.1}
... )
>>> mixture = bcp.Mixture(
...     components=[comp],
...     mechanisms={'catalysis': bcp.MichaelisMentenCopy()},
... )
>>> mixture.compile_crn()
Species = Ribo, mRNA, complex_Ribo_mRNA_, GFP
Reactions = [
    mRNA+Ribo <--> complex[Ribo:mRNA]
    complex[Ribo:mRNA] --> mRNA+GFP+Ribo
]
update_reactions(enzyme, substrate, product, component=None, part_id=None, complex=None, kb=None, ku=None, kcat=None)[source]

Generate reactions for copy-type Michaelis-Menten kinetics.

Creates two mass-action reactions implementing copy-type Michaelis-Menten enzyme kinetics: reversible enzyme-substrate binding and catalytic copying that preserves the substrate.

Parameters:
enzymeSpecies

The enzyme species that catalyzes the copying reaction.

substrateSpecies

The substrate (template) species that is copied but not consumed.

productSpecies

The product species.

componentComponent, optional

Component containing parameter values. Required if kb, ku, or kcat are not provided directly.

part_idstr, optional

Identifier for parameter lookup. If None, defaults to component.name.

complexSpecies, optional

Pre-specified enzyme-substrate complex. If None, automatically creates a Complex([substrate, enzyme]).

kbParameter or float, optional

Forward binding rate constant. If None, retrieved from component parameters.

kuParameter or float, optional

Reverse unbinding rate constant. If None, retrieved from component parameters.

kcatParameter or float, optional

Catalytic rate constant. If None, retrieved from component parameters.

Returns:
list of Reaction

List containing two reactions: [binding_reaction, catalysis_reaction].

Raises:
ValueError

If component is None and any of kb, ku, or kcat is not provided.

Notes

The mechanism generates the following reactions:

  1. S + E <–> S:E (binding, rates ‘kb’ and ‘ku’)

  2. S:E –> S + E + P (copying, rate ‘kcat’)

The key feature is that the substrate appears on both sides of the catalytic reaction, ensuring it is not consumed. This makes the reaction a true template-based copying mechanism.

update_species(enzyme, substrate, complex=None, product=None)[source]

Generate species for copy-type Michaelis-Menten kinetics.

Creates the species involved in copy-type Michaelis-Menten enzyme kinetics: enzyme, substrate (template), enzyme-substrate complex, and optionally the product(s).

Parameters:
enzymeSpecies

The enzyme species that catalyzes the copying reaction.

substrateSpecies

The substrate (template) species that is copied but not consumed.

complexSpecies, optional

Pre-specified enzyme-substrate complex. If None, automatically creates a Complex([substrate, enzyme]).

productSpecies or list of Species, optional

The product species or list of products. If None, only enzyme, substrate, and complex are returned.

Returns:
list of Species

List containing [enzyme, substrate, complex] if product is None. If product is provided, returns [enzyme, substrate, complex, product] for single product or [enzyme, substrate, complex] + product for list of products.

Notes

This method can handle multiple products by accepting product as a list. This is useful for modeling processes like transcription where multiple transcript copies may be produced.

class biocrnpyler.mechanisms.enzyme.MichaelisMentenReversible(name='michaelis_menten_reverse_binding', mechanism_type='catalysis')[source]

Reversible Michaelis-Menten kinetics with product binding.

A ‘catalysis’ mechanism implementing Michaelis-Menten enzyme kinetics where the product can also bind reversibly to the enzyme. Both the substrate and product form distinct enzyme complexes, and the catalytic step itself is reversible.

The reaction scheme is

S + E <–> S:E <–> E:P <–> E + P

where S is the substrate, E is the enzyme, S:E is the enzyme-substrate complex, E:P is the enzyme-product complex, and P is the product.

Parameters:
namestr, default=’michaelis_menten_reverse_binding’

Name identifier for this mechanism instance.

mechanism_typestr, default=’catalysis’

Type classification of this mechanism.

Attributes:
namestr

Name of the mechanism instance.

mechanism_typestr

Type classification (‘catalysis’).

See also

MichaelisMenten

Standard Michaelis-Menten with irreversible catalysis.

MichaelisMentenCopy

Michaelis-Menten preserving substrate.

Mechanism

Base class for all mechanisms.

Notes

This mechanism generates three mass-action reactions:

  1. Reversible substrate binding: S + E <–> S:E (rates ‘kb1’ and ‘ku1’)

  2. Reversible product binding: P + E <–> E:P (rates ‘kb2’ and ‘ku2’)

  3. Reversible catalysis: S:E <–> E:P (rates ‘kcat’ and ‘kcat_rev’)

Common applications include:

  • Reversible enzymatic reactions near equilibrium

  • Bidirectional metabolic pathways

  • Reactions where product inhibition is significant

  • Detailed kinetic models requiring thermodynamic consistency

Required parameters for this mechanism:

  • ‘kb1’ : Forward binding rate for substrate-enzyme association

  • ‘ku1’ : Reverse unbinding rate for substrate-enzyme dissociation

  • ‘kb2’ : Forward binding rate for product-enzyme association

  • ‘ku2’ : Reverse unbinding rate for product-enzyme dissociation

  • ‘kcat’ : Forward catalytic rate constant (S:E –> E:P)

  • ‘kcat_rev’ : Reverse catalytic rate constant (E:P –> S:E)

This mechanism is particularly useful when modeling reactions close to equilibrium where the reverse reaction and product binding cannot be neglected.

Examples

Model a reversible enzymatic conversion:

>>> enzyme = bcp.Species('E', material_type='protein')
>>> substrate = bcp.Species('S')
>>> product = bcp.Species('P')
>>> comp = bcp.Enzyme(
...     enzyme, substrates=[substrate], products=[product],
...     mechanisms={'catalysis': bcp.MichaelisMentenReversible()},
...     parameters={
...         'kb1': 2.0, 'ku1': 0.5,
...         'kb2': 1.5, 'ku2': 0.3,
...         'kcat': 1.0, 'kcat_rev': 0.4
...     }
... )
>>> mixture = bcp.Mixture(components=[comp])
>>> mixture.compile_crn()
Species = protein_E, S, P, complex_S_protein_E_, complex_P_protein_E_
Reactions = [
    S+protein[E] <--> complex[S:protein[E]]
    P+protein[E] <--> complex[P:protein[E]]
    complex[S:protein[E]] <--> complex[P:protein[E]]
]
update_reactions(enzyme, substrate, product, component=None, part_id=None, complex=None, complex2=None, kb=None, ku=None, kcat=None)[source]

Generate reactions for reversible Michaelis-Menten kinetics.

Creates three mass-action reactions implementing reversible Michaelis-Menten enzyme kinetics with product binding: substrate binding, product binding, and reversible catalysis.

Parameters:
enzymeSpecies

The enzyme species that catalyzes the reaction.

substrateSpecies

The substrate species.

productSpecies

The product species.

componentComponent, optional

Component containing parameter values. Required if kb, ku, or kcat are not provided directly.

part_idstr, optional

Identifier for parameter lookup. If None, defaults to component.name.

complexSpecies, optional

Pre-specified enzyme-substrate complex. If None, automatically creates a Complex([substrate, enzyme]).

complex2Species, optional

Pre-specified enzyme-product complex. If None, automatically creates a Complex([product, enzyme]).

kbtuple of (float or Parameter), optional

Tuple of (kb1, kb2) binding rate constants. If None, kb1 and kb2 retrieved separately from component parameters.

kutuple of (float or Parameter), optional

Tuple of (ku1, ku2) unbinding rate constants. If None, ku1 and ku2 retrieved separately from component parameters.

kcattuple of (float or Parameter), optional

Tuple of (kcat, kcat_rev) catalytic rate constants. If None, kcat and kcat_rev retrieved separately from component parameters.

Returns:
list of Reaction

List containing three reactions: [substrate_binding_reaction, product_binding_reaction, catalysis_reaction].

Raises:
ValueError

If component is None and any of kb, ku, or kcat is not provided.

Notes

The mechanism generates the following reactions:

  1. S + E <–> S:E (binding, rates ‘kb1’ and ‘ku1’)

  2. P + E <–> E:P (binding, rates ‘kb2’ and ‘ku2’)

  3. S:E <–> E:P (catalysis, rates ‘kcat’ and ‘kcat_rev’)

When providing parameters directly (not via component), kb, ku, and kcat should be tuples of two values each.

update_species(enzyme, substrate, product, complex=None, complex2=None)[source]

Generate species for reversible Michaelis-Menten kinetics.

Creates the species involved in reversible Michaelis-Menten enzyme kinetics: enzyme, substrate, product, enzyme-substrate complex, and enzyme-product complex.

Parameters:
enzymeSpecies

The enzyme species that catalyzes the reaction.

substrateSpecies

The substrate species.

productSpecies

The product species.

complexSpecies, optional

Pre-specified enzyme-substrate complex. If None, automatically creates a Complex([substrate, enzyme]).

complex2Species, optional

Pre-specified enzyme-product complex. If None, automatically creates a Complex([product, enzyme]).

Returns:
list of Species

List containing [enzyme, substrate, product, complex1, complex2] where complex1 is S:E and complex2 is E:P.

Notes

Both complexes are automatically generated if not explicitly provided. The enzyme-substrate complex contains [substrate, enzyme] and the enzyme-product complex contains [product, enzyme].