public abstract class AbstractKineticConstantPropensityCalculator extends Object implements KineticConstantPropensityCalculator, PartialDerivativePropensityCalculator
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 and Description |
---|
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). |
Modifier and Type | Method and Description |
---|---|
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| !
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConstant
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 arrayspublic 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 simulatorpublic 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 spacepublic 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 volumeCopyright © 2007–2021. All rights reserved.