libSBML C# API
libSBML 5.12.0 C# API
|
Accessing libSBML from software | ||
Asking questions, reporting issues |
Asking questions, reporting issues The continued improvement of libSBML is crucially dependent on your
feedback. Below are some means of discussing and sharing your
experiences.
Reporting bugs and other problemsPlease report problems and other issues using the issue tracker for libSBML on SourceForge: http://sbml.org/Software/libSBML/issue-tracker. You can also report problems on the sbml-interoperability mailing list (see next section). This may have advantages, such as that other people may also have experienced the same issue and offer a workaround more quickly than the libSBML developers can respond. Finally, if you want to contact the libSBML developers directly, you can email them at libsbml-team@caltech.edu. Mailing lists, web forums, and list archivesIf you use SBML (which seems likely, if you are using libSBML), we urge you to sign up for sbml-announce, the SBML announcements mailing list. It is a low-volume, broadcast-only list where new releases of SBML and other important events are announced. These announcements are not cross-posted to the other lists below, so it's important to subscribe to sbml-announce even if you subscribe to the other lists below. In addition, if you use libSBML, we highly recommend that you subscribe or monitor the mailing list sbml-interoperability. Subscribing to this list will enable you to keep in touch with the latest developments in libSBML as well as to ask questions and share your experiences with fellow users and developers of libSBML and other SBML software. The mailing list is vigilantly moderated by humans to prevent spam and off-topic postings. If you are interested in delving more deeply into libSBML, perhaps to make extensions and modifications, we recommend that you also subscribe or monitor the mailing list libsbml-development. Being a member of this list will enable you to keep in touch with the latest developments in libSBML as well as to ask questions and share your experiences with fellow developers and users of libSBML. Web-based interfaces for all lists are available at http://sbml.org/Forums/, for those who prefer to interact with the list via a web forum interface. This website is also where you will find the mailing list archives. (The lists and the forums are cross-posted, and the archives are identical to each other.) Notifications via RSS and TwitterIf you wish to get notifications of mailing list postings via RSS, an individual feed for each mailing list mentioned above is available at http://sbml.org/Forums/. If you wish to get general announcements about SBML and its use, you may want to follow sbmlnews on Twitter. The SVN notification mailing listIf you are obtaining your libSBML files directly from the SVN repository on SourceForge, you may wish to subscribe to the mailing list sbml-svn, to be apprised of changes to the SVN repository as soon as they are committed. You can join the list by visiting the URL https://lists.sourceforge.net/lists/listinfo/sbml-svn. | |
▼How to extend libSBML to support SBML packages | ||
Step by step summary of the implementation of an extension | ||
Detailed explanation of each package extension class | ||
LibSBML features at a glance |
LibSBML features at a glance LibSBML is an application programming interface (API) library for reading, writing and manipulating files and data streams containing content in SBML (Systems Biology Markup Language) format. Developers can embed the library in their applications, saving themselves the work of implementing their own parsing, manipulation and validation software. At the API level, the library provides the same interface to data structures independently of whether the model originated in SBML Level 1, 2 or 3. LibSBML also fully supports all accepted SBML Level 3 packages. Why not simply use a generic XML parsing library? After all, SBML is usually expressed in XML, and there exist plenty of XML parsers, so why not simply tell people to use one of them, rather than develop a specialized library? The answer is: while it is true that developers can use general-purpose XML libraries, there are many reasons why using a system such as libSBML is a vastly better choice. Here are just some of the features offered by libSBML:
Users of libSBML often find its features convenient to use for more than simply supporting SBML. For example, many software packages provide users with the ability to express mathematical expressions for such things as reaction rate expressions, and these packages' interfaces often let users type in the formulas directly as text strings. LibSBML's API for mathematical formulas, with its support for text-string based input, thus saves application programmers the work of developing their own formula manipulation and translation facilities. LibSBML is distributed in both source-code form and as precompiled dynamic libraries for the Microsoft Windows, Linux and Apple Mac OS X operating systems; they are available from the SBML project site on SourceForge.net. | |
Building and installing libSBML |
Building and installing libSBML | |
Known issues and pitfalls |
Known issues and pitfalls This section documents the following known problems, limitations, and
possible pitfalls in using libSBML:
Potential for language bindings to link old versions of libSBML by accident At application run-time, the language bindings for C#, Java, JavaScript, Perl, PHP, Python and others must be able to dynamically link the core libSBML library file (i.e., Some versions of MATLAB include a conflicting version of libstdc++ Some versions of MATLAB produced for Linux include a version of the stdc++ library that conflicts with the version provided by the operating system. This copy of the library is installed in MATLAB's own directories. This may cause a conflict not in building libSBML, but running MATLAB code that use libSBML, such as The solution is to preload the system stdc++ library before invoking MATLAB. You can accomplish this by setting the Linux environment variable Once you know the path to the stdc++ library file, set the value of export LD_PRELOAD=/path/to/system/libstdc++for sh-based shells such as Bash, or setenv LD_PRELOAD /path/to/system/libstdc++for csh-based shells. Explicit freeing of memory when using static MSVC runtimesOn MS Windows, when using libSBML compiled against a static MSVC runtime library, it is not possible to use the standard char * formula = SBML_formulaToString(astNode); /* ... do some work with formula here ... */ free(formula); To cope with this issue, beginning with version 4.2, libSBML provides a special function for this situation: Name collisions in mathematical expressions In the C-like, text-based, formula expression syntax supported by libSBML and used in SBML Level 1, four constants are reserved words: <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <times/> <cn type="integer"> 2 </cn> <pi/> </apply> </math> This problem exists for all four of the constants mentioned above, but is most commonly encountered in the context of "pi". Currently, the only ways to avoid this problem are either to avoid using the strings "pi" and "Pi" in this context, or to avoid using the text-string expressions altogether and instead use ASTs. All libSBML methods that accept text-string mathematical formulas have variants that accept ASTs instead. Differences in XML parser behaviorThe different parsers supported by libSBML (Xerces, Expat, libxml2) behave slightly differently when reading files, and the differences are difficult for libSBML to hide. The following are the differences of which we are currently aware:
Cannot report a failure of validation rule #10312 The SBML Level 3 Version 1 Core specification defines validation rule #10312 as being The value of a "name" attribute must always conform to the syntax of type Different error number (either 20413 or 20409) may be reported depending on Level of SBML in useIn SBML Level 3 Version 1 Core, validation rule #20413 (concerning whether the ListOfUnits container element can be empty) subsumes what was validation rule #20409 in the specifications for SBML Level 2 Versions 2–4. Rule #20409 does not exist in Level 3. The consequence of this difference in the specifications is that an application may receive different validation error numbers for the same situation depending on whether it is dealing with a Level 2 or a Level 3 model. Possible unexpected
| |
Working with math | This section describes libSBML's facilities for working with SBML representations of mathematical expressions | |
Additional complete example programs | The libSBML distribution comes with the following selection of complete example programs in the top-level file directory named examples/csharp | |
Mathematical Expressions and their Manipulation | This section describes libSBML's facilities for working with SBML representations of mathematical expressions | |
Reading and writing SBML content from your software | This section summarizes how to read and write SBML content using the facilities provided by the libSBML C# API | |
▼Release history | ||
LibSBML license |