|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.network.AbstractNetworkImpl
fern.network.fernml.FernMLNetwork
public class FernMLNetwork
A FernMLNetwork
is usually loaded from a file. For specifications see
the included FernMLSchema.xsd or the examples. Additionally, a FernMLNetwork
can be created out of an arbitrary Network
. By using the saveToFile
method, every Network
can be saved as a fernml-File.
Constructor Summary | |
---|---|
FernMLNetwork(File file)
Creates a FernMLNetwork from a file. |
|
FernMLNetwork(Network net)
Create a FernMLNetwork from an existing Network . |
|
FernMLNetwork(Network net,
double[] kineticConstants)
Creates a FernMLNetwork out of an existing network (e.g. to save it to a fernml file) using explicitly given kineticConstants (when KineticConstantPropensityCalculator
If kineticConstants is null or to short, a default value of 1 is taken. |
Method Summary | |
---|---|
long |
getInitialAmount(int species)
Gets the initial amount of the specified molecule species. |
int |
getNumReactions()
Gets the number of reaction within the network. |
int |
getNumSpecies()
Gets the number of species within the network. |
ArrayKineticConstantPropensityCalculator |
getPropensityCalculator()
Gets the PropensityCalculator for this network. |
void |
saveToFile(File file)
Saves the actual FernMLNetwork to a file. |
void |
setInitialAmount(int species,
long value)
Sets the initial amount of the specified molecule species. |
Methods inherited from class fern.network.AbstractNetworkImpl |
---|
getAmountManager, getAnnotationManager, getName, getProducts, getReactants, getReactionName, getSpeciesByName, getSpeciesMapping, getSpeciesName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FernMLNetwork(File file) throws IOException, org.jdom.JDOMException
FernMLNetwork
from a file.
file
- file containing the network
IOException
- if the file cannot be read
org.jdom.JDOMException
- if the file is malformedpublic FernMLNetwork(Network net)
FernMLNetwork
from an existing Network
. If the
network's PropensityCalculator
is not an AbstractKineticConstantPropensityCalculator
,
the constant for the rate reaction is obtained by the propensity calculator by setting
each reactant species' amount to 1. If the stoichiometry of some reactant is greater than 1 the value
is set accordingly.
net
- the network to create a FernMLNetwork
frompublic FernMLNetwork(Network net, double[] kineticConstants)
KineticConstantPropensityCalculator
If kineticConstants
is null
or to short, a default value of 1 is taken.
net
- An existing networkkineticConstants
- kinetic constants for each reaction in net
Method Detail |
---|
public ArrayKineticConstantPropensityCalculator getPropensityCalculator()
Network
PropensityCalculator
for this network.
getPropensityCalculator
in interface Network
getPropensityCalculator
in class AbstractNetworkImpl
PropensityCalculator
public int getNumReactions()
Network
getNumReactions
in interface Network
getNumReactions
in class AbstractNetworkImpl
public int getNumSpecies()
Network
getNumSpecies
in interface Network
getNumSpecies
in class AbstractNetworkImpl
public void setInitialAmount(int species, long value)
Network
species
- index of the speciesvalue
- initial amount of the speciespublic long getInitialAmount(int species)
Network
species
- index of the species
public void saveToFile(File file) throws IOException
FernMLNetwork
to a file.
file
- the file to save the network in
IOException
- if the file cannot be written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |