You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pymoose

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pymoose

Python scripting interface of MOOSE Simulator (https://moose.ncbs.res.in)

4.1.2
PyPI
Maintainers
2

Python package

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.1.1 – Incremental Release over v4.1.0 "Jhangri"

This version builds upon the v4.1.0 (Jhangri) release and includes important internal improvements, documentation enhancements, and binding support.

ABOUT VERSION 4.1.1, Jhangri

Jhangri is an Indian sweet in the shape of a flower. It is made of white-lentil (Vigna mungo) batter, deep-fried in ornamental shape to form the crunchy, golden body, which is then soaked in sugar syrup lightly flavoured with spices.

This release has the following changes:

Installation

Installing released version from PyPI using pip

This version is now available for installation via pip. To install the latest release, run

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

New Features

  • Formula-based versions of HH-type channels
    • Added HHChannelF and HHGateF for formula-based evaluation of Hodgkin-Huxley type gating parameters
    • Added a formula interface for HHGate: Users can now assign string formula in exprtk syntax to alphaExpr, betaExpr, tauExpr and infExpr to fill up the tables. These can take either v for voltage or c for concentration as independent variable names in the formula.
  • Added moose.sysfields to display system fields like fieldIndex, numData etc.
  • Reintroduced moose.neighbors() function to retrieve neighbors on a particular field. This allows more flexibility than element.neighbors[fieldName] by allowing the user to specify the message type ("Single", "OneToOne", etc.) and direction (1 for incoming 0 for outgoing, otherwise both directions).

API Updates

  • API changes in moose.vec and moose.element, including updated documentation.
  • moose.showfields updated to
    • skip system fields like fieldIndex, numData etc. These can now be printed using sysfields function.
    • print common but informative fields like name, className, tick and dt at the top.
    • return None instead of the output string to avoid cluttering the interactive session.
  • moose.pwe() returns None to avoid output clutter. Use moose.getCwe() for retrieving the current working element.
  • children field of moose elements (ObjId) now return a list of elements instead of vecs (Id). This brings consistency between parent and children fields.
  • moose.le() returns None to avoid output clutter. Use element.children field to access the list of children.
  • path field for elements (ObjId) now includes the index in brackets, as in the core C++. This avoids confusion with vec (Id) objects.
  • moose.copy() now accepts either str path or element or vec for src and dest parameters.
  • Attempt to access paths with non-existent element now consistently raises RuntimeError.
  • moose.delete now accepts vec (Id) as argument.

Bug Fixes

  • bool attribute handling added to moose.vec
  • More informative error message for unhandled attributes in moose.vec
  • Fixed issue #505
  • moose.setCwe() now handles str, element (ObjId) and vec (Id) parameters correctly
  • fixed moose.showmsg() mixing up incoming and outgoing messages.

Documentation

  • Updated Ubuntu build instructions for better clarity.
  • Enhanced documentation for HHGate, including additional warnings.
  • Updated documentation for Stoich, with improved code comments and clarifications.

LICENSE

MOOSE is released under GPLv3.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts