multi compartmental and multi scale modeling in moose via
play

Multi-compartmental and multi-scale modeling in MOOSE via Python - PowerPoint PPT Presentation

Multi-compartmental and multi-scale modeling in MOOSE via Python Subhasis Ray National Centre for Biological Sciences Tata Institue of Fundamental Research Bangalore, INDIA BrainScaleS CodeJam 5, Edinburgh 2012 Outline Walk through:


  1. Multi-compartmental and multi-scale modeling in MOOSE via Python Subhasis Ray National Centre for Biological Sciences Tata Institue of Fundamental Research Bangalore, INDIA BrainScaleS CodeJam 5, Edinburgh 2012

  2. Outline ● Walk through: simple compartmental model ● Multiscale modeling outline ● Architecture of MOOSE ● Extensions ● Preview of upcoming version ● Future directions

  3. the M ultiscale O bject- O riented S imulation E nvironment Logo credit: Upi Bhalla ● A general purpose simulator framework ● Draws from experience with GENESIS 3

  4. What is MOOSE? Depends on what you are and where you look. 4

  5. A single passive compartment import moose soma = moose.Compartment('soma') soma.Rm = 7 .6e6 soma.Cm = 7e-9 soma.Em = -70e-3 Cytoplasm soma.inject = 1e-6 ● Getting help: Cm Cell Rm Vm membrane moose.doc('Compartment') Em moose.doc('HHChannel.chann el') Extracellular medium 5

  6. Recording data vm_table = moose.Table('/vm') vm_table.stepMode = 3 vm_table.connect('inputRequest', soma, 'Vm') 6

  7. Scheduling moose.context.setClock(0, sim_dt) moose.context.setClock(1, sim_dt) moose.context.setClock(2, plot_dt) moose.context.useClock(0, '/soma', 'init') moose.context.useClock(1, '/##[TYPE=Compartment]', 'process') moose.context.useClock(2, '/vm') 7

  8. Running the simulation moose.context.reset() moose.context.step(50e-3) vm_table.dumpFile('soma_vm.txt') 8

  9. Adding another compartment Ra Ra' Rm' Cm Rm Cm' Vm' Vm Em Em' Vm, Ra soma axon Vm' 9

  10. Vm Vm' Ra Ra' Rm' Cm Rm Cm' Em Em' soma.Ra = 1e6 axon = moose.Compartment('axon') … soma.connect('raxial', axon, 'axial') 10

  11. Inserting Hodgkin-Huxley-type ion channels Cytoplasm Ra Ik Rm Gk Cm Cell membrane Vm Ek Em Extracellular medium 11

  12. Setting up the channel 3 ∗ h Gk = Gbar ∗ m na_chan = moose.HHChannel('/soma/Na') na_chan.Gbar = 1e-9 na_chan.Xpower = 3 na_chan.Ypower = 1 na_chan.connect('channel', soma, 'channel') 12

  13. Setting up the gates dm A + B ∗ Vm dt = alpha ∗( 1 − m )− beta ∗ m alpha = C + exp ( D + Vm ) F Equation for beta has same form as alpha na_chan.setupAlpha('xGate', alphaA,alphaB,alphaC,alphaD,alphaF , betaA,betaB,betaC,betaD,betaF , divs,vmin,vmax) 13

  14. Or simply ... from moose import neuroml reader = neuroml.NeuroML() reader.readNeuroMLFromFile( 'GranuleGenerated.net.xml') cell = moose.Cell('/Gran_0') 14

  15. Even simpler: use MOOSE GUI 15

  16. Multiscale modeling ● Ticks with different time-steps run different components of a model at different rates. Chemical compartment Substrate Product Enzyme Tick2 dt=1s 16

  17. Multiscale modeling ● Ticks with different time-steps run different components of a model at different rates. Electrical model K_AHP [Ca2+] Tick 0 dt=0.1ms channel Soma 17

  18. Multiscale modeling ● Ticks with different time-steps run different components of a model at different rates. Electrical model Chemical compartment K_AHP Substrate Product Tick 0 dt=0.1ms channel Enzyme Soma Tick 2 dt=1s 18

  19. Multiscale modeling ● Ticks with different time-steps run different components of a model at different rates. Electrical model Chemical compartment K_AHP concentration Substrate Product Tick 0 dt=0.1ms channel Enzyme Soma Tick 2 dt=1s 19

  20. A more realistic system NMDA Channel Chemical Compartment Electrical Compartment (spine) Ca Pool Ca Channel 20

  21. Multiscale modeling: networks ● You can connect neuronal compartments via synapse to create a network. Spike event soma_0 soma_1 Gk/Ek SynChan_0 axon_0 axon_1 Vm SpikeGen_0 21

  22. Multiscale modeling: networks ● You can connect neuronal compartments via synapse to create a network. soma_0 soma_1 axon_0 axon_1 Vm SpikeGen_0 22

  23. Multiscale modeling: networks ● You can connect neuronal compartments via synapse to create a network. Spike event soma_0 soma_1 axon_0 axon_1 Vm SpikeGen_0 23

  24. Multiscale modeling: networks ● You can connect neuronal compartments via synapse to create a network. Spike event soma_0 soma_1 SynChan_0 axon_0 axon_1 Vm SpikeGen_0 24

  25. Multiscale modeling: networks ● You can connect neuronal compartments via synapse to create a network. Spike event soma_0 soma_1 Gk/Ek SynChan_0 axon_0 axon_1 Vm SpikeGen_0 25

  26. Multiscale modeling: Olfactory bulb Aditya Gilra By Aditya Gilra 26

  27. Multiscale modeling: Cortical column ● Detailed biophysical model of single thalamocortical column (based on Traub et al 2005) of rat barrel cortex: 14 cell types 50-120 compartments 11 ion channel types ~3500 cells thalamus 27

  28. MOOSE Architecture Figure: Upi Bhalla 28

  29. MOOSE Architecture: scripting interface user Command line/scripting interface The command line / scripting interface is where modeler interacts with MOOSE. file database SBW/ other model system 29 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  30. MOOSE Architecture: Shell user Command line/scripting interface The user interface talks to Shell - the single point of shell access to all functionalities file available to the user database SBW/ other model system 30 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  31. MOOSE Architecture user Command line/scripting interface shell Simulation entities file database Shell creates, deletes and queries other MOOSE objects. It also executes some of the SBW/ built-in functionalities reinit, other model start. system 31 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  32. MOOSE Architecture: Messaging Objects communicate state variables during simulation. Destination fields give handle to functions for callback. na_channel.connect('channel', soma, 'channel') handleChannel() Gk/Ek na_channel soma handleVm() Vm 32

  33. MOOSE Architecture: scheduling user Command line/scripting interface shell Simulation entities file database scheduler SBW/ At start-up, the scheduling other model system is initialized system 33 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  34. MOOSE Architecture: scheduling user Command line/scripting interface shell Simulation entities file database Clock SBW/ other model system 34 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  35. MOOSE Architecture: scheduling user Command line/scripting interface Simulation entities shell file Tick 0: dt0 Tick 1: dt1 database Clock SBW/ other model system 35 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  36. MOOSE Architecture: scheduling Compartment init() process() user Command line/scripting interface Simulation entities shell file Tick 0: dt0 Tick 1: dt1 database Clock SBW/ other model system 36 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  37. MOOSE Architecture: solvers user Command line/scripting interface shell Simulation entities file solvers database scheduler SBW/ Solvers can take over the other model calculation from simulation system entities 37 Derived from: http://moose.sourceforge.net/images/stories/architecture_65.jpg

  38. Solvers: Avoid the penalty of object orientation Compartment 1 Compartment 2 Compartment 3 Compartment 4 Tick0 38

  39. Solvers: Avoid the penalty of object orientation Compartment 1 Compartment 2 Compartment 3 Compartment 4 Solver Tick0 39

  40. Solvers: Avoid the penalty of object orientation Compartment 1 Compartment 2 Compartment 3 Compartment 4 Solver Hsolve – neuronal (Niraj) Ksolve – biochemical (Upi) Gillespie – biochemical (Upi) Tick0 40

  41. Extensions ● NeuroML and SBML support (9ml partially) (Aditya Gilra, Siji George). ● MUSIC API for runtime interaction with other simulators (Niraj Dudani, Johannes Hjorth) ● Smoldyn engine for reaction diffusion systems at cellular scale (Steve Andrews, Upi Bhalla). ● Markov models of ion channels (Vishaka Datta) ● Generally, MOOSE C++ API allows incorporation of other specialized simulation engines as solvers. 41

  42. New MOOSE: sneak preview ● Complete rewrite applying lessons learned from previous releases. ● Facilities for dynamic class information. ● Focus on utilizing multi-core CPUs and multi- node clusters. 42

  43. New MOOSE: sneak preview ● Complete switch to Python interface (kinetikit and GENESIS prototype files still supported). ● Computation cleanly separated from user interaction (runs in separate thread). No more blocking during long running simulation. ● Automatic distribution of load among different threads/nodes. ● Most of biophysics and biochemistry classes have been ported. Porting of Hsolve, NeuroML-reader, SBML-reader and the GUI are under development. ● Native support for saving data in HDF5 format. 43

  44. New MOOSE: sneak preview ● Python interface rewritten using Python/C API ● Much slimmer and more efficient than SWIG-based interface. ● C++ programmer need not worry about Python – it dynamically queries the MOOSE core and generates the class hierarchy using metaprogramming. 44

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend