sbml2matlab is an executable for translating SBML files to their MATLAB model equivalents.
NOTE: Adding sbml2matlab to PATH does not work yet. Also, it is recommended that you install in a user home directory and not
Program Filesfor testing purposes to avoid needing admin access.
sbml2matlab may be called in four different ways:
- SBML input is from stdin, MATLAB output is to stdout
- SBML input is from inputFile.sbml, Matlab output is to stdout
- SBML input is from stdin, MATLAB output is to outputFile.m
- SBML input is from inputFile.sbml, MATLAB is to outputFile.m
Replace the square brackets with the paths of the input and output files, respectively.
This will pipe in
mymodel.sbml as the input to
sbml2matlab and writes the translated MATLAB file to
sbml2matlab versions use the following numbering scheme: MAJOR.MINOR.PATCH
- sbml2matlab and NOM depend on libSBML. Follow the libSBML instructions to download and install libSBML.
- Using the CMake GUI, specify location of the sbml2matlab folder, containing the top level CMakeLists.txt file and source code. Specify where you would like the project files to be built.
- Click the Configure button and select the compiler environment of your choice. Options to be set for your build will be highlighted in red.
- The following options must be set:
- Specify install location of sbml2matlab. For example, the executable and all runtime libraries will be installed in this location.
- Specify the bin (runtime libraries), include (header files), and lib (import libraries) folders within the libSBML install location.
- Click Configure once again so that the red highlighting disappears. Finally, click the Generate button to produce the project files in the build directory.
To build NOM without sbml2matlab, specify the source directory in the CMake GUI as the NOM subdirectory. Proceed through the previous steps as in the sbml2matlab build.
CMake will generate seven Projects within MSVS for sbml2matlab. The below is a description of what building each of these projects does.
- ALL_BUILD: Compiles all source files. This is the default Build Solution action.
- INSTALL: Compiles all source files and places the output in the location specified in CMAKE_INSTALL_PREFIX, along with the dependencies (libsbml.dll et al.) needed to run it, help files, license, and readme files.
- libsbml2matlab: Compiles sbml2matlab as a shared library.
- NOM: Compiles the NOM as a shared library.
- PACKAGE: Builds the standalone installer.
- sbml2matlab: Compiles sbml2matlab as an executable.
- ZERO_CHECK: Used by CMake to check that project files are up to date relative to the CMakeLists.txt files.
- In the terminal, run
makein the Build folder, specified in CMake within the "Where to build the binaries" field.
makeis complete, enter in
make installto install all the program files into the location specified by CMAKE_INSTALL_PREFIX.
NOM requires libSBML header files and the libSBML import library to compile.
NOM.dll requires libSBML.dll and the shared libraries (DLLs) found in the libSBML dependencies. All these DLLs are placed in the same install folder as sbml2matlab or any other program that uses NOM.