<jupyter_start><jupyter_text>Frequently Asked Questions (FAQs)Have a question? Try searching the FAQs!  How do I install MASSpy?There are several ways to install MASSpy. To use ``pip`` to [install MASSpy from PyPI](https://pypi.python.org/pypi/masspy)```pythonpip install masspy```Check out the [Quick Start Guide](../installation/quickstart.rst) to learn more about getting started!  How do I cite MASSpy?A manuscript is in preparation for publication and will be the proper reference for citing the **MASSpy** software package in the future. In the meantime, feel free to cite the preprint MASSpy: Building, simulating, and visualizing dynamic biological models in Python using mass action kinetics, which can be found at [bioRxiv](https://www.biorxiv.org/content/10.1101/2020.07.31.230334v1).  How do I change the rate expression for a reaction?Use the `MassModel.add_custom_rate()` method.<jupyter_code>import mass.test

model = mass.test.create_test_model("textbook")<jupyter_output>Using license file /Users/zhaiman/opt/licenses/gurobi.lic
Academic license - for non-commercial use only<jupyter_text>When metabolites are added to reactions, **MASSpy** will generates rate expressions automatically based on mass action kinetics and the kinetic reversibility given by the `MassReaction.reversible` attribute.<jupyter_code>print(model.reactions.PGI.rate)<jupyter_output>kf_PGI*(g6p_c(t) - f6p_c(t)/Keq_PGI)<jupyter_text>If a reaction is associated with a model, a custom rate expression can be set using the `MassModel.add_custom_rate()` method. The `add_custom_rate()` method requires the corresponding reaction object and a string representing the custom rate expression to set. For example, to set a simple Michaelis Menten rate expression with $V_{max}$ and $K_{m}$ parameters:<jupyter_code>custom_parameter_dict = {"vmax_PGI": None, "Km_PGI": None}

model.add_custom_rate(
    model.reactions.PGI,
    custom_rate="(vmax_PGI * g6p_c)/(Km_PGI + g6p_c)",
    custom_parameters=custom_parameter_dict)
print(model.reactions.PGI.rate)<jupyter_output>vmax_PGI*g6p_c(t)/(Km_PGI + g6p_c(t))<jupyter_text>The reaction rate expression is converted from a string to a symbolic expression using the `sympy.sympify()` function. All metabolites and standard reaction parameters (i.e. returned by the `MassReaction.all_parameter_ids`), and boundary conditions are recognized. However, all additional parameters must be set as a custom parameter in the `MassModel.custom_parameters` attribute.<jupyter_code>print("Recognized Parameters: {!r}".format(model.reactions.PGI.all_parameter_ids))
print("Custom Parameters: {!r}".format(list(custom_parameter_dict)))<jupyter_output>Recognized Parameters: ['kf_PGI', 'Keq_PGI', 'kr_PGI', 'v_PGI']
Custom Parameters: ['vmax_PGI', 'Km_PGI']
StarcoderdataJupyterStructuredCleanDedup