def __init__(self, GDP=0, GTP=0, unbound=0): box = DiffusionBox() # We want absolute number of molecules. self.GDP = box.membrane_to_absolute(GDP) self.GTP = box.membrane_to_absolute(GTP) self.unbound = box.cytosolic_to_absolute(unbound) super().__init__(self.GDP + self.GTP + self.unbound)
def __init__(self, concentration=None, **kwargs): if concentration is not None: box = DiffusionBox() if self.location == 'cytosolic': self.num_molecules = box.cytosolic_to_absolute(concentration) else: self.num_molecules = box.membrane_to_absolute(concentration) else: super().__init__(**kwargs)