Skip to main content

Python bindings for libAntimony

Project description

Thank you for using Antimony, a human-readable, human-writable modular model definition language.

The documentation for this project is in the doc/ subdirectory, and was created with Doxygen. Described there is information about the Antimony model language and the libAntimony library, including compilation instructions.

To enable full functionality in libAntimony, you first need to install libSBML, available from http://sbml.org/Software/libSBML/. Both libSBML and libAntimony now use CMake as their build systems. For full functionality, be sure to enable the ‘comp’ package in libsbml, as this enables full hierarchical modeling support. As of antimony v2.4, all binary releases of the library and executables use the ‘comp’ package by default.

For CellML:

The CellML API v1.11 SDK was used in this version of Antimony (and QTAntimony) and seems to work OK (despite producing 2.33 billion warnings during compile). As of this writing, the URL to download the SDK was http://www.cellml.org/tools/downloads/cellml_api/releases/1.11 All that is needed in CMake is to set CELLML_API_INSTALL_DIR to this SDK, and the other CELLML_* variables will be set automatically.

If downloading the SDK does not work (or if it is unavailable for your operating system) it too now uses CMake as its build system, and we have had reasonable success using this on linux-based systems.

Antimony was supported by NIH/NIGMS Grant # GM081070.

What’s new in v2.7.0
  • Fixed a bug with QTAntimony and linux systems with German or other languages that use ‘.’ and ‘,’ in numbers opposite to how they are used in American Math.

  • Added find/replace functionality to QTAntimony

  • Added ‘go to line’ functionality to QTAntimony

  • Added the ability to define submodels with implied parameters:

    A: foo(1,2)

    is now the same as declaring

    A: foo(x,y) x=1 y=2

  • Added the ability to concisely define elements and their assignment rules:

    const species S1 in C := 1+x

What’s new in v2.6.1
  • Fixed a bug that prevented the new distributions from being properly exported to SBML when used in event constructs.

What’s new in v2.6.0
  • Built-in distribution functions that round-trip to SBML and SBML-distrib:
    • normal(mean, stddev), truncatedNormal(mean, stddev, min, max)

    • uniform(min, max)

    • exponential(rate), truncatedExponential(rate, min, max)

    • gamma(shape, scale), truncatedGamma(shape, scale, min, max)

    • poisson(rate), truncatedPoisson(rate, min, max)

  • New function ‘rateOf’/’rate’ that uses the custom annotaition of Copasi/roadrunner to define a function that returns the rate of change of a variable.

  • Default libsbml bindings now static.

  • Better error handling for miscoded models.

  • Better python installer

  • Fix to add ‘arcsinh’ and ‘sec’ back in as built-in functions.

  • Allow python-style ‘and’, ‘or’ and ‘not’ functions instead of ‘&&’, ‘||’ and ‘!’.

  • Allow shorthand use of function definitions that uses global variables if present.

  • Add ability to define and import model-wide units for SBML.

  • No longer allow export of invalid SBML, for any reason.

  • Various bug fixes for more robust round-tripping of models involving deletions and other hierarchical features.

What’s new in v2.5.1
  • Fix installers, particularly for python.

What’s new in v2.5:
  • Better support for Python bindings

  • Various fixes for QTAntimony, including better support for turning on/off CellML visualization.

  • Better suite of unit tests, along with fixes for the problems they uncovered.

  • More compact and consistent spacing in produced math infix.

What’s new in v2.4:
  • Because the SBML ‘Hierarchical Model Composition’ package has been accepted and is now officially part of SBML (yay!), support for it is now on by default, and has moved out of beta. Models created using this package should be fully compatible with other programs who also support SBML hierarchy. Support for ‘flattened’ models also remains, so core SBML L3v1 models as well as SBML L2 and L1 models can still be exported and imported.)

  • The Tutorial has been updated to include information on all the most recent features.

What’s new in v2.3-beta:
  • The ability to import and export SBML models with all the new 2.2 capabilities to ‘hierarchical model composition’ package constructs.

