Skip to content

Reaction-diffusion models to simulate the dynamics of fluorescent dyes and peptides in the brain extracellular space implemented using the extracellular simulator in NEURON.

License

Notifications You must be signed in to change notification settings

NTBEL/extracellular-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extracellular-models

This package contains a set of reaction-diffusion models to simulate the dynamics of fluorescent dyes and neuropeptides in the brain extracellular space. The models are encoded in Python using the reaction-diffusion module of the NEURON simulator and its recently developed extracellular reaction-diffusion simulator (McDougal et al. 2013, Newton et al. 2018).


Table of Contents

  1. Install
    1. Dependencies
    2. pip install
  2. The Models
  3. Usage details
    1. Importing
    2. Simulating
    3. Chaning extracellular parameters
    4. Examples
  4. License
  5. Change Log
  6. Citing

Install

extracellular-models installs as the extmodels Python package. It is tested with Python 3.9.

Dependencies

Note that extmodels has the following core dependencies:

pip install

You can install extmodels with pip sourced from the GitHub repo:

pip install -e git+https://github.com/NTBEL/extracellular-models#egg=extmodels

The Models

extracellular-models currently contains 4 models:

  • extmodels.calcein - Model of calcein diffusion in the brain extracellular space after photorelease from gold-coated nanovesicles.
  • extmodels.somatostatin - Model of somatostatin diffusion and loss (degradation, clearance, etc.) in the brain extracellular space after photorelease from gold-coated nanovesicles.
  • extmodels.dynophin - Model of dynorphin A diffusion and binding to the kLight receptor-based fluorescent sensor in the brain extracellular space after photorelease from gold-coated nanovesicles.
  • extmodels.core_satellite - Model of somatostatin (SST) release, diffusion, and loss with core-satellite based sensing clusters. The sensing clusters are simplified models of the core-satellite CNiFERs clusters setup used in Xiong et al. 2021 bioRxiv.
  • extmodels.calcein_pointsource - Model of calcein diffusion in the brain extracellular space that approximates release from an instantaneous point source.
  • extmodels.dynorphin_pointsource - Model of dynorphin A diffusion and binding to the kLight receptor-based fluorescent sensor in the brain extracellular space after photorelease from a point-source.
  • extmodels.calcein_pointsource_asymm - Model of asymmetric calcein diffusion in the brain extracellular space after release from an approximate instantaneous point source. The two-sides of the simulation domain along the x-axis have different tortuosities so calcein diffuses asymmetrically.

Usage details

To facilitate reusability and allow models to be importable they have been encapsulated as Python class objects and defined within separate modules.

Importing

Models can be imported from their respective modules. For example,

from extmodels.calcein import model

will import the initialized instance of the calcein model.

Simulating

To simulate the model you can call the simulate function. For example,

time_step = 10 # time step in milliseconds
n_steps = 100 # run for 100 time steps.
out_frequency = 10 # compute model observables every 10 time steps.
model.simulate(time_step, n_steps, out_frequency)

will run the model simulation for total simulated time of 1 second (time_step*n_step) and store model observables at intervals of every 10 time steps. The observables and corresponding simulated times are accessible through the properteries observables and times; for example:

model_observables = model.observables
times = model.times

Changing Extracellular parameters

The NEURON rxd.Extracellular object that is used to define the extracellular space and its parameters (e.g., volume fraction and tortuosity) currently doesn't support modifying the parameters (such as volume fraction or tortuosity) after it has been initialized in the model. If you want to use a particular model but want, for example, a different tortuosity, you can import the Model class and then create a custom instance:

from extmodels.calcein import Model

# Initialize the calcein model but with a tortuosity of 2 instead of the default
# 1.7 used for extmodels.calcein.model.
model = Model(tortuosity=2.0)

Examples

The examples folder contains some example application scripts using the models and saving outputs. Note that most of these require the tifffile library to save 2d z-projections as .tiff image trajectory files.


Contact

Please open a GitHub Issue to report any problems/bugs or make any comments, suggestions, or feature requests.


License

This project is licensed under the MIT License - see the LICENSE file for detail


Change Log

See: CHANGELOG


Citing

If any of these models are useful in your research, please cite this GitHub repo: https://github.com/NTBEL/extracellular-models

About

Reaction-diffusion models to simulate the dynamics of fluorescent dyes and peptides in the brain extracellular space implemented using the extracellular simulator in NEURON.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages