public class ReversibleNetwork extends ModifierNetwork
ModifierNetwork
, the reactions are not copied but the indices are
redirected.
Note: The reverse reactions do not have any annotation, unless in the original network the
reactions have annotation with fields ending with REVERSIBLE_SUFFIX
. If such
annotations are present in the original network, the corresponding reactions in the reversible
network will not have these annotations but the corresponding reversible reactions will have
these annotations without this suffix (e.g., if you create an AutocatalyticNetwork
, the
reactions have annotations Catalyst
and CatalystReversible
, if you
create a ReversibleNetwork
out of this, each reaction will have only the annotation
Catalyst
).
For the new reactions you have to specify a new PropensityCalculator
whose index space is
equal to the original network's index space. If you have, for instance, in your original network
two reactions, A + A → B, B → C, the PropensityCalculatory
has to calculate the
propensity for A + A ← B when index 0 is given, the propensity for B ← C, when index 1 is given.
Modifier and Type | Field and Description |
---|---|
static String |
REVERSIBLE_SUFFIX
Suffix which marks annotations for virtually created reverse reactions.
|
Constructor and Description |
---|
ReversibleNetwork(Network originalNet,
PropensityCalculator reversiblePropensityCalculator)
Creates a new network from an original network and virtually creates for each reaction a new
inverse reaction.
|
Modifier and Type | Method and Description |
---|---|
AmountManager |
getAmountManager()
Gets the
AmountManager for the modified network. |
AnnotationManager |
getAnnotationManager()
Gets the
AnnotationManager for the modified network. |
int |
getNumReactions()
Gets the number of reactions in the modified network (which is 2*number of reaction in the
original network).
|
int[] |
getProducts(int reaction)
Gets the products of a reaction
|
PropensityCalculator |
getPropensityCalculator()
Gets the
PropensityCalculator for the modified network. |
int[] |
getReactants(int reaction)
Gets the reactants of a reaction
|
String |
getReactionName(int index)
Gets a string representation of the reaction in the modified network.
|
getInitialAmount, getName, getNumSpecies, getOriginalNetwork, getParentNetwork, getSpeciesByName, getSpeciesName, setInitialAmount
public static final String REVERSIBLE_SUFFIX
public ReversibleNetwork(Network originalNet, PropensityCalculator reversiblePropensityCalculator)
PropensityCalculator
has to be given.originalNet
- the original networkreversiblePropensityCalculator
- the PropensityCalculator
for the reverse
reactionspublic AmountManager getAmountManager()
AmountManager
for the modified network.getAmountManager
in interface Network
getAmountManager
in class ModifierNetwork
AmountManager
for the modified networkpublic int getNumReactions()
getNumReactions
in interface Network
getNumReactions
in class ModifierNetwork
public int[] getProducts(int reaction)
getProducts
in interface Network
getProducts
in class ModifierNetwork
reaction
- index of the reactionpublic int[] getReactants(int reaction)
getReactants
in interface Network
getReactants
in class ModifierNetwork
reaction
- index of the reactionpublic PropensityCalculator getPropensityCalculator()
PropensityCalculator
for the modified network. If the original
PropensityCalculator
and the one for the reverse reactions is a AbstractKineticConstantPropensityCalculator
, an AbstractKineticConstantPropensityCalculator
is returned.getPropensityCalculator
in interface Network
getPropensityCalculator
in class ModifierNetwork
PropensityCalculator
for the modified networkpublic AnnotationManager getAnnotationManager()
AnnotationManager
for the modified network.getAnnotationManager
in interface Network
getAnnotationManager
in class ModifierNetwork
AnnotationManager
for the modified network.public String getReactionName(int index)
getReactionName
in interface Network
getReactionName
in class ModifierNetwork
index
- index of the reactionCopyright © 2007–2021. All rights reserved.