|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.network.AbstractNetworkImpl
fern.network.creation.AutocatalyticNetwork
public class AutocatalyticNetwork
Evolve an autocatalytic network. The evolution starts at some monomers, let them aggregate
(e.g. A+B -> AB) by a given probability and up to a given length. Then, each reaction
is catalyzed by a given probability by some molecule species (the catalysts are stored
as fields in the net's annotation). Since the reactions are only unidirectional you have
to create a ReversibleNetwork
out of it. Because of this, also catalysts for
the reverse reactions are stored in the corresponding fields.
The advantage of the unidirectional reactions is space efficiency since the ReversibleNetwork
does not copy the reactions but redirects the indices.
This network can of course be used for stochastic simulations. If it is just converted
into a ReversibleNetwork
, there are just different kinetic constants used for
catalyzed and not catalyzed reactions (getCatalyzedKineticConstant()
and getUncatalyzedKineticConstant()
).
Field Summary | |
---|---|
static String |
CATALYSTS_FIELD
Name of the field where catalysts are stored. |
static String |
CATALYSTS_FIELD_REVERSIBLE
Name of the field where catalysts for the reverse reactions are stored. |
Constructor Summary | |
---|---|
AutocatalyticNetwork(char[] monomers,
Probability createProb,
Probability catProb,
int maxLength)
Creates the autocatalytic network from given monomers, reaction probability, catalysis probability up to a given polymer length. |
|
AutocatalyticNetwork(char[] monomers,
Probability createProb,
Probability catProb,
int maxLength,
boolean useFastMethod)
Creates the autocatalytic network from given monomers, reaction probability, catalysis probability up to a given polymer length. useDefault should usually set to true unless you want to evolve really huge networks. |
Method Summary | |
---|---|
Iterable<Integer> |
getCatalysts(int reaction)
Implementation for the CatalystIterator . |
double |
getCatalyzedKineticConstant()
Gets the kinetic constant for catalyzed reactions. |
long |
getInitialAmount(int species)
Gets the initial amount of the specified molecule species. |
long |
getMonomerAmount()
Gets the initial amount of the monomers for a simulation algorithm. |
int |
getNumMonomers()
Gets if the number of monomers |
long |
getOtherAmount()
Gets the initial amount of the not-monomers for a simulation algorithm. |
PropensityCalculator |
getReversePropensityCalculator()
Gets the PropensityCalculator which has to be used for instantiation
of the ReversibleNetwork . |
double |
getUncatalyzedKineticConstant()
Gets the kinetic constant for not catalyzed reactions. |
void |
setCatalyzedKineticConstant(double catalyzedKineticConstant)
Sets the kinetic constant for catalyzed reactions. |
void |
setInitialAmount(int species,
long value)
Sets the initial amount of the specified molecule species. |
void |
setMonomerAmount(long monomerAmount)
Sets the initial amount of the monomers for a simulation algorithm. |
void |
setOtherAmount(long otherAmount)
Sets the initial amount of the not-monomers for a simulation algorithm. |
void |
setUncatalyzedKineticConstant(double uncatalyzedKineticConstant)
Sets the kinetic constant for not catalyzed reactions. |
Methods inherited from class fern.network.AbstractNetworkImpl |
---|
getAmountManager, getAnnotationManager, getName, getNumReactions, getNumSpecies, getProducts, getPropensityCalculator, getReactants, getReactionName, getSpeciesByName, getSpeciesMapping, getSpeciesName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CATALYSTS_FIELD
public static final String CATALYSTS_FIELD_REVERSIBLE
Constructor Detail |
---|
public AutocatalyticNetwork(char[] monomers, Probability createProb, Probability catProb, int maxLength)
monomers
- the monomers to start the network evolution withcreateProb
- the reaction probabilitycatProb
- the catalyzation probabilitymaxLength
- the maximal polymer lengthProbability
public AutocatalyticNetwork(char[] monomers, Probability createProb, Probability catProb, int maxLength, boolean useFastMethod)
monomers
- the monomers to start the network evolution withcreateProb
- the reaction probabilitycatProb
- the catalysis probabilitymaxLength
- the maximal polymer lengthuseFastMethod
- what method is going to be used for creating / catalyzingProbability
Method Detail |
---|
public PropensityCalculator getReversePropensityCalculator()
PropensityCalculator
which has to be used for instantiation
of the ReversibleNetwork
.
PropensityCalculator
for the ReversibleNetwork
public Iterable<Integer> getCatalysts(int reaction)
CatalystIterator
. Returns the indices of
catalysts for the given reaction. By using getAnnotationManager
it returns the correct catalysts even if a ReversibleNetwork
is used.
getCatalysts
in interface CatalystIterator
reaction
- index of the reaction for which the catalysts have to be returned
public long getInitialAmount(int species)
Network
getInitialAmount
in interface Network
species
- index of the species
public void setInitialAmount(int species, long value)
Network
setInitialAmount
in interface Network
species
- index of the speciesvalue
- initial amount of the speciespublic int getNumMonomers()
public long getMonomerAmount()
public void setMonomerAmount(long monomerAmount)
monomerAmount
- initial amount of the monomerspublic long getOtherAmount()
public void setOtherAmount(long otherAmount)
otherAmount
- initial amount of the not-monomerspublic double getCatalyzedKineticConstant()
public void setCatalyzedKineticConstant(double catalyzedKineticConstant)
catalyzedKineticConstant
- the catalyzedKineticConstant to setpublic double getUncatalyzedKineticConstant()
public void setUncatalyzedKineticConstant(double uncatalyzedKineticConstant)
uncatalyzedKineticConstant
- the uncatalyzedKineticConstant to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |