In [63]:
from molecules import BioMoleculeCount
from molecules import BioMolecule
from processes import Process
class chromosome:
def __init__(self, sequence):
self.sequence = sequence
#BioM class PM, He
# wenn He gebunden, PM bindet (if bound...)
#mehrere Origins
#definition i?
class Helicase(BioMoleculeCount):
def __init__(self, mid, name, count=0):
super().__init__(mid, name, count)
#Bindung?
# bindet an Stelle X
class Polymerase(BioMoleculeCount):
def __init__(self, mid, name, count=0):
super().__init__(mid, name, count)
class Replication(Process):
def __init__(self, id, name):
super().__init__(id, name)
self._init_helicase()
self._init_polymerase()
def _init_helicase(self):
self.helicase = Helicase("Helicase", "DnaB", 1)
def _init_polymerase(self):
self.polymerase = Polymerase("Polymerase", "Polymerase3", 1)
def update(self):
#state
pass
def initiate(self):
#BioMolcount
#if not He boud> bind
#if not PM bound but He boud > bind
#
pass
def elongate(self):
#rate
#compl()
#numpy.random.poisson()
#if i+xx >=(Nukleotide/sec) >= len(sequence)
#terminate bis xxx
pass
def terminate(self):
#BioMolcount
pass
chrom1 = chromosome(['A','G','C','T','T','G','A','C','T','A'])
chrom1.sequence
def length():
print(len(chrom1.sequence))
#replicated complementary strand
comp_strand = []
#replicated original strand
ori_strand = []
#Origins
#wahrscheinlichkeiten für falsche Nukleotide
#comp+ori
#Rate
#Wann initiate? vllt ab bestimmter Anzahl an Proteine
#energie?
def nucleotide_complement():
for i in chrom1.sequence:
if i == 'A':
comp_strand.append('T')
if i == 'T':
comp_strand.append('A')
if i == 'G':
comp_strand.append('C')
if i == 'C':
comp_strand.append('G')
return comp_strand
nucleotide_complement()
length()
print(chrom1.sequence)
print(comp_strand)
print(ori_strand)
In [54]:
class Dog:
def __init__(self, bellen):
self.bellen = bellen
hund1 = Dog('wuff')
hund2 = Dog('wiff')
In [56]:
print(hund1.bellen)
print(hund2.bellen)
In [57]:
class Helicase(BioMoleculeCount):
def __init__(self, mid, name, count):
super().__init__(mid, name, count)
In [58]:
helicase1 = Helicase('Helicase', 'Helicase', 10)
In [61]:
helicase1.count -= 1
helicase1.count
Out[61]:
In [ ]: