moose to pymoose interfacing moose with python
play

MOOSE to PyMOOSE: Interfacing MOOSE with Python Subhasis Ray - PowerPoint PPT Presentation

MOOSE to PyMOOSE: Interfacing MOOSE with Python Subhasis Ray National Centre for Biological Sciences Tata Institute of Fundamental Research Bangalore, Karnataka, India The People Upi Niraj Raamesh Genesis of MOOSE GEneral NEural


  1. MOOSE to PyMOOSE: Interfacing MOOSE with Python Subhasis Ray National Centre for Biological Sciences Tata Institute of Fundamental Research Bangalore, Karnataka, India

  2. The People Upi Niraj Raamesh

  3. Genesis of MOOSE GEneral NEural SImulation System has been serving for neuronal and biochemical simulations for last 20 years. It employed the idea of connecting the simulation entities through messages. The scripting language is dynamic – you can add and delete fields to/from objects at runtime. Imitated UNIX file-system tree convention to organize and traverse objects ( which are called elements). All object access is path-based.

  4. Genesis of MOOSE “They did it by making the single “All repairs tend to destroy the worst strategic mistake that structure, to increase the any software company can entropy and disorder of the make: system.” They decided to rewrite the code -Frederick P. Brooks, "The from scratch.” Mythical Man-Month” - Joel Spolsky, Things You Should Never Do, Part I The need for modernization was pressing, with obvious limitations of the scripting language. Some aspects of the GENESIS source code are problematic.

  5. Problems with GENESIS Messaging: implemented as linked list in genesis – forces sequential traversal. Scheduling: the scheduler looks through all objects to check if it should be processed. Encapsulation: Object safety was lacking – receiver of a message would actually peep into the memory allocated to the sender object to get message values. Extension: To introduce a new object type one has to prepare three as sociated files – C header, C source and a genesis script. A preprocessor would look into the header and create a mapping between object names and c pointers.

  6. The creation of MOOSE Another misuse of Michelangelo's work : with due apology

  7. GENESIS of MOOSE  MOOSE ( Multiscale Object Oriented Simulation Environment) started as a backward compatible successor of GENESIS.  The core system has been written from scratch.  The underlying architecture changed completely.  MOOSE inherits GENESIS parser and can run GENESIS scripts.

  8. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  9. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  10. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  11. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  12. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  13. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  14. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  15. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  16. A sample session create compartment /squid useclock /squid 0 setfield /squid Ra 7.6e6 \ useclock /Vm 1 Rm 4.2e4 Cm 7.8e-9 \ reset Em -0.07 setfield /squid inject 0 create table /Vm step 0.005 -t call /Vm TABCREATE \ setfield /squid inject {INJECT} {RUNTIME / PLOTDT} 0 1 step 0.040 -t setfield /Vm step_mode 3 setfield /squid inject 0 addmsg /squid /Vm INPUT Vm step 0.005 -t setclock 0 {SIMDT} tab2file squid.plot /Vm setclock 1 {PLOTDT} table quit

  17. Architecture of MOOSE  Three types of objects - System objects constitute the backbone of the engine, e.g. Shell, ClockJob, ClockTick etc. Simulation entities representative of biophysical / biochemical objects that represent the states / parameters we are studying Utility objects provide various other functionalities like inspecting data, interpolation, etc.

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

  19. MOOSE Architecture 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 Not to be confused with the idea of UNIX shell SBW/ other model system Derived from: http://moose.ncbs.res.in/images/stories/architecture_65.jpg

  20. MOOSE Architecture user Command line/scripting interface shell Simulation entities file database Shell creates, deletes and queries other MOOSE objects. It also executes the built-in SBW/ functionalities like file I/O. other model system Derived from: http://moose.ncbs.res.in/images/stories/architecture_65.jpg

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

  22. MOOSE Architecture user Command line/scripting interface shell Simulation entities file database scheduler SBW/ other model system Derived from: http://moose.ncbs.res.in/images/stories/architecture_65.jpg

  23. MOOSE Architecture user Command line/scripting interface shell Simulation entities file database ClockJob SBW/ other model system Derived from: http://moose.ncbs.res.in/images/stories/architecture_65.jpg

  24. MOOSE Architecture user Command line/scripting interface shell Simulation entities file ClockTick 0 ClockTi database ClockJob SBW/ other model system Derived from: http://moose.ncbs.res.in/images/stories/architecture_65.jpg

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

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

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

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

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