GENESIS: Documentation

Related Documentation:

Chemesis-3 and G-3

This document outlines the steps of implementation of Chemesis-3.

Chemesis is a library of biochemical reaction objects for modeling calcium concentration[1], originally contributed by Avrama Blackwell (avrama@gmu.edu) to G-2. The G-3 implementation of Chemesis, called Chemesis-3, is based on the G-2 functionality, the code is mostly rewritten from scratch, with small snippets copied pasted over.

Creation of Chemesis-3 for G-3

The global outline of adding new functionality to G-3 is defined as:

  1. Implementation of the code of the new functionality.
  2. Incorporation of this new code into the maintenance loop of documentation and tests.
  3. Interfacing the new code with the rest of the system.

The core of this process is in the first step. A software developer can be fully focussed on the new mathematics and algorithms without being distracted or feeling restricted by overhead of G-3 maintenance. The other these steps are semi-automatic. It is possible but not required to start with step 2 and 3 before finishing step 1.

The steps required for the creation and the implementation of the Chemesis-3 library are (1) implementation of the independent solver objects, (2) definition in the DeveloperPackage, (3) initial creation of the workspace under version control, (4) configuration of the model-container for the new Chemesis-3 tokens, (5) connecting the model-container’s Chemesis-3 tokens with the solver objects via the model-container API, (6) connecting the solvers with the scriptable software components of G-3 such as SSPy, SSP and the gshell, and (7) implementation of documentation for the new functionality.

  1. The implementation of the independent solver objects is specific to Chemesis-3 functionality. The development of these solvers can be started independent of G-3.
  2. The following configuration snippet in the file /etc/neurospaces/developer/build.yml defines the Chemesis-3 library for the DeveloperPackage:
    all_packages:  
      chemesis-3:  
        order: 2.5  
        version_control:  
          port_number: 4706

    The order key defines the build order of the Chemesis-3 library. The Chemesis-3 library is built after Heccer (build order 2) and before SSP (build order 3). The command

    neurospaces_build --help-build-order

    reveals the details of the software component build order.

  3. For the creation of the initial workspace the DeveloperPackage provides the command neurospaces_new_component. The option --package-name defines the name of the new software component, in this case Chemesis-3. In full the command is:
    neurospaces_new_component --package-name chemesis-3

    This command creates a new workspace under control of the DeveloperPackage and populates it with configuration scripts and makefiles. After the creation of the workspace, it can be populated with the source code that was created in the first step and the makefiles can be updated with compilation and installation targets as necessary.

  4. The model-container already recognizes the POOL token for calcium concentration ion pools. The Chemesis-3 library also needs a definition of the REACTION token that recognizes two parameters FORWARD_RATE and BACKWARD_RATE. The configuration snippet1 below should be installed to /etc/neurospaces/model-container/symbols/. It defines the new token REACTION and for simplicity maps it to the implementation of the GROUP token that is already available. This reduces the implementation overhead. Later on, additional implementation may be useful or necessary.
    ---  
    class_hierarchy:  
      group:  
        grammar:  
          components:  
            - Reaction  
      reaction:  
        allows:  
          create_alias: group  
        annotations:  
          piSymbolType2Biolevel: BIOLEVEL_MECHANISM  
        description: a reaction between different molecule concentration pools  
        dimensions:  
          - mechanism  
        grammar:  
          components:  
            - Group  
            - Pool  
          specific_allocator: GroupCalloc  
          specific_token:  
            class: reaction  
            lexical: TOKEN_REACTION  
            purpose: physical  
          typing:  
            base: phsle  
            id: pidin  
            spec: pgrup  
            to_base: ->bio.ioh.iol.hsle  
        isa: group  
        name: symtab_Group  
        parameters:  
           FORWARD_RATE: forward reaction rate, from substrate(s) to product.  
           BACKWARD_RATE: backward reaction rate, from product to substrate(s).

  5. Connection with the model-container API.
  6. Making the new functionality scriptable.
  7. Implementation of integration tests and development of user documentation.

Making Chemesis-3 Available for Others

Setting up a repository server is what is required to make Chemesis-3 available for others. To initialize the server repository, implement steps (2) and (3) explained in the previous section on the server PC. Then use the neurospaces_serve command to start the server. For an explanation of permissions and other security aspects, see Installation Debian Server 5.0.3.

Installation and Testing of Chemesis-3 on Other Computers

To incorporate the new software component in existing and new installations, the following configuration snippet in the file /etc/neurospaces/developer/build.yml defines the Chemesis-3 library for the DeveloperPackage. Note that this configuration snippet is now builtin in the developer package. This snipped should not be created in your filesystem.

all_packages:  
  chemesis-3:  
    order: 2.5  
    version_control:  
      port_number: 4706

Then the neurospaces_upgrade command can be used to automate the process of importation and installation of the new component.

References

[1]   Kim T. Blackwell and Jeanette Hellgren Kotaleski. Neuroscience Databases, A Practical Guide, chapter 5. Modeling the Dynamics of Second Messenger Pathways, pages 63–80. Kluwer Academic Publishers, Boston / Dordrecht / London, October 2002.