Life123 : Dynamical Modeling of Biological Systems
Home1-click Live DemoTechnologyExperimentsGuideVisualizationDiffusionReactionsMembranesHistoryDownloadContact / 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 !

8-min video – best watched full-screen, at high resolution!

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.

Installation: you may skip it, by simply using the one-click hosted solution (explained under Experiments.)
But if you want to install it locally, see these instructions.



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

ChemData

Data about all the chemicals and (if applicable) reactions,
including:
    - names
    - diffusion rates
    - macro-molecules Binding Site Affinities (for Transcription Factors)
    - reaction data (see also class "Reaction", in "reaction_data.py")


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, AllReactions, Macromolecules
Reference Guide
Source code

Reaction

    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

ReactionDynamics

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

OTHER LIBRARIES

GraphicLog

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

Heuristics

Evaluation and decisions about how much precision to use
at various stages in computations
Reference Guide
Source code

HtmlLog

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

MovieTabular

A "tabular movie" is a list of snapshots of data that comes as a list or one-dimensional array,
such as something based on the state of the system or of parts thereof,
either taken at different times,
or resulting from varying some parameter(s)

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

MAIN DATA STRUCTURE for "tabular" mode:
    A Pandas dataframe
Reference Guide
Source code

MovieArray

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

MovieGeneral

A "general movie" 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

Numerical

Assorted, general numerical methods
Reference Guide
Source code