amici.pysb_import¶
PySB Import¶
This module provides all necessary functionality to import a model specified
in the pysb.core.Model format.
Functions Summary
|
Constructs a list of monomer names contained in complex patterns. |
|
Wrapper to interface |
|
Creates an |
|
Generate AMICI C++ files for the model provided to the constructor. |
|
Load a pysb model module and return the |
Functions
-
amici.pysb_import.extract_monomers(complex_patterns)[source]¶ Constructs a list of monomer names contained in complex patterns. Multiplicity of names corresponds to the stoichiometry in the complex.
- Parameters
complex_patterns (
typing.Union[pysb.core.ComplexPattern,typing.List[pysb.core.ComplexPattern]]) – (list of) complex pattern(s)- Return type
- Returns
list of monomer names
-
amici.pysb_import.has_fixed_parameter_ic(specie, pysb_model, ode_model)[source]¶ Wrapper to interface
ode_export.ODEModel.state_has_fixed_parameter_initial_condition()from a pysb specie/model arguments- Parameters
specie (
pysb.core.ComplexPattern) – pysb speciespysb_model (
pysb.core.Model) – pysb modelode_model (
amici.ode_export.ODEModel) – ODE model
- Return type
- Returns
Falseif the species does not have an initial condition at all. Otherwise the return value ofode_export.ODEModel.state_has_fixed_parameter_initial_condition()
-
amici.pysb_import.ode_model_from_pysb_importer(model, constant_parameters=None, observables=None, sigmas=None, compute_conservation_laws=True, simplify=<function powsimp>, verbose=False)[source]¶ Creates an
amici.ODEModelinstance from apysb.Modelinstance.- Parameters
model (
pysb.core.Model) – seeamici.pysb_import.pysb2amici()constant_parameters (
typing.Optional[typing.List[str]]) – seeamici.pysb_import.pysb2amici()observables (
typing.Optional[typing.List[str]]) – seeamici.pysb_import.pysb2amici()sigmas (
typing.Optional[typing.Dict[str,str]]) – dict with names of observable Expressions as keys and names of sigma Expressions as value sigmacompute_conservation_laws (
bool) – seeamici.pysb_import.pysb2amici()simplify (
typing.Callable) – seeamici.ODEModel._simplifyverbose (
typing.Union[int,bool]) – verbosity level for logging, True/False default tologging.DEBUG/logging.ERROR
- Return type
- Returns
New ODEModel instance according to pysbModel
-
amici.pysb_import.pysb2amici(model, output_dir=None, observables=None, constant_parameters=None, sigmas=None, verbose=False, assume_pow_positivity=False, compiler=None, compute_conservation_laws=True, compile=True, simplify=<function <lambda>>)[source]¶ Generate AMICI C++ files for the model provided to the constructor.
- Parameters
model (
pysb.core.Model) – pysb model,pysb.Model.namewill determine the name of the generated moduleoutput_dir (
typing.Optional[str]) – seeamici.ode_export.ODEExporter.set_paths()observables (
typing.Optional[typing.List[str]]) – list ofpysb.core.Expressionorpysb.core.Observablenames in the provided model that should be mapped to observablessigmas (
typing.Optional[typing.Dict[str,str]]) – dict ofpysb.core.Expressionnames that should be mapped to sigmasconstant_parameters (
typing.Optional[typing.List[str]]) – list ofpysb.core.Parameternames that should be mapped as fixed parametersverbose (
typing.Union[int,bool]) – verbosity level for logging, True/False default tologging.DEBUG/logging.ERRORassume_pow_positivity (
bool) – if set totrue, a special pow function is used to avoid problems with state variables that may become negative due to numerical errorscompiler (
typing.Optional[str]) – distutils/setuptools compiler selection to build the python extensioncompute_conservation_laws (
bool) – if set totrue, conservation laws are automatically computed and applied such that the state-jacobian of the ODE right-hand-side has full rank. This option should be set totruewhen using the Newton algorithm to compute steadystatescompile (
bool) – Iftrue, build the python module for the generated model. If false, just generate the source code.simplify (
typing.Callable) – seeamici.ODEModel._simplify