Skip to content

MooseNeuro/moose-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16,936 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python package

License: GPL v3

Platform

MOOSE

MOOSE is the Multiscale Object-Oriented Simulation Environment. It is designed to simulate neural systems ranging from subcellular components and biochemical reactions to complex models of single neurons, circuits, and large networks. MOOSE can operate at many levels of detail, from stochastic chemical computations, to multicompartment single-neuron models, to spiking neuron network models.

MOOSE is multiscale: It can do all these calculations together. For example it handles interactions seamlessly between electrical and chemical signaling. MOOSE is object-oriented. Biological concepts are mapped into classes, and a model is built by creating instances of these classes and connecting them by messages. MOOSE also has classes whose job is to take over difficult computations in a certain domain, and do them fast. There are such solver classes for stochastic and deterministic chemistry, for diffusion, and for multicompartment neuronal models.

MOOSE is a simulation environment, not just a numerical engine: It provides data representations and solvers (of course!), but also a scripting interface with Python, graphical displays with Matplotlib, PyQt, and VPython, and support for many model formats. These include SBML, NeuroML, GENESIS kkit and cell.p formats, HDF5 and NSDF for data writing.

This is the core computational engine of MOOSE simulator. This repository contains C++ codebase and python interface called pymoose. For more details about MOOSE simulator, visit https://moose.ncbs.res.in .


Installation

See docs/source/install/INSTALL.md for instructions on installation.

Examples and Tutorials

v4.3.0 – Major Release "Lavang Latika"

Lavang Latika (also known as Lobongo Lotika or Laung Lata) is a traditional Indian sweet from Bengal, Eastern Uttar Pradesh, Odisha, and Bihar. It is made of flour pastry filled with khoya (mawa) and nuts, folded and sealed with a clove (lavang), then deep-fried and soaked in sugar syrup. The clove gives it a distinctive aroma.

Quick Install

Installing released version from PyPI using pip

This version is available for installation via pip. To install the latest release, we recommend creating a separate environment using conda, mamba, micromamba, or miniforge to manage dependencies cleanly and avoid conflicts with other Python packages. The conda-forge channel has all the required libraries available for Linux, macOS, and Windows.

conda create -n moose python=3.13 gsl hdf5 numpy vpython matplotlib -c conda-forge
conda activate moose
pip install pymoose

Post installation

You can check that moose is installed and initializes correctly by running:

$ python -c "import moose; ch = moose.HHChannel('ch'); moose.le()"

This should show

Elements under /
    /Msgs
    /clock
    /classes
    /postmaster
    /ch

Now you can import moose in a Python script or interpreter with the statement:

>>> import moose

What's New in 4.3.0

Ion Channel Library

Access over 3,517 ion channel models from the ICGenealogy database through the new moose.channels module. Supported ion classes include Na, K, Ca, KCa, and IH. Insert channels into compartments using wildcards, lists, or dictionaries, with support for distance-dependent conductance.

Channel metadata includes both modeldb_id (ModelDB reference) and icg_id (unique ICGenealogy identifier) for precise channel identification.

Features:

  • Search, info, and make_prototype accept icg_id as an alternative to modeldb_id
  • Simplified prototype naming format: {suffix}_{modeldb_id}
  • New get_icg_id function to retrieve ICG identifier for a channel

Morphology Library

The new moose.morphologies module simplifies loading and working with neuron morphologies. Load SWC files and access compartments via .root, .soma, .compartments, and .select(pattern). Includes automatic re-rooting of SWC files not rooted at soma.

Bundled morphologies from:

Utilities:

  • Convert GENESIS .p files to SWC format (moose.swc_utils.p_to_swc)

Bug Fixes

  • Python's ** operator now works in MOOSE expressions (e.g., func.expr = 'x0**2'), in addition to the existing ^ operator
  • Fixed ReadSwc to detect and handle 3-point soma and linear soma chains
  • Fixed HHGateF2D::lookupB not setting voltage and concentration values from input vector

Documentation

  • Updated Ubuntu build instructions with clearer steps
  • Fixed MOOSE website address in README

Credits and Citations

Ion Channel Library

The channel parameters and omnimodel formulation are the work of the ICGenealogy project and the Vogels group at IST Austria.

If you use moose.channels in your research, please cite:

Chintaluri, C., Podlaski, W., Bozelos, P. A., Gonçalves, P. J., Lueckmann, J.-M., Macke, J. H., & Vogels, T. P. (2025). An ion channel omnimodel for standardized biophysical neuron modelling. bioRxiv. https://doi.org/10.1101/2025.10.03.680368

and the IonChannelGenealogy database:

Podlaski, W. F., Seeholzer, A., Groschner, L. N., Miesenboeck, G., Ranjan, R., & Vogels, T. P. (2017). Mapping the function of neuronal ion channels in model and experiment. eLife, 6, e22152. https://doi.org/10.7554/eLife.22152

The ICG web application and channel specification sheets are available at: https://icg.neurotheory.ox.ac.uk/

Morphology Utilities (ShapeShifter)

Developed by Prof. Avrama Blackwell and her team, George Mason University. ShapeShifter: a morphology processing utility for compartmental neuron models. https://github.com/neurord/ShapeShifter

Used in: moose.swc_utils, moose.morphologies (GENESIS .p file support), python/moose/ShapeShifter/

If you use morphology conversion or reduction features in your research, please acknowledge Prof. Avrama Blackwell's group and the ShapeShifter project.

LICENSE

MOOSE is released under GPLv3.

About

C++ basecode and python scripting interface

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 61.9%
  • Python 22.8%
  • GAP 13.5%
  • CMake 0.5%
  • OpenEdge ABL 0.4%
  • Meson 0.3%
  • Other 0.6%