-
Notifications
You must be signed in to change notification settings - Fork 3
JSim SBML support
JSim version 2.03 and above require the main libraries and java bindings from libSBML, the utility program sbtranslate from the Antimony package, and sbml2matlab program (JSim v2.07 and above) for full functionality. This document describes how to obtain what you need from those packages.
The core JSim program requires libsbml to perform its SBML/MML translations and Matlab code generation. This means that we need:
-
libsbml, the core C++ library; -
libsbmlj, the SWIG-based wrapper Java-to-C++ library; and -
libsbmlj.jar, the java code that calls the SWIG library.
By default, libsbml distributions will statically link the libsbml library and the libsbmlj library (plus any dependent XML-reading libraries and compression libraries), so there is only a single library file that you need (libsbmlj), plus the jar file. If space is not an issue, it is highly recommended that this be used directly. However, if space is an issue, it is possible to compile the library yourself.
In addition, the Antimony program sbtranslate is used to perform the Antimony/MML translation, as well as (potentially) Antimony/MML/CellML translations. This is an external executable that also uses libsbml internally, as well as (potentially) the CellML API. Antimony binary distributions can also be used in any form, as long as 'sbtranslate' works. Again, if space is an issue, you may wish to ensure that sbtranslate uses the same version of libsbml that you use above. However, if the binary distribution of libsbml is being used, this will not use the libsbml library at all (as it is statically linked to libsbmlj instead), so it is not even necessary to ensure that the version of libsbml being used is the same! If space is indeed an issue, you'll need to compile from source, and at that point, you might as well compile libsbml at the same time.
Visit the libSBML home page, and follow the 'Download libSBML' link (which currently (April 2019) points to the 5.18.0 version). Assuming you are assembling binaries for distribution in the 'canonical' JSIMAUXLIB folders, you can get the two files you need (the libsbmlj library and the libsbmlj.jar file) from these distributions: follow the instructions for installation, and copy any of the libsbml.jar files (they should be functionally identical, if not actually identical) into $JSIMSRC/third/server/, and [libsbmlj.dll|libsbmlj.dylib|libsbmlj.so] into $JSIMAUXLIB/[win32|macos|linux]/.
Next, visit the Antimony home page, and download any binary installers you find there (there will almost certainly be one for Windows, there may be one for MacOSX, and there probably will not be one for linux). Again, follow the instructions provided, and find the 'sbtranslate' executable. Copy this and all associated libraries into $JSIMAUXLIB. Assuming the version you download works with CellML, this will include several different libraries for that (including libxml2), plus the libsbml library, plus (on windows) two dll's needed to work with Visual Studio-compiled programs. Assuming you downloaded the binaries for libsbml, the libsbml library provided here may be the same or it may be different from the other; it won't matter, as libsbmlj is completely self-contained.
Model development and archiving support at physiome.org provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.