8.11. PolymerConformation and CombinatorialConformation

BioCRNpyler contains a number of specialized classes to represent conformations (secondary structures) of Polymers and the reactions involved in producing these conformations. This notebook provides an introduction to these features and examples of how to use them.

PolymerConformation is a Species that represents 1 or more OrderedPolymerSpecies with a set of complexes describing how these OrderedPolymerSpecies are in contact.

CombinatorialConformation is a Component which wraps around PolymerConformations (containing just a single Polymer) and enumerates binding and unbinding reactions in order to form different Conformations, similarly to the CombinatorialComplex Component.

CombinatorialConformationPromoter is a combination of CombinatorialConformation and a Promoter which can be used to represent the dynamic structure DNA in settings coupled to transcription.

Example 1: PolymerConformations

In this example, we will consider an OrderedPolymerSpecies AABC and build a PolymerConformation with two internal Complexes: AB and ACS. Here, S is an external species not part of the polymer. PolymerConformations easiest to build iteratively, one Complex at a time.

[1]:
from biocrnpyler.core import Species
from biocrnpyler.components import PolymerConformation, Complex

A, B, C, S = Species("A"), Species("B"), Species("C"), Species("S")

#First Create an PolymerConformation wrapped around a single string of Monomers (e.g. a Polymer)
#This PolymerConformation has no internal complexes
pc = PolymerConformation(polymer = [A, A, B, C])
print("pc is an emtpy PolymerConformation, which represents as an OrderedPolymerSpecies:", pc)
print("pc contains no complexes:", pc.complexes)
print("pc contains one polymer:", pc.polymers)

#Make a polymer conformation indirectly using the Complex function to join the monomers inside a Polymer
c1 = Complex([pc.polymers[0][0], pc.polymers[0][2]]) #Form a Complex A:B
print('\nc1:', c1)
pc1 = c1.parent #This complex has a parent which is a PolymerConformation
print('pc1:', pc1)
print("pc1 contains one complex:", pc1.complexes)
print("pc1 contains one polymer:", pc1.polymers)

#Next, take the polymer inside the new conformation and add a new contact which now includes an additional species S
#Notice how pc1's internal polymer is used, this way the same polymer has two contacts
c2 = Complex([pc1.polymers[0][1], pc1.polymers[0][3], S])
print("\nc2:", c2)
pc2 = c2.parent
print("pc2:", pc2)
print("pc2 contains two complexes:", pc2.complexes)
print("pc2 contains one polymer:", pc2.polymers)

#Now we produce a complex between two different polymers
#Notice that pc1 is used for one polymer and p is used for the other polymer.
#This represents the binding of two seperate polymers
c3 = Complex([pc1.polymers[0][1], pc.polymers[0][3], S])
print("\nc3:", c3)
pc3 = c3.parent
print("pc3", pc3)
print("pc3 contains two complexes:", pc3.complexes)
print("pc3 contains two polymers:", pc3.polymers)
pc is an emtpy PolymerConformation, which represents as an OrderedPolymerSpecies: ordered_polymer_A_A_B_C_
pc contains no complexes: []
pc contains one polymer: [ordered_polymer_A_A_B_C_]

c1: complex_A_B_
pc1: conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__
pc1 contains one complex: [complex_A_B_]
pc1 contains one polymer: [ordered_polymer_A_A_B_C_]

c2: complex_A_C_S_
pc2: conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__
pc2 contains two complexes: [complex_A_B_, complex_A_C_S_]
pc2 contains one polymer: [ordered_polymer_A_A_B_C_]

c3: complex_A_C_S_
pc3 conformation__ordered_polymer_A_A_B_C__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p1l3n_complex_A_C_S__
pc3 contains two complexes: [complex_A_B_, complex_A_C_S_]
pc3 contains two polymers: [ordered_polymer_A_A_B_C_, ordered_polymer_A_A_B_C_]

Example 2: CombinatorialConformation

CombinatorialConformation is a Component which produces species and reactions allowing for the binding and unbinding of complexes in a PolymerConformation with a single internal polymer. This component transforms a set of initial_states to a set of final_states via a set of intermediate_states. Abstractly, this can be written

Initial States \(\rightleftharpoons\) Intermediate States \(\rightleftharpoons\) Final States

Here \(\rightleftharpoons\) denote combinatorial binding to form the different complexes in the PolymerConformation. All Excluded States found during enumeration are skipped. If no initial_states are given, the CombinatorialConformation defaults to the unbound Polymer inside the PolymerConformation in the Final States. If no intermediate states are given, initial states convert directly to final states.

Note that parameters for transitions between states can be stored under particular IDs using the state_part_ids {species:id} keyword. If None, the str(s0)-str(sf) is the default part_id for a transition between s0 and sf.

First, we consider a simple example to produce the PolymerConformation pc2 in the previous cell.

[2]:
from biocrnpyler.core import Mixture
from biocrnpyler.components import CombinatorialConformation

cc = CombinatorialConformation(final_states = [pc2])

params = {"kf":1.0, "kr":1.0}
M = Mixture(components = [cc], parameters = params)