What’s new in v2.2:
  • The ability to define units and use them in mathematical equations.

  • The ability to define conversion factors when synchronizing elements between submodels.

  • The ability to define time and extent conversion factors when importing submodels.

  • The ability to delete submodel elements.

The syntax for each is:

Deletions:

delete A1.x;

which will delete the variable ‘x’ from submodel A1, and will clear any equations or reactions that had ‘x’ in it: if a reaction rate was ‘p1*x’, that reaction rate will be cleared entirely (and may be reset using normal Antimony constructs).

Time and extent conversion factors in submodels:

A1: submodel(), timeconv=60, extentconv=100;

or

A1: submodel(), timeconv=tc, extentconv=xc;

(where ‘tc’ and ‘xc’ are parameters that may be defined elsewhere) may be used.

Conversion factors for synchronized variables:

A1.y * cf is x;

or

A1.y is x / cf;

What’s new in v2.0:
  • The ability to translate to and from CellML

  • The ability to define events more specifically (following their modification for SBML Level 3)

  • The ability to define irreversible reactions with ‘=>’ instead of ‘->’.

What’s new in v2.1-beta:
  • The ability to import and export SBML models with ‘hierarchical model composition’ package constructs.

By default, libAntimony will compile as version 2.0. To compile v2.1-beta from source, you will need the working SVN version of libSBML:

https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml

plus the working SVN version of the ‘comp’ package, from:

https://sbml.svn.sourceforge.net/svnroot/sbml/branches/libsbml-packages/comp/

both of which use CMake. Check out both, then run CMake on the comp package first, telling it where the libsbml source is. Then make the ‘integrate’ target, which will copy the source code from the comp package into the libsbml source. Then run CMake on the libsbml source, making sure to turn on ‘ENABLE_COMP’, and build the library.

Finally, run CMake on this Antimony distribution, pointing it at your newly-built libsbml-with-comp library, and checking ‘WITH_COMP_SBML’. Assuming everything compiles for you, the library that is then built should call itself ‘v2.1-beta’, and will be able to read and write comp-enabled SBML models.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

antimony-2.15.0-py3-none-win_amd64.whl (2.0 MB view details)

Uploaded Python 3 Windows x86-64

antimony-2.15.0-py3-none-manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ x86-64

antimony-2.15.0-py3-none-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded Python 3 macOS 14.0+ ARM64

antimony-2.15.0-py3-none-macosx_12_0_x86_64.whl (2.8 MB view details)

Uploaded Python 3 macOS 12.0+ x86-64

File details

Details for the file antimony-2.15.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: antimony-2.15.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for antimony-2.15.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a1c0e39e7d92910bd4c7b92f72ba63d29736aec8e877200bb523b8892b6db241
MD5 43e7a983bad80bf65e0d93a5894faba4
BLAKE2b-256 3e5734cfbbe9e3156bcb8e10d40ed97c0628e28a5bf9eb2f3dad8ce224ce62ff

See more details on using hashes here.

File details

Details for the file antimony-2.15.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for antimony-2.15.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 75fad7421e16d622a65c8abbe4e78f4d45141d1c3c6b79ae086d018ac015a63a
MD5 b00d3dc1dd2f2956fd4e25e3e9708f4e
BLAKE2b-256 5fc93508ed4034e9a9cea82373256b6c542b92d2f69a4b57b0e78bdad606531e

See more details on using hashes here.

File details

Details for the file antimony-2.15.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for antimony-2.15.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 430ff3e47be3ef9b05c72ebafb7da2cb9ad8c5f9a3a8a6b4f146b467c41c2a62
MD5 22364e5e68a9c5955ee0155b4c59592c
BLAKE2b-256 799e9b37c05faf6cfdae3fcd24618a60493af5e20b73e5c4c544a8ed520b98e8

See more details on using hashes here.

File details

Details for the file antimony-2.15.0-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for antimony-2.15.0-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 895ef9895673c1267d9b0f21c3e1c3f0e9ad75e828ae7ead0612151ca9f33dcd
MD5 c7c40b10ead2baadfe0caf714d2dc530
BLAKE2b-256 58c6de513588d4b4303c949d15ba5e11f438f841272c27f549804f41b391a364

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page