Beispiel #1
0
    def add_reactions(self):
        A = self.A
        B = self.B
        C = self.C

        r = model.create_unimolecular_reaction_rule(A, B, self.kf_1)
        self.m.network_rules.add_reaction_rule(r)
        r = model.create_unimolecular_reaction_rule(B, A, self.kb_1)
        self.m.network_rules.add_reaction_rule(r)
        r = model.create_binding_reaction_rule(A, B, C, self.kf_2)
        self.m.network_rules.add_reaction_rule(r)
        r = model.create_unbinding_reaction_rule(C, A, B, self.kb_2)
        self.m.network_rules.add_reaction_rule(r)
        r = model.create_decay_reaction_rule(C, self.kb_1)
        self.m.network_rules.add_reaction_rule(r)
Beispiel #2
0
    def test_three_particles_in_contact(self):
        place_particle(self.s.world, self.S, [0.0,0.0,0.0])
        place_particle(self.s.world, self.S, [1e-7,0.0,0.0])

        # dummy
        place_particle(self.s.world, self.S, [2e-7,0.0,0.0])

        r = model.create_unimolecular_reaction_rule(self.S, self.A, 1e10)
        self.m.network_rules.add_reaction_rule(r)

        t = self.s.t
        for i in range(5):
            self.s.step()
            
            # Check if species ids are consistent after unimolecular 
            # multi reaction.
            for species in self.s.world.species:
                for pid in self.s.world.get_particle_ids(species.id):
                    particle = self.s.world.get_particle(pid)[1]
                    self.failIf(particle.sid != species.id)
        self.failIf(t == self.s.t)
Beispiel #3
0
m.add_species_type(O)
m.add_species_type(R)
m.add_species_type(P)
m.add_species_type(OR)
m.add_species_type(ORp)
m.add_species_type(ORpa)
m.add_species_type(T)
m.add_species_type(M)
m.add_species_type(Mribo)

# Reaction rules
r1 = model.create_binding_reaction_rule(O, R, OR, k_fR)
m.network_rules.add_reaction_rule(r1)
r2 = model.create_unbinding_reaction_rule(OR, O, R, k_bR)
m.network_rules.add_reaction_rule(r2)
r3 = model.create_unimolecular_reaction_rule(O, ORp, k_f_rp)
m.network_rules.add_reaction_rule(r3)
r4 = model.create_unimolecular_reaction_rule(ORp, O, k_b_rp)
m.network_rules.add_reaction_rule(r4)
r5 = model.create_unimolecular_reaction_rule(ORp, ORpa, k_OC)
m.network_rules.add_reaction_rule(r5)
r6 = model.create_unbinding_reaction_rule(ORpa, T, O, 1 / t_clear)
m.network_rules.add_reaction_rule(r6)
r7 = model.create_decay_reaction_rule(M, k_dm)
m.network_rules.add_reaction_rule(r7)
r8 = model.create_unbinding_reaction_rule(M, M, Mribo, k_ribo)
m.network_rules.add_reaction_rule(r8)
r9 = model.create_unimolecular_reaction_rule(Mribo, P, 1 / t_trans)
m.network_rules.add_reaction_rule(r9)
r10 = model.create_decay_reaction_rule(P, k_dp)
m.network_rules.add_reaction_rule(r10)
Beispiel #4
0
m.add_species_type(O) 
m.add_species_type(R) 
m.add_species_type(P) 
m.add_species_type(OR) 
m.add_species_type(ORp) 
m.add_species_type(ORpa) 
m.add_species_type(T) 
m.add_species_type(M) 
m.add_species_type(Mribo) 

# Reaction rules
r1 = model.create_binding_reaction_rule(O, R, OR, k_fR)
m.network_rules.add_reaction_rule(r1)
r2 = model.create_unbinding_reaction_rule(OR, O, R, k_bR)
m.network_rules.add_reaction_rule(r2)
r3 = model.create_unimolecular_reaction_rule(O, ORp, k_f_rp)
m.network_rules.add_reaction_rule(r3)
r4 = model.create_unimolecular_reaction_rule(ORp, O, k_b_rp)
m.network_rules.add_reaction_rule(r4)
r5 = model.create_unimolecular_reaction_rule(ORp, ORpa, k_OC)
m.network_rules.add_reaction_rule(r5)
r6 = model.create_unbinding_reaction_rule(ORpa, T, O, 1/t_clear)
m.network_rules.add_reaction_rule(r6)
r7 = model.create_decay_reaction_rule(M, k_dm)
m.network_rules.add_reaction_rule(r7)
r8 = model.create_unbinding_reaction_rule(M, M, Mribo, k_ribo)
m.network_rules.add_reaction_rule(r8)
r9 = model.create_unimolecular_reaction_rule(Mribo, P, 1/t_trans)
m.network_rules.add_reaction_rule(r9)
r10 = model.create_decay_reaction_rule(P, k_dp)
m.network_rules.add_reaction_rule(r10)