public class ReversibleReaction extends Reaction
Reactions where the substrates form products, and products can also from substrates.
A <-> BThe corresponding rate law is as follows:
v = kfwd * cA - kbwd * cBwhere v is the velocity of the reaction, kfwd is any
ForwardsRateConstant, kbwd is any
BackwardsRateConstant, cA is the concentration of the substrate, and cB is the concentration of the product.
Reversible reactions are SectionSpecific and supply IndependentUpdates.
// setup kfwd
RateConstant forwardsRate = RateConstant.create(10)
.forward().firstOrder()
.timeUnit(SECOND)
.build();
// setup kbwd
RateConstant backwardsRate = RateConstant.create(10)
.backward().firstOrder()
.timeUnit(SECOND)
.build();
// set up species
SmallMolecule speciesA = new SmallMolecule.Builder("A")
.build();
SmallMolecule speciesB = new SmallMolecule.Builder("A")
.build();
// create reaction
ReversibleReaction.inSimulation(simulation)
.addSubstrate(speciesA)
.addProduct(speciesB)
.forwardsRateConstant(forwardsRate)
.backwardsRateConstant(backwardsRate)
.build();| Modifier and Type | Class and Description |
|---|---|
static class |
ReversibleReaction.ReversibleReactionBuilder |
Reaction.Builder<TopLevelType extends Reaction,BuilderType extends Reaction.Builder>supplier| Constructor and Description |
|---|
ReversibleReaction() |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateVelocity(ConcentrationContainer concentrationContainer)
Calculates the reaction velocity, depending on the kinetic law.
|
void |
checkFeatures() |
static ModuleBuilder |
getBuilder(Simulation simulation) |
String |
getReactionString()
Returns a nicely formatted string representation of the reaction.
|
void |
initialize() |
static ReversibleReaction.ReversibleReactionBuilder |
inSimulation(Simulation simulation) |
addStochiometricReactant, calculateDeltas, collectProductsString, collectSubstrateString, getProductEntities, getProducts, getStoichiometricReactants, getSubstrateEntities, getSubstrates, isElementary, setElementary, substratesAvailable, toStringaddDeltaFunction, addModuleToSimulation, addReferencedEntities, addReferencedEntity, calculateUpdates, deltaIsValid, determineLargestLocalError, getApplicationCondition, getDeltaCutoff, getErrorCutoff, getFeature, getFeatures, getIdentifier, getReferencedEntities, getRequiredFeatures, getScaledFeature, getScaledFeature, getScope, getSimulation, getSpecificity, getState, getSupplier, handleDelta, onCompletion, onReset, optimizeTimeStep, resetState, scaleScalableFeatures, setApplicationCondition, setDeltaCutoff, setErrorCutoff, setFeature, setIdentifier, setSimulationpublic static ReversibleReaction.ReversibleReactionBuilder inSimulation(Simulation simulation)
public void initialize()
initialize in class Reactionpublic double calculateVelocity(ConcentrationContainer concentrationContainer)
ReactioncalculateVelocity in class ReactionconcentrationContainer - The concentration container to calculate the deltas for.public String getReactionString()
ReactiongetReactionString in class Reactionpublic void checkFeatures()
checkFeatures in interface UpdateModulecheckFeatures in class ConcentrationBasedModule<SectionDeltaFunction>public static ModuleBuilder getBuilder(Simulation simulation)
Copyright © 2019. All rights reserved.