Scroll to TOP of page
Life123 : Open-Source Engine for Quantitative Reactomics
Dynamical Modeling of Biological Systems   ♦   In-Silico Experiments
HomeQUICK START / 1-clickTechnologyExperimentsGuideVisualizationDiffusionReactionsMembranesHistoryDownloadContact / Participate

User Guide

A basic knowledge of Python (and, optionally, of Jupyter Notebooks) is all that is required to run "in-silico experiments" (simulations) with Life123 !

3-min video

NOTE: for examples of usage, see the Experiments. The unit tests of the various python functions can also be of help. For the JavaScript modules, see the Visualization section.


How to use these libraries: see our quick start page!



The following libraries (python classes) are being used:

CORE CLASSES

BioSim1D

1D simulations of diffusion and reactions,
with an early partial implementation of membranes.
Reference Guide

Source code

BioSim2D

2D simulations of diffusion and reactions
Reference Guide

Source code

BioSim3

3D simulations of diffusion and reactions
Source code

ChemData

Data about all the chemicals and (if applicable) reactions,
including:
    - names
    - diffusion rates
    - macro-molecules Binding Site Affinities (for Transcription Factors)


Notes: * for now, the temperature is assumed constant everywhere, and unvarying (or very slowly varying)
       * this class contains (extends) the following other classes: ChemCore, Diffusion, Macromolecules
Reference Guide

Source code

Diagnostics

For the management of reaction diagnostic data
Reference Guide

Source code

Numerical

Assorted, general numerical methods
Reference Guide

Source code

ReactionGeneric

    Data about a SINGLE reaction,
    including:
        - stoichiometry
        - kinetic data (reaction rates, reaction orders)
        - thermodynamic data (temperature, changes in enthalpy/entropy/Gibbs Free Energy)
        - list of involved enzymes


    (Note: this data will eventually be stored in a Neo4j graph database)

    Each reaction contains:
            "reactants"
            "products"
            "kF"    (forward reaction rate constant)
            "kR"    (reverse reaction rate constant)
            "K"     (equilibrium constant - from either kinetic or thermodynamic data; if both present, they must match up!)
            "Delta_H" (change in Enthalpy: Enthalpy of Products - Enthalpy of Reactants)
            "Delta_S" (change in Entropy)
            "Delta_G" (change in Gibbs Free Energy)
                        Note - at constant temperature T :  Delta_G = Delta_H - T * Delta_S
                        Equilibrium constant = exp(-Delta_G / RT)
            "enzymes" (list of the indices of the chemical species that appear as catalysts in the reaction)

        Each Reactant and each Product is a triplet of the form: (stoichiometry, species index, reaction order).
        The "reaction order" refers to the forward reaction for reactants, and the reverse reaction for products.
Reference Guide

Source code

ReactionEnz

Data about a SINGLE enzyme-catalyzed reaction that can be modeled kinetically as:

E + S <-> ES <-> E + P
Reference Guide

Source code

Reactions

Manage reaction-related data
Reference Guide

Source code

ReactionKinetics / VariableTimeSteps

2 classes:

Static methods about reactions kinetics / Methods for managing variable time steps during reactions
Reference Guide

Source code

ThermoDynamics

    Manage the Thermodynamics aspects of reactions:
    changes in Gibbs Free Energy, Enthalpy, Entropy - and how
    they relate to equilibrium constant, at a given temperature.

    This class does NOT get instantiated

            "K"       (equilibrium constant - from either kinetic or thermodynamic data; 
                       if both present, they must match up!)
            "delta_H" (change in Enthalpy: Enthalpy of Products - Enthalpy of Reactants)
            "delta_S" (change in Entropy)
            "delta_G" (change in Gibbs Free Energy)

            Note - at constant temperature T :
                Delta_G = Delta_H - T * Delta_S
                Equilibrium constant = exp(-Delta_G / RT)
Reference Guide

Source code

UniformCompartment

Used to simulate the dynamics of reactions (in a single compartment)
Reference Guide

Source code




GRAPHIC LIBRARIES

GraphicLog

To simplify use of HtmlLog and Vue components from within this project
Reference Guide

Source code

PlotlyHelper

To assist in the use of the plotly library
Reference Guide

Source code

PyGraphVisual

Facilitate data preparation for graph visualization using the Cytoscape.js library.

The development of this library is shared with the sister project BrainAnnex.org
Reference Guide

Source code




VISUALIZATION LIBRARIES

HtmlLog

An HTML logger to file, plus optional plain-text printing to standard output
Reference Guide

Source code

CollectionTabular

A "tabular collection" is a Pandas dataframe
built up from a sequence of "snapshots" of data that's in  the form of a python dictionary
(representing a list of values and their corresponding names),
such as the state of the system or of parts thereof.

Each data "snapshots" is taken at different times,
or results from varying some parameter.

Each snapshot - incl. its parameter values and optional captions -
will constitute a "row" in a tabular format

MAIN DATA STRUCTURE for "tabular" collections:
    A Pandas dataframe
Reference Guide

Source code

CollectionArray

Use this structure if your "snapshots" (data to add to the cumulative collection) are Numpy arrays,
of any dimension - but always retaining that same dimension.

Usually, the snapshots will be dump of the entire system state, or parts thereof, but could be anything.
Typically, each snapshot is taken at a different time (for example, to create a history), but could also
be the result of varying some parameter(s)

DATA STRUCTURE:
    A Numpy array of 1 dimension larger than that of the snapshots

    EXAMPLE: if the snapshots are the 1-d numpy arrays [1., 2., 3.] and [10., 20., 30.]
                    then the internal structure will be the matrix
                    [[1., 2., 3.],
                     [10., 20., 30.]]
Reference Guide

Source code

Collection

A "Collection" is a list of snapshots of any values that the user wants to preserve,
such as the state of the entire system, or of parts thereof,
either taken at different times,
or resulting from varying some parameter(s)

This class accept data in arbitrary formats

MAIN DATA STRUCTURE:
    A list of triplets.
    Each triplet is of the form (parameter value, caption, snapshot_data)
        1) The "parameter" is typically time, but could be anything.
           (a descriptive meaning of this parameter is stored in the object attribute "parameter_name")
        2) "snapshot_data" can be anything of interest, typically a clone of some data element.
        3) "caption" is just a string with an optional label.

    If the "parameter" is time, it's assumed to be in increasing order

    EXAMPLE:
        [
            (0., DATA_STRUCTURE_1, "Initial state"),
            (8., DATA_STRUCTURE_2, "State immediately after injection of 2nd reagent")
        ]
Reference Guide

Source code