-
Notifications
You must be signed in to change notification settings - Fork 9
Description
I have been testing ThinLayerPysces with a complex dataset comprising 15 measurements and 2 cascade reactions. The parameters I have obtained with PyEnzyme differ from those I obtained when coding the fit by hand using lmfit. It turns out that the catalyst (protein) concentrations differ between measurements. These are specified in the rate laws of the two reactions (as modifiers). But it appears that the protein values are not updated for the various measurements, see here:
PyEnzyme/pyenzyme/thinlayers/psyces.py
Lines 530 to 551 in 8a29bb7
| def to_pysces_model(self, model: pysces.model): | |
| """ | |
| Apply initial conditions to a PySCeS model. | |
| This method sets the simulation time and initial species concentrations | |
| in the PySCeS model, ensuring zero values are replaced with small positive values. | |
| Args: | |
| model (pysces.model): The PySCeS model to update. | |
| Returns: | |
| pysces.model: The updated model with initial conditions set. | |
| """ | |
| model = dill.loads(dill.dumps(model)) | |
| model.sim_time = np.array(self.time) | |
| model.__dict__.update( | |
| { | |
| f"{species_id}_init": value if value != 0 else 1.0e-9 | |
| for species_id, value in self.species.items() | |
| } | |
| ) | |
| return model |
Only the initial values of the species in the measurements are updated. I guess the values of the constant species (if there are any), as well as of the proteins, should be updated as well as these may differ between measurements. In the PySCeS PSC files these enter as "fixed species".
Metadata
Metadata
Assignees
Labels
Type
Projects
Status