#include <FuncRateTerm.h>
Public Member Functions | |
FuncRate (double k, unsigned int targetPoolIndex) | |
double | operator() (const double *S) const |
Computes the rate. The argument is the molecule array. | |
unsigned int | getReactants (vector< unsigned int > &molIndex) const |
void | setReactants (const vector< unsigned int > &molIndex) |
const vector< unsigned int > & | getFuncArgIndex () |
void | setFuncArgIndex (const vector< unsigned int > &mol) |
void | setExpr (const string &s) |
const string & | getExpr () const |
RateTerm * | copyWithVolScaling (double vol, double sub, double prd) const |
Protected Attributes | |
FuncTerm | func_ |
double | k_ |
double | funcVolPower_ |
This FuncRate manages a one-way reaction whose rate is determined by a Function. It has no substrates, just controls the rate of change of a target molecule.
dtarget/dt = func( x0, x1, x2..., t )
The values x0, x1, x2 are expected to be concentrations so that they do not depend on volume.
FuncRate::FuncRate | ( | double | k, | |
unsigned int | targetPoolIndex | |||
) | [inline] |
References func_, and FuncTerm::setTarget().
Referenced by copyWithVolScaling().
RateTerm* FuncRate::copyWithVolScaling | ( | double | vol, | |
double | sub, | |||
double | prd | |||
) | const [inline, virtual] |
Duplicates rate term and then applies volume scaling. Arguments are volume of reference voxel, product of vol/refVol for all substrates: applied to R1 product of vol/refVol for all products: applied to R2
Note that unless the reaction is cross-compartment, the vol/refVol will be one.
Reimplemented from ExternReac.
Reimplemented in FuncReac.
References func_, FuncRate(), funcVolPower_, FuncTerm::getTarget(), k_, and NA.
const string& FuncRate::getExpr | ( | ) | const [inline] |
const vector< unsigned int >& FuncRate::getFuncArgIndex | ( | ) | [inline] |
unsigned int FuncRate::getReactants | ( | vector< unsigned int > & | molIndex | ) | const [inline, virtual] |
This function finds the reactant indices in the vector S. It returns the number of substrates found, which are the first entries in molIndex. The products are the remaining ones. Note that it does NOT find products for unidirectional reactions, which is a bit of a problem.
Reimplemented from ExternReac.
Reimplemented in FuncReac.
References func_, and FuncTerm::getTarget().
double FuncRate::operator() | ( | const double * | S | ) | const [inline, virtual] |
Computes the rate. The argument is the molecule array.
Reimplemented from ExternReac.
Reimplemented in FuncReac.
References func_.
void FuncRate::setExpr | ( | const string & | s | ) | [inline] |
References func_, and FuncTerm::setExpr().
Referenced by Stoich::installAndUnschedFuncReac().
void FuncRate::setFuncArgIndex | ( | const vector< unsigned int > & | mol | ) | [inline] |
References func_, and FuncTerm::setReactantIndex().
Referenced by Stoich::installAndUnschedFuncReac().
void FuncRate::setReactants | ( | const vector< unsigned int > & | molIndex | ) | [inline] |
Reimplemented in FuncReac.
References func_, and FuncTerm::setTarget().
FuncTerm FuncRate::func_ [protected] |
double FuncRate::funcVolPower_ [protected] |
Referenced by FuncReac::copyWithVolScaling(), and copyWithVolScaling().
double FuncRate::k_ [protected] |
Referenced by FuncReac::copyWithVolScaling(), copyWithVolScaling(), and FuncReac::rescaleVolume().