EPFL-LCSB / skimpy

Symbolic Kinetic Models with Python
Apache License 2.0
30 stars 14 forks source link

load_yaml_model does not seem to load inhibitory mechanisms #15

Open PHvanLent opened 1 year ago

PHvanLent commented 1 year ago

Dear Skimpy developers,

I noticed that when adding inhibitory mechanisms to the model, these can be in principle exported with the export_to_yaml function, but not imported with the load_yaml_model(). Is this correct, or is there already something missing in how I add the mechanisms in the mode?

name="Enz_B"
SpecificConvenience = make_generalized_reversible_hill_n_n_h1_with_inhibition([-1, 1,1], [1])
metabolites=SpecificConvenience.Reactants(substrate1='A_c',product1='B_c',product2='pi_c')
inhibitors=SpecificConvenience.Inhibitors(inhibitor1='L_c')
parameters=SpecificConvenience.Parameters(
    vmax_forward=None,
    km_substrate1=None,
    km_product1=None,
    ki_inhibitor1=None)
Enz_B=Reaction(name=name,
                   mechanism=SpecificConvenience,
                   reactants=metabolites,
                   inhibitors=inhibitors,)
Enz_B.modifiers['DSM__h_c']=DisplacementSmallMoleculeModifier("h_c",1)           
kmodel.add_reaction(Enz_B)
kmodel.parametrize_by_reaction({Enz_B.name:parameters})
kmodel.reactants.B_c.compartment=kmodel.compartments.c

I have been using your kinetic modelling package quite a lot, so thank you for this nice package.

Kind regards,

Paul

weilandtd commented 1 year ago

Hi Paul,

Thank you for bringing this to our attention. It looks like you add everything correctly. We will try to come back with a fix solution for this!