CRN = M.compile_crn()

print(CRN.pretty_print())
Species(N = 5) = {
    conformation[ordered_polymer_A_A_B_C_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_] (@ 0),
    S (@ 0),
}

Reactions (4) = [
0. conformation[ordered_polymer_A_A_B_C_] <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]
 Kf=k_forward * ordered_polymer_A_A_B_C_
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__, name=kr).

1. conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]+S <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_]
 Kf=k_forward * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__ * S
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kr).

2. conformation[ordered_polymer_A_A_B_C_]+S <--> conformation[_ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S_]
 Kf=k_forward * ordered_polymer_A_A_B_C_ * S
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S__, name=kr).

3. conformation[_ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S_] <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_]
 Kf=k_forward * conformation__ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S__
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l1p0l3n_complex_A_C_S__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kr).

]

Example 2 (continued)

The enumerated reactions can be restricted by choosing a set of intermediate states, initial states, and excluded states.

[3]:
params = {"kf":1.0, "kr":1.0}

#Use a different initial state
cc1 = CombinatorialConformation(initial_states = [pc1], final_states = [pc2])
M1 = Mixture(components = [cc1], parameters = params)
CRN1 = M1.compile_crn()
print("CRN starting at a different initial state:\n", CRN1.pretty_print())

#Use default initial state but contrain the intermediate states
cc2 = CombinatorialConformation(intermediate_states = [pc1], final_states = [pc2])
M2 = Mixture(components = [cc2], parameters = params)
CRN2 = M2.compile_crn()
print("CRN with contrained intermediate states:\n", CRN2.pretty_print())

#Exclude a particular state
cc3 = CombinatorialConformation(excluded_states = [pc1], final_states = [pc2])
M3 = Mixture(components = [cc3], parameters = params)
CRN3 = M2.compile_crn()
print("CRN starting at a different initial state:\n", CRN3.pretty_print())
CRN starting at a different initial state:
 Species(N = 3) = {
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_] (@ 0),
    S (@ 0),
}

Reactions (1) = [
0. conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]+S <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_]
 Kf=k_forward * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__ * S
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kr).

]
CRN with contrained intermediate states:
 Species(N = 4) = {
    conformation[ordered_polymer_A_A_B_C_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_] (@ 0),
    S (@ 0),
}

Reactions (2) = [
0. conformation[ordered_polymer_A_A_B_C_] <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]
 Kf=k_forward * ordered_polymer_A_A_B_C_
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__, name=kr).

1. conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]+S <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_]
 Kf=k_forward * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__ * S
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kr).

]
CRN starting at a different initial state:
 Species(N = 4) = {
    conformation[ordered_polymer_A_A_B_C_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_] (@ 0),
    conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_] (@ 0),
    S (@ 0),
}

Reactions (2) = [
0. conformation[ordered_polymer_A_A_B_C_] <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]
 Kf=k_forward * ordered_polymer_A_A_B_C_
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=ordered_polymer_A_A_B_C_-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__, name=kr).

1. conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B_]+S <--> conformation[_ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S_]
 Kf=k_forward * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__ * S
 Kr=k_reverse * conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__
  k_forward=1.0
  found_key=(mech=None, partid=None, name=kf).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kf).
  k_reverse=1.0
  found_key=(mech=None, partid=None, name=kr).
  search_key=(mech=one_step_conformation_change, partid=conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__-conformation__ordered_polymer_A_A_B_C__p0l0p0l2_complex_A_B__p0l1p0l3n_complex_A_C_S__, name=kr).

]

Example 3: CombinatorialConformationPromoter

The CombinatorialConformationPromoter is a combination of Promoter and CombinatorialConformation that can be used to model transcription. In this example, we build a simple model of a piece of DNA which can fold into two different conformations with folding mediated by a transcription factor F. This model has two sites on the piece of DNA, an A site and a B site. The transcription factor F must first bind to the B site before allowing a loop to form between the A site and B site.

Two variations of this model will be examined, one in which the folded states are transcriptionally activated and the other in which the folded states are transcriptionally repressed.

[4]:
from biocrnpyler.core import Mixture
from biocrnpyler.components import CombinatorialConformationPromoter, DNAassembly
from biocrnpyler.mechanisms import SimpleTranscription, SimpleTranslation

A, B, F = Species("A"), Species("B"), Species("F")

#Operon without anything bound
O = PolymerConformation(polymer = [B, A, B])
#F bound to the first B site
OF0 = Complex([O.polymers[0][0], F]).parent
#F bound to the second B site
OF1 = Complex([O.polymers[0][2], F]).parent
#F Bound to both sites
OF2 = Complex([OF1.polymers[0][2], F]).parent

#Looped Conformations
L0 = Complex([O.polymers[0][0], O.polymers[0][1], F]).parent
L1 = Complex([O.polymers[0][2], O.polymers[0][1], F]).parent

