Esempio n. 1
0
 def test_single_assembly(self):
     """monomers at surface, single assembly"""
     reactor = aggsim.Reactor()
     n = 9
     mon = aggsim.Reactant('monomer', n)
     nuc = aggsim.Reactant('nucleus', 0)
     amb = aggsim.SphericalAssembly('assembly', n, 1.0)
     self.assertTrue(amb.monomers_at_surface == n - 1)
     amb.inc(10)
     self.assertTrue(amb.monomers_at_surface > n - 1)
Esempio n. 2
0
 def test_odd(self):
     """nucleation, odd number of monomers"""
     reactor = aggsim.Reactor()
     n = 1001
     mon = aggsim.Reactant('monomer', n)
     nuc = aggsim.Reactant('nucleus', 0)
     nucr = aggsim.NucleationReaction('monomer', 'nucleus', 2.0)
     reactor.addReactant(mon)
     reactor.addReactant(nuc)
     reactor.addReaction(nucr)
     while not reactor.exhausted:
         reactor.step()
     self.assertTrue(reactor['nucleus'].number == (n - 1) / 2)
     self.assertTrue(reactor['monomer'].number == 1)
Esempio n. 3
0
 def test_steps(self):
     """advancing n steps"""
     reactor = aggsim.Reactor()
     A = aggsim.Reactant('A', 1000)
     Deg = aggsim.DegradationReaction('A', 2.0)
     reactor.addReactant(A)
     reactor.addReaction(Deg)
     reactor.step(10)
     self.assertTrue(reactor.num_steps == 10)
Esempio n. 4
0
 def test_deg(self):
     """degradation"""
     reactor = aggsim.Reactor()
     A = aggsim.Reactant('A', 1000)
     Deg = aggsim.DegradationReaction('A', 2.0)
     reactor.addReactant(A)
     reactor.addReaction(Deg)
     while not reactor.exhausted:
         reactor.step()
     self.assertTrue(reactor['A'].number == 0)
Esempio n. 5
0
 def test_asmb(self):
     """nucleation, into assembly"""
     reactor = aggsim.Reactor()
     n = 1001
     mon = aggsim.Reactant('monomer', n)
     nuc = aggsim.SphericalAssembly('nucleus', 0, 1.0, 0.74)
     nucr = aggsim.NucleationReaction('monomer', 'nucleus', 2.0)
     reactor.addReactant(mon)
     reactor.addReactant(nuc)
     reactor.addReaction(nucr)
     while not reactor.exhausted:
         reactor.step()
     self.assertTrue(reactor['nucleus'].number == (n - 1) / 2)
     self.assertTrue(reactor['monomer'].number == 1)
Esempio n. 6
0
 def setUp(self):
     self.n_initial_mrnas = 10
     self.n_initial_prots = 0
     reactor = aggsim.Reactor(volume_uL=1e-9 * 45, temperature_C=25)
     self.reactor = reactor
     n_prot_A = self.n_initial_prots  #aggsim.numberOfMolecules(1e-15 * 45, 1e-6 * 10)
     prot_A = aggsim.ActivatableReactant('prot-A', n_prot_A)
     reactor.addReactant(prot_A)
     n_mrna_A = self.n_initial_mrnas  #aggsim.numberOfMolecules(1e-15 * 45, 1e-6 * 10)
     mrna_A = aggsim.Reactant('mrna-A', n_mrna_A)
     #self.prot_A = monomers
     reactor.addReactant(mrna_A)
     transl_reaction = aggsim.TranslationReaction('mrna-A', 'prot-A', 1e-7)
     reactor.addReaction(transl_reaction)