amici.amici
Core C++ bindings
This module encompasses the complete public C++ API of AMICI, which was
exposed via swig. All functions listed here are directly accessible in the
main amici package, i.e., amici.amici.ExpData
is available as
amici.ExpData
.
Usage of functions and classes from the base amici
package is
generally recommended as they often include convenience wrappers that avoid
common pitfalls when accessing C++ types from python and implement some
nonstandard type conversions.
Classes
|
Swig-Generated class templating common python types including |
|
Swig-Generated class templating common python types including |
|
ExpData carries all information about experimental or condition-specific data |
|
Swig-Generated class that implements smart pointers to ExpData as objects. |
|
Swig-Generated class templating common python types including |
|
An enumeration. |
|
Swig-Generated class templating common python types including |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
A log item. |
|
|
|
A logger, holding a list of error messages. |
|
The Model class represents an AMICI ODE/DAE model. |
|
Container for model dimensions. |
|
Swig-Generated class that implements smart pointers to Model as objects. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
|
|
An enumeration. |
|
Stores all data to be returned by |
|
Swig-Generated class that implements smart pointers to ReturnData as objects. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
Container for various simulation parameters. |
implements an exchange format to store and transfer the state of a simulation at a specific timepoint. |
|
|
The Solver class provides a generic interface to CVODES and IDAS solvers, individual realizations are realized in the CVodeSolver and the IDASolver class. |
|
Swig-Generated class that implements smart pointers to Solver as objects. |
|
An enumeration. |
|
An enumeration. |
|
|
|
Swig-Generated class templating |
|
Swig-Generated class templating common python types including |
Functions Summary
|
Returns the current backtrace as std::string |
AMICI extension was compiled with OpenMP? |
|
|
|
|
Apply parameter scaling according to scaling |
|
Remove parameter scaling according to scaling |
|
Swig-Generated class, which, in contrast to other Vector classes, does not allow for simple interoperability with common Python types, but must be created using |
|
Core integration routine. |
|
Same as runAmiciSimulation, but for multiple ExpData instances. |
|
Apply parameter scaling according to scaling |
|
Get the string representation of the given simulation status code (see ReturnData::status). |
|
Remove parameter scaling according to the parameter scaling in pscale |
Functions
- amici.amici.backtraceString(maxFrames: int, first_frame: int = 0) str [source]
Returns the current backtrace as std::string
- amici.amici.compiledWithOpenMP() bool [source]
AMICI extension was compiled with OpenMP?
- Return type
- amici.amici.getScaledParameter(unscaledParameter: float, scaling: amici.amici.ParameterScaling) float [source]
Apply parameter scaling according to scaling
- Parameters
unscaledParameter (
float
) –scaling (
amici.amici.ParameterScaling
) – parameter scaling
- Return type
- Returns
Scaled parameter
- amici.amici.getUnscaledParameter(scaledParameter: float, scaling: amici.amici.ParameterScaling) float [source]
Remove parameter scaling according to scaling
- Parameters
scaledParameter (
float
) – scaled parameterscaling (
amici.amici.ParameterScaling
) – parameter scaling
- Return type
- Returns
Unscaled parameter
- amici.amici.parameterScalingFromIntVector(intVec: amici.amici.IntVector) amici.amici.ParameterScalingVector [source]
Swig-Generated class, which, in contrast to other Vector classes, does not allow for simple interoperability with common Python types, but must be created using
amici.amici.parameterScalingFromIntVector()
- Return type
- amici.amici.runAmiciSimulation(solver: amici.amici.Solver, edata: amici.amici.ExpData, model: amici.amici.Model, rethrow: bool = False) amici.amici.ReturnData [source]
Core integration routine. Initializes the solver and runs the forward and backward problem.
- Parameters
solver (
amici.amici.Solver
) – Solver instanceedata (
amici.amici.ExpData
) – pointer to experimental data objectmodel (
amici.amici.Model
) – model specification objectrethrow (
bool
) – rethrow integration exceptions?
- Return type
- Returns
rdata pointer to return data object
- amici.amici.runAmiciSimulations(solver: amici.amici.Solver, edatas: amici.amici.ExpDataPtrVector, model: amici.amici.Model, failfast: bool, num_threads: int) Iterable[amici.amici.ReturnData] [source]
Same as runAmiciSimulation, but for multiple ExpData instances. When compiled with OpenMP support, this function runs multi-threaded.
- Parameters
solver (
amici.amici.Solver
) – Solver instanceedatas (
amici.amici.ExpDataPtrVector
) – experimental data objectsmodel (
amici.amici.Model
) – model specification objectfailfast (
bool
) – flag to allow early terminationnum_threads (
int
) – number of threads for parallel execution
- Return type
Iterable[ReturnData]
- Returns
vector of pointers to return data objects
- amici.amici.scaleParameters(bufferUnscaled: Iterable[float], pscale: Iterable[amici.amici.ParameterScaling], bufferScaled: Iterable[float]) None [source]
Apply parameter scaling according to scaling
- Parameters
bufferUnscaled (
typing.Iterable
[float
]) –pscale (
typing.Iterable
[amici.amici.ParameterScaling
]) – parameter scalingbufferScaled (
typing.Iterable
[float
]) – destination
- Return type
- amici.amici.simulation_status_to_str(status: int) str [source]
Get the string representation of the given simulation status code (see ReturnData::status).
- amici.amici.unscaleParameters(bufferScaled: Iterable[float], pscale: Iterable[amici.amici.ParameterScaling], bufferUnscaled: Iterable[float]) None [source]
Remove parameter scaling according to the parameter scaling in pscale
All vectors must be of same length.
- Parameters
bufferScaled (
typing.Iterable
[float
]) – scaled parameterspscale (
typing.Iterable
[amici.amici.ParameterScaling
]) – parameter scalingbufferUnscaled (
typing.Iterable
[float
]) – unscaled parameters are written to the array
- Return type