Menu

Home

Frank Bergmann

Structural Analysis Library (libStructural).


Purpose

The structural analysis library is a C/C++ portable software library for analyzing the structural properties of stoichiometric networks. The library supports the analysis of both flux balance and moiety conservation. The library will accept models in the form of either standard SBML or raw stoichiometry matrices. The software is distributed under the BSD license and was developed through funding from NIH grant 1R01GM081070-01.

Installation for Windows, Mac and Linux

README

When building the windows binaries make sure you load the SBW_CLAPACK solution found the root of the distribution. This will, in addition to building the SBW binary files, also build the individual library files (dlls etc) that can be used in non-SBW projects.

Source Control

All source for libStruct is in our SVN repository:


svn co https://libstruct.svn.sourceforge.net/svnroot/libstruct libstruct

To build just run qmake from the libstruct directory

qmake LIBSBML_DIR=<path to libsbml dir> [SBW_DIR=<path to sbw dir>] make

Source Package

The source package includes sources for all platforms and binaries for Windows. Test examples are included as well as sample applications. As of Version 1.1 we also include SWIG interface files and examples for Java, C#, Ruby, Python and R.

Source Version 1.2.0 (2009-03-01)

Source Version 1.2.0 (including libsbml, 2009-03-01)

Source Version 1.1.0 (2008-11-18)

Source Version 1.0.1 (2008-10-27)

Source Version 1.0 (2008-10-23)

Binary Package

There was a request to have the libsbtructural binaries available for 32-bit windows. So here the download:

Win32 Binary Version 1.2.0 (2009-03-01)

Please make sure you have the Visual Studio Runtime installed.

Things that Need Attention

  • The LU, QR etc routines that return the permutation matrix should return a pivot vector
    to save space. The caller can choose afterwards whether to convert the pivot matrix into
    a matrix or not. This change would also make it easier to compute the determinant of a
    matrix.

Documentation

The library comes into two parts, a base library that exposes parts of LAPACK and additional functionality for numerical linear algebra. The second part builds on the base library to expose methods for calculating a wide variety metrics related to stoichiometry matrices. A unique aspect of the libStructural library that all matrices use or generated by the library can be optionally labeled. When loading a model from a SBML file the labels are provided by the species and reaction Ids. If a raw stoichiometry matrix is loaded, species and reaction labels can be loaded to augment the stoichiometry matrix. Labeled rows and columns are particularly useful in network studies because it allows information on species and reactions to be maintained during calculations.

Summary of capabilities (details in developer documentation below):

Numerical Linear Algebra Library: eigenvalues, GuassJordan, right and left null space, LU, QR, Rank, SVD and Inverse.

Structural Analysis: K, K0, L, L0, N, Nr, N0, Gamma (conservation laws), NDC, NIC (dependent and independent reaction partitions), dependent and independent species.

Example C Code:

// load matrix into the structural analysis library
LibStructural_loadStoichiometryMatrix (stoichMatrix, nRows, nCols);

// load species names and initial concentrations
LibStructural_loadSpecies(speciesNames, initialConcentrations, nRows);

// load reaction names
LibStructural_loadReactionNames(reactionNames, nCols);

// analyze the stoichiometry matrix using the QR method
LibStructural_analyzeWithQR( &sMessage, &nLength);

// get the conservation law matrix and corresponding labels
LibStructural_getGammaMatrix (&gammaMatrix, &numRows, &numCols);
LibStructural_getGammaMatrixLabels (&rows, &numRows, &vols, &numCols);

LibStructural_getKMatrix (&KMatrix, *numRows, &numCols);
LibStructural_getKMatrixLabels (&rows, &numRows, &cols, &numCols)

The library is currently distributed with SBW and is used by a number of SBW modules to carry out various analyses.

Developer Documentation:

C API Documentation

C++ API Documentation

C# API Documentation

Project Admins:

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.