Computational Systems Biology
Sauro Lab
University of Washington
Home  |   Downloads  |   News  |   Research  |   Papers  |   About Us  |   Contact Us  |   SBW Help   |   Jobs

What is SBW 
Research Impact 
Published Papers 
Lab Members 
Available Positions 
CSB Links 
Student Projects 
Software Downloads:

1. SBW
2. JDesigner
3. Jarnac
5. Matlab Interface
6. Optimization
6. Bifurcation
maintained by Frank Bergmann

SBML Translators

About SBML Translators

The Translators convert description of a model from SBML to other langauges. Presently supported languages are Matlab, C, C# and Java. The Translators for C, C# and Java generate model code that can be executed much faster than Matlab. This is useful in running simulations of large models.

Please download the executable file from the link below. Running the executable will install the translators and register them with SBW. Note that Systems Biology Workbecnch (SBW) should be installed before the translators. These SBML translators have been tested on a system running Microsoft Windows XP.


Instructions on using the Translators

The C, C# and Java Translators work by linking the model code with a hosting application. These can be linked together to simulate the model.

The Hosting Application file can be generated by using the Inspector tool - Select the translator and run the 'string getHostingApp()' method. The model code can be generated by calling the Translator from the Export tool in JDesigner.

Executing a model built with CTranslator

The Hosting application can be named as hostinApp.c and the model code as model.h. Both these files should be placed in the same folder. On windows platforms a suitable C compiler can then build an executable out of these two files. On Unix or Linux platforms one can use gcc to comiple and create an executable. Rememeber to link the math library. The following command can create the executable with gcc.

gcc hostingApp.c -lm -o a.out

where a.out is the name of the executable. The user can set the simulation starting time, ending time, number of time steps, name of output file and the output format. These can be altered by changing the values in the define statements for SIMULATION_START_TIME, SIMULATION_END_TIME, NUMBER_OF_TIME_STEPS, NAME_OF_OUTPUT_FILE and FORMAT_TO_SAVE_OUTPUT. These define statements can be found near the top of the hosting application hostingApp.c.

Each simulation timestep is displayed to the console by a period (”.”) If the number of simulation steps is very large, it will take a long time to display the dots. The user can instead change the setting to display every Nth simulation step by a dot rather than every step. This can be done by changing the define statement for SHOW_NTH_TIMESTEP (which by default is set to show every 100th simulation step with a dot). The output to a file can be controlled in a similar fashion by changing the define statement for SAVE_NTH_DATA_POINT to a suitable integer.

Executing a model built with CSharpTranslator

C# allows us to define classes which contain all the required methods. Both the hosting application and the model are thus built as classes (HostingApp and Model classes respectively). Using Microsoft Visual Studio .NET, one can create a new C# project and add these as two class files (Model.cs and HostingApp.cs) The simulation can be performed by compiling and executing the project.

C# Translator also provides the user control over the simulation parameters - start time, end time, number of time steps etc. These can be altered from the default values by changing the public static statements for SIMULATION_START_TIME, SIMULATION_END_TIME and NUMBER_OF_TIME_STEPS. The output file name can be changed (default is CSharpData.txt) by changing OUTPUT_FILE_NAME.

The public static statements for SHOW_NTH_TIMESTEP and SAVE_NTH_DATA_POINT can be changed to display every Nth simulation step as a dot, and similarly save every Nth simulation step output to the output file.

Executing a model built with JavaTranslator

Java is also an object oriented language allowing creation of classes. Similar to C#, the hosting application and model can be saved as and respectively. These can be compiled in a Java IDE or from command line to create class files that can then be run using the Java virtual Machine (JVM). Please note that this requires installation of Java Development Kit from Sun Microsystems. The latest version, freely available, is Java 2 Platorm, Standard Edition (renamed from JDK 1.2). Here are the steps to create the class files from command line:


The following command will then run the simulation

java HostingApp

Similar to the C and C# Translators, the user has control over the simulation parameters, which can be altered from the default values by changing SIMULATION_START_TIME, SIMULATION_END_TIME and NUMBER_OF_TIME_STEPS. The output file name can be changed (default is JavaData.txt) by changing output_file.

Please report any issues with the translators to

sysbio/sbmltranslators.txt · Last modified: 2007/07/30 13:39 by mallain

    Home  |   About Us  |   Contact Us  |   Statistics
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki