|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.network.AbstractKineticConstantPropensityCalculator
public abstract class AbstractKineticConstantPropensityCalculator
Base implementation of a PropensityCalculator
. The propensity is simply
a product of the populations of its reactant species and a specific reaction
probability rate constant (which is related to the conventional deterministic
rate constant and can be calculated by getConstantFromDeterministicRateConstant
.
Some of the tau leap procedures need partial derivatives of the propensity function (and
use therefore the method calculatePartialDerivative
) so the use of this
procedures is only possible when the network's PropensityCalculator
is a AbstractKineticConstantPropensityCalculator
.
Constructor Summary | |
---|---|
AbstractKineticConstantPropensityCalculator(int[][] reactants)
Creates a AbstractKineticConstantPropensityCalculator by an array of
adjacency arrays for the reaction's reactant species (which are the only one needed
for the propensity calculation). |
Method Summary | |
---|---|
double |
calculatePartialDerivative(int reaction,
AmountManager amount,
int reactantIndex,
double volume)
Calculates partial differentials of the propensity functions for the tau leaping methods. |
double |
calculatePropensity(int reaction,
AmountManager amount,
Simulator sim)
Calculates the propensity for reaction by the formula h*c, where
c is the kinetic constant for reaction and h is the number of
distinct molecular reactant combinations for reaction . |
double |
getConstantFromDeterministicRateConstant(double k,
int reaction,
double V)
Calculates the specific reaction probability rate constant c from the conventional deterministic rate constant k in some fixed volume v by the formula c=|reactants| ! |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fern.network.KineticConstantPropensityCalculator |
---|
getConstant |
Constructor Detail |
---|
public AbstractKineticConstantPropensityCalculator(int[][] reactants)
AbstractKineticConstantPropensityCalculator
by an array of
adjacency arrays for the reaction's reactant species (which are the only one needed
for the propensity calculation).
reactants
- array of adjacency arraysMethod Detail |
---|
public double calculatePropensity(int reaction, AmountManager amount, Simulator sim)
reaction
by the formula h*c, where
c is the kinetic constant for reaction
and h is the number of
distinct molecular reactant combinations for reaction
. If a positive
value for volume is given, it is assumed that the constants are deterministic rate
constants and are hence transformed to specific reaction rate constants.
calculatePropensity
in interface PropensityCalculator
reaction
- the index of the reactionamount
- the AmountManager
sim
- the simulator
public double calculatePartialDerivative(int reaction, AmountManager amount, int reactantIndex, double volume)
calculatePartialDerivative
in interface PartialDerivativePropensityCalculator
reaction
- the reaction indexamount
- the AmountManager
reactantIndex
- the network index of the reactant to calculate the partial differential forvolume
- the volume of the reaction space
public double getConstantFromDeterministicRateConstant(double k, int reaction, double V)
getConstantFromDeterministicRateConstant
in interface KineticConstantPropensityCalculator
k
- deterministic rate constantreaction
- the index of the constant's reactionV
- the fixed volume
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |