roadrunner
2.6.0
Fast simulator for SBML models
|
A data structure that is that allows data to be exchanged with running SBML models. More...
#include <LLVMModelData.h>
Public Attributes | |
unsigned | size |
sizeof this struct, make sure we use the correct size in LLVM land. | |
unsigned | flags |
double | time |
current time. | |
unsigned | numIndCompartments |
unsigned | numIndFloatingSpecies |
The total ammounts of the independent floating species that don't have rules, i.e. More... | |
unsigned | numIndBoundarySpecies |
number of boundary species and boundary species concentrations. More... | |
unsigned | numIndGlobalParameters |
number of global parameters | |
unsigned | numRateRules |
all rate rules are by definition dependent | |
unsigned | numReactions |
number of reactions, same as ratesSize. More... | |
unsigned | numInitCompartments |
unsigned | numInitFloatingSpecies |
unsigned | numInitBoundarySpecies |
unsigned | numInitGlobalParameters |
rr::csr_matrix * | stoichiometry |
stoichiometry matrix | |
class Random * | random |
The rrllvm::Random class holds a RNG and caches random distributions used by the distrib package. | |
unsigned | numEvents |
unsigned | numPiecewiseTriggers |
unsigned | stateVectorSize |
number of items in the state std::vector. More... | |
double * | stateVector |
the state std::vector, this is usually a pointer to a block of data owned by the integrator. | |
double * | stateVectorRate |
the rate of change of the state std::vector, this is usually a pointer to a block of data owned by the integrator. | |
double * | rateRuleRates |
the rate of change of all elements who's dynamics are determined by rate rules. More... | |
double * | floatingSpeciesAmountRates |
amount rates of change for floating species. More... | |
double * | compartmentVolumesAlias |
******* Permanent data section ******* More... | |
double * | initCompartmentVolumesAlias |
double * | initFloatingSpeciesAmountsAlias |
conservation More... | |
double * | boundarySpeciesAmountsAlias |
double * | initBoundarySpeciesAmountsAlias |
double * | globalParametersAlias |
double * | initGlobalParametersAlias |
double * | reactionRatesAlias |
double * | rateRuleValuesAlias |
All of the elelments which have a rate rule are stored here, including the dependent floating species, which will not be stored in the independent floating species block. More... | |
double * | floatingSpeciesAmountsAlias |
has length numIndFloatingSpecies More... | |
double | data [0] |
binary data layout: More... | |
A data structure that is that allows data to be exchanged with running SBML models.
In the case of CExecutableModels, A pointer to this struct is given to the compiled shared library, and the C code there modifies the buffers of this structure.
There are some functions in ExecutableModel.h that manage ModelData memory. These would have made more sense here, but in order to prevent any issues with generated code interacting with them, they were placed there.
Basic Nomencalture Compartments: A well stirred compartment which contains one or more species. the volume of a compartment can change durring the course of a simulation.
Floating Species: these are chemical species who's values (ammount / concentration) change over time.
Boundary Species: chemical species that who's values are fixed to their initial conditions, these function as boundary conditions.
double* rrllvm::LLVMModelData::compartmentVolumesAlias |
******* Permanent data section *******
Ten Alias pointers below point to ten arrays stored continously in data[0] at the end of this struct. number of compartments, and compartment volumes. units: volume
double rrllvm::LLVMModelData::data[0] |
binary data layout:
compartmentVolumes [numIndCompartmentVolumes] // 32 initCompartmentVolumes [numInitCompartmentVolumes] // 33 initFloatingSpeciesAmounts [numInitFloatingSpecies] // 34 boundarySpeciesAmounts [numIndBoundarySpecies] // 35 initBoundarySpeciesAmounts [numInitBoundarySpecies] // 36 globalParameters [numIndGlobalParameters] // 37 initGlobalParameters [numInitGlobalParameters] // 38 reactionRates [numReactions] // 39
rateRuleValues [numRateRules] // 40 floatingSpeciesAmounts [numIndFloatingSpecies] // 41 This dynamic-sized array will be allocated while this ModelData is allocated. Ten array in the permanent data section is stored contiously in this chunck. Size of each array is defined by ten unsigned integer above. Values can be accessed using ten alias pointers defined above.
double* rrllvm::LLVMModelData::floatingSpeciesAmountRates |
amount rates of change for floating species.
This pointer is ONLY valid during an evalModel call, otherwise it is zero. TODO, this needs be be moved to a parameter.
double* rrllvm::LLVMModelData::floatingSpeciesAmountsAlias |
has length numIndFloatingSpecies
This pointer is part of the state std::vector. When any function is called by CVODE, this is actually a pointer to a CVODE owned memory block.
double* rrllvm::LLVMModelData::initFloatingSpeciesAmountsAlias |
conservation
length numIndFloatingSpecies
Note that dependent floating species which have a rate rule will not be stored in this block, instead, they will be stored in RateRule block
unsigned rrllvm::LLVMModelData::numIndBoundarySpecies |
number of boundary species and boundary species concentrations.
units: either Mass Percent = (Mass of Solute) / (Mass of Solution) x 100% Volume Percent= (Volume of Solute) / (Volume of Solution) x 100% Mass/Volume Percent= (Mass of Solute) / (Volume of Solution) x 100%
unsigned rrllvm::LLVMModelData::numIndFloatingSpecies |
The total ammounts of the independent floating species that don't have rules, i.e.
concentration * compartment volume.
Note, the floating species consist of BOTH independent AND dependent species. Indexes [0,numIndpendentSpecies) values are the indenpendent species, other dependent species stored in RateRule block
unsigned rrllvm::LLVMModelData::numReactions |
number of reactions, same as ratesSize.
These are the calcuated reaction rates, not the species rates.
double* rrllvm::LLVMModelData::rateRuleRates |
the rate of change of all elements who's dynamics are determined by rate rules.
This is just a pointer to a data block owned by the integrator.
Normally NULL, only valid durring an evalModel call.
double* rrllvm::LLVMModelData::rateRuleValuesAlias |
All of the elelments which have a rate rule are stored here, including the dependent floating species, which will not be stored in the independent floating species block.
As the integrator runs, this pointer can simply point to an offset in the integrator's state std::vector.
This pointer is part of the state std::vector. When any function is called by CVODE, this is actually a pointer to a CVODE owned memory block. Otherwise, this points to the alocated rateRuleValues block at the end of this struct.
unsigned rrllvm::LLVMModelData::stateVectorSize |
number of items in the state std::vector.
should be numIndFloatingSpecies + numRateRules