amici.ode_model
Objects for AMICI’s internal ODE model representation
Classes
|
A conservation law defines the absolute the total amount of a (weighted) sum of states |
|
A Constant is a fixed variable in the model with respect to which sensitivities cannot be computed, abbreviated by |
|
An Event defines either a SBML event or a root of the argument of a Heaviside function. |
|
An Event Observable links model simulations to event related experimental measurements, abbreviated by |
|
An Expression is a recurring elements in symbolic formulas. |
|
A LogLikelihood defines the distance between measurements and experiments for a particular observable. |
|
Loglikelihood for event observables regularization |
|
Loglikelihood for observables |
|
Loglikelihood for event observables |
|
Base class for model components |
|
An Observable links model simulations to experimental measurements, abbreviated by |
|
A Parameter is a free variable in the model with respect to which sensitivities may be computed, abbreviated by |
|
A Standard Deviation Sigma rescales the distance between simulations and measurements when computing residuals or objective functions, abbreviated by |
|
Standard deviation for observables |
|
Standard deviation for event observables |
|
A State variable defines an entity that evolves with time according to the provided time derivative, abbreviated by |
- class amici.ode_model.ConservationLaw(identifier, name, value, coefficients, state_id)[source]
A conservation law defines the absolute the total amount of a (weighted) sum of states
- get_ncoeff(state_id)[source]
Computes the normalized coefficient a_i/a_j where i is the index of the provided state_id and j is the index of the state that is replaced by this conservation law. This can be used to compute both dtotal_cl/dx_rdata (=ncoeff) and dx_rdata/dx_solver (=-ncoeff).
- Parameters
state_id – identifier of the state
- Return type
- Returns
normalized coefficent of the state
- class amici.ode_model.Constant(identifier, name, value)[source]
A Constant is a fixed variable in the model with respect to which sensitivities cannot be computed, abbreviated by
k
.
- class amici.ode_model.Event(identifier, name, value, state_update, initial_value=True)[source]
An Event defines either a SBML event or a root of the argument of a Heaviside function. The Heaviside functions will be tracked via the vector
h
during simulation and are needed to inform the ODE solver about a discontinuity in either the right-hand side or the states themselves, causing a reinitialization of the solver.
- class amici.ode_model.EventObservable(identifier, name, value, event, measurement_symbol=None, transformation='lin')[source]
An Event Observable links model simulations to event related experimental measurements, abbreviated by
z
.- Variables
_event – symbolic event identifier
- class amici.ode_model.Expression(identifier, name, value)[source]
An Expression is a recurring elements in symbolic formulas. Specifying this may yield more compact expression which may lead to substantially shorter model compilation times, but may also reduce model simulation time. Abbreviated by
w
.
- class amici.ode_model.LogLikelihoodRZ(identifier, name, value)[source]
Loglikelihood for event observables regularization
- class amici.ode_model.LogLikelihoodY(identifier, name, value)[source]
Loglikelihood for observables
- class amici.ode_model.LogLikelihoodZ(identifier, name, value)[source]
Loglikelihood for event observables
- class amici.ode_model.ModelQuantity(identifier, name, value)[source]
Base class for model components
- class amici.ode_model.Observable(identifier, name, value, measurement_symbol=None, transformation=ObservableTransformation.LIN)[source]
An Observable links model simulations to experimental measurements, abbreviated by
y
.- Variables
_measurement_symbol – sympy symbol used in the objective function to represent measurements to this observable
trafo – observable transformation, only applies when evaluating objective function or residuals
- class amici.ode_model.Parameter(identifier, name, value)[source]
A Parameter is a free variable in the model with respect to which sensitivities may be computed, abbreviated by
p
.
- class amici.ode_model.SigmaZ(identifier, name, value)[source]
Standard deviation for event observables
- class amici.ode_model.State(identifier, name, init, dt)[source]
A State variable defines an entity that evolves with time according to the provided time derivative, abbreviated by
x
.- Variables
_conservation_law – algebraic formula that allows computation of this state according to a conservation law
_dt – algebraic formula that defines the temporal derivative of this state
- get_dx_rdata_dx_solver(state_id)[source]
Returns the expression that allows computation of
dx_rdata_dx_solver
for this state, accounting for conservation laws.- Returns
dx_rdata_dx_solver expression
- get_free_symbols()[source]
Gets the set of free symbols in time derivative and initial conditions
- Return type
- Returns
free symbols
- get_x_rdata()[source]
Returns the expression that allows computation of x_rdata for this state, accounting for conservation laws.
- Returns
x_rdata expression
- has_conservation_law()[source]
Checks whether this state has a conservation law assigned.
- Returns
True if assigned, False otherwise
- set_conservation_law(law)[source]
Sets the conservation law of a state.
If a conservation law is set, the respective state will be replaced by an algebraic formula according to the respective conservation law.
- Parameters
law (
amici.ode_model.ConservationLaw
) – linear sum of states that if added to this state remain constant over time- Return type
- set_dt(dt)[source]
Sets the time derivative
- Parameters
dt (
sympy.core.expr.Expr
) – time derivative- Return type