add_metabolite#

pharmpy.modeling.add_metabolite(model, drug_dvid=1, presystemic=False)[source]#

Adds a metabolite compartment to a model

The flow from the central compartment to the metabolite compartment will be unidirectional.

Presystemic indicate that the metabolite compartment will be directly connected to the DEPOT. If a depot compartment is not present, one will be created.

Parameters:
  • model (Model) – Pharmpy model

  • drug_dvid (int) – DVID for drug (assuming all other DVIDs being for metabolites)

  • presystemic (bool) – Decide wether or not to add metabolite as a presystemetic fixed drug.

Returns:

Model – Pharmpy model object

Examples

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> model = add_metabolite(model)