biosimulators_utils.model_lang.xpp package

Submodules

biosimulators_utils.model_lang.xpp.data_model module

Data model for XPP simulation methods

Author

Jonathan Karr <karr@mssm.edu>

Date

2021-08-08

Copyright

2021, Center for Reproducible Biomedical Modeling

License

MIT

biosimulators_utils.model_lang.xpp.utils module

Utilities for working with XPP models

Author

Jonathan Karr <karr@mssm.edu>

Date

2021-08-08

Copyright

2021, Center for Reproducible Biomedical Modeling

License

MIT

biosimulators_utils.model_lang.xpp.utils.get_parameters_variables_outputs_for_simulation(model_filename, model_language, simulation_type, algorithm_kisao_id=None, set_filename=None, parameter_filename=None, initial_conditions_filename=None, native_ids=False, native_data_types=False, include_compartment_sizes_in_simulation_variables=False, include_model_parameters_in_simulation_variables=False)[source]

Get the possible observables for a simulation of a model

Parameters
  • model_filename (str) – path to model file or directory of XPP ODE, set, parameters, and initial conditions files

  • model_language (str) – model language (e.g., urn:sedml:language:xpp)

  • simulation_type (types.Type) – subclass of Simulation

  • algorithm_kisao_id (str, optional) – KiSAO id of the algorithm for simulating the model (e.g., KISAO_0000019 for CVODE)

  • set_filename (str, optional) – path to XPP set file

  • parameter_filename (str, optional) – path to XPP parameters file

  • initial_conditions_filename (str, optional) – path to XPP initial conditions file

  • native_ids (bool, optional) – whether to return the raw id and name of each model component rather than the suggested name for the variable of an associated SED-ML data generator

  • native_data_types (bool, optional) – whether to return new_values in their native data types

  • include_compartment_sizes_in_simulation_variables (bool, optional) – whether to include the sizes of non-constant SBML compartments with assignment rules among the returned SED variables

  • include_model_parameters_in_simulation_variables (bool, optional) – whether to include the values of non-constant SBML parameters with assignment rules among the returned SED variables

Returns

possible attributes of a model that can be changed and their default values list of Simulation: simulations of the model list of Variable: possible observables for a simulation of the model list of Plot: possible plots of the results of a simulation of the model

Return type

list of ModelAttributeChange

biosimulators_utils.model_lang.xpp.validation module

Methods for validating XPP files

Author

Jonathan Karr <karr@mssm.edu>

Date

2021-08-06

Copyright

2021, Center for Reproducible Biomedical Modeling

License

MIT

biosimulators_utils.model_lang.xpp.validation.get_xpp_input_configuration_from_directory(dirname)[source]

Get input file configuration from a directory of files

  • *.ode: Main model model

  • *.set: Set file

  • *.par: Parameters file

  • *.ic: Initial conditions file

Parameters

dirname (str) – path to directory of XPP files

Returns

  • str: path to main model file

  • str: path to set file

  • str: path to parameters file

  • str: path to initial conditions file

  • str: name of a set to use

  • str: name of a set not to use

Return type

tuple

biosimulators_utils.model_lang.xpp.validation.validate_model(filename, set_filename=None, parameter_filename=None, initial_conditions_filename=None, name=None)[source]

Check that a model is valid

Parameters
  • filename (str) – path to model file or directory with .ode and possibly set (.set), parameter (.par), andd initial conditions (.ic) files

  • set_filename (str, optional) – path to XPP set file

  • parameter_filename (str, optional) – path to XPP parameters file

  • initial_conditions_filename (str, optional) – path to XPP initial conditions file

  • name (str, optional) – name of model for use in error messages

Returns

  • nested list of str: nested list of errors (e.g., required ids missing or ids not unique)

  • nested list of str: nested list of errors (e.g., required ids missing or ids not unique)

  • dict: values of parameters of initial conditions of variables

Return type

tuple