#Loop between B0 and A with all sites occuped by F
L0F1 = Complex([OF1.polymers[0][0], OF1.polymers[0][1], F]).parent
#Loop between B1 and A with all sites occuped by F
L1F0 = Complex([OF0.polymers[0][2], OF0.polymers[0][1], F]).parent

#Create a CombinatorialConformationPromoter
CCP = CombinatorialConformationPromoter(name = "CCP",
                                        intermediate_states = [OF0, OF1], #F must first bind to B sites
                                        final_states = [OF2, L0F1, L1F0], #A list of the saturated (most bound) states
                                        promoter_states = [L0F1, L1F0, L0, L1], #these states will be transcribed
                                        promoter_states_on = True, #toggling this will switch wether or not promoter_states are transcribed
                                        promoter_location = 1 #the location a polymerase may bind (if this is included in the transcription mechanism)
                                       )
#Create a DNAassembly
A = DNAassembly(name = "X", dna = O, promoter = CCP, rbs = "rbs", protein = "X")

mechanisms = [SimpleTranscription(), SimpleTranslation()]

M = Mixture(components = [A], mechanisms = mechanisms, parameters = {"kf":1.0, "kr":1.0, "ktx":1.0, "ktl":1.0})

CRN = M.compile_crn()

print("This model produces 4 transcription reactions, one for each state in the promoter_states list.")
print("Additionally, there are 8 total different PolymerConformations with binding reactions enumerated between them.")
print(CRN.pretty_print(show_rates = False))
This model produces 4 transcription reactions, one for each state in the promoter_states list.
Additionally, there are 8 total different PolymerConformations with binding reactions enumerated between them.
Species(N = 12) = {
    conformation[ordered_polymer_B_A_B_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_] (@ 0),
    protein[X] (@ 0),
    rna[X] (@ 0),
    F (@ 0),
}

Reactions (17) = [
0. conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]+rna[X]
1. conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]+rna[X]
2. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_]+rna[X]
3. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_]+rna[X]
4. conformation[ordered_polymer_B_A_B_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]
5. conformation[ordered_polymer_B_A_B_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]
6. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_]
7. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]
8. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]
9. conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_]
10. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_]
11. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_]
12. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_]
13. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]
14. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]
15. conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_]
16. rna[X] --> rna[X]+protein[X]
]

By toggling promoter_states_on = False, the looped promoters will now become repressed with every other state transcribable by default.

[5]:
#Create a CombinatorialConformationPromoter
CCP = CombinatorialConformationPromoter(name = "CCP",
                                        intermediate_states = [OF0, OF1], #F must first bind to B sites
                                        final_states = [OF2, L0F1, L1F0], #A list of the saturated (most bound) states
                                        promoter_states = [L0F1, L1F0, L0, L1], #these states will be transcribed
                                        promoter_states_on = False, #toggling this will switch wether or not promoter_states are transcribed
                                        promoter_location = 1 #the location a polymerase may bind (if this is included in the transcription mechanism)
                                       )
#Create a DNAassembly
A = DNAassembly(name = "X", dna = O, promoter = CCP, rbs = "rbs", protein = "X")

mechanisms = [SimpleTranscription(), SimpleTranslation()]

M = Mixture(components = [A], mechanisms = mechanisms, parameters = {"kf":1.0, "kr":1.0, "ktx":1.0, "ktl":1.0})

CRN = M.compile_crn()

print("This model produces 4 transcription reactions, one for each state in the promoter_states list.")
print("Additionally, there are 8 total different PolymerConformations with binding reactions enumerated between them.")
print("Notice that the transcribed conformations are all different from the previous example.")
print(CRN.pretty_print(show_rates = False))
This model produces 4 transcription reactions, one for each state in the promoter_states list.
Additionally, there are 8 total different PolymerConformations with binding reactions enumerated between them.
Notice that the transcribed conformations are all different from the previous example.
Species(N = 12) = {
    conformation[ordered_polymer_B_A_B_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_] (@ 0),
    conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_] (@ 0),
    protein[X] (@ 0),
    rna[X] (@ 0),
    F (@ 0),
}

Reactions (18) = [
0. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_]+rna[X]
1. conformation[ordered_polymer_B_A_B_] --> conformation[ordered_polymer_B_A_B_]+rna[X]
2. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]+rna[X]
3. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]+rna[X]
4. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_] --> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_]+rna[X]
5. conformation[ordered_polymer_B_A_B_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]
6. conformation[ordered_polymer_B_A_B_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]
7. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_]
8. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l0n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]
9. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]
10. conformation[_ordered_polymer_B_A_B__p0l1p0l0n_complex_A_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_]
11. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_]
12. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F__p0l1p0l0n_complex_A_B_F_]
13. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_]
14. conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l2n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]
15. conformation[_ordered_polymer_B_A_B__p0l2n_complex_B_F_] <--> conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]
16. conformation[_ordered_polymer_B_A_B__p0l1p0l2n_complex_A_B_F_]+F <--> conformation[_ordered_polymer_B_A_B__p0l0n_complex_B_F__p0l1p0l2n_complex_A_B_F_]
17. rna[X] --> rna[X]+protein[X]
]
[6]:
# End