StochSecondOrderSingleSubstrate Class Reference

#include <RateTerm.h>

Inheritance diagram for StochSecondOrderSingleSubstrate:
Inheritance graph
[legend]
Collaboration diagram for StochSecondOrderSingleSubstrate:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StochSecondOrderSingleSubstrate (double k, unsigned int y)
double operator() (const double *S) const
 Computes the rate. The argument is the molecule array.
unsigned int getReactants (vector< unsigned int > &molIndex) const
void rescaleVolume (short comptIndex, const vector< short > &compartmentLookup, double ratio)
RateTermcopyWithVolScaling (double vol, double sub, double prd) const

Detailed Description

The reason for this class is that if we have a single substrate acting in 2nd order, we must account for the removal of one molecule halfway through the reaction. This has a major effect when there is only one molecule to start with: the eventual # would become negative if we didn't do this correction!


Constructor & Destructor Documentation

StochSecondOrderSingleSubstrate::StochSecondOrderSingleSubstrate ( double  k,
unsigned int  y 
) [inline]

Referenced by copyWithVolScaling().


Member Function Documentation

RateTerm* StochSecondOrderSingleSubstrate::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 ZeroOrder.

References ZeroOrder::k_, NA, and StochSecondOrderSingleSubstrate().

Here is the call graph for this function:

unsigned int StochSecondOrderSingleSubstrate::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 ZeroOrder.

double StochSecondOrderSingleSubstrate::operator() ( const double *  S  )  const [inline, virtual]

Computes the rate. The argument is the molecule array.

Reimplemented from ZeroOrder.

References ZeroOrder::k_, and y.

void StochSecondOrderSingleSubstrate::rescaleVolume ( short  comptIndex,
const vector< short > &  compartmentLookup,
double  ratio 
) [inline, virtual]

This is used to rescale the RateTerm kinetics when the compartment volume changes. This is needed because the kinetics are in extensive units, that is, mol numbers, rather than in intensive units like concentration. So when the volume changes the rate terms change. Each Rate term checks if any of its reactant molecules are affected, and if so, rescales. Ratio is newVol / oldVol

Reimplemented from ZeroOrder.

References ZeroOrder::k_.


The documentation for this class was generated from the following file:

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1