public class FernMLNetwork extends AbstractNetworkImpl
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 and Description |
|---|
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
net} doesn't use
KineticConstantPropensityCalculator If kineticConstants is
null or to short, a default value of 1 is taken. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getAmountManager, getAnnotationManager, getName, getProducts, getReactants, getReactionName, getSpeciesByName, getSpeciesMapping, getSpeciesNamepublic FernMLNetwork(File file) throws IOException, org.jdom.JDOMException
FernMLNetwork from a file.file - file containing the networkIOException - if the file cannot be readorg.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)
net} doesn't use
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 netpublic ArrayKineticConstantPropensityCalculator getPropensityCalculator()
NetworkPropensityCalculator for this network.getPropensityCalculator in interface NetworkgetPropensityCalculator in class AbstractNetworkImplPropensityCalculatorpublic int getNumReactions()
NetworkgetNumReactions in interface NetworkgetNumReactions in class AbstractNetworkImplpublic int getNumSpecies()
NetworkgetNumSpecies in interface NetworkgetNumSpecies in class AbstractNetworkImplpublic void setInitialAmount(int species,
long value)
Networkspecies - index of the speciesvalue - initial amount of the speciespublic long getInitialAmount(int species)
Networkspecies - index of the speciespublic void saveToFile(File file) throws IOException
FernMLNetwork to a file.file - the file to save the network inIOException - if the file cannot be writtenCopyright © 2007–2021. All rights reserved.