GENESIS3 in Python
To allow more flexible use of GENESIS, bindings in Python are available for each
component of G3’s CBI Architecture.
The Python module hierarchy is structured very similar to the C-base components
that they bind. Each module is also meant to be installed at a particular step in
the installation process:
- neurospaces : The top level module is installed from the developer
package. It contains functionality for determining which modules are
installed and retrieving their current version numbers, revision tags,
and dependencies. It also contains methods for upgrading and deleting
- model_container : A Python
module for the Neurospaces Model Container. It implements more
object oriented abstractions to the underlying C code to make it easier
to use in Python scripts.
- experiment : Python module for the Experiment package. The
Experiment package is a collection of simulation objects used to
incorporate simulation protocols in an experiment and set up data
recording. The corresponding Python bound simulation objects that
are a part of the Experiment package are sub modules to this top level
- experiment.output : Allows for outputting simulation data to a file.
- experiment.perfectclamp : Injects a constant value into a
- experiment.pulsegen : Applies pulsed currents into a simulation.
- heccer : Python module for the Heccer solver.
- chemesis3: Python module for the Chemesis3 solver.
- sspy : Simple Scheduler in Python. This module allows for setting
up complex schedules without the need to know all of the internals of
the model container, experiment, or heccer modules. The sspy module
replicates the functionality of SSP to allow scripting in Python.
- gtube : The G tube is a module which houses a GUI for creating
basic simulations with project tracking, as well as a collection of
miscellaneous GUIs for performing experiments and analysis. The goal
is for the gtube to become a suite of visual tools that can be used to
make interacting with G3 easier.
Each Python module that is a part of the CBI Architecture contains a
__cbi__ module that contains information about the package such as: name,
version, revision, dependencies, and setup tools identifiers. For example,
to print the current version for Heccer you would write a script like
from heccer.__cbi__ import PackageInfo
_package_info = PackageInfo()
print "The current Heccer version is %s" % _package_info.GetVersion()
Downloading and installing in python
To make installation of python modules easy, python eggs are available on PyPi,
the python package index. They can be installed via the easy_install script that
comes with python setuptools. To install the model_container from PyPi
simply type the following on the command line:
sudo easy_install model_container
This retrieves the zipped python egg and installs it into your python
site-packages directory. After this you can just import the model_container in your
The PyPi pages for each component can be found via the following