|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.network.modification.ModifierNetwork
fern.network.modification.ReversibleNetwork
public class ReversibleNetwork
Doubles each reaction in a way that each original unidirectional reaction becomes
reversible.As proposed by 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.
Field Summary | |
---|---|
static String |
REVERSIBLE_SUFFIX
Suffix which marks annotations for virtually created reverse reactions. |
Constructor Summary | |
---|---|
ReversibleNetwork(Network originalNet,
PropensityCalculator reversiblePropensityCalculator)
Creates a new network from an original network and virtually creates for each reaction a new inverse reaction. |
Method Summary | |
---|---|
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. |
Methods inherited from class fern.network.modification.ModifierNetwork |
---|
getInitialAmount, getName, getNumSpecies, getOriginalNetwork, getParentNetwork, getSpeciesByName, getSpeciesName, setInitialAmount |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVERSIBLE_SUFFIX
Constructor Detail |
---|
public ReversibleNetwork(Network originalNet, PropensityCalculator reversiblePropensityCalculator)
PropensityCalculator
has
to be given.
originalNet
- the original networkreversiblePropensityCalculator
- the PropensityCalculator
for the reverse reactionsMethod Detail |
---|
public 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 reaction
public int[] getReactants(int reaction)
getReactants
in interface Network
getReactants
in class ModifierNetwork
reaction
- index of the reaction
public 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 reaction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |