MathSBML

MathSBML Home Page MathSBML Site Map

MathSBML Model Builder: speciesToSBML, speciesToSymbolicSBML


speciesToSBML[options] returns a single <species.../> definition.

speciesToSBML[{{options}, {options},...}] returns a <listOfSpecies.../> where each option list refers to a separate species.

speciesToSymbolicSBML[arguments] returns Symbolic SBML for a <species.../> definition.

New in version 2.1.4. Modified in 2.3.0, 2.3.24, 2.4.16, 2.6.0

Options

The options for speciesToSMBML are identical to species fields listed in the SBML spec, i.e., id, name, speciesType compartment, initialAmount, initialConcentration, substanceUnits, spatialSizeUnits, hasOnlySubstanceUnits, boundaryCondition, charge, constant, metaid, notes, annotation, sboTerm (level 2 version 2 only).

Experimental Options

If Arrays->True is set by an call to newModel[]: ArrayDimensions->{i->{min,max},j->{min,max},...} or {} (default).


Example 1: Single Species

The following input expression will create a single species definition (linefeeds and indentation added to emphasize syntax):

	speciesToSBML[id->"fred", 
		name->"Fred Flintstone", 
		compartment->"bedrock" , 
		boundaryCondition->"false",
		constant->"true", 
		initialConcentration->5, 
		substanceUnits->"rocks", 
		charge->17]

and will produce the following output (line feeds and indentation added to emphasize format):

	<species id="fred" 
		name="Fred Flintstone" 
		compartment="bedrock" 
		boundaryCondition="false" 
		constant="true" 
		initialConcentration="5" 
		substanceUnits="rocks" 
		charge="17"/>

Example 2: Multiple Species

The following will generate a listOfSpecies SBML fragment:

	speciesToSBML[{{id-> "fred", compartment-> "bedrock"}, 
	               {id-> "barney",compartment-> "bedrock"}
	               }]

A string containing the following SBML, including embedded line feeds and spaces for indentations, will be returned:

	<listOfSpecies>
	 <species id="fred"
	     name="fred"
	     compartment="bedrock"
	     boundaryCondition="false"
	     constant="false"
	     substanceUnits="substance"
	     hasOnlySubstanceUnits="false"/>
	 <species id="barney"
	     name="barney"
	     compartment="bedrock"
	     boundaryCondition="false"
	     constant="false"
	     substanceUnits="substance"
	     hasOnlySubstanceUnits="false"/>
	</listOfSpecies>



Go to the top of this page

This page last modified 10 May 2005