MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <Stoich.h>
Public Member Functions | |
void | allocateModel (const vector< Id > &elist) |
Calculate sizes of all arrays, and allocate them. More... | |
void | allocateModelObject (Id id) |
Identifies and allocates objects in the Stoich. More... | |
void | buildFuncLookup () |
void | buildPoolLookup () |
Functions to build the maps between Ids and internal indices. More... | |
void | buildRateTermLookup () |
unsigned int | convertIdToFuncIndex (Id id) const |
unsigned int | convertIdToPoolIndex (Id id) const |
unsigned int | convertIdToReacIndex (Id id) const |
void | convertRatesToStochasticForm () |
const FuncTerm * | funcs (unsigned int i) const |
bool | getAllowNegative () const |
vector< unsigned int > | getColIndex () const |
Id | getCompartment () const |
Id | getDsolve () const |
double | getEnzK2 (const Eref &e) const |
Get rate k2 (1/sec) for enzyme. More... | |
double | getEnzK3 (const Eref &e) const |
Get rate k3, aka kcat, for enzyme. More... | |
double | getEnzNumK1 (const Eref &e) const |
Id | getKsolve () const |
vector< int > | getMatrixEntry () const |
double | getMMenzKcat (const Eref &e) const |
double | getMMenzNumKm (const Eref &e) const |
unsigned int | getNumAllPools () const |
unsigned int | getNumBufPools () const |
Returns number of local buffered pools. More... | |
unsigned int | getNumCoreRates () const |
Number of rate terms for reactions purely on this compartment. More... | |
unsigned int | getNumFuncs () const |
unsigned int | getNumProxyPools () const |
unsigned int | getNumRates () const |
unsigned int | getNumVarPools () const |
Returns number of local pools that are updated by solver. More... | |
vector< Id > | getOffSolverCompts () const |
const vector< Id > & | getOffSolverPools () const |
bool | getOneWay () const |
string | getPath (const Eref &e) const |
Id | getPoolByIndex (unsigned int index) const |
vector< unsigned int > | getPoolIdMap () const |
vector< Id > | getProxyPools (Id i) const |
double | getR1 (const Eref &e) const |
double | getR1offset1 (const Eref &e) const |
double | getR1offset2 (const Eref &e) const |
double | getR2 (const Eref &e) const |
const vector< RateTerm * > & | getRateTerms () const |
Returns a reference to the entire rates_ vector. More... | |
vector< unsigned int > | getRowStart () const |
unsigned int | getSpecies (unsigned int poolIndex) const |
int | getStatus () const |
const KinSparseMatrix & | getStoichiometryMatrix () const |
Updates the rates for cross-compartment reactions. More... | |
unsigned int | innerInstallReaction (Id reacId, const vector< Id > &subs, const vector< Id > &prds) |
void | installAndUnschedFunc (Id func, Id pool, double volScale) |
void | installAndUnschedFuncRate (Id func, Id pool) |
void | installAndUnschedFuncReac (Id func, Id reac) |
void | installDummyEnzyme (Id enzId, Id enzMolId) |
This is used when the enzyme lacks sub or prd. More... | |
void | installEnzyme (Id enzId, Id enzMolId, Id cplxId, const vector< Id > &subs, const vector< Id > &prds) |
void | installEnzyme (ZeroOrder *r1, ZeroOrder *r2, ZeroOrder *r3, Id enzId, Id enzMolId, const vector< Id > &prds) |
void | installMMenz (Id enzId, const vector< Id > &enzMolId, const vector< Id > &subs, const vector< Id > &prds) |
void | installMMenz (MMEnzymeBase *meb, unsigned int rateIndex, const vector< Id > &subs, const vector< Id > &prds) |
This is the internal variant to install the MMenz. More... | |
void | installReaction (Id reacId, const vector< Id > &subs, const vector< Id > &prds) |
bool | isFuncTarget (unsigned int poolIndex) const |
Returns true if the specified pool is controlled by a func. More... | |
void | locateOffSolverReacs (Id myCompt, vector< Id > &elist) |
ZeroOrder * | makeHalfReaction (double rate, const vector< Id > &reactants) |
Utility function to make a half reac and return the rate term. More... | |
const vector< Id > & | offSolverPoolMap (Id compt) const |
void | print () const |
Utility function, prints out N_, used for debugging. More... | |
void | printRates () const |
Another utility function, prints out all Kf, kf, Kb, kb. More... | |
const RateTerm * | rates (unsigned int i) const |
Utility function to return a rates_ entry. More... | |
void | resizeArrays () |
Using the computed array sizes, now allocate space for them. More... | |
void | scaleBufsAndRates (unsigned int index, double volScale) |
Used to handle run-time size updates for spines. More... | |
void | setAllowNegative (bool v) |
void | setCompartment (Id v) |
assigns compartment occupied by Stoich. More... | |
void | setDsolve (Id v) |
assigns diffusion solver: Dsovle or a Gillespie voxel stepper More... | |
void | setElist (const Eref &e, const vector< ObjId > &elist) |
void | setEnzK1 (const Eref &e, double v) const |
Later handle all the volumes when this conversion is done. More... | |
void | setEnzK2 (const Eref &e, double v) const |
Set rate k2 (1/sec) for enzyme. More... | |
void | setEnzK3 (const Eref &e, double v) const |
Set rate k3 (1/sec) for enzyme. More... | |
void | setFunctionExpr (const Eref &e, string expr) |
void | setKsolve (Id v) |
assigns kinetic solver: Ksovle or GSSAsolve. More... | |
void | setMMenzKcat (const Eref &e, double v) const |
void | setMMenzKm (const Eref &e, double v) const |
void | setOneWay (bool v) |
void | setPath (const Eref &e, string path) |
void | setReacKb (const Eref &e, double v) const |
void | setReacKf (const Eref &e, double v) const |
void | setSpecies (unsigned int poolIndex, unsigned int s) |
Stoich () | |
void | unZombifyModel () |
void | unZombifyPools () |
unZombifies Pools. Helper for unZombifyModel. More... | |
void | updateFuncs (double *s, double t) const |
Updates the function values, within s. More... | |
void | updateRatesAfterRemesh () |
void | updateReacVelocities (const double *s, vector< double > &vel, unsigned int volIndex) const |
void | zombifyChemCompt (Id compt) |
void | zombifyModel (const Eref &e, const vector< Id > &elist) |
Id | zombifyPoolFuncWithScaling (Id pool) |
~Stoich () | |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
Static Public Attributes | |
static const unsigned int | PoolIsNotOnSolver |
Private Attributes | |
bool | allowNegative_ |
vector< Id > | bufPoolVec_ |
Id | compartment_ |
Contains Id of compartment holding reac system. Optional. More... | |
ZombiePoolInterface * | dinterface_ |
Pointer for dsolve. More... | |
Id | dsolve_ |
This contains the Id of the Diffusion solver. Optional. More... | |
vector< Id > | enzVec_ |
map< Id, unsigned int > | funcLookup_ |
vector< FuncTerm * > | funcs_ |
The FuncTerms handle mathematical ops on mol levels. More... | |
vector< unsigned int > | funcTarget_ |
vector< Id > | incrementFuncVec_ |
ZombiePoolInterface * | kinterface_ |
Pointer for ksolve. More... | |
Id | ksolve_ |
This contains the Id of the Kinetic solver. More... | |
vector< Id > | mmEnzVec_ |
KinSparseMatrix | N_ |
N_ is the stoichiometry matrix. All pools * all reac terms. More... | |
unsigned int | numVoxels_ |
Number of voxels in reac system. More... | |
vector< pair< Id, Id > > | offSolverEnzCompts_ |
vector< Id > | offSolverEnzVec_ |
vector< pair< Id, Id > > | offSolverMMenzCompts_ |
vector< Id > | offSolverMMenzVec_ |
map< Id, vector< Id > > | offSolverPoolMap_ |
vector< Id > | offSolverPoolVec_ |
vector< pair< Id, Id > > | offSolverReacCompts_ |
vector< Id > | offSolverReacVec_ |
string | path_ |
vector< Id > | poolFuncVec_ |
map< Id, unsigned int > | poolLookup_ |
vector< vector< Id > > | prdComptVec_ |
vector< RateTerm * > | rates_ |
map< Id, unsigned int > | rateTermLookup_ |
vector< Id > | reacFuncVec_ |
vector< Id > | reacVec_ |
vector< unsigned int > | species_ |
int | status_ |
vector< vector< Id > > | subComptVec_ |
bool | useOneWay_ |
vector< Id > | varPoolVec_ |
Stoich is the class that handles the stoichiometry matrix for a reaction system, and also setting up the computations for reaction rates. It has to coordinate the operation of a number of model definition classes, most importantly: Pools, Reacs and Enz(yme)s. It also coordinates the setup of a large number of numerical solution engines, or solvers: Ksolve, Gsolve, Dsolve, and SteadyState. The setup process has to follow a tight order, most of which is internally manged by the Stoich. The Stoich itself does not do any 'process' functions. It just sets up data structures for the other objects that do the crunching.
Reinit, 5.1 Dsolve builds matrix, provided dt has changed. It needs dt. 5.2 Ksolve builds solvers if not done already, assigning initDt
As seen by the user, this reduces to just 4 stages:
Stoich::Stoich | ( | ) |
Definition at line 255 of file Stoich.cpp.
Stoich::~Stoich | ( | ) |
Definition at line 273 of file Stoich.cpp.
References funcs_, rates_, and unZombifyModel().
void Stoich::allocateModel | ( | const vector< Id > & | elist | ) |
Calculate sizes of all arrays, and allocate them.
Definition at line 968 of file Stoich.cpp.
References allocateModelObject(), bufPoolVec_, buildFuncLookup(), buildPoolLookup(), buildRateTermLookup(), enzVec_, incrementFuncVec_, mmEnzVec_, poolFuncVec_, reacFuncVec_, reacVec_, resizeArrays(), and varPoolVec_.
Referenced by setElist().
void Stoich::allocateModelObject | ( | Id | id | ) |
Identifies and allocates objects in the Stoich.
If this assertion fails it usually means that the elist passed to the solver is not properly restricted to objects located on the current compartment. As a result of this, traversal for finding off-compartment pools generates repeats with the ones in the elist. Note that pool compartment assignment is determined by following the mesh message, and thus a tree-based elist construction for compartments may be incompatible with the generation of the lists of off-compartment pools. It is up to the upstream code to ensure that this is done properly.
This assertion also fails if the Ids concerned had a dimension greater than 1.
Definition at line 844 of file Stoich.cpp.
References bufPoolCinfo, bufPoolVec_, Element::cinfo(), enzCinfo, enzVec_, Cinfo::find(), Cinfo::findFinfo(), functionCinfo, Element::getMsgTargetAndFunctions(), Element::id(), incrementFuncVec_, mmEnzCinfo, mmEnzVec_, poolCinfo, poolFuncVec_, reacCinfo, reacFuncVec_, reacVec_, and varPoolVec_.
Referenced by allocateModel().
void Stoich::buildFuncLookup | ( | ) |
Definition at line 1054 of file Stoich.cpp.
References funcLookup_, and poolFuncVec_.
Referenced by allocateModel().
void Stoich::buildPoolLookup | ( | ) |
Functions to build the maps between Ids and internal indices.
Definition at line 997 of file Stoich.cpp.
References bufPoolVec_, offSolverPoolVec_, poolLookup_, and varPoolVec_.
Referenced by allocateModel().
void Stoich::buildRateTermLookup | ( | ) |
Definition at line 1011 of file Stoich.cpp.
References enzVec_, incrementFuncVec_, mmEnzVec_, offSolverEnzVec_, offSolverMMenzVec_, offSolverReacVec_, rateTermLookup_, reacVec_, and useOneWay_.
Referenced by allocateModel().
unsigned int Stoich::convertIdToFuncIndex | ( | Id | id | ) | const |
Definition at line 1484 of file Stoich.cpp.
References funcLookup_.
Referenced by installAndUnschedFunc(), and setFunctionExpr().
unsigned int Stoich::convertIdToPoolIndex | ( | Id | id | ) | const |
Definition at line 1464 of file Stoich.cpp.
References poolLookup_.
Referenced by Gsolve::getPoolIndex(), Ksolve::getPoolIndex(), installAndUnschedFunc(), installAndUnschedFuncRate(), installAndUnschedFuncReac(), installEnzyme(), installMMenz(), and makeHalfReaction().
unsigned int Stoich::convertIdToReacIndex | ( | Id | id | ) | const |
Definition at line 1474 of file Stoich.cpp.
References rateTermLookup_.
Referenced by VoxelPoolsBase::filterCrossRateTerms(), getR1(), getR1offset1(), getR1offset2(), getR2(), innerInstallReaction(), installAndUnschedFuncRate(), installAndUnschedFuncReac(), installDummyEnzyme(), installEnzyme(), installMMenz(), setEnzK1(), setEnzK2(), setEnzK3(), setFunctionExpr(), setMMenzKcat(), setMMenzKm(), setReacKb(), and setReacKf().
void Stoich::convertRatesToStochasticForm | ( | ) |
This function is used when the stoich class is employed by a Gsolver for doing stochastic calculations. Here we fix the issue of having a single substrate at more than first order. As the first molecule of the substrate is consumed, the number is depleted by one and so its forward rate is reduced. And so on. This also protects against going negative in mol number or concentration.
Definition at line 1196 of file Stoich.cpp.
References RateTerm::getR1(), and rates_.
Referenced by Gsolve::rebuildGssaSystem().
const FuncTerm * Stoich::funcs | ( | unsigned int | i | ) | const |
Definition at line 599 of file Stoich.cpp.
References funcs_.
Referenced by Gsolve::fillPoolFuncDep().
bool Stoich::getAllowNegative | ( | ) | const |
Definition at line 315 of file Stoich.cpp.
References allowNegative_.
Referenced by initCinfo().
vector< unsigned int > Stoich::getColIndex | ( | ) | const |
Definition at line 617 of file Stoich.cpp.
References SparseMatrix< T >::colIndex(), and N_.
Referenced by initCinfo().
Id Stoich::getCompartment | ( | ) | const |
Definition at line 505 of file Stoich.cpp.
References compartment_.
Referenced by initCinfo(), and SteadyState::setStoich().
Id Stoich::getDsolve | ( | ) | const |
Definition at line 469 of file Stoich.cpp.
References dsolve_.
Referenced by initCinfo().
double Stoich::getEnzK2 | ( | const Eref & | e | ) | const |
Get rate k2 (1/sec) for enzyme.
Definition at line 1986 of file Stoich.cpp.
References getR1offset1(), getR2(), and useOneWay_.
Referenced by ZombieEnz::vGetK2().
double Stoich::getEnzK3 | ( | const Eref & | e | ) | const |
Get rate k3, aka kcat, for enzyme.
Definition at line 1994 of file Stoich.cpp.
References getR1offset1(), getR1offset2(), and useOneWay_.
Referenced by ZombieEnz::vGetKcat().
double Stoich::getEnzNumK1 | ( | const Eref & | e | ) | const |
Definition at line 1981 of file Stoich.cpp.
References getR1().
Id Stoich::getKsolve | ( | ) | const |
Definition at line 446 of file Stoich.cpp.
References ksolve_.
Referenced by SteadyState::classifyState(), initCinfo(), and Ksolve::print().
vector< int > Stoich::getMatrixEntry | ( | ) | const |
Definition at line 612 of file Stoich.cpp.
References SparseMatrix< T >::matrixEntry(), and N_.
Referenced by initCinfo().
double Stoich::getMMenzKcat | ( | const Eref & | e | ) | const |
Definition at line 1937 of file Stoich.cpp.
References getR2().
Referenced by ZombieMMenz::vGetKcat().
double Stoich::getMMenzNumKm | ( | const Eref & | e | ) | const |
Definition at line 1921 of file Stoich.cpp.
References getR1().
unsigned int Stoich::getNumAllPools | ( | ) | const |
Returns total number of pools. Includes the pools whose actual calculations happen on another solver, but are given a proxy here in order to handle cross-compartment reactions.
Definition at line 520 of file Stoich.cpp.
References bufPoolVec_, offSolverPoolVec_, and varPoolVec_.
Referenced by Gsolve::fillIncrementFuncDep(), Gsolve::fillPoolFuncDep(), Ksolve::getEstimatedDt(), initCinfo(), Gsolve::setStoich(), and Ksolve::setStoich().
unsigned int Stoich::getNumBufPools | ( | ) | const |
Returns number of local buffered pools.
Definition at line 515 of file Stoich.cpp.
References bufPoolVec_.
Referenced by initCinfo(), and VoxelPoolsBase::scaleVolsBufsRates().
unsigned int Stoich::getNumCoreRates | ( | ) | const |
Number of rate terms for reactions purely on this compartment.
Utility function to return # of core rates for reacs which are entirely located on current compartment, including all reactants
Definition at line 574 of file Stoich.cpp.
References enzVec_, incrementFuncVec_, mmEnzVec_, reacVec_, and useOneWay_.
Referenced by installEnzyme(), installMMenz(), installReaction(), Gsolve::rebuildGssaSystem(), VoxelPoolsBase::scaleVolsBufsRates(), SteadyState::setStoich(), GssaVoxelPools::setVolumeAndDependencies(), Gsolve::updateRateTerms(), and Ksolve::updateRateTerms().
unsigned int Stoich::getNumFuncs | ( | ) | const |
Definition at line 594 of file Stoich.cpp.
References funcs_.
Referenced by Gsolve::fillPoolFuncDep().
unsigned int Stoich::getNumProxyPools | ( | ) | const |
Returns number of proxy pools here for cross-compartment reactions
Definition at line 525 of file Stoich.cpp.
References offSolverPoolVec_.
Referenced by initCinfo(), Gsolve::rebuildGssaSystem(), and VoxelPoolsBase::xferInOnlyProxies().
unsigned int Stoich::getNumRates | ( | ) | const |
Utility function to return # of rates_ entries. This includes the cross-solver reactions.
Definition at line 568 of file Stoich.cpp.
References rates_.
Referenced by GssaVoxelPools::advance(), Gsolve::fillIncrementFuncDep(), Gsolve::fillMmEnzDep(), Gsolve::fillPoolFuncDep(), Ksolve::getEstimatedDt(), initCinfo(), Gsolve::makeReacDepsUnique(), and Gsolve::rebuildGssaSystem().
unsigned int Stoich::getNumVarPools | ( | ) | const |
Returns number of local pools that are updated by solver.
Definition at line 510 of file Stoich.cpp.
References varPoolVec_.
Referenced by initCinfo(), Gsolve::process(), Ksolve::process(), Gsolve::rebuildGssaSystem(), GssaVoxelPools::reinit(), VoxelPoolsBase::scaleVolsBufsRates(), and VoxelPoolsBase::xferInOnlyProxies().
vector< Id > Stoich::getOffSolverCompts | ( | ) | const |
List all the compartments to which the current compt is coupled, by cross-compartment reactions. Self not included.
Definition at line 2092 of file Stoich.cpp.
References offSolverPoolMap_.
const vector< Id > & Stoich::getOffSolverPools | ( | ) | const |
bool Stoich::getOneWay | ( | ) | const |
Definition at line 305 of file Stoich.cpp.
References useOneWay_.
Referenced by VoxelPoolsBase::filterCrossRateTerms().
string Stoich::getPath | ( | const Eref & | e | ) | const |
Definition at line 416 of file Stoich.cpp.
References path_.
Referenced by initCinfo().
Id Stoich::getPoolByIndex | ( | unsigned int | index | ) | const |
vector< unsigned int > Stoich::getPoolIdMap | ( | ) | const |
Map to look up the index of the pool from its Id. poolIndex = poolIdMap[ Id::value() - poolOffset ] where the poolOffset is the smallest Id::value. poolOffset is passed back as the last entry of this vector. Any Ids that are not pools return EMPTY=~0.
Definition at line 530 of file Stoich.cpp.
References poolLookup_.
Referenced by initCinfo().
Definition at line 627 of file Stoich.cpp.
References Element::cinfo(), dummy, Id::element(), Field< A >::get(), Cinfo::isA(), and offSolverPoolMap_.
Referenced by initCinfo().
double Stoich::getR1 | ( | const Eref & | e | ) | const |
Returns the internal rate in #/voxel, for R1, for the specified Eref.
Looks up the matching rate for R1. Later we may have additional scaling terms for the specified voxel.
Definition at line 2006 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), and rates_.
Referenced by getEnzNumK1(), getMMenzNumKm(), getR1offset1(), and getR1offset2().
double Stoich::getR1offset1 | ( | const Eref & | e | ) | const |
Returns internal rate R1 in #/voxel, for the rate term following the one directly referred to by the Eref e. Enzymes define multiple successive rate terms, so we look up the first, and then select one after it.
Definition at line 2010 of file Stoich.cpp.
References convertIdToReacIndex(), getR1(), Eref::id(), and rates_.
Referenced by getEnzK2(), and getEnzK3().
double Stoich::getR1offset2 | ( | const Eref & | e | ) | const |
Returns internal rate R1 in #/voxel, for the rate term two after the one directly referred to by the Eref e. Enzymes define multiple successive rate terms, so we look up the first, and then select the second one after it.
Definition at line 2014 of file Stoich.cpp.
References convertIdToReacIndex(), getR1(), Eref::id(), and rates_.
Referenced by getEnzK3().
double Stoich::getR2 | ( | const Eref & | e | ) | const |
Returns the internal rate in #/voxel, for R2, for the specified reacIndex and voxel index. In some cases R2 is undefined, and it then returns 0.
Looks up the matching rate for R2. Later we may have additional scaling terms for the specified voxel.
Definition at line 2023 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), and rates_.
Referenced by getEnzK2(), and getMMenzKcat().
const vector< RateTerm * > & Stoich::getRateTerms | ( | ) | const |
Returns a reference to the entire rates_ vector.
Definition at line 589 of file Stoich.cpp.
References rates_.
Referenced by Gsolve::fillIncrementFuncDep(), Gsolve::rebuildGssaSystem(), VoxelPoolsBase::scaleVolsBufsRates(), SteadyState::setStoich(), GssaVoxelPools::setVolumeAndDependencies(), Gsolve::updateRateTerms(), and Ksolve::updateRateTerms().
vector< unsigned int > Stoich::getRowStart | ( | ) | const |
Definition at line 622 of file Stoich.cpp.
References N_, and SparseMatrix< T >::rowStart().
Referenced by initCinfo().
SpeciesId Stoich::getSpecies | ( | unsigned int | poolIndex | ) | const |
Returns SpeciesId of specified pool
Definition at line 2055 of file Stoich.cpp.
References species_.
int Stoich::getStatus | ( | ) | const |
getStatus(): Flag to track status of Stoich object. -1: No path yet assigned. 0: Success 1: Warning: Missing reactant in Reac or Enz 2: Warning: Missing substrate in MMenz 4: Warning: Compartment not defined 8: Warning: Neither Ksolve nor Dsolve defined 16: Warning: No objects found on path
Definition at line 644 of file Stoich.cpp.
References status_.
Referenced by initCinfo().
const KinSparseMatrix & Stoich::getStoichiometryMatrix | ( | ) | const |
Updates the rates for cross-compartment reactions.
Get the rate for a single reaction specified by r, as per all the mol numbers in s. double getReacVelocity( unsigned int r, const double* s, unsigned int volIndex ) const;Returns the stoich matrix. Used by gsolve.
Definition at line 1221 of file Stoich.cpp.
References N_.
Referenced by Gsolve::fillPoolFuncDep(), Gsolve::rebuildGssaSystem(), and GssaVoxelPools::updateReacVelocities().
|
static |
Definition at line 34 of file Stoich.cpp.
References getAllowNegative(), getColIndex(), getCompartment(), getDsolve(), getKsolve(), getMatrixEntry(), getNumAllPools(), getNumBufPools(), getNumProxyPools(), getNumRates(), getNumVarPools(), getPath(), getPoolIdMap(), getProxyPools(), getRowStart(), getStatus(), Neutral::initCinfo(), path, scaleBufsAndRates(), setAllowNegative(), setCompartment(), setDsolve(), setKsolve(), setPath(), stoichCinfo, and unZombifyModel().
unsigned int Stoich::innerInstallReaction | ( | Id | reacId, |
const vector< Id > & | subs, | ||
const vector< Id > & | prds | ||
) |
This takes the specified forward and reverse half-reacs belonging to the specified Reac, and builds them into the Stoich.
Definition at line 1562 of file Stoich.cpp.
References convertIdToReacIndex(), SparseMatrix< T >::get(), ZeroOrder::getReactants(), makeHalfReaction(), N_, rates_, SparseMatrix< T >::set(), and useOneWay_.
Referenced by installReaction().
This installs a FuncTerm, which evaluates a function to specify the conc of the specific pool. The pool is a BufPool.
Definition at line 1067 of file Stoich.cpp.
References convertIdToFuncIndex(), convertIdToPoolIndex(), Id::element(), Cinfo::find(), Cinfo::findFinfo(), funcs_, funcTarget_, Field< A >::get(), FuncTerm::setExpr(), FuncTerm::setReactantIndex(), FuncTerm::setTarget(), Element::setTick(), FuncTerm::setVolScale(), and Id::value().
Referenced by zombifyPoolFuncWithScaling().
This installs a FuncRate, which evaluates a function to specify the rate of change of conc of the specific pool. The pool is a Pool.
Definition at line 1113 of file Stoich.cpp.
References convertIdToPoolIndex(), convertIdToReacIndex(), Id::element(), Cinfo::find(), Cinfo::findFinfo(), SparseMatrix< T >::get(), Field< A >::get(), N_, rates_, SparseMatrix< T >::set(), FuncRate::setExpr(), FuncRate::setFuncArgIndex(), Element::setTick(), and Id::value().
Referenced by zombifyModel().
This installs a FuncReac, which evaluates a function to specify the rate (Kf) of the specified reaction.
Definition at line 1158 of file Stoich.cpp.
References convertIdToPoolIndex(), convertIdToReacIndex(), Id::element(), Cinfo::find(), Cinfo::findFinfo(), Field< A >::get(), rates_, FuncRate::setExpr(), FuncRate::setFuncArgIndex(), Element::setTick(), and Id::value().
Referenced by zombifyModel().
This is used when the enzyme lacks sub or prd.
Definition at line 1711 of file Stoich.cpp.
References convertIdToReacIndex(), dummy, rates_, status_, and useOneWay_.
void Stoich::installEnzyme | ( | Id | enzId, |
Id | enzMolId, | ||
Id | cplxId, | ||
const vector< Id > & | subs, | ||
const vector< Id > & | prds | ||
) |
Definition at line 1732 of file Stoich.cpp.
References convertIdToReacIndex(), dummy, getCompt(), getNumCoreRates(), ObjId::id, makeHalfReaction(), prdComptVec_, subComptVec_, and useOneWay_.
Referenced by ZombieEnz::setSolver().
void Stoich::installEnzyme | ( | ZeroOrder * | r1, |
ZeroOrder * | r2, | ||
ZeroOrder * | r3, | ||
Id | enzId, | ||
Id | enzMolId, | ||
const vector< Id > & | prds | ||
) |
This takes the forward, backward and product formation half-reacs belonging to the specified Enzyme, and builds them into the Stoich. This is the low-level function.
Definition at line 1777 of file Stoich.cpp.
References convertIdToPoolIndex(), convertIdToReacIndex(), SparseMatrix< T >::get(), ZeroOrder::getReactants(), N_, rates_, SparseMatrix< T >::set(), and useOneWay_.
void Stoich::installMMenz | ( | Id | enzId, |
const vector< Id > & | enzMols, | ||
const vector< Id > & | subs, | ||
const vector< Id > & | prds | ||
) |
This takes the baseclass for an MMEnzyme and builds the MMenz into the Stoich.
Definition at line 1636 of file Stoich.cpp.
References convertIdToPoolIndex(), convertIdToReacIndex(), dummy, getCompt(), getNumCoreRates(), ObjId::id, installDummy(), prdComptVec_, rates_, status_, and subComptVec_.
void Stoich::installMMenz | ( | MMEnzymeBase * | meb, |
unsigned int | rateIndex, | ||
const vector< Id > & | subs, | ||
const vector< Id > & | prds | ||
) |
This is the internal variant to install the MMenz.
This is the inner function to do the installation.
Definition at line 1691 of file Stoich.cpp.
References convertIdToPoolIndex(), SparseMatrix< T >::get(), N_, rates_, and SparseMatrix< T >::set().
Definition at line 1525 of file Stoich.cpp.
References dummy, getCompt(), getNumCoreRates(), ObjId::id, innerInstallReaction(), prdComptVec_, subComptVec_, and useOneWay_.
Referenced by ZombieReac::setSolver().
bool Stoich::isFuncTarget | ( | unsigned int | poolIndex | ) | const |
Returns true if the specified pool is controlled by a func.
Definition at line 606 of file Stoich.cpp.
References funcTarget_.
Referenced by VoxelPoolsBase::scaleVolsBufsRates().
Scans through elist to find any reactions that connect to pools not located on solver. Removes these reactions from the elist and maintains Ids of the affected reactions, and their off-solver pools, in offSolverReacs_ and offSolverPools_.
Definition at line 725 of file Stoich.cpp.
References Element::cinfo(), extractCompts(), Cinfo::isA(), isOffSolverReac(), offSolverEnzCompts_, offSolverEnzVec_, offSolverMMenzCompts_, offSolverMMenzVec_, offSolverPoolMap_, offSolverPoolVec_, offSolverReacCompts_, and offSolverReacVec_.
Utility function to make a half reac and return the rate term.
Definition at line 1494 of file Stoich.cpp.
References convertIdToPoolIndex(), and status_.
Referenced by innerInstallReaction(), and installEnzyme().
Looks up the vector of pool Ids originating from the specified compartment, that are represented on this compartment as proxies.
Definition at line 2102 of file Stoich.cpp.
References offSolverPoolMap_.
void Stoich::print | ( | ) | const |
Utility function, prints out N_, used for debugging.
Definition at line 2066 of file Stoich.cpp.
References N_, and SparseMatrix< T >::print().
void Stoich::printRates | ( | ) | const |
Another utility function, prints out all Kf, kf, Kb, kb.
Definition at line 2072 of file Stoich.cpp.
References Field< A >::get(), and reacVec_.
const RateTerm * Stoich::rates | ( | unsigned int | i | ) | const |
Utility function to return a rates_ entry.
Definition at line 583 of file Stoich.cpp.
References rates_.
Referenced by Gsolve::fillMmEnzDep().
void Stoich::resizeArrays | ( | ) |
Using the computed array sizes, now allocate space for them.
Builds the objMap vector, which maps all Ids to the internal indices for pools and reacs that are used in the solver. In addition to the elist, it also scans through the offSolverPools and offSolverReacs to build the map. void allocateObjMap( const vector< Id >& elist );
Definition at line 932 of file Stoich.cpp.
References bufPoolVec_, dinterface_, enzVec_, funcs_, funcTarget_, incrementFuncVec_, kinterface_, mmEnzVec_, myUnique(), N_, offSolverEnzVec_, offSolverMMenzVec_, offSolverPoolVec_, offSolverReacVec_, poolFuncVec_, rates_, reacVec_, ZombiePoolInterface::setNumPools(), SparseMatrix< T >::setSize(), species_, useOneWay_, and varPoolVec_.
Referenced by allocateModel().
void Stoich::scaleBufsAndRates | ( | unsigned int | index, |
double | volScale | ||
) |
Used to handle run-time size updates for spines.
Definition at line 2212 of file Stoich.cpp.
References kinterface_, ZombiePoolInterface::pools(), VoxelPoolsBase::scaleVolsBufsRates(), and status_.
Referenced by initCinfo().
void Stoich::setAllowNegative | ( | bool | v | ) |
Definition at line 310 of file Stoich.cpp.
References allowNegative_.
Referenced by initCinfo().
void Stoich::setCompartment | ( | Id | v | ) |
assigns compartment occupied by Stoich.
Definition at line 474 of file Stoich.cpp.
References Element::cinfo(), compartment_, doubleEq(), Id::element(), Cinfo::isA(), and numVoxels_.
Referenced by initCinfo().
void Stoich::setDsolve | ( | Id | v | ) |
assigns diffusion solver: Dsovle or a Gillespie voxel stepper
Definition at line 451 of file Stoich.cpp.
References Element::cinfo(), Eref::data(), dinterface_, dsolve_, Id::element(), Id::eref(), and Cinfo::isA().
Referenced by initCinfo().
Internal function which sets up the model based on the provided elist of all elements managed by this solver.
Definition at line 363 of file Stoich.cpp.
References allocateModel(), compartment_, Eref::data(), dinterface_, Shell::doAddMsg(), dsolve_, Id::eref(), filterWildcards(), Eref::id(), kinterface_, ksolve_, ZombiePoolInterface::setCompartment(), ZombiePoolInterface::setDsolve(), ZombiePoolInterface::setStoich(), status_, ZombiePoolInterface::updateRateTerms(), and zombifyModel().
Referenced by setPath().
void Stoich::setEnzK1 | ( | const Eref & | e, |
double | v | ||
) | const |
Later handle all the volumes when this conversion is done.
Sets the rate v (given in millimoloar concentration units) for the forward enzyme reaction of binding substrate to enzyme. Does this throughout the compartment in which the enzyme lives. Internally the stoich uses #/voxel units so this involves querying the volume subsystem about volumes for each voxel, and scaling accordingly.
Definition at line 1943 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, and ZombiePoolInterface::updateRateTerms().
Referenced by updateRatesAfterRemesh(), ZombieEnz::vSetConcK1(), ZombieEnz::vSetK1(), ZombieEnz::vSetKcat(), ZombieEnz::vSetKm(), and ZombieEnz::vSetNumKm().
void Stoich::setEnzK2 | ( | const Eref & | e, |
double | v | ||
) | const |
Set rate k2 (1/sec) for enzyme.
Definition at line 1951 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, ZombiePoolInterface::updateRateTerms(), and useOneWay_.
Referenced by updateRatesAfterRemesh(), ZombieEnz::vSetK2(), ZombieEnz::vSetKcat(), and ZombieEnz::vSetRatio().
void Stoich::setEnzK3 | ( | const Eref & | e, |
double | v | ||
) | const |
Set rate k3 (1/sec) for enzyme.
Definition at line 1966 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, ZombiePoolInterface::updateRateTerms(), and useOneWay_.
Referenced by updateRatesAfterRemesh(), and ZombieEnz::vSetKcat().
void Stoich::setFunctionExpr | ( | const Eref & | e, |
string | expr | ||
) |
Sets the arithmetic expression used in a FuncRate or FuncReac
Definition at line 2028 of file Stoich.cpp.
References convertIdToFuncIndex(), convertIdToReacIndex(), funcs_, Eref::id(), Id::path(), rates_, FuncTerm::setExpr(), and FuncRate::setExpr().
Referenced by ZombieFunction::innerSetExpr().
void Stoich::setKsolve | ( | Id | v | ) |
assigns kinetic solver: Ksovle or GSSAsolve.
Definition at line 421 of file Stoich.cpp.
References Element::cinfo(), Eref::data(), Id::element(), Id::eref(), Cinfo::isA(), kinterface_, ksolve_, and setOneWay().
Referenced by initCinfo().
void Stoich::setMMenzKcat | ( | const Eref & | e, |
double | v | ||
) | const |
Sets the kcat for MMenz. No conversions needed.
Definition at line 1926 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, and ZombiePoolInterface::updateRateTerms().
Referenced by updateRatesAfterRemesh(), and ZombieMMenz::vSetKcat().
void Stoich::setMMenzKm | ( | const Eref & | e, |
double | v | ||
) | const |
Sets the Km for MMenz, using appropriate volume conversion to go from the argument (in millimolar) to #/voxel. This may do the assignment among many voxels containing the enz in case there are different volumes.
Definition at line 1895 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, and ZombiePoolInterface::updateRateTerms().
Referenced by updateRatesAfterRemesh(), ZombieMMenz::vSetKm(), and ZombieMMenz::vSetNumKm().
void Stoich::setOneWay | ( | bool | v | ) |
Definition at line 300 of file Stoich.cpp.
References useOneWay_.
Referenced by setKsolve().
void Stoich::setPath | ( | const Eref & | e, |
string | path | ||
) |
Take the provided wildcard path to build the list of elements managed by this solver.
Definition at line 320 of file Stoich.cpp.
References ksolve_, path_, setElist(), status_, and wildcardFind().
Referenced by initCinfo().
void Stoich::setReacKb | ( | const Eref & | e, |
double | v | ||
) | const |
Sets the reverse rate v (given in millimoloar concentration units) for the specified reaction throughout the compartment in which the reaction lives. Internally the stoich uses #/voxel units so this involves querying the volume subsystem about volumes for each voxel, and scaling accordingly.
For now assume a single rate term.
Definition at line 1874 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, ZombiePoolInterface::updateRateTerms(), and useOneWay_.
Referenced by updateRatesAfterRemesh(), ZombieReac::vSetConcKb(), and ZombieReac::vSetNumKb().
void Stoich::setReacKf | ( | const Eref & | e, |
double | v | ||
) | const |
Sets the forward rate v (given in millimoloar concentration units) for the specified reaction throughout the compartment in which the reaction lives. Internally the stoich uses #/voxel units so this involves querying the volume subsystem about volumes for each voxel, and scaling accordingly.
Sets the forward rate v (given in millimoloar concentration units) for the specified reaction throughout the compartment in which the reaction lives. Internally the stoich uses #/voxel units so this involves querying the volume subsystem about volumes for each voxel, and scaling accordingly. For now assume a uniform voxel volume and hence just convert on 0 meshIndex.
Definition at line 1860 of file Stoich.cpp.
References convertIdToReacIndex(), Eref::id(), kinterface_, rates_, and ZombiePoolInterface::updateRateTerms().
Referenced by updateRatesAfterRemesh(), ZombieReac::vSetConcKf(), and ZombieReac::vSetNumKf().
void Stoich::setSpecies | ( | unsigned int | poolIndex, |
unsigned int | s | ||
) |
Assigns SpeciesId of specified pool
Definition at line 2060 of file Stoich.cpp.
References species_.
void Stoich::unZombifyModel | ( | ) |
Converts back to ExpEuler type basic kinetic Elements.
Definition at line 1402 of file Stoich.cpp.
References Element::cinfo(), enzCinfo, enzVec_, Cinfo::find(), functionCinfo, Element::getTick(), incrementFuncVec_, Clock::lookupDefaultTick(), mmEnzCinfo, mmEnzVec_, Cinfo::name(), offSolverEnzVec_, offSolverMMenzVec_, offSolverReacVec_, poolFuncVec_, reacCinfo, reacVec_, Element::setTick(), unZombifyPools(), zombieEnzCinfo, zombieFunctionCinfo, zombieMMenzCinfo, zombieReacCinfo, ZombieFunction::zombify(), CplxEnzBase::zombify(), ReacBase::zombify(), and EnzBase::zombify().
Referenced by initCinfo(), and ~Stoich().
void Stoich::unZombifyPools | ( | ) |
unZombifies Pools. Helper for unZombifyModel.
Definition at line 1376 of file Stoich.cpp.
References bufPoolCinfo, bufPoolVec_, Element::cinfo(), Cinfo::find(), Element::isDoomed(), poolCinfo, varPoolVec_, zombieBufPoolCinfo, zombiePoolCinfo, and PoolBase::zombify().
Referenced by unZombifyModel().
void Stoich::updateFuncs | ( | double * | s, |
double | t | ||
) | const |
Updates the function values, within s.
Definition at line 2118 of file Stoich.cpp.
References funcs_.
Referenced by GssaVoxelPools::advance(), VoxelPools::advance(), GssaVoxelPools::refreshAtot(), GssaVoxelPools::reinit(), and GssaVoxelPools::updateDependentMathExpn().
void Stoich::updateRatesAfterRemesh | ( | ) |
This function scans all reacs and enzymes and recalculates the internal rate terms depending on the reference terms stored in the original chemical object.
updateJunctionRates: Updates the rates for cross-compartment reactions. These are located at the end of the rates_ vector, and are directly indexed by the reacTerms. void Stoich::updateJunctionRates( const double* s, const vector< unsigned int >& reacTerms, double* yprime ) { for ( vector< unsigned int >::const_iterator i = reacTerms.begin(); i != reacTerms.end(); ++i ) { assert( *i < rates_[0].size() ); yprime++ += (*rates_[0][*i])( s ); } }
Definition at line 2148 of file Stoich.cpp.
References Field< A >::get(), offSolverEnzVec_, offSolverMMenzVec_, offSolverReacVec_, reacVec_, setEnzK1(), setEnzK2(), setEnzK3(), setMMenzKcat(), setMMenzKm(), setReacKb(), and setReacKf().
void Stoich::updateReacVelocities | ( | const double * | s, |
vector< double > & | vel, | ||
unsigned int | volIndex | ||
) | const |
Updates the yprime array, rate of change of each molecule The volIndex specifies which set of rates to use, since the rates are volume dependent. Moved to VoxelPools void updateRates( const double* s, double* yprime, unsigned int volIndex ) const; Computes the velocity of each reaction, vel. The volIndex specifies which set of rates to use, since the rates are volume dependent.
void Stoich::zombifyChemCompt | ( | Id | compt | ) |
zombifyModel marches through the specified id list and converts all entries into zombies. The first arg e is the Eref of the Stoich itself.
Definition at line 1270 of file Stoich.cpp.
References bufPoolCinfo, Element::cinfo(), dsolve_, Id::element(), enzCinfo, Cinfo::find(), findFuncMsgSrc(), Field< A >::get(), Eref::id(), Element::id(), installAndUnschedFuncRate(), installAndUnschedFuncReac(), ksolve_, mmEnzCinfo, numVoxels_, offSolverEnzVec_, offSolverMMenzVec_, offSolverReacVec_, poolCinfo, reacCinfo, Element::resize(), Field< A >::set(), zombieBufPoolCinfo, zombieEnzCinfo, zombieMMenzCinfo, zombiePoolCinfo, zombieReacCinfo, ZombieFunction::zombify(), CplxEnzBase::zombify(), ReacBase::zombify(), EnzBase::zombify(), PoolBase::zombify(), and zombifyPoolFuncWithScaling().
Referenced by setElist().
Utility function to find if incoming message assigns N or conc, and to appropriately zombify the function and set up its parameters including volume scaling.
Definition at line 1244 of file Stoich.cpp.
References dsolve_, Id::element(), Cinfo::find(), findFuncMsgSrc(), Field< A >::get(), installAndUnschedFunc(), ksolve_, NA, and ZombieFunction::zombify().
Referenced by zombifyModel().
|
private |
True if pools are permitted to take negative concentrations. This may happen if solver is handling a general equation system that is not constrained by chemical rules. Defaults to False, so that we cannot have negative concs.
Definition at line 496 of file Stoich.h.
Referenced by getAllowNegative(), and setAllowNegative().
|
private |
Vector of bufPool Ids.
Definition at line 578 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildPoolLookup(), getNumAllPools(), getNumBufPools(), resizeArrays(), and unZombifyPools().
|
private |
Contains Id of compartment holding reac system. Optional.
Definition at line 507 of file Stoich.h.
Referenced by getCompartment(), setCompartment(), and setElist().
|
private |
Pointer for dsolve.
Definition at line 512 of file Stoich.h.
Referenced by resizeArrays(), setDsolve(), and setElist().
|
private |
This contains the Id of the Diffusion solver. Optional.
Definition at line 504 of file Stoich.h.
Referenced by getDsolve(), setDsolve(), setElist(), zombifyModel(), and zombifyPoolFuncWithScaling().
|
private |
Map back from enz index to Id. Needed to unzombify
Definition at line 596 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildRateTermLookup(), getNumCoreRates(), resizeArrays(), and unZombifyModel().
|
private |
Definition at line 634 of file Stoich.h.
Referenced by buildFuncLookup(), and convertIdToFuncIndex().
|
private |
The FuncTerms handle mathematical ops on mol levels.
Definition at line 543 of file Stoich.h.
Referenced by funcs(), getNumFuncs(), installAndUnschedFunc(), resizeArrays(), setFunctionExpr(), updateFuncs(), and ~Stoich().
|
private |
vector tracks which pool is controlled by which func. Unused entries are flagged by ~0. funcTarget_[ poolIndex ] == funcIndex
Definition at line 615 of file Stoich.h.
Referenced by installAndUnschedFunc(), isFuncTarget(), and resizeArrays().
|
private |
Vector of funcs controlling pool increment, that is dN/dt This is handled as a rateTerm.
Definition at line 621 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildRateTermLookup(), getNumCoreRates(), resizeArrays(), and unZombifyModel().
|
private |
Pointer for ksolve.
Definition at line 510 of file Stoich.h.
Referenced by resizeArrays(), scaleBufsAndRates(), setElist(), setEnzK1(), setEnzK2(), setEnzK3(), setKsolve(), setMMenzKcat(), setMMenzKm(), setReacKb(), and setReacKf().
|
private |
This contains the Id of the Kinetic solver.
Definition at line 501 of file Stoich.h.
Referenced by getKsolve(), setElist(), setKsolve(), setPath(), zombifyModel(), and zombifyPoolFuncWithScaling().
|
private |
Map back from enz index to Id. Needed to unzombify
Definition at line 602 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildRateTermLookup(), getNumCoreRates(), resizeArrays(), and unZombifyModel().
|
private |
N_ is the stoichiometry matrix. All pools * all reac terms.
Definition at line 546 of file Stoich.h.
Referenced by getColIndex(), getMatrixEntry(), getRowStart(), getStoichiometryMatrix(), innerInstallReaction(), installAndUnschedFuncRate(), installEnzyme(), installMMenz(), print(), and resizeArrays().
|
private |
Number of voxels in reac system.
This tracks the unique volumes handled by the reac system. Maps one-to-one with the vector of vector of RateTerms. vector< double > uniqueVols_;
Definition at line 540 of file Stoich.h.
Referenced by setCompartment(), and zombifyModel().
Definition at line 709 of file Stoich.h.
Referenced by locateOffSolverReacs().
|
private |
Definition at line 597 of file Stoich.h.
Referenced by buildRateTermLookup(), locateOffSolverReacs(), resizeArrays(), unZombifyModel(), updateRatesAfterRemesh(), and zombifyModel().
Definition at line 710 of file Stoich.h.
Referenced by locateOffSolverReacs().
|
private |
Definition at line 603 of file Stoich.h.
Referenced by buildRateTermLookup(), locateOffSolverReacs(), resizeArrays(), unZombifyModel(), updateRatesAfterRemesh(), and zombifyModel().
Map of vectors of Ids of offSolver pools. Each map entry contains the vector of Ids of proxy pools coming from the specified compartment. In use, the junction will copy the pool indices over for data transfer.
Definition at line 697 of file Stoich.h.
Referenced by getOffSolverCompts(), getProxyPools(), locateOffSolverReacs(), and offSolverPoolMap().
|
private |
These are pools that were not in the original scope of the solver, but have to be brought in because they are reactants of one or more of the offSolverReacs.
Definition at line 585 of file Stoich.h.
Referenced by buildPoolLookup(), getNumAllPools(), getNumProxyPools(), getOffSolverPools(), locateOffSolverReacs(), and resizeArrays().
Tracks the reactions that go off the current solver. vector< Id > offSolverReacs_; Which compartment(s) does the off solver reac connect to? Usually it is just one, in which case the second id is Id()
Definition at line 708 of file Stoich.h.
Referenced by locateOffSolverReacs().
|
private |
Definition at line 591 of file Stoich.h.
Referenced by buildRateTermLookup(), locateOffSolverReacs(), resizeArrays(), unZombifyModel(), updateRatesAfterRemesh(), and zombifyModel().
|
private |
|
private |
Vector of funcs controlling pool number, that is N.
Definition at line 608 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildFuncLookup(), resizeArrays(), and unZombifyModel().
|
static |
|
private |
Definition at line 632 of file Stoich.h.
Referenced by buildPoolLookup(), convertIdToPoolIndex(), getPoolByIndex(), and getPoolIdMap().
|
private |
prdComptVec_[rateTermIndex][product#]: Identifies compts for each product for each cross-compartment RateTerm in the rates_vector.
Definition at line 724 of file Stoich.h.
Referenced by installEnzyme(), installMMenz(), and installReaction().
|
private |
The RateTerms handle the update operations for reaction rate v_. This is the master vector of RateTerms, and it is scaled to a volume such that the 'n' units and the conc units are identical. Duplicates of this vector are made in each voxel with a different volume. The duplicates have rates scaled as per volume. The RateTerms vector also includes reactions that have off-compartment products. These need special volume scaling involving all the interactiong compartments.
Definition at line 531 of file Stoich.h.
Referenced by convertRatesToStochasticForm(), getNumRates(), getR1(), getR1offset1(), getR1offset2(), getR2(), getRateTerms(), innerInstallReaction(), installAndUnschedFuncRate(), installAndUnschedFuncReac(), installDummyEnzyme(), installEnzyme(), installMMenz(), rates(), resizeArrays(), setEnzK1(), setEnzK2(), setEnzK3(), setFunctionExpr(), setMMenzKcat(), setMMenzKm(), setReacKb(), setReacKf(), and ~Stoich().
|
private |
Definition at line 633 of file Stoich.h.
Referenced by buildRateTermLookup(), and convertIdToReacIndex().
|
private |
Vector of funcs controlling reac rate, that is numKf This is handled as a rateTerm.
Definition at line 627 of file Stoich.h.
Referenced by allocateModel(), and allocateModelObject().
|
private |
Vector of reaction ids.
Definition at line 590 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildRateTermLookup(), getNumCoreRates(), printRates(), resizeArrays(), unZombifyModel(), and updateRatesAfterRemesh().
|
private |
Lookup from each molecule to its Species identifer This will eventually be tied into an ontology reference.
Definition at line 518 of file Stoich.h.
Referenced by getSpecies(), resizeArrays(), and setSpecies().
|
private |
Number of variable molecules that the solver deals with, that are local to the solver. Number of variable molecules that the solver deals with, including the proxy molecules which belong in other compartments.
unsigned int totVarPools_; Number of buffered molecules Looks up the rate term from the Id for a reac, enzyme, or func. map< Id, unsigned int > rateTermLookup_; Number functions, currently only the ones controlling molecule numbers, like sumtotals. unsigned int numFunctions_; Number of reactions in the solver model. This includes conversion reactions A + B <—> C enzyme reactions E + S <—> E.S —> E + P and MM enzyme reactions rate = E.S.kcat / ( Km + S ) The enzyme reactions count as two reaction steps. unsigned int numReac_; Flag to track status of Stoich object. -1: No path yet assigned. 0: Success 1: Warning: Missing reactant in Reac or Enz 2: Warning: Missing substrate in MMenz 4: Warning: Compartment not defined 8: Warning: Neither Ksolve nore Dsolve defined
Definition at line 684 of file Stoich.h.
Referenced by getStatus(), installDummyEnzyme(), installMMenz(), makeHalfReaction(), scaleBufsAndRates(), setElist(), and setPath().
|
private |
subComptVec_[rateTermIndex][substrate#]: Identifies compts for each substrate for each cross-compartment RateTerm in the rates_vector.
Definition at line 717 of file Stoich.h.
Referenced by installEnzyme(), installMMenz(), and installReaction().
|
private |
True if the stoich matrix is set up to handle only one-way reactions, as is needed in the case of the Gillespie algorithm.
Definition at line 488 of file Stoich.h.
Referenced by buildRateTermLookup(), getEnzK2(), getEnzK3(), getNumCoreRates(), getOneWay(), innerInstallReaction(), installDummyEnzyme(), installEnzyme(), installReaction(), resizeArrays(), setEnzK2(), setEnzK3(), setOneWay(), and setReacKb().
|
private |
Maps Ids to objects in the S_, RateTerm, and FuncTerm vectors. There will be holes in this map, but look up is very fast. The calling Id must know what it wants to find: all it gets back is an integer. The alternative is to have multiple maps, but that is slower. Assume no arrays. Each Pool/reac etc must be a unique Element. Later we'll deal with diffusion. Minor efficiency: We will usually have a set of objects that are nearly contiguous in the map. May as well start with the first of them. Vector of variablePool Ids.
Definition at line 573 of file Stoich.h.
Referenced by allocateModel(), allocateModelObject(), buildPoolLookup(), getNumAllPools(), getNumVarPools(), resizeArrays(), and unZombifyPools().