diff --git a/docs/source/doxygen/doxy.rst b/docs/source/doxygen/doxy.rst new file mode 100644 index 0000000000000000000000000000000000000000..4d62729abe5307f9c78297eb319bc899817d9c05 --- /dev/null +++ b/docs/source/doxygen/doxy.rst @@ -0,0 +1,4 @@ +Doxygen +------- + +Here you can find all the references necessary for MOOSE. diff --git a/docs/source/user/py/cookbook/chem_GUI.rst b/docs/source/user/py/cookbook/chem_GUI.rst new file mode 100644 index 0000000000000000000000000000000000000000..f7d1136c03c13fc3f4cada1b316e8c872bf0b42b --- /dev/null +++ b/docs/source/user/py/cookbook/chem_GUI.rst @@ -0,0 +1,410 @@ +************************************************* +Interface for chemical kinetic models in MOOSEGUI +************************************************* + + +Upinder Bhalla, Harsha Rani + +Nov 8 2016. + +-------------- + +- `Introduction <#introduction>`__ + +- `**TODO** What are chemical kinetic + models? <#todo-what-are-chemical-kinetic-models>`__ + + - `Levels of model <#levels-of-model>`__ + - `Numerical methods <#numerical-methods>`__ + +- `Using Kinetikit 12 <#using-kinetikit-12>`__ + + - `Overview <#overview>`__ + - `Model layout and icons <#model-layout-and-icons>`__ + + - `Compartment <#compartment>`__ + - `Pool <#pool>`__ + - `Buffered pools <#buffered-pools>`__ + - `Reaction <#reaction>`__ + - `Mass-action enzymes <#mass-action-enzymes>`__ + - `Michaelis-Menten Enzymes <#michaelis-menten-enzymes>`__ + - `Summation <#summation>`__ + + - `Model operations <#model-operations>`__ + - `Model Building <#model-building>`__ + +`Introduction <#TOC>`__ +----------------------- + +Kinetikit 12 is a graphical interface for doing chemical kinetic modeling in MOOSE. It is derived in part from Kinetikit, which was the +graphical interface used in GENESIS for similar models. Kinetikit, also known as kkit, was at version 11 with GENESIS. Here we start with +Kinetikit 12. + +`**TODO** What are chemical kinetic models? <#TOC>`__ +----------------------------------------------------- + +Much of neuronal computation occurs through chemical signaling. For +example, many forms of synaptic plasticity begin with calcium influx +into the synapse, followed by calcium binding to calmodulin, and then +calmodulin activation of numerous enzymes. These events can be +represented in chemical terms: + + 4 Ca2+ + CaM <===> Ca4.CaM + +Such chemical equations can be modeled through standard Ordinary +Differential Equations, if we ignore space:: + + d[Ca]/dt = −4Kf ∗ [Ca]4 ∗ [CaM] + 4Kb ∗ [Ca4.CaM] d[CaM]/dt = −Kf ∗ [Ca]4 ∗ [CaM] + Kb ∗ [Ca4.CaM] d[Ca4.CaM]/dt = Kf ∗ [Ca]4 ∗ [CaM] − Kb ∗ [Ca4.CaM] + +MOOSE models these chemical systems. This help document describes how to do such modelling using the graphical interface, Kinetikit 12. + +`Levels of model <#TOC>`__ +-------------------------- + +Chemical kinetic models can be simple well-stirred (or point) models, or +they could have multiple interacting compartments, or they could include +space explicitly using reaction-diffusion. In addition such models could +be solved either deterministically, or using a stochastic formulation. +At present Kinetikit handles compartmental models but does not compute +diffusion within the compartments, though MOOSE itself can do this at +the script level. Kkit12 will do deterministic as well as stochastic +chemical calculations. + +`Numerical methods <#TOC>`__ +---------------------------- + +- **Deterministic**: Adaptive timestep 5th order Runge-Kutta-Fehlberg from the GSL (GNU Scientific Library). +- **Stochastic**: Optimized Gillespie Stochastic Systems Algorithm, custom implementation. + +`Using Kinetikit 12 <#TOC>`__ +----------------------------- + +`Overview <#TOC>`__ +^^^^^^^^^^^^^^^^^^^ + +- Load models using **'File -> Load model'**. A reaction schematic for the chemical system appears in the **'Editor view'** tab. +- From **'Editor view'** tab + + - View parameters by clicking on icons, and looking at entries in **'Properties'** table to the right. + - Edit parameters by changing their values in the **'Properties'** table. + +- From **'Run View'** + + - Pools can be plotted by clicking on their icons and dragging the icons onto the plot Window. Presently only concentration v/s time is plottable. + - Select simulation, diffusin dt's along updateInterval for plot and Gui with numerical method using options under **'Preferences'** button in simulation control. + - Run model using **'Run'** button. + - Save plots image using the icons at the top of the **'Plot Window'** or right click on plot to Export to csv. + +Most of these operations are detailed in other sections, and are shared +with other aspects of the MOOSE simulation interface. Here we focus on +the Kinetikit-specific items. + +`Model layout and icons <#TOC>`__ +--------------------------------- + +When you are in the **'Editor View'** tab you will see a collection of +icons, arrows, and grey boxes surrounding these. This is a schematic of +the reaction scheme being modeled. You can view and change parameters, +and change the layout of the model. + +.. figure:: ../../../images/Moose1.png + :alt: + +Resizing the model layout and icons: + +- **Zoom**:  Comma and period keys. Alternatively, the mouse scroll wheel or vertical scroll line on the track pad will cause the display to zoom in and out. +- **Pan**:  The arrow keys move the display left, right, up, and down. +- **Entire Model View**:  Pressing the **'a'** key will fit the entire model into the entire field of view. +- **Resize Icons**:  Angle bracket keys, that is, **'<'** and **'>'** or **'+'** and **'-'**. This resizes the icons while leaving their positions on the screen layout more or less the same. +- **Original Model View**:  Pressing the **'A'** key (capital 'A') will revert to the original model view including the original icon scaling. + +`Compartment <#TOC>`__ +^^^^^^^^^^^^^^^^^^^^^^ + +The *compartment* in moose is usually a contiguous domain in which a +certain set of chemical reactions and molecular species occur. The +definition is very closely related to that of a cell-biological +compartment. Examples include the extracellular space, the cell +membrane, the cytosol, and the nucleus. Compartments can be nested, but +of course you cannot put a bigger compartment into a smaller one. + +- **Icon**: Grey boundary around a set of reactions. +- **Moving Compartments**: Click and drag on the boundary. +- **Resizing Compartment boundary**: Happens automatically when contents are repositioned, so that the boundary just contains contents. +- **Compartment editable parameters**: + + - **'name'**: The name of the compartment. + - **'size'**: This is the volume, surface area or length of the compartment, depending on its type. + +- **Compartment fixed parameters**: + + - **'numDimensions'**: This specifies whether the compartment is a volume, a 2-D surface, or if it is just being represented as a length. + +`Pool <#TOC>`__ +^^^^^^^^^^^^^^^ + +This is the set of molecules of a given species within a compartment. +Different chemical states of the same molecule are in different pools. + +- **Icon**: |image0| Colored rectangle with pool name in it. +- **Moving pools**: Click and drag. +- **Pool editable parameters**: + + - **name**: Name of the pool + - **n**: Number of molecules in the pool + - **nInit**: Initial number of molecules in the pool. 'n' gets set + to this value when the 'reinit' operation is done. + - **conc**: Concentration of the molecules in the pool. + ``conc = n * unit_scale_factor / (N<sub>A</sub> * vol)`` + - **concInit**: Initial concentration of the molecules in the pool. + 'conc' is set to this value when the 'reinit' operation is done. + + ``concInit = nInit * unit_scale_factor / (N<sub>A</sub> * vol)`` + +- **Pool fixed parameters** + + - **size**: Derived from the compartment that holds the pool. + Specifies volume, surface area or length of the holding + compartment. + +`Buffered pools <#TOC>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some pools are set to a fixed 'n', that is number of molecules, and +therefore a fixed concentration, throughout a simulation. These are +buffered pools. + +- **Icon**: |image1| Colored rectangle with pool name in it. +- **Moving Buffered pools**: Click and drag. +- **Buffered Pool editable parameters** + + - **name**: Name of the pool + - **nInit**: Fixed number of molecules in the pool. 'n' gets set to + this value throughout the run. + - **concInit**: Fixed concentration of the molecules in the pool. + 'conc' is set to this value throughout the run. + + ``concInit = nInit * unit_scale_factor / (N<sub>A</sub> * vol)`` + +- **Pool fixed parameters**: + + - **n**: Number of molecules in the pool. Derived from 'nInit'. + - **conc**: Concentration of molecules in the pool. Derived from + 'concInit'. + - **size**: Derived from the compartment that holds the pool. + Specifies volume, surface area or length of the holding + compar'tment. + +`Reaction <#TOC>`__ +^^^^^^^^^^^^^^^^^^^ + +These are conversion reactions between sets of pools. They are +reversible, but you can set either of the rates to zero to get +irreversibility. In the illustration below, **'D'** and **'A'** are +substrates, and **'B'** is the product of the reaction. This is +indicated by the direction of the green arrow. + +.. figure:: ../../../images/KkitReaction.png + :alt: + +- **Icon**: |image2| Reversible reaction arrow. +- **Moving Reactions**: Click and drag. +- **Reaction editable parameters**: + + - **Name** : Name of reaction + - **K\ :sub:`f`** : 'Forward rate' of reaction, in + 'concentration/time' units. This is the normal way to express and + manipulate the reaction rate. + - **k\ :sub:`f`** : Forward rate of reaction, in 'number/time' + units. This is used internally for computations, but is + volume-dependent and should not be used to manipulate the reaction + rate unless you really know what you are doing. + - **K\ :sub:`b`** : Backward rate' of reaction, in + 'concentration/time' units. This is the normal way to express and + manipulate the reaction rate. + - **k\ :sub:`b`** : Backward rate of reaction, in 'number/time' + units. This is used internally for computations, but is + volume-dependent and should not be used to manipulate the reaction + rate unless you really know what you are doing. + +- **Reaction fixed parameters**: + + - **numSubstrates**: Number of substrates molecules. + - **numProducts**: Number of product molecules. + +`Mass-action enzymes <#TOC>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +These are enzymes that model the chemical equation's + + E + S <===> E.S -> E + P + +Note that the second reaction is irreversible. Note also that +mass-action enzymes include a pool to represent the **'E.S'** +(enzyme-substrate) complex. In the example below, the enzyme pool is +named **'MassActionEnz'**, the substrate is **'C'**, and the product is +**'E'**. The direction of the enzyme reaction is indicated by the red +arrows. + +.. figure:: ../../../images/MassActionEnzReac.png + :alt: + +- **Icon**: |image3| Colored ellipse atop a small square. The ellipse represents the enzyme. The small square represents **'E.S'**, the enzyme-substrate complex. The ellipse icon has the same color as the enzyme pool **'E'**. It is connected to the enzyme pool **'E'** with a straight line of the same color. + + The ellipse icon sits on a continuous, typically curved arrow in red, + from the substrate to the product. + + A given enzyme pool can have any number of enzyme activities, since + the same enzyme might catalyze many reactions. + +- **Moving Enzymes**: Click and drag on the ellipse. +- **Enzyme editable parameters** + + - **name** : Name of enzyme. + - **K\ :sub:`m`** : Michaelis-Menten value for enzyme, in + 'concentration' units. + - **k\ :sub:`cat`** : Production rate of enzyme, in '1/time' units. + Equal to k\ :sub:`3`, the rate of the second, irreversible + reaction. + - **k1** : Forward rate of the **E+S** reaction, in number and + '1/time' units. This is what is used in the internal calculations. + - **k2** : Backward rate of the **E+S** reaction, in '1/time' units. + Used in internal calculations. + - **k3** : Forward rate of the **E.S -> E + P** reaction, in + '1/time' units. Equivalent to k\ :sub:`cat`. Used in internal + calculations. + - **ratio** : This is equal to k\ :sub:`2`/k:sub:`3`. Needed to + define the internal rates in terms of K\ :sub:`m` and + k\ :sub:`cat`. I usually use a value of 4. + +- **Enzyme-substrate-complex editable parameters**: These are identica'l to those of any other pool. + + - **name**: Name of the **E.S** complex. Defaults to \*\*\_cplx\*\*. + - **n**: Number of molecules in the pool + - **nInit**: Initial number of molecules in the complex. 'n' gets set to this value when the 'reinit' operation is done. + - **conc**: Concentration of the molecules in the pool. + + ``conc = n * unit_scale_factor / (N<sub>A</sub> * vol)`` + - **concInit**: Initial concentration of the molecules in the pool. + 'conc' is set to this value when the 'reinit' operation is done. + ``concI'nit = nInit * unit_scale_factor / (N<sub>A</sub> * vol)`` + +- **Enzyme-substrate-complex fixed parameters**: + + - **size**: Derived from the compartment that holds the pool. + Specifies volume, surface area or length of the holding + compartment. Note that the Enzyme-substrate-complex is assumed to + be in the same compartment as the enzyme molecule. + +`Michaelis-Menten Enzymes <#TOC>`__ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +These are enzymes that obey the Michaelis-Menten equation + +``V = V<sub>max</sub> * [S] / ( K<sub>m</sub> + [S] ) = k<sub>cat</sub> * [Etot] * [S] / ( K<sub>m</sub> + [S] )`` +where +- V\ :sub:`max` is the maximum rate of the enzyme +- [Etot] is the total amount of the enzyme +- K\ :sub:`m` is the Michaelis-Menten constant +- S is the substrate. + +Nominally these enzymes model the same chemical equation as the mass-action enzyme': + +``E + S <===> E.S -> E + P`` + +but they make the assumption that the **E.S** is in a quasi-steady-state +with **E** and **S**, and they also ignore sequestration of the enzyme +into the complex. So there is no representation of the **E.S** complex. +In the example below, the enzyme pool is named **MM\_Enz**, the +substrate is **E**, and the product is **P**. The direction of the +enzyme reaction is indicated by the red arrows. + +.. figure:: ../../../images/MM_EnzReac.png + :alt: + +- **Icon**: |image4| Colored ellipse. The ellipse represents the enzyme + The ellipse icon has the same color as the enzyme **'MM\_Enz'**. It + is connected to the enzyme pool **'MM\_Enz'** with a straight line of + the same color. The ellipse icon sits on a continuous, typically + curved arrow in red, from the substrate to the product. A given + enzyme pool can have any number of enzyme activities, since the same + enzyme might catalyze many reactions. +- **Moving Enzymes**: Click and drag. +- **Enzyme editable parameters**: + + - **name**: Name of enzyme. + - K\ :sub:`m`: Michaelis-Menten value for enzyme, in 'concentration' + units. + - k\ :sub:`cat`: Production rate of enzyme, in '1/time' units. Equal to k\ :sub:`3`, the rate of the second, irreversible reaction. + +`Summation <#TOC>`__ +^^^^^^^^^^^^^^^^^^^^ + +Summation object can be used to add specified variable values. The +variables can be input from pool object. + +- **Icon**: This is **Σ** in the example image below. The input pools + **'A'** and **'B'** connect to the **Σ** with blue arrows. The + function ouput's to BuffPool |image5| + +`Model operations <#TOC>`__ +---------------------------- + +- **Loading models**: **File -> Load Model -> select from dialog**. + This operation makes the previously loaded model disable and loads newly selected models in **'Model View'**. +- **New**: **File -> New -> Model name**. This opens a empty widget for model building +- **Saving models**: **File -> Save Model -> select from dialog**. +- **Changing numerical methods**: **Preference->Chemical tab** item from Simulation Control. Currently supports: +- Runge Kutta: This is the Runge-Kutta-Fehlberg implementation from the GNU Scientific Library (GSL). It is a fifth order variable timestep explicit method. Works well for most reaction systems except if they have very stiff reactions. +- Gillespie: Optimized Gillespie stochastic systems algorithm, custom implementation. This uses variable timesteps internally. + Note that it slows down with increasing numbers of molecules in + each pool. It also slows down, but not so badly, if the number of + reactions goes up. +- Exponential Euler:This methods computes the solution of partial + and ordinary differential equations. + +`Model building <#TOC>`__ +------------------------- + +- The **Edit Widget** includes various menu options and model icons on + the top. Use the mouse buttton to click and drag icons from toolbar + to Edit Widget, two things will happen, **icon** will appear in the + editor widget and a **object editor** will pop up with lots of + parameters with respect to moose object. + +.. figure:: ../../../images/chemical_CS.png + :alt: + +**Rules**: +:: + + * Compartment has to be created firstly(At present only single compartment model is allowed) + * Enzyme should be dropped on a pool as parent + * function should be dropped on buffPool for output + +**Note**: +:: + + * Drag in pool's and reaction on to the editor widget, now one can set up a reaction. + * Click on mooseObject one can find a little arrow on the top right corner of the object, drag from this little arrow to any object for connection. e.g pool to reaction and reaction to pool. Specific connection type gets specific colored arrow. e.g. Green color arrow for specifying connection between reactant and product for reaction. + * Clicking on the object one can rearrange object for clean layout. + * Second order reaction can also be done by repeating the connection over again + * Each connection can be deleted and using rubberband selection each moose object can be deleted + +- From **run widget**, pools are draggable to plot window for plotting. + (Currently **conc** is plotted as default field) Plots are + color-coded as per in model. + +.. figure:: ../../../images/Chemical_run.png + :alt: + +- Model can be run by clicking **start** button. One can stop button in + mid-stream and start up again without affectiong the calculations. + The reset button clears the simulation. + +.. |image0| image:: ../../../images/Pool.png +.. |image1| image:: ../../../images/BufPool.png +.. |image2| image:: ../../../images/KkitReacIcon.png +.. |image3| image:: ../../../images/MassActionEnzIcon.png +.. |image4| image:: ../../../images/MM_EnzIcon.png +.. |image5| image:: ../../../images/func.png diff --git a/docs/source/user/py/cookbook/chem_load_save.rst b/docs/source/user/py/cookbook/chem_load_save.rst new file mode 100644 index 0000000000000000000000000000000000000000..b278dffd4bfb94f9d51a7e65eb77aae382e344b7 --- /dev/null +++ b/docs/source/user/py/cookbook/chem_load_save.rst @@ -0,0 +1,33 @@ +************************ +Load - Run - Save models +************************ + +Load a Kinetic Model +-------------------- + +.. automodule:: loadKineticModel + :members: + +Load an SBML Model +------------------- + +.. automodule:: loadSbmlmodel + :members: + +Load a CSpace Model +------------------- + +.. automodule:: loadCspaceModel + :members: + +Save a model into SBML format +----------------------------- + +.. automodule:: convert_Genesis2Sbml + :members: + +Save a model +------------ + +.. automodule:: savemodel + :members: diff --git a/docs/source/user/py/cookbook/chem_sim_eg.rst b/docs/source/user/py/cookbook/chem_sim_eg.rst new file mode 100644 index 0000000000000000000000000000000000000000..63c87e0785d2d3a77efdc2811f2f3ae226d20b6c --- /dev/null +++ b/docs/source/user/py/cookbook/chem_sim_eg.rst @@ -0,0 +1,280 @@ +*************** +Simple Examples +*************** + +Set-up a kinetic solver and model +--------------------------------- + +with Scripting +^^^^^^^^^^^^^^ + +.. automodule:: scriptGssaSolver + :members: + +With something else +^^^^^^^^^^^^^^^^^^^ + +.. automodule:: changeFuncExpression + :members: + +Building a chemical Model from Parts +------------------------------------ + +Disclaimer: Avoid doing this for all but the very simplest models. This +is error-prone, tedious, and non-portable. For preference use one of the +standard model formats like SBML, which MOOSE and many other tools can +read and write. + +Nevertheless, it is useful to see how these models are set up. +There are several tutorials and snippets that build the entire chemical +model system using the basic MOOSE calls. The sequence of steps is +typically: + + #. Create container (chemical compartment) for model. This is typically + a CubeMesh, a CylMesh, and if you really know what you are doing, + a NeuroMesh. + #. Create the reaction components: pools of molecules **moose.Pool**; + reactions **moose.Reac**; and enzymes **moose.Enz**. Note that when + creating an enzyme, one must also create a molecule beneath it to + serve as the enzyme-substrate complex. Other less-used + components include Michaelis-Menten enzymes **moose.MMenz**, input + tables, pulse generators and so on. These are illustrated in other + examples. All these reaction components should be child objects + of the compartment, since this defines what volume they will occupy. + Specifically , a pool or reaction object must be placed somewhere + below the compartment in the object tree for the volume to be + set correctly and for the solvers to know what to use. + #. Assign parameters for the components. + + * Compartments have a **volume**, and each subtype will have + quite elaborate options for partitioning the compartment + into voxels. + * **Pool** s have one key parameter, the initial + concentration **concInit**. + * **Reac** tions have two parameters: **Kf** and **Kb**. + * **Enz** ymes have two primary parameters **kcat** and **Km**. + That is enough for **MMenz** ymes. Regular **Enz** ymes have + an additional parameter **k2** which by default is set to 4.0 + times **kcat**, but you may also wish to explicitly assign it + if you know its value. + + #. Connect up the reaction system using moose messaging. + #. Create and connect up input and output tables as needed. + #. Create and connect up the solvers as needed. This has to be done + in a specific order. Examples are linked below, but briefly the + order is: + + a. Make the compartment and reaction system. + b. Make the Ksolve or Gsolve. + c. Make the Stoich. + d. Assign **stoich.compartment** to the compartment + e. Assign **stoich.ksolve** to either the Ksolve or Gsolve. + f. Assign **stoich.path** to finally fill in the reaction system. + +An example of manipulating the models is as following: + +.. automodule:: scriptKineticSolver + :members: + +The recommended way to build a chemical model, of course, is to load it +in from a file format specific to such models. MOOSE understands +**SBML**, **kkit.g** (a legacy GENESIS format), and **cspace** +(a very compact format used in a large study of bistables from +Ramakrishnan and Bhalla, PLoS Comp. Biol 2008). + +One key concept is that in MOOSE the components, messaging, and access +to model components is identical regardless of whether the model was +built from parts, or loaded in from a file. All that the file loaders do +is to use the file to automate the steps above. Thus the model components +and their fields are completely accessible from the script even if +the model has been loaded from a file. + +Cross-Compartment Reaction Systems +---------------------------------- + +Frequently reaction systems span cellular (chemical) compartments. +For example, a membrane-bound molecule may be phosphorylated by a +cytosolic kinase, using soluble ATP as one of the substrates. Here the +membrane and the cytsol are different chemical compartments. +MOOSE supports such reactions. The following snippets illustrate +cross-compartment chemistry. Note that the interpretation of the rates +of enzymes and reactions does depend on which compartment they reside in. + +.. automodule:: crossComptSimpleReac + :members: + +.. automodule:: crossComptOscillator + :members: + +.. automodule:: crossComptNeuroMesh + :members: + +.. automodule:: crossComptSimpleReacGSSA + :members: + +Tweaking Parameters +------------------- + +.. automodule:: tweakingParameters + :members: + +.. figure:: ../../../images/tweakingParameters.png + :alt: Three oscillation patterns after tweaking model parameters. + +Models' Demonstration +--------------------- + +Oscillation Model +^^^^^^^^^^^^^^^^^ + +.. automodule:: slowFbOsc + :members: + +.. automodule:: repressillator + :members: + +.. automodule:: relaxationOsc + :members: + +Bistability Models +^^^^^^^^^^^^^^^^^^ + +MAPK feedback loop model +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: mapkFB + :members: + +Simple minimal bistable model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: scaleVolumes + :members: + +Strongly bistable Model +~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: strongBis + :members: + +Model of bidirectional synaptic plasticity +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[showing bistable chemical switch] + +.. automodule:: bidirectionalPlasticity + :members: + +Reaction Diffusion Models +------------------------- + +The MOOSE design for reaction-diffusion is to specify one or +more cellular 'compartments', and embed reaction systems in each of them. + +A 'compartment', in the context of reaction-diffusion, is used in the +cellular sense of a biochemically defined, +volume restricted subpart of a cell. Many but not all compartments +are bounded by a cell membrane, but biochemically the membrane itself +may form a compartment. Note that this interpretation differs from that +of a 'compartment' in detailed electrical models of neurons. + +A reaction system can be loaded in from any of the supported MOOSE +formats, or built within Python from MOOSE parts. + +The computations for such models are done by a set of objects: +Stoich, Ksolve and Dsolve. Respectively, these handle the model +reactions and stoichiometry matrix, the reaction computations for +each voxel, and the diffusion between voxels. The 'Compartment' specifies +how the model should be spatially discretized. + +[Reaction-diffusion + transport in a tapering cylinder] + +.. automodule:: cylinderDiffusion + :members: + +.. automodule:: cylinderMotor + :members: + +.. automodule:: gssaCylinderDiffusion + :members: + +Neuronal Diffusion Reaction +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: rxdFuncDiffusion + :members: + +.. automodule:: rxdReacDiffusion + :members: + +.. automodule:: rxdFuncDiffusionStoch + :members: + +A Turing Model +-------------- + +.. automodule:: TuringOneDim + :members: + +A Spatial Bistable Model +------------------------ + +Reaction Diffusion in Neurons +----------------------------- + +.. automodule:: reacDiffConcGradient + :members: + +.. automodule:: reacDiffBranchingNeuron + :members: + +.. automodule:: reacDiffSpinyNeuron + :members: + +.. automodule:: diffSpinyNeuron + :members: + +Manipulating Chemical Models +---------------------------- + +Running with different numerical methods +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: switchKineticSolvers + :members: + +Changing volumes +^^^^^^^^^^^^^^^^ + +.. automodule:: scaleVolumes + :members: + :noindex: + +Feeding tabulated input to a model +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: analogStimTable + :members: + +Finding steady states +^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: findChemSteadyState + :members: + +Making a dose-response curve +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. figure:: ../../../images/chemDoseResponse.png + :alt: Dose-response curve example for a bistable system. + +.. automodule:: chemDoseResponse + :members: + +Transport in branching dendritic tree +------------------------------------- + +.. figure:: ../../../images/reacDiffBranchingNeuron.png + :alt: Pseudo-3-D rendition of branching neuron and the concs in it. + +.. automodule:: transportBranchingNeuron + :members: diff --git a/docs/source/user/py/cookbook/chem_tut.rst b/docs/source/user/py/cookbook/chem_tut.rst new file mode 100644 index 0000000000000000000000000000000000000000..1a3a5a9e55cf825710067db67191a7ba4e53c5e1 --- /dev/null +++ b/docs/source/user/py/cookbook/chem_tut.rst @@ -0,0 +1,18 @@ +********* +Tutorials +********* + +Finding Steady State (CSpace) +----------------------------- + +.. automodule:: cspaceSteadyState + :members: + +Building Simple Reaction Model +------------------------------ + +Define a kinetic model using the scripting +------------------------------------------ + +.. automodule:: scriptKineticModel + :members: diff --git a/docs/source/user/py/cookbook/elec_GUI.rst b/docs/source/user/py/cookbook/elec_GUI.rst new file mode 100644 index 0000000000000000000000000000000000000000..695619661a7942e625809ee8ec721ed94014a53b --- /dev/null +++ b/docs/source/user/py/cookbook/elec_GUI.rst @@ -0,0 +1,75 @@ +******************************** +Neuronal simulations in MOOSEGUI +******************************** + +Neuronal models in various formats can be loaded and simulated in the +**MOOSE Graphical User Interface**. The GUI displays the neurons in 3D, +and allows visual selection and editing of neuronal properties. Plotting +and visualization of activity proceeds concurrently with the simulation. +Support for creating and editing channels, morphology and networks is +planned for the future. MOOSEGUI uses SI units throughout. + +moose-examples +^^^^^^^^^^^^^^^ + +- **Cerebellar granule cell** + + **File -> Load ->** + ~/moose/moose-examples/neuroml/GranuleCell/GranuleCell.net.xml + + This is a single compartment Cerebellar granule cell with a variety + of channels `Maex, R. and De Schutter, E., + 1997 <http://www.tnb.ua.ac.be/models/network.shtml>`_ (exported from + http://www.neuroconstruct.org/). Click on its soma, and **See + children** for its list of channels. Vary the Gbar of these + channels to obtain regular firing, adapting and bursty behaviour (may + need to increase tau of the Ca pool). + + +- **Pyloric rhythm generator in the stomatogastric ganglion of lobster** + + **File -> Load ->** + ~/moose/moose-examples/neuroml/pyloric/Generated.net.xml + + +- **Purkinje cell** + + **File -> Load ->** + ~/moose/moose-examples/neuroml/PurkinjeCell/Purkinje.net.xml + + This is a purely passive cell, but with extensive morphology [De + Schutter, E. and Bower, J. M., 1994] (exported from + http://www.neuroconstruct.org/). The channel specifications are in an + obsolete ChannelML format which MOOSE does not support. + + +- **Olfactory bulb subnetwork** + + **File -> Load ->** + ~/moose/moose-examples/neuroml/OlfactoryBulb/numgloms2_seed100.0_decimated.xml + + This is a pruned and decimated version of a detailed network model + of the Olfactory bulb [Gilra A. and Bhalla U., in preparation] + without channels and synaptic connections. We hope to post the + ChannelML specifications of the channels and synapses soon. + + +- **All channels cell** + + **File -> Load ->** + ~/moose/moose-examples/neuroml/allChannelsCell/allChannelsCell.net.xml + + This is the Cerebellar granule cell as above, but with loads of + channels from various cell types (exported from + http://www.neuroconstruct.org/). Play around with the channel + properties to see what they do. You can also edit the ChannelML files + in ~/moose/moose-examples/neuroml/allChannelsCell/cells_channels/ to + experiment further. + + +- **NeuroML python scripts** + In directory ~/moose/moose-examples/neuroml/GranuleCell, you can run + python FvsI_Granule98.py which plots firing rate vs injected + current for the granule cell. Consult this python script to see how + to read in a NeuroML model and to set up simulations. There are ample + snippets in ~/moose/moose-examples/snippets too. diff --git a/docs/source/user/py/cookbook/elec_load_run.rst b/docs/source/user/py/cookbook/elec_load_run.rst new file mode 100644 index 0000000000000000000000000000000000000000..14879a7fbf181184659557ff3653d019a1aa3ed1 --- /dev/null +++ b/docs/source/user/py/cookbook/elec_load_run.rst @@ -0,0 +1,27 @@ +************************** +Load and Run simple models +************************** + +Single Cubicle Compartmental Neuron +----------------------------------- + +.. automodule:: cubeMeshSigNeur + :members: + +Single Neuron Model +------------------- + +.. automodule:: testSigNeur + :members: + +Load neuron model from GENESIS +------------------------------ + +.. automodule:: neuronFromDotp + :members: + +Integrate-and-fire models +------------------------- + +.. automodule:: IntegrateFireZoo + :members: diff --git a/docs/source/user/py/cookbook/elec_mod.rst b/docs/source/user/py/cookbook/elec_mod.rst new file mode 100644 index 0000000000000000000000000000000000000000..2a6d5755e336f257c000ab167be80bad6d05dbd1 --- /dev/null +++ b/docs/source/user/py/cookbook/elec_mod.rst @@ -0,0 +1,158 @@ +**************** +Neuron Modeling +**************** + +Neurons are modelled as equivalent electrical circuits. The morphology +of a neuron can be broken into isopotential compartments connected by +axial resistances R\ :sub:`a`\ denoting the cytoplasmic +resistance. In each compartment, the neuronal membrane is represented as +a capacitance C\ :sub:`m`\ with a shunt leak resistance +R\ :sub:`m`\ . Electrochemical gradient (due to ion pumps) +across the leaky membrane causes a voltage drive E\ :sub:`m`\ , +that hyperpolarizes the inside of the cell membrane compared to the +outside. + +Each voltage dependent ion channel, present on the membrane, is modelled +as a voltage dependent conductance G\ :sub:`k`\ with gating +kinetics, in series with an electrochemical voltage drive (battery) +E\ :sub:`k`\ , across the membrane capacitance +C\ :sub:`m`\ , as in the figure below. + +-------------------------------------------------------- + +.. figure:: ../../../images/neuroncompartment.png + :align: center + :alt: **Equivalent circuit of neuronal compartments** + + **Equivalent circuit of neuronal compartments** + +-------------------------------------------------------- + +Neurons fire action potentials / spikes (sharp rise and fall of membrane +potential V\ :sub:`m`\ ) due to voltage dependent channels. +These result in opening of excitatory / inhibitory synaptic channels +(conductances with batteries, similar to voltage gated channels) on +other connected neurons in the network. + +MOOSE can handle large networks of detailed neurons, each with +complicated channel dynamics. Further, MOOSE can integrate chemical +signalling with electrical activity. Presently, creating and simulating +these requires PyMOOSE scripting, but these will be incorporated into +the GUI in the future. + +To understand channel kinetics and neuronal action potentials, run the +Squid Axon demo installed along with MOOSEGUI and consult its +help/tutorial. + +Read more about compartmental modelling in the first few chapters of the +`Book of Genesis <http://www.genesis-sim.org/GENESIS/iBoG/iBoGpdf/index.html>`_. + +Models can be defined in `NeuroML <http://www.neuroml.org>`_, an XML +format which is mostly supported across simulators. Channels, neuronal +morphology (compartments), and networks can be specified using various +levels of NeuroML, namely ChannelML, MorphML and NetworkML. Importing of +cell models in the `GENESIS <http://www.genesis-sim.org/GENESIS>`_ +.p format is supported for backwards compatibitility. + +Modeling details +================ + +Some salient properties of neuronal building blocks in MOOSE are +described below. Variables that are updated at every simulation time +step are are listed **dynamical**. Rest are parameters. + +- **Compartment** + When you select a compartment, you can view and edit its properties + in the right pane. V\ :sub:`m`\ and I\ :sub:`m`\ + are plot-able. + + - V\ :sub:`m`\ + membrane potential (across C\ :sub:`m`\ ) in Volts. It is a + dynamical variable. + - C\ :sub:`m`\ + membrane capacitance in Farads. + - E\ :sub:`m`\ + membrane leak potential in Volts due + to the electrochemical gradient setup by ion pumps. + - I\ :sub:`m`\ + current in Amperes across the membrane via leak resistance R\ + :sub:`m`\ . + - inject + current in Amperes injected externally into the compartment. + - initVm + initial V\ :sub:`m`\ in Volts. + - R\ :sub:`m`\ + membrane leak resistance in Ohms due to leaky channels. + - diameter + diameter of the compartment in metres. + - length + length of the compartment in metres. + +- **HHChannel** + Hodgkin-Huxley channel with voltage dependent dynamical gates. + + - Gbar + peak channel conductance in Siemens. + - E\ :sub:`k`\ + reversal potential of the channel, due to electrochemical + gradient of the ion(s) it allows. + - G\ :sub:`k`\ + conductance of the channel in Siemens. + G\ :sub:`k`\ (t) = Gbar × X(t)\ :sup:`Xpower`\ × + Y(t)\ :sup:`Ypower`\ × Z(t)\ :sup:`Zpower`\ + + - I\ :sub:`k`\ + current through the channel into the neuron in Amperes. + I\ :sub:`k`\ (t) = G\ :sub:`k`\ (t) × + (E\ :sub:`k`\ -V\ :sub:`m`\ (t)) + + - X, Y, Z + gating variables (range 0.0 to 1.0) that may turn on or off as + voltage increases with different time constants. + + dX(t)/dt = X\ :sub:`inf`\ /τ - X(t)/τ + + Here, X\ :sub:`inf`\ and τ are typically + sigmoidal/linear/linear-sigmoidal functions of membrane + potential V\ :sub:`m`\ , which are described in a ChannelML + file and presently not editable from MOOSEGUI. Thus, a gate + may open (X\ :sub:`inf`\ (V\ :sub:`m`\ ) → 1) or close (X\ + :sub:`inf`\ (V\ :sub:`m`\ ) → 0) on increasing V\ :sub:`m`\ + , with time constant τ(V\ :sub:`m`\ ). + + - Xpower, Ypower, Zpower + powers to which gates are raised in the G\ :sub:`k`\ (t) + formula above. + +- **HHChannel2D** + The Hodgkin-Huxley channel2D can have the usual voltage dependent + dynamical gates, and also gates that depend on voltage and an + ionic concentration, as for say Ca-dependent K conductance. It has + the properties of HHChannel above, and a few more, similar to + in the `GENESIS tab2Dchannel + reference <http://www.genesis-sim.org/GENESIS/Hyperdoc/Manual-26.html#ss26.61>`_. + +- **CaConc** + This is a pool of Ca ions in each compartment, in a shell volume + under the cell membrane. The dynamical Ca concentration increases + when Ca channels open, and decays back to resting with a specified + time constant τ. Its concentration controls Ca-dependent K channels, + etc. + + - Ca + Ca concentration in the pool in units mM ( i.e., mol/m\ + :sup:`3`\ ). + + d[Ca\ :sup:`2+`\ ]/dt = B × I\ :sub:`Ca`\ - + [Ca\ :sup:`2+`\ ]/τ + + - CaBasal/Ca_base + Base Ca concentration to which the Ca decays + - tau + time constant with which the Ca concentration decays to the base Ca level. + - B + constant in the [Ca\ :sup:`2+`\ ] equation above. + - thick + thickness of the Ca shell within the cell membrane which is + used to calculate B (see Chapter 19 of `Book of GENESIS + <http://www.genesis-sim.org/GENESIS/iBoG/iBoGpdf/index.html>`_.) diff --git a/docs/source/user/py/cookbook/elec_sim_eg.rst b/docs/source/user/py/cookbook/elec_sim_eg.rst new file mode 100644 index 0000000000000000000000000000000000000000..68077b54c8244fc64546bd364c77c7776cafcd34 --- /dev/null +++ b/docs/source/user/py/cookbook/elec_sim_eg.rst @@ -0,0 +1,60 @@ +*************** +Simple Examples +*************** + +Create a Leaky Neuron +--------------------- + +.. automodule:: lif + :members: + +Create a Leaky Compartment +-------------------------- + +.. automodule:: lifcomp + :members: + +Voltage Clamping +---------------- + +.. automodule:: vclamp + :members: + +Generate Pulse +---------------- + +.. automodule:: pulsegen + :members: + +.. automodule:: pulsegen2 + :members: + +Synapse +------- + +.. automodule:: synapse + :members: + +Message transmission via synapse +-------------------------------- + +.. automodule:: intfire + :members: + +Gap Junction +------------ + +.. automodule:: gapjunction + :members: + +Insert Spine heads +------------------ + +.. automodule:: insertSpinesWithoutRdesigneur + :members: + +Multi compartmental Neuron model +-------------------------------- + +.. automodule:: testHsolve + :members: diff --git a/docs/source/user/py/cookbook/multi_rdes.rst b/docs/source/user/py/cookbook/multi_rdes.rst new file mode 100644 index 0000000000000000000000000000000000000000..8725b916346fa583589fe546ea8b44e217a904e9 --- /dev/null +++ b/docs/source/user/py/cookbook/multi_rdes.rst @@ -0,0 +1,24 @@ +********** +RDesigneur +********** + +Building Chemical-Electrical Signalling Models using Rdesigneur +--------------------------------------------------------------- + +Building a compartment +^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: testRdesigneur + :members: + +Inserting Spines and viewing +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: insertSpines + :members: + +Proceeding with Spines +^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: testWigglySpines + :members: diff --git a/docs/source/user/py/cookbook/multi_sim_eg.rst b/docs/source/user/py/cookbook/multi_sim_eg.rst new file mode 100644 index 0000000000000000000000000000000000000000..e80193c5bbb0d03ebed2215e84eb123b53076f8d --- /dev/null +++ b/docs/source/user/py/cookbook/multi_sim_eg.rst @@ -0,0 +1,27 @@ +*************** +Simple Examples +*************** + +Single-compartment multiscale model +----------------------------------- + +.. automodule:: multiscaleOneCompt + :members: + +Multi compartment Single Neuron Model +------------------------------------- + +.. automodule:: multiComptSigNeur + :members: + +Multi-compartment multiscale model +---------------------------------- + +Modeling chemical reactions in neurons +-------------------------------------- + +.. automodule:: gssaRDspiny + :members: + +.. automodule:: rxdSpineSize + :members: diff --git a/docs/source/user/py/cookbook/net_sim_eg.rst b/docs/source/user/py/cookbook/net_sim_eg.rst new file mode 100644 index 0000000000000000000000000000000000000000..ef9f46e5be1f225cfaeed05787c6ffd3d15997e9 --- /dev/null +++ b/docs/source/user/py/cookbook/net_sim_eg.rst @@ -0,0 +1,74 @@ +*************** +Simple Examples +*************** + +Connecting two cells via a synapse +---------------------------------- + +Below is the connectivity diagram for setting up a synaptic connection +from one neuron to another. The PulseGen object is there for +stimulating the presynaptic cell as part of experimental setup. The +cells are defined as single-compartments with Hodgkin-Huxley type Na+ +and K+ channels. + +.. figure:: ../../../images/twoCells.png + :scale: 50% + :alt: Two cells connected via synapse + +.. automodule:: twocells + :members: + +Multi Compartmental Leaky Neurons +--------------------------------- + +.. automodule:: multicomp_lif + :members: + +Providing random input to a cell +-------------------------------- + +.. automodule:: randomspike + :members: + +.. figure:: ../../../images/randomSpike.png + :scale: 50% + :alt: Random spike input to a cell + +Plastic synapse +--------------- + +.. automodule:: STDP + :members: + +Synapse Handler for Spikes +-------------------------- + +.. automodule:: RandSpikeStats + :members: + +Recurrent integrate-and-fire network +------------------------------------ + +.. automodule:: recurrentIntFire + :members: + +Recurrent integrate-and-fire network with plasticity +---------------------------------------------------- + +.. automodule:: recurrentLIF + :members: + +Demonstration Models +-------------------- + +.. automodule:: compartment_net + :members: + +.. automodule:: compartment_net_no_array + :members: + +Building Models +--------------- + +.. automodule:: synapse_tutorial + :members: diff --git a/docs/source/user/py/cookbook/net_tut.rst b/docs/source/user/py/cookbook/net_tut.rst new file mode 100644 index 0000000000000000000000000000000000000000..ea98c2f96f799938a8cf1630ea853e7a4ae0040d --- /dev/null +++ b/docs/source/user/py/cookbook/net_tut.rst @@ -0,0 +1,12 @@ +********* +Tutorials +********* + +Network with Ca-based plasticity +-------------------------------- + +.. automodule:: GraupnerBrunel2012_STDPfromCaPlasticity + :members: + +.. automodule:: HigginsGraupnerBrunel2014_LifetimeCaPlasticity + :members: diff --git a/docs/source/user/py/quickstart/classes_demos.rst b/docs/source/user/py/quickstart/classes_demos.rst new file mode 100644 index 0000000000000000000000000000000000000000..d8e3bb3493861f7edbb7991735d0158fe0e53503 --- /dev/null +++ b/docs/source/user/py/quickstart/classes_demos.rst @@ -0,0 +1,156 @@ +************* +MOOSE Classes +************* + +Messages +^^^^^^^^ + +One-to-one message +"""""""""""""""""" + +.. automodule:: onetoonemsg + :members: + +Show the message +"""""""""""""""" + +.. automodule:: showmsg + :members: + +Single Message Cross +"""""""""""""""""""" + +.. automodule:: singlemsgcross + :members: + +Time +^^^^ + +Clocks +"""""" + +.. automodule:: showclocks + :members: + +Generating Time Data Table +"""""""""""""""""""""""""" + +.. automodule:: timetable + :members: + +Vectors +^^^^^^^ + +.. automodule:: vectors + :members: + +Data Entries +^^^^^^^^^^^^ + +.. automodule:: wildcard + :members: + +Interpolation +^^^^^^^^^^^^^ + +1-dimentional Interpolation +""""""""""""""""""""""""""" + +.. automodule:: interpol + :members: + +2-dimentional interpolation +""""""""""""""""""""""""""" + +.. automodule:: interpol2d + :members: + +Function +^^^^^^^^ + +.. automodule:: func + :members: + +SymCompartment +^^^^^^^^^^^^^^ + +.. automodule:: symcompartment + :members: + +Tables +^^^^^^ + +.. automodule:: tabledemo + :members: + +Data Types +^^^^^^^^^^ + +HDF DataType +"""""""""""" + +.. automodule:: hdfdemo + :members: + +NSDF DataType +""""""""""""" + +.. automodule:: nsdf + :members: + +.. automodule:: nsdf_vec + :members: + +Threading +^^^^^^^^^ + +.. automodule:: threading_demo + :members: + +PyMoose +^^^^^^^ + +.. automodule:: traub_naf + :members: + +.. _quickstart-maths: + +Mathematics with MOOSE +^^^^^^^^^^^^^^^^^^^^^^ + +Computing an arbitrary function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: function + :members: + +.. figure:: ../../../images/function.png + :alt: Outputs of Function object calculating z = c0 * exp(c1 * x) * cos(y) + :scale: 50% + +Differential Equation Solving +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffEqSolution + :members: + +Harmonic Oscillatory Function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: funcRateHarmonicOsc + :members: + +Lotka-Voltera Model +^^^^^^^^^^^^^^^^^^^ + +.. automodule:: funcReacLotkaVolterra + :members: + +.. automodule:: stochasticLotkaVolterra + :members: + +Vary Concentration with mathematical function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: funcInputToPools + :members: diff --git a/docs/source/user/py/quickstart/demos.rst b/docs/source/user/py/quickstart/demos.rst new file mode 100644 index 0000000000000000000000000000000000000000..390d05fb801b32c6a4742e49e65d2cabb9bcf021 --- /dev/null +++ b/docs/source/user/py/quickstart/demos.rst @@ -0,0 +1,51 @@ +************************************** +Demonstration of basic functionalities +************************************** + +.. _quickstart-load-run: + +Load and Run a Model +-------------------- + +.. automodule:: helloMoose + :members: + +.. _quickstart-timing: + +Start, Stop, and setting clocks +------------------------------- + +.. automodule:: startstop + :members: + +.. automodule:: stimtable + :members: + +The Hodgkin-Huxley demo +----------------------- + +This is a self-contained graphical demo implemented by Subhasis Ray, +closely based on the 'Squid' demo by Mark Nelson which ran in GENESIS. + +.. figure:: ../../../images/squid_demo.png + :alt: Hodgkin-Huxley's squid giant axon experiment + +Simulation of Hodgkin-Huxley's experiment on squid giant axon +showing action potentials generated by a step current injection. + + +The demo has built-in documentation and may be run from the +``moose-examples/squid`` subdirectory of MOOSE. + +.. _quickstart-python_from_moose: + +Run Python from MOOSE +--------------------- + +.. automodule:: pyrun + :members: + +.. automodule:: pyrun1 + :members: + +.. _quickstart-classes: diff --git a/docs/source/user/py/references/AdExIF.rst b/docs/source/user/py/references/AdExIF.rst new file mode 100644 index 0000000000000000000000000000000000000000..7ced38eba6aa6d9950a405c13ab251e3f322cff7 --- /dev/null +++ b/docs/source/user/py/references/AdExIF.rst @@ -0,0 +1,65 @@ +AdExIF +------ + +.. py:class:: AdExIF + + Leaky Integrate-and-Fire neuron with Exponential spike rise and adaptation via an adapting current w.Rm*Cm * dVm/dt = -(Vm-Em) + deltaThresh * exp((Vm-thresh)/deltaThresh) + Rm*I - w tau\_w * d w /dt = a0*(Vm-Em) - w at each spike, w -> w + b0 + + .. py:method:: setW + + (*destination message field*) Assigns field value. + + + .. py:method:: getW + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauW + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauW + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setA0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getA0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setB0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getB0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: w + + double (*value field*) adaptation current with time constant tauW + + + .. py:attribute:: tauW + + double (*value field*) time constant of adaptation current w + + + .. py:attribute:: a0 + + double (*value field*) factor for voltage-dependent term in evolution of adaptation current: tau\_w dw/dt = a0*(Vm-Em) - w + + + .. py:attribute:: b0 + + double (*value field*) b0 is added to w, the adaptation current on each spike diff --git a/docs/source/user/py/references/AdThreshIF.rst b/docs/source/user/py/references/AdThreshIF.rst new file mode 100644 index 0000000000000000000000000000000000000000..1fc7c47193a6481ee201527a1c3e74dadae3e683 --- /dev/null +++ b/docs/source/user/py/references/AdThreshIF.rst @@ -0,0 +1,65 @@ +AdThreshIF +---------- + +.. py:class:: AdThreshIF + + Leaky Integrate-and-Fire neuron with adaptive threshold.Based on Rossant, C., Goodman, D.F.M., Platkiewicz, J., and Brette, R. (2010).Rm*Cm * dVm/dt = -(Vm-Em) + Rm*ItauThresh * d threshAdaptive / dt = a0*(Vm-Em) - threshAdaptive at each spike, threshAdaptive is increased by threshJump the spiking threshold adapts as thresh + threshAdaptive + + .. py:method:: setThreshAdaptive + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshAdaptive + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauThresh + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauThresh + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setA0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getA0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setThreshJump + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshJump + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: threshAdaptive + + double (*value field*) adaptative part of the threshold that decays with time constant tauThresh + + + .. py:attribute:: tauThresh + + double (*value field*) time constant of adaptative part of the threshold + + + .. py:attribute:: a0 + + double (*value field*) factor for voltage-dependent term in evolution of adaptative threshold: tauThresh * d threshAdaptive / dt = a0*(Vm-Em) - threshAdaptive + + + .. py:attribute:: threshJump + + double (*value field*) threshJump is added to threshAdaptive on each spike diff --git a/docs/source/user/py/references/Adaptor.rst b/docs/source/user/py/references/Adaptor.rst new file mode 100644 index 0000000000000000000000000000000000000000..c021c6f32155bd719b3fa91c2a1ee7d4b0dab20c --- /dev/null +++ b/docs/source/user/py/references/Adaptor.rst @@ -0,0 +1,90 @@ +Adaptor +------- + +.. py:class:: Adaptor + + This is the adaptor class. It is used in interfacing different kinds of solver with each other, especially for electrical to chemical signeur models. The Adaptor class is the core of the API for interfacing between different solution engines. It is currently in use for interfacing between chemical and electrical simulations, but could be used for other cases such as mechanical models. The API for interfacing between solution engines rests on the following capabilities of MOOSE. 1. The object-oriented interface with classes mapped to biological and modeling concepts such as electrical and chemical compartments, ion channels and molecular pools. 2. The invisible mapping of Solvers (Objects implementing numerical engines) to the object-oriented interface. Solvers work behind the scenes to update the objects. 3. The messaging interface which allows any visible field to be accessed and updated from any other object. 4. The clock-based scheduler which drives operations of any subset of objects at any interval. For example, this permits the operations of field access and update to take place at quite different timescales from the numerical engines. 5. The implementation of Adaptor classes. These perform a linear transformation:: (y = scale * (x + inputOffset) + outputOffset ) where y is output and x is the input. The input is the average of any number of sources (through messages) and any number of timesteps. The output goes to any number of targets, again through messages. It is worth adding that messages can transport arbitrary data structures, so it would also be possible to devise a complicated opaque message directly between solvers. The implementation of Adaptors working on visible fields does this much more transparently and gives the user facile control over the scaling transformatoin. These adaptors are used especially in the rdesigneur framework of MOOSE, which enables multiscale reaction-diffusion and electrical signaling models. As an example of this API in operation, I consider two mappings: 1. Calcium mapped from electrical to chemical computations. 2. phosphorylation state of a channel mapped to the channel conductance. 1. Calcium mapping. Problem statement. Calcium is computed in the electrical solver as one or more pools that are fed by calcium currents, and is removed by an exponential decay process. This calcium pool is non-diffusive in the current electrical solver. It has to be mapped to chemical calcium pools at a different spatial discretization, which do diffuse. In terms of the list of capabilities described above, this is how the API works. 1. The electrical model is partitioned into a number of electrical compartments, some of which have the 'electrical' calcium pool as child object in a UNIX filesystem-like tree. Thus the 'electrical' calcium is represented as an object with concentration, location and so on. 2. The Solver computes the time-course of evolution of the calcium concentration. Whenever any function queries the 'concentration' field of the calcium object, the Solver provides this value. 3. Messaging couples the 'electrical' calcium pool concentration to the adaptor (see point 5). This can either be a 'push' operation, where the solver pushes out the calcium value at its internal update rate, or a 'pull' operation where the adaptor requests the calcium concentration. 4. The clock-based scheduler keeps the electrical and chemical solvers ticking away, but it also can drive the operations of the adaptor. Thus the rate of updates to and from the adaptor can be controlled. 5. The adaptor averages its inputs. Say the electrical solver is going at a timestep of 50 usec, and the chemical solver at 5000 usec. The adaptor will take 100 samples of the electrical concentration, and average them to compute the 'input' to the linear scaling. Suppose that the electrical model has calcium units of micromolar, but has a zero baseline. The chemical model has units of millimolar and a baseline of 1e-4 millimolar. This gives: y = 0.001x + 1e-4 At the end of this calculation, the adaptor will typically 'push' its output to the chemical solver. Here we have similar situation to item (1), where the chemical entities are calcium pools in space, each with their own calcium concentration. The messaging (3) determines another aspect of the mapping here: the fan in or fan out. In this case, a single electrical compartment may house 10 chemical compartments. Then the output message from the adaptor goes to update the calcium pool concentration on the appropriate 10 objects representing calcium in each of the compartments. In much the same manner, the phosphorylation state can regulate channel properties. 1. The chemical model contains spatially distributed chemical pools that represent the unphosphorylated state of the channel, which in this example is the conducting form. This concentration of this unphosphorylated state is affected by the various reaction- diffusion events handled by the chemical solver, below. 2. The chemical solver updates the concentrations of the pool objects as per reaction-diffusion calculations. 3. Messaging couples these concentration terms to the adaptor. In this case we have many chemical pool objects for every electrical compartment. There would be a single adaptor for each electrical compartment, and it would average all the input values for calcium concentration, one for each mesh point in the chemical calculation. As before, the access to these fields could be through a 'push' or a 'pull' operation. 4. The clock-based scheduler oeperates as above. 5. The adaptor averages the spatially distributed inputs from calcium, and now does a different linear transform. In this case it converts chemical concentration into the channel conductance. As before, the 'electrical' channel is an object (point 1) with a field for conductance, and this term is mapped into the internal data structures of the solver (point 2) invisibly to the user. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process message from the scheduler. + + + .. py:method:: setInputOffset + + (*destination message field*) Assigns field value. + + + .. py:method:: getInputOffset + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOutputOffset + + (*destination message field*) Assigns field value. + + + .. py:method:: getOutputOffset + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Input message to the adaptor. If multiple inputs are received, the system averages the inputs. + + + .. py:method:: process + + (*destination message field*) Handles 'process' call + + + .. py:method:: reinit + + (*destination message field*) Handles 'reinit' call + + + .. py:attribute:: output + + double (*source message field*) Sends the output value every timestep. + + + .. py:attribute:: requestOut + + PSt6vectorIdSaIdEE (*source message field*) Sends out a request to a field with a double or array of doubles. Issued from the process call.Works for any number of targets. + + + .. py:attribute:: inputOffset + + double (*value field*) Offset to apply to input message, before scaling + + + .. py:attribute:: outputOffset + + double (*value field*) Offset to apply at output, after scaling + + + .. py:attribute:: scale + + double (*value field*) Scaling factor to apply to input + + + .. py:attribute:: outputValue + + double (*value field*) This is the linearly transformed output. diff --git a/docs/source/user/py/references/Annotator.rst b/docs/source/user/py/references/Annotator.rst new file mode 100644 index 0000000000000000000000000000000000000000..68457d1056bf2fe351fa4a94a7397299f4e6e1bc --- /dev/null +++ b/docs/source/user/py/references/Annotator.rst @@ -0,0 +1,170 @@ +Annotator +--------- + + +.. py:class:: Annotator + + + .. py:method:: setX + + (*destination message field*) Assigns field value. + + + .. py:method:: getX + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY + + (*destination message field*) Assigns field value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNotes + + (*destination message field*) Assigns field value. + + + .. py:method:: getNotes + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setColor + + (*destination message field*) Assigns field value. + + + .. py:method:: getColor + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTextColor + + (*destination message field*) Assigns field value. + + + .. py:method:: getTextColor + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setIcon + + (*destination message field*) Assigns field value. + + + .. py:method:: getIcon + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSolver + + (*destination message field*) Assigns field value. + + + .. py:method:: getSolver + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRuntime + + (*destination message field*) Assigns field value. + + + .. py:method:: getRuntime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDirpath + + (*destination message field*) Assigns field value. + + + .. py:method:: getDirpath + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setModeltype + + (*destination message field*) Assigns field value. + + + .. py:method:: getModeltype + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: x + + double (*value field*) x field. Typically display coordinate x + + + .. py:attribute:: y + + double (*value field*) y field. Typically display coordinate y + + + .. py:attribute:: z + + double (*value field*) z field. Typically display coordinate z + + + .. py:attribute:: notes + + string (*value field*) A string to hold some text notes about parent object + + + .. py:attribute:: color + + string (*value field*) A string to hold a text string specifying display color.Can be a regular English color name, or an rgb code rrrgggbbb + + + .. py:attribute:: textColor + + string (*value field*) A string to hold a text string specifying color for text labelthat might be on the display for this object.Can be a regular English color name, or an rgb code rrrgggbbb + + + .. py:attribute:: icon + + string (*value field*) A string to specify icon to use for display + + + .. py:attribute:: solver + + string (*value field*) A string to specify solver to store for Gui + + + .. py:attribute:: runtime + + double (*value field*) runtime field. Store runtime + + + .. py:attribute:: dirpath + + string (*value field*) directory path for Gui + + + .. py:attribute:: modeltype + + string (*value field*) model type diff --git a/docs/source/user/py/references/Arith.rst b/docs/source/user/py/references/Arith.rst new file mode 100644 index 0000000000000000000000000000000000000000..d4d8eca05cae91d223a9ef1a129cc8ea1b77331c --- /dev/null +++ b/docs/source/user/py/references/Arith.rst @@ -0,0 +1,99 @@ +Arith +----- + +.. py:class:: Arith + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setFunction + + (*destination message field*) Assigns field value. + + + .. py:method:: getFunction + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOutputValue + + (*destination message field*) Assigns field value. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getArg1Value + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAnyValue + + (*destination message field*) Assigns field value. + + + .. py:method:: getAnyValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: arg1 + + (*destination message field*) Handles argument 1. This just assigns it + + + .. py:method:: arg2 + + (*destination message field*) Handles argument 2. This just assigns it + + + .. py:method:: arg3 + + (*destination message field*) Handles argument 3. This sums in each input, and clears each clock tick. + + + .. py:method:: arg1x2 + + (*destination message field*) Store the product of the two arguments in output\_ + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: output + + double (*source message field*) Sends out the computed value + + + .. py:attribute:: function + + string (*value field*) Arithmetic function to perform on inputs. + + + .. py:attribute:: outputValue + + double (*value field*) Value of output as computed last timestep. + + + .. py:attribute:: arg1Value + + double (*value field*) Value of arg1 as computed last timestep. + + + .. py:attribute:: anyValue + + unsigned int,double (*lookup field*) Value of any of the internal fields, output, arg1, arg2, arg3,as specified by the index argument from 0 to 3. diff --git a/docs/source/user/py/references/BinomialRng.rst b/docs/source/user/py/references/BinomialRng.rst new file mode 100644 index 0000000000000000000000000000000000000000..62e4006fcc6f95924a76b243517b1dbe66458017 --- /dev/null +++ b/docs/source/user/py/references/BinomialRng.rst @@ -0,0 +1,35 @@ +BinomialRng +----------- + +.. py:class:: BinomialRng + + Binomially distributed random number generator. + + .. py:method:: setN + + (*destination message field*) Assigns field value. + + + .. py:method:: getN + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setP + + (*destination message field*) Assigns field value. + + + .. py:method:: getP + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: n + + double (*value field*) Parameter n of the binomial distribution. In a coin toss experiment, this is the number of tosses. + + + .. py:attribute:: p + + double (*value field*) Parameter p of the binomial distribution. In a coin toss experiment, this is the probability of one of the two sides of the coin being on top. diff --git a/docs/source/user/py/references/CaConc.rst b/docs/source/user/py/references/CaConc.rst new file mode 100644 index 0000000000000000000000000000000000000000..5199ee7b0e5e3293c3eee70717e48f34109c6b88 --- /dev/null +++ b/docs/source/user/py/references/CaConc.rst @@ -0,0 +1,6 @@ +CaConc +------ + +.. py:class:: CaConc + + CaConc: Calcium concentration pool. Takes current from a channel and keeps track of calcium buildup and depletion by a single exponential process. diff --git a/docs/source/user/py/references/CaConcBase.rst b/docs/source/user/py/references/CaConcBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..a8e59b4153e83adb6dc5843f7bf46380c90558d8 --- /dev/null +++ b/docs/source/user/py/references/CaConcBase.rst @@ -0,0 +1,202 @@ +CaConcBase +---------- + +.. py:class:: CaConcBase + + CaConcBase: Base class for Calcium concentration pool. Takes current from a channel and keeps track of calcium buildup and depletion by a single exponential process. + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive Process message from scheduler + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: setCa + + (*destination message field*) Assigns field value. + + + .. py:method:: getCa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaBasal + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaBasal + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCa\_base + + (*destination message field*) Assigns field value. + + + .. py:method:: getCa\_base + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTau + + (*destination message field*) Assigns field value. + + + .. py:method:: getTau + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setB + + (*destination message field*) Assigns field value. + + + .. py:method:: getB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setThick + + (*destination message field*) Assigns field value. + + + .. py:method:: getThick + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiameter + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiameter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCeiling + + (*destination message field*) Assigns field value. + + + .. py:method:: getCeiling + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFloor + + (*destination message field*) Assigns field value. + + + .. py:method:: getFloor + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: current + + (*destination message field*) Calcium Ion current, due to be converted to conc. + + + .. py:method:: currentFraction + + (*destination message field*) Fraction of total Ion current, that is carried by Ca2+. + + + .. py:method:: increase + + (*destination message field*) Any input current that increases the concentration. + + + .. py:method:: decrease + + (*destination message field*) Any input current that decreases the concentration. + + + .. py:method:: basal + + (*destination message field*) Synonym for assignment of basal conc. + + + .. py:attribute:: concOut + + double (*source message field*) Concentration of Ca in pool + + + .. py:attribute:: Ca + + double (*value field*) Calcium concentration. + + + .. py:attribute:: CaBasal + + double (*value field*) Basal Calcium concentration. + + + .. py:attribute:: Ca\_base + + double (*value field*) Basal Calcium concentration, synonym for CaBasal + + + .. py:attribute:: tau + + double (*value field*) Settling time for Ca concentration + + + .. py:attribute:: B + + double (*value field*) Volume scaling factor. Deprecated. This is a legacy field from GENESIS and exposes internal calculations. Please do not use. + B = 1/(vol * F) so that it obeys: + dC/dt = B*I\_Ca - C/tau + + + .. py:attribute:: thick + + double (*value field*) Thickness of Ca shell, assumed cylindrical. Legal range is between zero and the radius. If outside this range it is taken as the radius. Default zero, ie, the shell is the entire thickness of the cylinder + + + .. py:attribute:: diameter + + double (*value field*) Diameter of Ca shell, assumed cylindrical + + + .. py:attribute:: length + + double (*value field*) Length of Ca shell, assumed cylindrical + + + .. py:attribute:: ceiling + + double (*value field*) Ceiling value for Ca concentration. If Ca > ceiling, Ca = ceiling. If ceiling <= 0.0, there is no upper limit on Ca concentration value. + + + .. py:attribute:: floor + + double (*value field*) Floor value for Ca concentration. If Ca < floor, Ca = floor diff --git a/docs/source/user/py/references/ChanBase.rst b/docs/source/user/py/references/ChanBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..9236699d1aa60bc0a964593486d511f073001973 --- /dev/null +++ b/docs/source/user/py/references/ChanBase.rst @@ -0,0 +1,125 @@ +ChanBase +-------- + +.. py:class:: ChanBase + + ChanBase: Base class for assorted ion channels.Presents a common interface for all of them. + + .. py:attribute:: channel + + void (*shared message field*) This is a shared message to couple channel to compartment. The first entry is a MsgSrc to send Gk and Ek to the compartment The second entry is a MsgDest for Vm from the compartment. + + + .. py:attribute:: ghk + + void (*shared message field*) Message to Goldman-Hodgkin-Katz object + + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive Process message from scheduler + + + .. py:method:: Vm + + (*destination message field*) Handles Vm message coming in from compartment + + + .. py:method:: Vm + + (*destination message field*) Handles Vm message coming in from compartment + + + .. py:method:: setGbar + + (*destination message field*) Assigns field value. + + + .. py:method:: getGbar + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setModulation + + (*destination message field*) Assigns field value. + + + .. py:method:: getModulation + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setEk + + (*destination message field*) Assigns field value. + + + .. py:method:: getEk + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGk + + (*destination message field*) Assigns field value. + + + .. py:method:: getGk + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIk + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: channelOut + + double,double (*source message field*) Sends channel variables Gk and Ek to compartment + + + .. py:attribute:: permeabilityOut + + double (*source message field*) Conductance term going out to GHK object + + + .. py:attribute:: IkOut + + double (*source message field*) Channel current. This message typically goes to concenobjects that keep track of ion concentration. + + + .. py:attribute:: Gbar + + double (*value field*) Maximal channel conductance + + + .. py:attribute:: modulation + + double (*value field*) Modulation, i.e, scale factor for channel conductance.Note that this is a regular parameter, it is not recomputed each timestep. Thus one can use a slow update, say, from a molecule pool, to send a message to set the modulation, and it will stay at the set value even if the channel runs many timesteps before the next assignment. This differs from the GENESIS semantics of a similar message,which required update each timestep. + + + .. py:attribute:: Ek + + double (*value field*) Reversal potential of channel + + + .. py:attribute:: Gk + + double (*value field*) Channel conductance variable + + + .. py:attribute:: Ik + + double (*value field*) Channel current variable diff --git a/docs/source/user/py/references/ChemCompt.rst b/docs/source/user/py/references/ChemCompt.rst new file mode 100644 index 0000000000000000000000000000000000000000..318e93a5c44acfdd9768b467ddebf2849d7ed311 --- /dev/null +++ b/docs/source/user/py/references/ChemCompt.rst @@ -0,0 +1,115 @@ +ChemCompt +--------- + +.. py:class:: ChemCompt + + Pure virtual base class for chemical compartments + + .. py:method:: setVolume + + (*destination message field*) Assigns field value. + + + .. py:method:: getVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getVoxelVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getVoxelMidpoint + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOneVoxelVolume + + (*destination message field*) Assigns field value. + + + .. py:method:: getOneVoxelVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumDimensions + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStencilRate + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStencilIndex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: buildDefaultMesh + + (*destination message field*) Tells ChemCompt derived class to build a default mesh with thespecified volume and number of meshEntries. + + + .. py:method:: setVolumeNotRates + + (*destination message field*) Changes volume but does not notify any child objects.Only works if the ChemCompt has just one voxel.This function will invalidate any concentration term inthe model. If you don't know why you would want to do this,then you shouldn't use this function. + + + .. py:method:: resetStencil + + (*destination message field*) Resets the diffusion stencil to the core stencil that only includes the within-mesh diffusion. This is needed prior to building up the cross-mesh diffusion through junctions. + + + .. py:method:: setNumMesh + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumMesh + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: voxelVolOut + + vector<double> (*source message field*) Sends updated voxel volume out to Ksolve, Gsolve, and Dsolve.Used to request a recalculation of rates and of initial numbers. + + + .. py:attribute:: volume + + double (*value field*) Volume of entire chemical domain.Assigning this only works if the chemical compartment hasonly a single voxel. Otherwise ignored.This function goes through all objects below this on thetree, and rescales their molecule #s and rates as per thevolume change. This keeps concentration the same, and alsomaintains rates as expressed in volume units. + + + .. py:attribute:: voxelVolume + + vector<double> (*value field*) Vector of volumes of each of the voxels. + + + .. py:attribute:: voxelMidpoint + + vector<double> (*value field*) Vector of midpoint coordinates of each of the voxels. The size of this vector is 3N, where N is the number of voxels. The first N entries are for x, next N for y, last N are z. + + + .. py:attribute:: numDimensions + + unsigned int (*value field*) Number of spatial dimensions of this compartment. Usually 3 or 2 + + + .. py:attribute:: oneVoxelVolume + + unsigned int,double (*lookup field*) Volume of specified voxel. + + + .. py:attribute:: stencilRate + + unsigned int,vector<double> (*lookup field*) vector of diffusion rates in the stencil for specified voxel.The identity of the coupled voxels is given by the partner field 'stencilIndex'.Returns an empty vector for non-voxelized compartments. + + + .. py:attribute:: stencilIndex + + unsigned int,vector<unsigned int> (*lookup field*) vector of voxels diffusively coupled to the specified voxel.The diffusion rates into the coupled voxels is given by the partner field 'stencilRate'.Returns an empty vector for non-voxelized compartments. diff --git a/docs/source/user/py/references/Cinfo.rst b/docs/source/user/py/references/Cinfo.rst new file mode 100644 index 0000000000000000000000000000000000000000..4147a8d6537bec164c4cb35eaedeb4c95699d68b --- /dev/null +++ b/docs/source/user/py/references/Cinfo.rst @@ -0,0 +1,27 @@ +Cinfo +----- + + + +.. py:class:: Cinfo + + Class information object. + + .. py:method:: getDocs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getBaseClass + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: docs + + string (*value field*) Documentation + + + .. py:attribute:: baseClass + + string (*value field*) Name of base class diff --git a/docs/source/user/py/references/Clock.rst b/docs/source/user/py/references/Clock.rst new file mode 100644 index 0000000000000000000000000000000000000000..bb4528d4471f496a70801dde94ab2db7e7b876ca --- /dev/null +++ b/docs/source/user/py/references/Clock.rst @@ -0,0 +1,742 @@ +Clock +----- + +.. py:class:: Clock + + Every object scheduled for operations in MOOSE is connected to oneof the 'Tick' entries on the Clock. + The Clock manages 32 'Ticks', each of which has its own dt,which is an integral multiple of the clock baseDt\_. On every clock step the ticks are examined to see which of themis due for updating. When a tick is updated, the 'process' call of all the objects scheduled on that tick is called. Order of execution: If a subset of ticks are scheduled for execution at a given timestep, then they will be executed in numerical order, lowest tick first and highest last. There is no guarantee of execution order for objects within a clock tick. + The clock provides default scheduling for all objects which can be accessed using Clock::lookupDefaultTick( className ). Specific items of note are that the output/file dump objects are second-last, and the postmaster is last on the order of Ticks. The clock also starts up with some default timesteps for each of these ticks, and this can be overridden using the shell command setClock, or by directly assigning tickStep values on the clock object. + Which objects use which tick? As a rule of thumb, try this: + Electrical/compartmental model calculations: Ticks 0-7 + Tables and output objects for electrical output: Tick 8 + Diffusion solver: Tick 10 + Chemical/compartmental model calculations: Ticks 11-17 + Tables and output objects for chemical output: Tick 18 + Unassigned: Ticks 20-29 + Special: 30-31 + Data output is a bit special, since you may want to store data at different rates for electrical and chemical processes in the same model. Here you will have to specifically assign distinct clock ticks for the tables/fileIO objects handling output at different time-resolutions. Typically one uses tick 8 and 18. + Here are the detailed mappings of class to tick. + | Class Tick dt + | DiffAmp 0 50e-6 + | Interpol 0 50e-6 + | PIDController 0 50e-6 + | PulseGen 0 50e-6 + | StimulusTable 0 50e-6 + | testSched 0 50e-6 + | VClamp 0 50e-6 + | SynHandlerBase 1 50e-6 + | SimpleSynHandler 1 50e-6 + | STDPSynHandler 1 50e-6 + GraupnerBrunel2012CaPlasticitySynHandler 1 50e-6 + SeqSynHandler 1 50e-6 + CaConc 1 50e-6 + CaConcBase 1 50e-6 + DifShell 1 50e-6 + MgBlock 1 50e-6 + Nernst 1 50e-6 + RandSpike 1 50e-6 + ChanBase 2 50e-6 + IntFire 2 50e-6 + IntFireBase 2 50e-6 + LIF 2 50e-6 + QIF 2 50e-6 + ExIF 2 50e-6 + AdExIF 2 50e-6 + AdThreshIF 2 50e-6 + IzhIF 2 50e-6 + IzhikevichNrn 2 50e-6 + SynChan 2 50e-6 + NMDAChan 2 50e-6 + GapJunction 2 50e-6 + HHChannel 2 50e-6 + HHChannel2D 2 50e-6 + Leakage 2 50e-6 + MarkovChannel 2 50e-6 + MarkovGslSolver 2 50e-6 + MarkovRateTable 2 50e-6 + MarkovSolver 2 50e-6 + MarkovSolverBase 2 50e-6 + RC 2 50e-6 + Compartment (init) 3 50e-6 + CompartmentBase (init ) 3 50e-6 + SymCompartment (init) 3 50e-6 + Compartment 4 50e-6 + CompartmentBase 4 50e-6 + SymCompartment 4 50e-6 + SpikeGen 5 50e-6 + HSolve 6 50e-6 + SpikeStats 7 50e-6 + Table 8 0.1e-3 + TimeTable 8 0.1e-3 + Dsolve 10 0.01 + Adaptor 11 0.1 + Func 12 0.1 + Function 12 0.1 + Arith 12 0.1 + BufPool 13 0.1 + Pool 13 0.1 + PoolBase 13 0.1 + CplxEnzBase 14 0.1 + Enz 14 0.1 + EnzBase 14 0.1 + MMenz 14 0.1 + Reac 14 0.1 + ReacBase 14 0.1 + Gsolve (init) 15 0.1 + Ksolve (init) 15 0.1 + Gsolve 16 0.1 + Ksolve 16 0.1 + Stats 17 0.1 + Table2 18 1 + Streamer 19 10 + HDF5DataWriter 30 1 + HDF5WriterBase 30 1 + NSDFWriter 30 1 + PyRun 30 1 + PostMaster 31 0.01 + + Note that the other classes are not scheduled at all. + + .. py:attribute:: clockControl + + void (*shared message field*) Controls all scheduling aspects of Clock, usually from Shell + + + .. py:attribute:: proc0 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc1 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc2 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc3 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc4 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc5 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc6 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc7 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc8 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc9 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc10 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc11 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc12 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc13 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc14 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc15 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc16 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc17 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc18 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc19 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc20 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc21 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc22 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc23 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc24 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc25 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc26 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc27 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc28 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc29 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc30 + + void (*shared message field*) Shared process/reinit message + + + .. py:attribute:: proc31 + + void (*shared message field*) Shared process/reinit message + + + .. py:method:: setBaseDt + + (*destination message field*) Assigns field value. + + + .. py:method:: getBaseDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getRunTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getCurrentTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNsteps + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumTicks + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStride + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getCurrentStep + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDts + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIsRunning + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTickStep + + (*destination message field*) Assigns field value. + + + .. py:method:: getTickStep + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTickDt + + (*destination message field*) Assigns field value. + + + .. py:method:: getTickDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDefaultTick + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: start + + (*destination message field*) Sets off the simulation for the specified duration + + + .. py:method:: step + + (*destination message field*) Sets off the simulation for the specified # of steps. Here each step advances the simulation by the timestep of the smallest tick that is actually in use. + + + .. py:method:: stop + + (*destination message field*) Halts the simulation, with option to restart seamlessly + + + .. py:method:: reinit + + (*destination message field*) Zeroes out all ticks, starts at t = 0 + + + .. py:attribute:: finished + + void (*source message field*) Signal for completion of run + + + .. py:attribute:: process0 + + PK8ProcInfo (*source message field*) process for Tick 0 + + + .. py:attribute:: reinit0 + + PK8ProcInfo (*source message field*) reinit for Tick 0 + + + .. py:attribute:: process1 + + PK8ProcInfo (*source message field*) process for Tick 1 + + + .. py:attribute:: reinit1 + + PK8ProcInfo (*source message field*) reinit for Tick 1 + + + .. py:attribute:: process2 + + PK8ProcInfo (*source message field*) process for Tick 2 + + + .. py:attribute:: reinit2 + + PK8ProcInfo (*source message field*) reinit for Tick 2 + + + .. py:attribute:: process3 + + PK8ProcInfo (*source message field*) process for Tick 3 + + + .. py:attribute:: reinit3 + + PK8ProcInfo (*source message field*) reinit for Tick 3 + + + .. py:attribute:: process4 + + PK8ProcInfo (*source message field*) process for Tick 4 + + + .. py:attribute:: reinit4 + + PK8ProcInfo (*source message field*) reinit for Tick 4 + + + .. py:attribute:: process5 + + PK8ProcInfo (*source message field*) process for Tick 5 + + + .. py:attribute:: reinit5 + + PK8ProcInfo (*source message field*) reinit for Tick 5 + + + .. py:attribute:: process6 + + PK8ProcInfo (*source message field*) process for Tick 6 + + + .. py:attribute:: reinit6 + + PK8ProcInfo (*source message field*) reinit for Tick 6 + + + .. py:attribute:: process7 + + PK8ProcInfo (*source message field*) process for Tick 7 + + + .. py:attribute:: reinit7 + + PK8ProcInfo (*source message field*) reinit for Tick 7 + + + .. py:attribute:: process8 + + PK8ProcInfo (*source message field*) process for Tick 8 + + + .. py:attribute:: reinit8 + + PK8ProcInfo (*source message field*) reinit for Tick 8 + + + .. py:attribute:: process9 + + PK8ProcInfo (*source message field*) process for Tick 9 + + + .. py:attribute:: reinit9 + + PK8ProcInfo (*source message field*) reinit for Tick 9 + + + .. py:attribute:: process10 + + PK8ProcInfo (*source message field*) process for Tick 10 + + + .. py:attribute:: reinit10 + + PK8ProcInfo (*source message field*) reinit for Tick 10 + + + .. py:attribute:: process11 + + PK8ProcInfo (*source message field*) process for Tick 11 + + + .. py:attribute:: reinit11 + + PK8ProcInfo (*source message field*) reinit for Tick 11 + + + .. py:attribute:: process12 + + PK8ProcInfo (*source message field*) process for Tick 12 + + + .. py:attribute:: reinit12 + + PK8ProcInfo (*source message field*) reinit for Tick 12 + + + .. py:attribute:: process13 + + PK8ProcInfo (*source message field*) process for Tick 13 + + + .. py:attribute:: reinit13 + + PK8ProcInfo (*source message field*) reinit for Tick 13 + + + .. py:attribute:: process14 + + PK8ProcInfo (*source message field*) process for Tick 14 + + + .. py:attribute:: reinit14 + + PK8ProcInfo (*source message field*) reinit for Tick 14 + + + .. py:attribute:: process15 + + PK8ProcInfo (*source message field*) process for Tick 15 + + + .. py:attribute:: reinit15 + + PK8ProcInfo (*source message field*) reinit for Tick 15 + + + .. py:attribute:: process16 + + PK8ProcInfo (*source message field*) process for Tick 16 + + + .. py:attribute:: reinit16 + + PK8ProcInfo (*source message field*) reinit for Tick 16 + + + .. py:attribute:: process17 + + PK8ProcInfo (*source message field*) process for Tick 17 + + + .. py:attribute:: reinit17 + + PK8ProcInfo (*source message field*) reinit for Tick 17 + + + .. py:attribute:: process18 + + PK8ProcInfo (*source message field*) process for Tick 18 + + + .. py:attribute:: reinit18 + + PK8ProcInfo (*source message field*) reinit for Tick 18 + + + .. py:attribute:: process19 + + PK8ProcInfo (*source message field*) process for Tick 19 + + + .. py:attribute:: reinit19 + + PK8ProcInfo (*source message field*) reinit for Tick 19 + + + .. py:attribute:: process20 + + PK8ProcInfo (*source message field*) process for Tick 20 + + + .. py:attribute:: reinit20 + + PK8ProcInfo (*source message field*) reinit for Tick 20 + + + .. py:attribute:: process21 + + PK8ProcInfo (*source message field*) process for Tick 21 + + + .. py:attribute:: reinit21 + + PK8ProcInfo (*source message field*) reinit for Tick 21 + + + .. py:attribute:: process22 + + PK8ProcInfo (*source message field*) process for Tick 22 + + + .. py:attribute:: reinit22 + + PK8ProcInfo (*source message field*) reinit for Tick 22 + + + .. py:attribute:: process23 + + PK8ProcInfo (*source message field*) process for Tick 23 + + + .. py:attribute:: reinit23 + + PK8ProcInfo (*source message field*) reinit for Tick 23 + + + .. py:attribute:: process24 + + PK8ProcInfo (*source message field*) process for Tick 24 + + + .. py:attribute:: reinit24 + + PK8ProcInfo (*source message field*) reinit for Tick 24 + + + .. py:attribute:: process25 + + PK8ProcInfo (*source message field*) process for Tick 25 + + + .. py:attribute:: reinit25 + + PK8ProcInfo (*source message field*) reinit for Tick 25 + + + .. py:attribute:: process26 + + PK8ProcInfo (*source message field*) process for Tick 26 + + + .. py:attribute:: reinit26 + + PK8ProcInfo (*source message field*) reinit for Tick 26 + + + .. py:attribute:: process27 + + PK8ProcInfo (*source message field*) process for Tick 27 + + + .. py:attribute:: reinit27 + + PK8ProcInfo (*source message field*) reinit for Tick 27 + + + .. py:attribute:: process28 + + PK8ProcInfo (*source message field*) process for Tick 28 + + + .. py:attribute:: reinit28 + + PK8ProcInfo (*source message field*) reinit for Tick 28 + + + .. py:attribute:: process29 + + PK8ProcInfo (*source message field*) process for Tick 29 + + + .. py:attribute:: reinit29 + + PK8ProcInfo (*source message field*) reinit for Tick 29 + + + .. py:attribute:: process30 + + PK8ProcInfo (*source message field*) process for Tick 30 + + + .. py:attribute:: reinit30 + + PK8ProcInfo (*source message field*) reinit for Tick 30 + + + .. py:attribute:: process31 + + PK8ProcInfo (*source message field*) process for Tick 31 + + + .. py:attribute:: reinit31 + + PK8ProcInfo (*source message field*) reinit for Tick 31 + + + .. py:attribute:: baseDt + + double (*value field*) Base timestep for simulation. This is the smallest dt out of all the clock ticks. By definition all other timesteps are integral multiples of this, and are rounded to ensure that this is the case . + + + .. py:attribute:: runTime + + double (*value field*) Duration to run the simulation + + + .. py:attribute:: currentTime + + double (*value field*) Current simulation time + + + .. py:attribute:: nsteps + + unsigned long (*value field*) Number of steps to advance the simulation, in units of the smallest timestep on the clock ticks + + + .. py:attribute:: numTicks + + unsigned int (*value field*) Number of clock ticks + + + .. py:attribute:: stride + + unsigned int (*value field*) Number by which the simulation advances the current step on each cycle. stride = smallest active timestep/smallest defined timestep. + + + .. py:attribute:: currentStep + + unsigned long (*value field*) Current simulation step + + + .. py:attribute:: dts + + vector<double> (*value field*) Utility function returning the dt (timestep) of all ticks. + + + .. py:attribute:: isRunning + + bool (*value field*) Utility function to report if simulation is in progress. + + + .. py:attribute:: tickStep + + unsigned int,unsigned int (*lookup field*) Step size of specified Tick, as integral multiple of dt\_ A zero step size means that the Tick is inactive + + + .. py:attribute:: tickDt + + unsigned int,double (*lookup field*) Timestep dt of specified Tick. Always integral multiple of dt\_. If you assign a non-integer multiple it will round off. A zero timestep means that the Tick is inactive + + + .. py:attribute:: defaultTick + + string,unsigned int (*lookup field*) Looks up the default Tick to use for the specified class. If no tick is assigned, as for classes without a process operation or zombie classes, the tick is ~0U. If nothing can be found returns 0 and emits a warning. diff --git a/docs/source/user/py/references/Compartment.rst b/docs/source/user/py/references/Compartment.rst new file mode 100644 index 0000000000000000000000000000000000000000..6c47c80cebdbe32e51d67e04d406c1aec9b0373d --- /dev/null +++ b/docs/source/user/py/references/Compartment.rst @@ -0,0 +1,6 @@ +Compartment +----------- + +.. py:class:: Compartment + + Compartment object, for branching neuron models. diff --git a/docs/source/user/py/references/CompartmentBase.rst b/docs/source/user/py/references/CompartmentBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..2cdc6a31603ec842ec2c69824acbd00e9713f80e --- /dev/null +++ b/docs/source/user/py/references/CompartmentBase.rst @@ -0,0 +1,345 @@ +CompartmentBase +--------------- + +.. py:class:: CompartmentBase + + CompartmentBase object, for branching neuron models. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects. The Process should be called \_second\_ in each clock tick, after the Init message.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:attribute:: init + + void (*shared message field*) This is a shared message to receive Init messages from the scheduler objects. Its job is to separate the compartmental calculations from the message passing. It doesn't really need to be shared, as it does not use the reinit part, but the scheduler objects expect this form of message for all scheduled output. The first entry is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a dummy MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:attribute:: channel + + void (*shared message field*) This is a shared message from a compartment to channels. The first entry is a MsgDest for the info coming from the channel. It expects Gk and Ek from the channel as args. The second entry is a MsgSrc sending Vm + + + .. py:attribute:: axial + + void (*shared message field*) This is a shared message between asymmetric compartments. axial messages (this kind) connect up to raxial messages (defined below). The soma should use raxial messages to connect to the axial message of all the immediately adjacent dendritic compartments.This puts the (low) somatic resistance in series with these dendrites. Dendrites should then use raxial messages toconnect on to more distal dendrites. In other words, raxial messages should face outward from the soma. The first entry is a MsgSrc sending Vm to the axialFuncof the target compartment. The second entry is a MsgDest for the info coming from the other compt. It expects Ra and Vm from the other compt as args. Note that the message is named after the source type. + + + .. py:attribute:: raxial + + void (*shared message field*) This is a raxial shared message between asymmetric compartments. The first entry is a MsgDest for the info coming from the other compt. It expects Vm from the other compt as an arg. The second is a MsgSrc sending Ra and Vm to the raxialFunc of the target compartment. + + + .. py:method:: setVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCm + + (*destination message field*) Assigns field value. + + + .. py:method:: getCm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setEm + + (*destination message field*) Assigns field value. + + + .. py:method:: getEm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInject + + (*destination message field*) Assigns field value. + + + .. py:method:: getInject + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInitVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getInitVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRm + + (*destination message field*) Assigns field value. + + + .. py:method:: getRm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRa + + (*destination message field*) Assigns field value. + + + .. py:method:: getRa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiameter + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiameter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getX0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getY0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX + + (*destination message field*) Assigns field value. + + + .. py:method:: getX + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY + + (*destination message field*) Assigns field value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: injectMsg + + (*destination message field*) The injectMsg corresponds to the INJECT message in the GENESIS compartment. Unlike the 'inject' field, any value assigned by handleInject applies only for a single timestep.So it needs to be updated every dt for a steady (or varying)injection current + + + .. py:method:: randInject + + (*destination message field*) Sends a random injection current to the compartment. Must beupdated each timestep.Arguments to randInject are probability and current. + + + .. py:method:: injectMsg + + (*destination message field*) The injectMsg corresponds to the INJECT message in the GENESIS compartment. Unlike the 'inject' field, any value assigned by handleInject applies only for a single timestep.So it needs to be updated every dt for a steady (or varying)injection current + + + .. py:method:: cable + + (*destination message field*) Message for organizing compartments into groups, calledcables. Doesn't do anything. + + + .. py:method:: displace + + (*destination message field*) Displaces compartment by specified vector + + + .. py:method:: setGeomAndElec + + (*destination message field*) Assigns length and dia and accounts for any electrical scaling needed as a result. + + + .. py:method:: process + + (*destination message field*) Handles 'process' call + + + .. py:method:: reinit + + (*destination message field*) Handles 'reinit' call + + + .. py:method:: initProc + + (*destination message field*) Handles Process call for the 'init' phase of the CompartmentBase calculations. These occur as a separate Tick cycle from the regular proc cycle, and should be called before the proc msg. + + + .. py:method:: initReinit + + (*destination message field*) Handles Reinit call for the 'init' phase of the CompartmentBase calculations. + + + .. py:method:: handleChannel + + (*destination message field*) Handles conductance and Reversal potential arguments from Channel + + + .. py:method:: handleRaxial + + (*destination message field*) Handles Raxial info: arguments are Ra and Vm. + + + .. py:method:: handleAxial + + (*destination message field*) Handles Axial information. Argument is just Vm. + + + .. py:attribute:: VmOut + + double (*source message field*) Sends out Vm value of compartment on each timestep + + + .. py:attribute:: axialOut + + double (*source message field*) Sends out Vm value of compartment to adjacent compartments,on each timestep + + + .. py:attribute:: raxialOut + + double,double (*source message field*) Sends out Raxial information on each timestep, fields are Ra and Vm + + + .. py:attribute:: Vm + + double (*value field*) membrane potential + + + .. py:attribute:: Cm + + double (*value field*) Membrane capacitance + + + .. py:attribute:: Em + + double (*value field*) Resting membrane potential + + + .. py:attribute:: Im + + double (*value field*) Current going through membrane + + + .. py:attribute:: inject + + double (*value field*) Current injection to deliver into compartment + + + .. py:attribute:: initVm + + double (*value field*) Initial value for membrane potential + + + .. py:attribute:: Rm + + double (*value field*) Membrane resistance + + + .. py:attribute:: Ra + + double (*value field*) Axial resistance of compartment + + + .. py:attribute:: diameter + + double (*value field*) Diameter of compartment + + + .. py:attribute:: length + + double (*value field*) Length of compartment + + + .. py:attribute:: x0 + + double (*value field*) X coordinate of start of compartment + + + .. py:attribute:: y0 + + double (*value field*) Y coordinate of start of compartment + + + .. py:attribute:: z0 + + double (*value field*) Z coordinate of start of compartment + + + .. py:attribute:: x + + double (*value field*) x coordinate of end of compartment + + + .. py:attribute:: y + + double (*value field*) y coordinate of end of compartment + + + .. py:attribute:: z + + double (*value field*) z coordinate of end of compartment diff --git a/docs/source/user/py/references/CplxEnzBase.rst b/docs/source/user/py/references/CplxEnzBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..d7b726e73c77801dde324ef254339453e5b1fa30 --- /dev/null +++ b/docs/source/user/py/references/CplxEnzBase.rst @@ -0,0 +1,110 @@ +CplxEnzBase +----------- + +.. py:class:: CplxEnzBase + + : Base class for mass-action enzymes in which there is an explicit pool for the enzyme-substrate complex. It models the reaction: E + S <===> E.S ----> E + P + + .. py:attribute:: enz + + void (*shared message field*) Connects to enzyme pool + + + .. py:attribute:: cplx + + void (*shared message field*) Connects to enz-sub complex pool + + + .. py:method:: setK1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getK1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setK2 + + (*destination message field*) Assigns field value. + + + .. py:method:: getK2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setK3 + + (*destination message field*) Assigns field value. + + + .. py:method:: getK3 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRatio + + (*destination message field*) Assigns field value. + + + .. py:method:: getRatio + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setConcK1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getConcK1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: enzDest + + (*destination message field*) Handles # of molecules of Enzyme + + + .. py:method:: cplxDest + + (*destination message field*) Handles # of molecules of enz-sub complex + + + .. py:attribute:: enzOut + + double,double (*source message field*) Sends out increment of molecules on product each timestep + + + .. py:attribute:: cplxOut + + double,double (*source message field*) Sends out increment of molecules on product each timestep + + + .. py:attribute:: k1 + + double (*value field*) Forward reaction from enz + sub to complex, in # units.This parameter is subordinate to the Km. This means thatwhen Km is changed, this changes. It also means that whenk2 or k3 (aka kcat) are changed, we assume that Km remainsfixed, and as a result k1 must change. It is only whenk1 is assigned directly that we assume that the user knowswhat they are doing, and we adjust Km accordingly.k1 is also subordinate to the 'ratio' field, since setting the ratio reassigns k2.Should you wish to assign the elementary rates k1, k2, k3,of an enzyme directly, always assign k1 last. + + + .. py:attribute:: k2 + + double (*value field*) Reverse reaction from complex to enz + sub + + + .. py:attribute:: k3 + + double (*value field*) Forward rate constant from complex to product + enz + + + .. py:attribute:: ratio + + double (*value field*) Ratio of k2/k3 + + + .. py:attribute:: concK1 + + double (*value field*) K1 expressed in concentration (1/millimolar.sec) unitsThis parameter is subordinate to the Km. This means thatwhen Km is changed, this changes. It also means that whenk2 or k3 (aka kcat) are changed, we assume that Km remainsfixed, and as a result concK1 must change. It is only whenconcK1 is assigned directly that we assume that the user knowswhat they are doing, and we adjust Km accordingly.concK1 is also subordinate to the 'ratio' field, sincesetting the ratio reassigns k2.Should you wish to assign the elementary rates concK1, k2, k3,of an enzyme directly, always assign concK1 last. diff --git a/docs/source/user/py/references/CubeMesh.rst b/docs/source/user/py/references/CubeMesh.rst new file mode 100644 index 0000000000000000000000000000000000000000..5a699206940152ad9c11ae292fb3773419cdfcf7 --- /dev/null +++ b/docs/source/user/py/references/CubeMesh.rst @@ -0,0 +1,289 @@ +CubeMesh +-------- + +.. py:class:: CubeMesh + + + .. py:method:: setIsToroid + + (*destination message field*) Assigns field value. + + + .. py:method:: getIsToroid + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setPreserveNumEntries + + (*destination message field*) Assigns field value. + + + .. py:method:: getPreserveNumEntries + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAlwaysDiffuse + + (*destination message field*) Assigns field value. + + + .. py:method:: getAlwaysDiffuse + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getX0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getY0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getX1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getY1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDx + + (*destination message field*) Assigns field value. + + + .. py:method:: getDx + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDy + + (*destination message field*) Assigns field value. + + + .. py:method:: getDy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDz + + (*destination message field*) Assigns field value. + + + .. py:method:: getDz + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNx + + (*destination message field*) Assigns field value. + + + .. py:method:: getNx + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNy + + (*destination message field*) Assigns field value. + + + .. py:method:: getNy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNz + + (*destination message field*) Assigns field value. + + + .. py:method:: getNz + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCoords + + (*destination message field*) Assigns field value. + + + .. py:method:: getCoords + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMeshToSpace + + (*destination message field*) Assigns field value. + + + .. py:method:: getMeshToSpace + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSpaceToMesh + + (*destination message field*) Assigns field value. + + + .. py:method:: getSpaceToMesh + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSurface + + (*destination message field*) Assigns field value. + + + .. py:method:: getSurface + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: isToroid + + bool (*value field*) Flag. True when the mesh should be toroidal, that is,when going beyond the right face brings us around to theleft-most mesh entry, and so on. If we have nx, ny, nzentries, this rule means that the coordinate (x, ny, z)will map onto (x, 0, z). Similarly,(-1, y, z) -> (nx-1, y, z)Default is false + + + .. py:attribute:: preserveNumEntries + + bool (*value field*) Flag. When it is true, the numbers nx, ny, nz remainunchanged when x0, x1, y0, y1, z0, z1 are altered. Thusdx, dy, dz would change instead. When it is false, thendx, dy, dz remain the same and nx, ny, nz are altered.Default is true + + + .. py:attribute:: alwaysDiffuse + + bool (*value field*) Flag. When it is true, the mesh matches up sequential mesh entries for diffusion and chmestry. This is regardless of spatial location, and is guaranteed to set up at least the home reaction systemDefault is false + + + .. py:attribute:: x0 + + double (*value field*) X coord of one end + + + .. py:attribute:: y0 + + double (*value field*) Y coord of one end + + + .. py:attribute:: z0 + + double (*value field*) Z coord of one end + + + .. py:attribute:: x1 + + double (*value field*) X coord of other end + + + .. py:attribute:: y1 + + double (*value field*) Y coord of other end + + + .. py:attribute:: z1 + + double (*value field*) Z coord of other end + + + .. py:attribute:: dx + + double (*value field*) X size for mesh + + + .. py:attribute:: dy + + double (*value field*) Y size for mesh + + + .. py:attribute:: dz + + double (*value field*) Z size for mesh + + + .. py:attribute:: nx + + unsigned int (*value field*) Number of subdivisions in mesh in X + + + .. py:attribute:: ny + + unsigned int (*value field*) Number of subdivisions in mesh in Y + + + .. py:attribute:: nz + + unsigned int (*value field*) Number of subdivisions in mesh in Z + + + .. py:attribute:: coords + + vector<double> (*value field*) Set all the coords of the cuboid at once. Order is:x0 y0 z0 x1 y1 z1 dx dy dzWhen this is done, it recalculates the numEntries since dx, dy and dz are given explicitly.As a special hack, you can leave out dx, dy and dz and use a vector of size 6. In this case the operation assumes that nx, ny and nz are to be preserved and dx, dy and dz will be recalculated. + + + .. py:attribute:: meshToSpace + + vector<unsigned int> (*value field*) Array in which each mesh entry stores spatial (cubic) index + + + .. py:attribute:: spaceToMesh + + vector<unsigned int> (*value field*) Array in which each space index (obtained by linearizing the xyz coords) specifies which meshIndex is present.In many cases the index will store the EMPTY flag if there isno mesh entry at that spatial location + + + .. py:attribute:: surface + + vector<unsigned int> (*value field*) Array specifying surface of arbitrary volume within the CubeMesh. All entries must fall within the cuboid. Each entry of the array is a spatial index obtained by linearizing the ix, iy, iz coordinates within the cuboid. So, each entry == ( iz * ny + iy ) * nx + ixNote that the voxels listed on the surface are WITHIN the volume of the CubeMesh object diff --git a/docs/source/user/py/references/CylMesh.rst b/docs/source/user/py/references/CylMesh.rst new file mode 100644 index 0000000000000000000000000000000000000000..7c36fb4fa63e0dcf93b67d481131205d23426499 --- /dev/null +++ b/docs/source/user/py/references/CylMesh.rst @@ -0,0 +1,174 @@ +CylMesh +------- + +.. py:class:: CylMesh + + + .. py:method:: setX0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getX0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getY0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setR0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getR0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getX1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getY1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setR1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getR1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiffLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiffLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCoords + + (*destination message field*) Assigns field value. + + + .. py:method:: getCoords + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumDiffCompts + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getTotLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: x0 + + double (*value field*) x coord of one end + + + .. py:attribute:: y0 + + double (*value field*) y coord of one end + + + .. py:attribute:: z0 + + double (*value field*) z coord of one end + + + .. py:attribute:: r0 + + double (*value field*) Radius of one end + + + .. py:attribute:: x1 + + double (*value field*) x coord of other end + + + .. py:attribute:: y1 + + double (*value field*) y coord of other end + + + .. py:attribute:: z1 + + double (*value field*) z coord of other end + + + .. py:attribute:: r1 + + double (*value field*) Radius of other end + + + .. py:attribute:: diffLength + + double (*value field*) Length constant to use for subdivisionsThe system will attempt to subdivide using compartments oflength diffLength on average. If the cylinder has different enddiameters r0 and r1, it will scale to smaller lengthsfor the smaller diameter end and vice versa.Once the value is set it will recompute diffLength as totLength/numEntries + + + .. py:attribute:: coords + + vector<double> (*value field*) All the coords as a single vector: x0 y0 z0 x1 y1 z1 r0 r1 diffLength + + + .. py:attribute:: numDiffCompts + + unsigned int (*value field*) Number of diffusive compartments in model + + + .. py:attribute:: totLength + + double (*value field*) Total length of cylinder diff --git a/docs/source/user/py/references/DiagonalMsg.rst b/docs/source/user/py/references/DiagonalMsg.rst new file mode 100644 index 0000000000000000000000000000000000000000..5472801a86c04f42abbe4afcbfd00bd4886c9192 --- /dev/null +++ b/docs/source/user/py/references/DiagonalMsg.rst @@ -0,0 +1,19 @@ +DiagonalMsg +----------- + +.. py:class:: DiagonalMsg + + + .. py:method:: setStride + + (*destination message field*) Assigns field value. + + + .. py:method:: getStride + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: stride + + int (*value field*) The stride is the increment to the src DataId that gives thedest DataId. It can be positive or negative, but bounds checkingtakes place and it does not wrap around. diff --git a/docs/source/user/py/references/DifShell.rst b/docs/source/user/py/references/DifShell.rst new file mode 100644 index 0000000000000000000000000000000000000000..d169a8bf95b283667a9c89165e4dc94732886230 --- /dev/null +++ b/docs/source/user/py/references/DifShell.rst @@ -0,0 +1,313 @@ +DifShell +-------- + +.. py:class:: DifShell + + DifShell object: Models diffusion of an ion (typically calcium) within an electric compartment. A DifShell is an iso-concentration region with respect to the ion. Adjoining DifShells exchange flux of this ion, and also keep track of changes in concentration due to pumping, buffering and channel currents, by talking to the appropriate objects. + + .. py:attribute:: process\_0 + + void (*shared message field*) Here we create 2 shared finfos to attach with the Ticks. This is because we want to perform DifShell computations in 2 stages, much as in the Compartment object. In the first stage we send out the concentration value to other DifShells and Buffer elements. We also receive fluxes and currents and sum them up to compute ( dC / dt ). In the second stage we find the new C value using an explicit integration method. This 2-stage procedure eliminates the need to store and send prev\_C values, as was common in GENESIS. + + + .. py:attribute:: process\_1 + + void (*shared message field*) Second process call + + + .. py:attribute:: buffer + + void (*shared message field*) This is a shared message from a DifShell to a Buffer (FixBuffer or DifBuffer). During stage 0: + - DifShell sends ion concentration + - Buffer updates buffer concentration and sends it back immediately using a call-back. + - DifShell updates the time-derivative ( dC / dt ) + + During stage 1: + - DifShell advances concentration C + + This scheme means that the Buffer does not need to be scheduled, and it does its computations when it receives a cue from the DifShell. May not be the best idea, but it saves us from doing the above computations in 3 stages instead of 2. + + + .. py:attribute:: innerDif + + void (*shared message field*) This shared message (and the next) is between DifShells: adjoining shells exchange information to find out the flux between them. Using this message, an inner shell sends to, and receives from its outer shell. + + + .. py:attribute:: outerDif + + void (*shared message field*) Using this message, an outer shell sends to, and receives from its inner shell. + + + .. py:method:: getC + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCeq + + (*destination message field*) Assigns field value. + + + .. py:method:: getCeq + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setD + + (*destination message field*) Assigns field value. + + + .. py:method:: getD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setValence + + (*destination message field*) Assigns field value. + + + .. py:method:: getValence + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLeak + + (*destination message field*) Assigns field value. + + + .. py:method:: getLeak + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setShapeMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getShapeMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiameter + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiameter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setThickness + + (*destination message field*) Assigns field value. + + + .. py:method:: getThickness + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVolume + + (*destination message field*) Assigns field value. + + + .. py:method:: getVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOuterArea + + (*destination message field*) Assigns field value. + + + .. py:method:: getOuterArea + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInnerArea + + (*destination message field*) Assigns field value. + + + .. py:method:: getInnerArea + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Reinit happens only in stage 0 + + + .. py:method:: process + + (*destination message field*) Handle process call + + + .. py:method:: reinit + + (*destination message field*) Reinit happens only in stage 0 + + + .. py:method:: reaction + + (*destination message field*) Here the DifShell receives reaction rates (forward and backward), and concentrations for the free-buffer and bound-buffer molecules. + + + .. py:method:: fluxFromOut + + (*destination message field*) Destination message + + + .. py:method:: fluxFromIn + + (*destination message field*) + + + .. py:method:: influx + + (*destination message field*) + + + .. py:method:: outflux + + (*destination message field*) + + + .. py:method:: fInflux + + (*destination message field*) + + + .. py:method:: fOutflux + + (*destination message field*) + + + .. py:method:: storeInflux + + (*destination message field*) + + + .. py:method:: storeOutflux + + (*destination message field*) + + + .. py:method:: tauPump + + (*destination message field*) + + + .. py:method:: eqTauPump + + (*destination message field*) + + + .. py:method:: mmPump + + (*destination message field*) + + + .. py:method:: hillPump + + (*destination message field*) + + + .. py:attribute:: concentrationOut + + double (*source message field*) Sends out concentration + + + .. py:attribute:: innerDifSourceOut + + double,double (*source message field*) Sends out source information. + + + .. py:attribute:: outerDifSourceOut + + double,double (*source message field*) Sends out source information. + + + .. py:attribute:: C + + double (*value field*) Concentration C is computed by the DifShell and is read-only + + + .. py:attribute:: Ceq + + double (*value field*) + + + .. py:attribute:: D + + double (*value field*) + + + .. py:attribute:: valence + + double (*value field*) + + + .. py:attribute:: leak + + double (*value field*) + + + .. py:attribute:: shapeMode + + unsigned int (*value field*) + + + .. py:attribute:: length + + double (*value field*) + + + .. py:attribute:: diameter + + double (*value field*) + + + .. py:attribute:: thickness + + double (*value field*) + + + .. py:attribute:: volume + + double (*value field*) + + + .. py:attribute:: outerArea + + double (*value field*) + + + .. py:attribute:: innerArea + + double (*value field*) diff --git a/docs/source/user/py/references/DiffAmp.rst b/docs/source/user/py/references/DiffAmp.rst new file mode 100644 index 0000000000000000000000000000000000000000..b8d53ca0ab018eff5e8e0e344b5586566c848ec5 --- /dev/null +++ b/docs/source/user/py/references/DiffAmp.rst @@ -0,0 +1,80 @@ +DiffAmp +------- + +.. py:class:: DiffAmp + + A difference amplifier. Output is the difference between the total plus inputs and the total minus inputs multiplied by gain. Gain can be set statically as a field or can be a destination message and thus dynamically determined by the output of another object. Same as GENESIS diffamp object. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: setGain + + (*destination message field*) Assigns field value. + + + .. py:method:: getGain + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSaturation + + (*destination message field*) Assigns field value. + + + .. py:method:: getSaturation + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: gainIn + + (*destination message field*) Destination message to control gain dynamically. + + + .. py:method:: plusIn + + (*destination message field*) Positive input terminal of the amplifier. All the messages connected here are summed up to get total positive input. + + + .. py:method:: minusIn + + (*destination message field*) Negative input terminal of the amplifier. All the messages connected here are summed up to get total positive input. + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: output + + double (*source message field*) Current output level. + + + .. py:attribute:: gain + + double (*value field*) Gain of the amplifier. The output of the amplifier is the difference between the totals in plus and minus inputs multiplied by the gain. Defaults to 1 + + + .. py:attribute:: saturation + + double (*value field*) Saturation is the bound on the output. If output goes beyond the +/-saturation range, it is truncated to the closer of +saturation and -saturation. Defaults to the maximum double precision floating point number representable on the system. + + + .. py:attribute:: outputValue + + double (*value field*) Output of the amplifier, i.e. gain * (plus - minus). diff --git a/docs/source/user/py/references/Dsolve.rst b/docs/source/user/py/references/Dsolve.rst new file mode 100644 index 0000000000000000000000000000000000000000..ad421e30a752e61dbe471af1db2a290700cf5272 --- /dev/null +++ b/docs/source/user/py/references/Dsolve.rst @@ -0,0 +1,169 @@ +Dsolve +------ + +.. py:class:: Dsolve + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setStoich + + (*destination message field*) Assigns field value. + + + .. py:method:: getStoich + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setPath + + (*destination message field*) Assigns field value. + + + .. py:method:: getPath + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCompartment + + (*destination message field*) Assigns field value. + + + .. py:method:: getCompartment + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumVoxels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumAllVoxels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNVec + + (*destination message field*) Assigns field value. + + + .. py:method:: getNVec + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumPools + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiffVol1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiffVol1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiffVol2 + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiffVol2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiffScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiffScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: buildMeshJunctions + + (*destination message field*) Builds junctions between mesh on current Dsolve, and another Dsolve. The meshes have to be compatible. + + + .. py:method:: buildNeuroMeshJunctions + + (*destination message field*) Builds junctions between NeuroMesh, SpineMesh and PsdMesh + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: stoich + + Id (*value field*) Stoichiometry object for handling this reaction system. + + + .. py:attribute:: path + + string (*value field*) Path of reaction system. Must include all the pools that are to be handled by the Dsolve, can also include other random objects, which will be ignored. + + + .. py:attribute:: compartment + + Id (*value field*) Reac-diff compartment in which this diffusion system is embedded. + + + .. py:attribute:: numVoxels + + unsigned int (*value field*) Number of voxels in the core reac-diff system, on the current diffusion solver. + + + .. py:attribute:: numAllVoxels + + unsigned int (*value field*) Number of voxels in the core reac-diff system, on the current diffusion solver. + + + .. py:attribute:: numPools + + unsigned int (*value field*) Number of molecular pools in the entire reac-diff system, including variable, function and buffered. + + + .. py:attribute:: nVec + + unsigned int,vector<double> (*lookup field*) vector of # of molecules along diffusion length, looked up by pool index + + + .. py:attribute:: diffVol1 + + unsigned int,double (*lookup field*) Volume used to set diffusion scaling: firstVol[ voxel# ] Particularly relevant for diffusion between PSD and head. + + + .. py:attribute:: diffVol2 + + unsigned int,double (*lookup field*) Volume used to set diffusion scaling: secondVol[ voxel# ] Particularly relevant for diffusion between spine and dend. + + + .. py:attribute:: diffScale + + unsigned int,double (*lookup field*) Geometry term to set diffusion scaling: diffScale[ voxel# ] Here the scaling term is given by cross-section area/length Relevant for diffusion between spine head and dend, or PSD. diff --git a/docs/source/user/py/references/Enz.rst b/docs/source/user/py/references/Enz.rst new file mode 100644 index 0000000000000000000000000000000000000000..a1a2a8ec7a8bc9e69c229f3491a17e60c4123cb7 --- /dev/null +++ b/docs/source/user/py/references/Enz.rst @@ -0,0 +1,9 @@ +Enz +--- + +.. py:class:: Enz + + + .. py:method:: setKmK1 + + (*destination message field*) Low-level function used when you wish to explicitly set Km and k1, without doing any of the volume calculations.Needed by ReadKkit and other situations where the numbers must be set before all the messaging is in place.Not relevant for zombie enzymes. diff --git a/docs/source/user/py/references/EnzBase.rst b/docs/source/user/py/references/EnzBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..8b87b153f2bf46c56db71630c3f65eca311b159b --- /dev/null +++ b/docs/source/user/py/references/EnzBase.rst @@ -0,0 +1,115 @@ +EnzBase +------- + +.. py:class:: EnzBase + + Abstract base class for enzymes. + + .. py:attribute:: sub + + void (*shared message field*) Connects to substrate molecule + + + .. py:attribute:: prd + + void (*shared message field*) Connects to product molecule + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setKm + + (*destination message field*) Assigns field value. + + + .. py:method:: getKm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumKm + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumKm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKcat + + (*destination message field*) Assigns field value. + + + .. py:method:: getKcat + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumSubstrates + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: enzDest + + (*destination message field*) Handles # of molecules of Enzyme + + + .. py:method:: subDest + + (*destination message field*) Handles # of molecules of substrate + + + .. py:method:: prdDest + + (*destination message field*) Handles # of molecules of product. Dummy. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: remesh + + (*destination message field*) Tells the MMEnz to recompute its numKm after remeshing + + + .. py:attribute:: subOut + + double,double (*source message field*) Sends out increment of molecules on product each timestep + + + .. py:attribute:: prdOut + + double,double (*source message field*) Sends out increment of molecules on product each timestep + + + .. py:attribute:: Km + + double (*value field*) Michaelis-Menten constant in SI conc units (milliMolar) + + + .. py:attribute:: numKm + + double (*value field*) Michaelis-Menten constant in number units, volume dependent + + + .. py:attribute:: kcat + + double (*value field*) Forward rate constant for enzyme, units 1/sec + + + .. py:attribute:: numSubstrates + + unsigned int (*value field*) Number of substrates in this MM reaction. Usually 1.Does not include the enzyme itself diff --git a/docs/source/user/py/references/ExIF.rst b/docs/source/user/py/references/ExIF.rst new file mode 100644 index 0000000000000000000000000000000000000000..ce044cb1c5f42048d4f93a12de47ad272965953b --- /dev/null +++ b/docs/source/user/py/references/ExIF.rst @@ -0,0 +1,35 @@ +ExIF +---- + +.. py:class:: ExIF + + Leaky Integrate-and-Fire neuron with Exponential spike rise.Rm*Cm dVm/dt = -(Vm-Em) + deltaThresh * exp((Vm-thresh)/deltaThresh) + Rm*I + + .. py:method:: setDeltaThresh + + (*destination message field*) Assigns field value. + + + .. py:method:: getDeltaThresh + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVPeak + + (*destination message field*) Assigns field value. + + + .. py:method:: getVPeak + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: deltaThresh + + double (*value field*) Parameter in Vm evolution equation:Rm*Cm * dVm/dt = -(Vm-Em) + deltaThresh * exp((Vm-thresh)/deltaThresh) + Rm*I + + + .. py:attribute:: vPeak + + double (*value field*) Vm is reset on reaching vPeak, different from spike thresh below:Rm*Cm dVm/dt = -(Vm-Em) + deltaThresh * exp((Vm-thresh)/deltaThresh) + Rm*I diff --git a/docs/source/user/py/references/ExponentialRng.rst b/docs/source/user/py/references/ExponentialRng.rst new file mode 100644 index 0000000000000000000000000000000000000000..2a1fb01d17602e044f0253f033bcd02e3fc3a2ee --- /dev/null +++ b/docs/source/user/py/references/ExponentialRng.rst @@ -0,0 +1,36 @@ +ExponentialRng +-------------- + +.. py:class:: ExponentialRng + + Exponentially distributed random number generator. + Exponential distribution with mean k is defined by the probability density function p(x; k) = k * exp(-k * x) if x >= 0, else 0. By default this class uses the random minimization method described in Knuth's TAOCP Vol II Sec 3.4.1 (Algorithm S). + + .. py:method:: setMean + + (*destination message field*) Assigns field value. + + + .. py:method:: getMean + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMethod + + (*destination message field*) Assigns field value. + + + .. py:method:: getMethod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: mean + + double (*value field*) Mean of the exponential distribution. + + + .. py:attribute:: method + + int (*value field*) The algorithm to use for computing the sample. Two methods are supported: 0 - logarithmic and 1 - random minimization. The logarithmic method is slower (it computes a logarithm). Default is random minimization. See Knuth, Vol II Sec 3.4.1 : Algorithm S. diff --git a/docs/source/user/py/references/Finfo.rst b/docs/source/user/py/references/Finfo.rst new file mode 100644 index 0000000000000000000000000000000000000000..7e189a436738a62322efae4dd08bf8a6df89d04c --- /dev/null +++ b/docs/source/user/py/references/Finfo.rst @@ -0,0 +1,54 @@ +Finfo +----- + +.. py:class:: Finfo + + + .. py:method:: getFieldName + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDocs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getType + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSrc + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDest + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: fieldName + + string (*value field*) Name of field handled by Finfo + + + .. py:attribute:: docs + + string (*value field*) Documentation for Finfo + + + .. py:attribute:: type + + string (*value field*) RTTI type info for this Finfo + + + .. py:attribute:: src + + vector<string> (*value field*) Subsidiary SrcFinfos. Useful for SharedFinfos + + + .. py:attribute:: dest + + vector<string> (*value field*) Subsidiary DestFinfos. Useful for SharedFinfos diff --git a/docs/source/user/py/references/Func.rst b/docs/source/user/py/references/Func.rst new file mode 100644 index 0000000000000000000000000000000000000000..bef667af783bdd702f9b916818e77e7290eaf508 --- /dev/null +++ b/docs/source/user/py/references/Func.rst @@ -0,0 +1,265 @@ +Func +---- + +.. py:class:: Func + + Func: general purpose function calculator using real numbers. It can + parse mathematical expression defining a function and evaluate it + and/or its derivative for specified variable values. + The variables can be input from other moose objects. In case of + arbitrary variable names, the source message must have the variable + name as the first argument. For most common cases, input messages to + set x, y, z and xy, xyz are made available without such + requirement. This class handles only real numbers + (C-double). Predefined constants are: pi=3.141592..., + e=2.718281... + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: getValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDerivative + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setExpr + + (*destination message field*) Assigns field value. + + + .. py:method:: getExpr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVar + + (*destination message field*) Assigns field value. + + + .. py:method:: getVar + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getVars + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX + + (*destination message field*) Assigns field value. + + + .. py:method:: getX + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY + + (*destination message field*) Assigns field value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: varIn + + (*destination message field*) Handle value for specified variable coming from other objects + + + .. py:method:: xIn + + (*destination message field*) Handle value for variable named x. This is a shorthand. If the + expression does not have any variable named x, this the first variable + in the sequence `vars`. + + + .. py:method:: yIn + + (*destination message field*) Handle value for variable named y. This is a utility for two/three + variable functions where the y value comes from a source separate + from that of x. This is a shorthand. If the + expression does not have any variable named y, this the second + variable in the sequence `vars`. + + + .. py:method:: zIn + + (*destination message field*) Handle value for variable named z. This is a utility for three + variable functions where the z value comes from a source separate + from that of x or y. This is a shorthand. If the expression does not + have any variable named y, this the second variable in the sequence `vars`. + + + .. py:method:: xyIn + + (*destination message field*) Handle value for variables x and y for two-variable function + + + .. py:method:: xyzIn + + (*destination message field*) Handle value for variables x, y and z for three-variable function + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: valueOut + + double (*source message field*) Evaluated value of the function for the current variable values. + + + .. py:attribute:: derivativeOut + + double (*source message field*) Value of derivative of the function for the current variable values + + + .. py:attribute:: value + + double (*value field*) Result of the function evaluation with current variable values. + + + .. py:attribute:: derivative + + double (*value field*) Derivative of the function at given variable values. + + + .. py:attribute:: mode + + unsigned int (*value field*) Mode of operation: + 1: only the function value will be calculated + 2: only the derivative will be calculated + 3: both function value and derivative at current variable values will be calculated. + + + .. py:attribute:: expr + + string (*value field*) Mathematical expression defining the function. The underlying parser + is muParser. In addition to the available functions and operators from + muParser, some more functions are added. + + Functions + Name args explanation + sin 1 sine function + cos 1 cosine function + tan 1 tangens function + asin 1 arcus sine function + acos 1 arcus cosine function + atan 1 arcus tangens function + sinh 1 hyperbolic sine function + cosh 1 hyperbolic cosine + tanh 1 hyperbolic tangens function + asinh 1 hyperbolic arcus sine function + acosh 1 hyperbolic arcus tangens function + atanh 1 hyperbolic arcur tangens function + log2 1 logarithm to the base 2 + log10 1 logarithm to the base 10 + log 1 logarithm to the base 10 + ln 1 logarithm to base e (2.71828...) + exp 1 e raised to the power of x + sqrt 1 square root of a value + sign 1 sign function -1 if x<0; 1 if x>0 + rint 1 round to nearest integer + abs 1 absolute value + min var. min of all arguments + max var. max of all arguments + sum var. sum of all arguments + avg var. mean value of all arguments + rand 1 rand(seed), random float between 0 and 1, + if seed = -1, then a 'random' seed is created. + rand2 3 rand(a, b, seed), random float between a and b, + if seed = -1, a 'random' seed is created using either + by random\_device or by reading system clock + + Operators + Op meaning prioroty + = assignement -1 + && logical and 1 + || logical or 2 + <= less or equal 4 + >= greater or equal 4 + != not equal 4 + == equal 4 + > greater than 4 + < less than 4 + + addition 5 + - subtraction 5 + * multiplication 6 + / division 6 + ^ raise x to the power of y 7 + + ?: if then else operator C++ style syntax + + + + .. py:attribute:: vars + + vector<string> (*value field*) Variable names in the expression + + + .. py:attribute:: x + + double (*value field*) Value for variable named x. This is a shorthand. If the + expression does not have any variable named x, this the first variable + in the sequence `vars`. + + + .. py:attribute:: y + + double (*value field*) Value for variable named y. This is a utility for two/three + variable functions where the y value comes from a source separate + from that of x. This is a shorthand. If the + expression does not have any variable named y, this the second + variable in the sequence `vars`. + + + .. py:attribute:: z + + double (*value field*) Value for variable named z. This is a utility for three + variable functions where the z value comes from a source separate + from that of x or z. This is a shorthand. If the expression does not + have any variable named z, this the third variable in the sequence `vars`. + + + .. py:attribute:: var + + string,double (*lookup field*) Lookup table for variable values. diff --git a/docs/source/user/py/references/Function.rst b/docs/source/user/py/references/Function.rst new file mode 100644 index 0000000000000000000000000000000000000000..46e47282903e5f0e07ac06492e72281b2369d547 --- /dev/null +++ b/docs/source/user/py/references/Function.rst @@ -0,0 +1,256 @@ +Function +-------- + +.. py:class:: Function + + General purpose function calculator using real numbers. + It can parse mathematical expression defining a function and evaluate it and/or its derivative for specified variable values.You can assign expressions of the form:: + f(c0, c1, ..., cM, x0, x1, ..., xN, y0,..., yP ) + where `ci`'s are constants and `xi`'s and `yi`'s are variables.The constants must be defined before setting the expression and variables are connected via messages. The constants can have any name, but the variable names must be of the form x{i} or y{i} where i is increasing integer starting from 0. + The variables can be input from other moose objects. Such variables must be named `x{i}` in the expression and the source field is connected to Function.x[i]'s `input` destination field. + In case the input variable is not available as a source field, but is a value field, then the value can be requested by connecting the `requestOut` message to the `get{Field}` destination on the target object. Such variables must be specified in the expression as y{i} and connecting the messages should happen in the same order as the y indices. + This class handles only real numbers (C-double). Predefined constants are: pi=3.141592..., e=2.718281... + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: getValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getRate + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDerivative + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setExpr + + (*destination message field*) Assigns field value. + + + .. py:method:: getExpr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumVars + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumVars + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumX + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumX + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: setC + + (*destination message field*) Assigns field value. + + + .. py:method:: getC + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setIndependent + + (*destination message field*) Assigns field value. + + + .. py:method:: getIndependent + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: requestOut + + PSt6vectorIdSaIdEE (*source message field*) Sends request for input variable from a field on target object + + + .. py:attribute:: valueOut + + double (*source message field*) Evaluated value of the function for the current variable values. + + + .. py:attribute:: rateOut + + double (*source message field*) Value of time-derivative of the function for the current variable values + + + .. py:attribute:: derivativeOut + + double (*source message field*) Value of derivative of the function for the current variable values + + + .. py:attribute:: value + + double (*value field*) Result of the function evaluation with current variable values. + + + .. py:attribute:: rate + + double (*value field*) Derivative of the function at given variable values. This is computed as the difference of the current and previous value of the function divided by the time step. + + + .. py:attribute:: derivative + + double (*value field*) Derivative of the function at given variable values. This is calulated using 5-point stencil <http://en.wikipedia.org/wiki/Five-point\_stencil> at current value of independent variable. Note that unlike hand-calculated derivatives, numerical derivatives are not exact. + + + .. py:attribute:: mode + + unsigned int (*value field*) Mode of operation: + 1: only the function value will be sent out. + 2: only the derivative with respect to the independent variable will be sent out. + 3: only rate (time derivative) will be sent out. + anything else: all three, value, derivative and rate will be sent out. + + + + .. py:attribute:: expr + + string (*value field*) Mathematical expression defining the function. The underlying parser + is muParser. In addition to the available functions and operators from + muParser, some more functions are added. + + Functions + Name args explanation + sin 1 sine function + cos 1 cosine function + tan 1 tangens function + asin 1 arcus sine function + acos 1 arcus cosine function + atan 1 arcus tangens function + sinh 1 hyperbolic sine function + cosh 1 hyperbolic cosine + tanh 1 hyperbolic tangens function + asinh 1 hyperbolic arcus sine function + acosh 1 hyperbolic arcus tangens function + atanh 1 hyperbolic arcur tangens function + log2 1 logarithm to the base 2 + log10 1 logarithm to the base 10 + log 1 logarithm to the base 10 + ln 1 logarithm to base e (2.71828...) + exp 1 e raised to the power of x + sqrt 1 square root of a value + sign 1 sign function -1 if x<0; 1 if x>0 + rint 1 round to nearest integer + abs 1 absolute value + min var. min of all arguments + max var. max of all arguments + sum var. sum of all arguments + avg var. mean value of all arguments + rand 1 rand(seed), random float between 0 and 1, + if seed = -1, then a 'random' seed is created. + rand2 3 rand(a, b, seed), random float between a and b, + if seed = -1, a 'random' seed is created using either + by random\_device or by reading system clock + + Operators + Op meaning priority + = assignment -1 + && logical and 1 + || logical or 2 + <= less or equal 4 + >= greater or equal 4 + != not equal 4 + == equal 4 + > greater than 4 + < less than 4 + + addition 5 + - subtraction 5 + * multiplication 6 + / division 6 + ^ raise x to the power of y 7 + % floating point modulo 7 + + ?: if then else operator C++ style syntax + + + + .. py:attribute:: numVars + + unsigned int (*value field*) Number of variables used by Function. + + + .. py:attribute:: independent + + string (*value field*) Index of independent variable. Differentiation is done based on this. Defaults to the first assigned variable. + + + .. py:attribute:: c + + string,double (*lookup field*) Constants used in the function. These must be assigned before specifying the function expression. + + +.. py:class:: GammaRng + + Gamma distributed random number generator. + + .. py:method:: setAlpha + + (*destination message field*) Assigns field value. + + + .. py:method:: getAlpha + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTheta + + (*destination message field*) Assigns field value. + + + .. py:method:: getTheta + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: alpha + + double (*value field*) Parameter alpha of the gamma distribution. + + + .. py:attribute:: theta + + double (*value field*) Parameter theta of the Gamma distribution. diff --git a/docs/source/user/py/references/GammaRng.rst b/docs/source/user/py/references/GammaRng.rst new file mode 100644 index 0000000000000000000000000000000000000000..ab9145c9e0dc8746a19bad9290e75e9ec8fd4124 --- /dev/null +++ b/docs/source/user/py/references/GammaRng.rst @@ -0,0 +1,35 @@ +GammaRng +-------- + +.. py:class:: GammaRng + + Gamma distributed random number generator. + + .. py:method:: setAlpha + + (*destination message field*) Assigns field value. + + + .. py:method:: getAlpha + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTheta + + (*destination message field*) Assigns field value. + + + .. py:method:: getTheta + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: alpha + + double (*value field*) Parameter alpha of the gamma distribution. + + + .. py:attribute:: theta + + double (*value field*) Parameter theta of the Gamma distribution. diff --git a/docs/source/user/py/references/GapJunction.rst b/docs/source/user/py/references/GapJunction.rst new file mode 100644 index 0000000000000000000000000000000000000000..960874d70b4970e335746717e4b280468fe0c387 --- /dev/null +++ b/docs/source/user/py/references/GapJunction.rst @@ -0,0 +1,74 @@ +GapJunction +----------- + +.. py:class:: GapJunction + + Implementation of gap junction between two compartments. The shared + fields, 'channel1' and 'channel2' can be connected to the 'channel' + message of the compartments at either end of the gap junction. The + compartments will send their Vm to the gap junction and receive the + conductance 'Gk' of the gap junction and the Vm of the other + compartment. + + .. py:attribute:: channel1 + + void (*shared message field*) This is a shared message to couple the conductance and Vm from + terminal 2 to the compartment at terminal 1. The first entry is source + sending out Gk and Vm2, the second entry is destination for Vm1. + + + .. py:attribute:: channel2 + + void (*shared message field*) This is a shared message to couple the conductance and Vm from + terminal 1 to the compartment at terminal 2. The first entry is source + sending out Gk and Vm1, the second entry is destination for Vm2. + + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects. The Process should be called \_second\_ in each clock tick, after the Init message.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: Vm1 + + (*destination message field*) Handles Vm message from compartment + + + .. py:method:: Vm2 + + (*destination message field*) Handles Vm message from another compartment + + + .. py:method:: setGk + + (*destination message field*) Assigns field value. + + + .. py:method:: getGk + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles 'process' call + + + .. py:method:: reinit + + (*destination message field*) Handles 'reinit' call + + + .. py:attribute:: channel1Out + + double,double (*source message field*) Sends Gk and Vm from one compartment to the other + + + .. py:attribute:: channel2Out + + double,double (*source message field*) Sends Gk and Vm from one compartment to the other + + + .. py:attribute:: Gk + + double (*value field*) Conductance of the gap junction diff --git a/docs/source/user/py/references/GraupnerBrunel2012CaPlasticitySynHandler.rst b/docs/source/user/py/references/GraupnerBrunel2012CaPlasticitySynHandler.rst new file mode 100644 index 0000000000000000000000000000000000000000..7f9f05233b80286fc597df7cbd1e4f787b6ef9d9 --- /dev/null +++ b/docs/source/user/py/references/GraupnerBrunel2012CaPlasticitySynHandler.rst @@ -0,0 +1,275 @@ +GraupnerBrunel2012CaPlasticitySynHandler +---------------------------------------- + +.. py:class:: GraupnerBrunel2012CaPlasticitySynHandler + + The GraupnerBrunel2012CaPlasticitySynHandler handles synapseswith Ca-based plasticity as per Higgins et al. 2014 and Graupner and Brunel 2012.Note 1: Here, Ca ('chemical Ca') is updated only at each pre-spike, pre-spike+delayD and post-spike! So it is inaccurate to use it for say Ca-dependent K channels in the electrical compartment, for which you use are advised to use the CaPool i.e. 'electrical Ca'.Note 2: Ca here is post-synaptic 'chemical Ca' common for all synapses in this SynHandler, so weights of all pre-synapses connected to this SynHandler get updated at each pre-spike, pre-spike+delayD and post-spike! So if all pre-synaptic weights start out the same, they remain the same!! If you want to consider each pre-synapse independently, have independent SynHandlers for each synapse. If these SynHandlers are in the same electrical compartment, you're essentially assuming these are on different spines, with their own 'chemical Ca' which won't match the 'electrical Ca' of the compartment (=dendrite). If you put each SynHandler with a single synapse in its own electrical compartment (=spine), only then can you have an 'electrical Ca' corresponding to the 'chemical Ca'.Three priority queues are used to manage pre, post, and pre+delayD spikes. + + .. py:method:: setNumSynapse + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumSynapse + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: addPostSpike + + (*destination message field*) Handles arriving spike messages from post-synaptic neuron, inserts into postEvent queue. + + + .. py:method:: setCa + + (*destination message field*) Assigns field value. + + + .. py:method:: getCa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaInit + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaInit + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauCa + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauCa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauSyn + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauSyn + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaPre + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaPre + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaPost + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaPost + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDelayD + + (*destination message field*) Assigns field value. + + + .. py:method:: getDelayD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setThetaP + + (*destination message field*) Assigns field value. + + + .. py:method:: getThetaP + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setThetaD + + (*destination message field*) Assigns field value. + + + .. py:method:: getThetaD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGammaP + + (*destination message field*) Assigns field value. + + + .. py:method:: getGammaP + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGammaD + + (*destination message field*) Assigns field value. + + + .. py:method:: getGammaD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWeightMax + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeightMax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWeightMin + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeightMin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWeightScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeightScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNoisy + + (*destination message field*) Assigns field value. + + + .. py:method:: getNoisy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNoiseSD + + (*destination message field*) Assigns field value. + + + .. py:method:: getNoiseSD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setBistable + + (*destination message field*) Assigns field value. + + + .. py:method:: getBistable + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: Ca + + double (*value field*) Ca is a post-synaptic decaying variable as a proxy for Ca concentrationand receives an impulse whenever a pre- or post- spike occurs.Caution: Ca is updated via an event-based rule, so it is only updated and validwhen a pre- or post- spike has occured, or at time delayD after a pre-spike.Do not use it to control a Ca dependent current, etc.See notes in the class Description: all pre-synapses get updated via the same post-synaptic Ca. + + + .. py:attribute:: CaInit + + double (*value field*) CaInit is the initial value for Ca + + + .. py:attribute:: tauCa + + double (*value field*) tauCa is the time constant for decay of Ca + + + .. py:attribute:: tauSyn + + double (*value field*) tauSyn is the time constant for synaptic weight evolution equation + + + .. py:attribute:: CaPre + + double (*value field*) CaPre is added to Ca on every pre-spike + + + .. py:attribute:: CaPost + + double (*value field*) CaPost is added to Ca on every post-spike + + + .. py:attribute:: delayD + + double (*value field*) Time delay D after pre-spike, when Ca is increased by Capre. delayD represents NMDA rise time. + + + .. py:attribute:: thetaP + + double (*value field*) Potentiation threshold for CaUser must ensure thetaP>thetaD, else simulation results will be wrong. + + + .. py:attribute:: thetaD + + double (*value field*) Depression threshold for CaUser must ensure thetaP>thetaD, else simulation results will be wrong. + + + .. py:attribute:: gammaP + + double (*value field*) gammaP is the potentiation factor for synaptic weight increase if Ca>thetaP + + + .. py:attribute:: gammaD + + double (*value field*) gammaD is the depression factor for synaptic weight decrease if Ca>thetaD + + + .. py:attribute:: weightMax + + double (*value field*) An upper bound on the weight + + + .. py:attribute:: weightMin + + double (*value field*) A lower bound on the weight + + + .. py:attribute:: weightScale + + double (*value field*) Scale all pre-synaptic weights by weightScale before adding to activation (default 1.0)In the terminology of the paper Higgins et al 2012, weight is synaptic efficacy,while weightScale*weight is what finally is added to activation variable. + + + .. py:attribute:: noisy + + bool (*value field*) If true, turn noise on as per noiseSD + + + .. py:attribute:: noiseSD + + double (*value field*) Standard deviation of noise added to Ca + + + .. py:attribute:: bistable + + bool (*value field*) If true, the synapse is bistable as in GraupnerBrunel2012 paper.The effect of potential on the weight update is usually ignorable if Ca is above thetaP and thetaD most of the time. diff --git a/docs/source/user/py/references/Group.rst b/docs/source/user/py/references/Group.rst new file mode 100644 index 0000000000000000000000000000000000000000..ee0da36edadbab59a9dcee5e3f0b95cf5b371b7e --- /dev/null +++ b/docs/source/user/py/references/Group.rst @@ -0,0 +1,9 @@ +Group +----- + +.. py:class:: Group + + + .. py:attribute:: group + + void (*source message field*) Handle for grouping Elements diff --git a/docs/source/user/py/references/Gsolve.rst b/docs/source/user/py/references/Gsolve.rst new file mode 100644 index 0000000000000000000000000000000000000000..2d5655f0132965599699c884267f15cb8b00b262 --- /dev/null +++ b/docs/source/user/py/references/Gsolve.rst @@ -0,0 +1,168 @@ +Gsolve +------ + +.. py:class:: Gsolve + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:attribute:: init + + void (*shared message field*) Shared message for initProc and initReinit. This is used when the system has cross-compartment reactions. + + + .. py:attribute:: xCompt + + void (*shared message field*) Shared message for pool exchange for cross-compartment reactions. Exchanges latest values of all pools that participate in such reactions. + + + .. py:method:: setStoich + + (*destination message field*) Assigns field value. + + + .. py:method:: getStoich + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumLocalVoxels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNVec + + (*destination message field*) Assigns field value. + + + .. py:method:: getNVec + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumAllVoxels + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumAllVoxels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumPools + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: voxelVol + + (*destination message field*) Handles updates to all voxels. Comes from parent ChemCompt object. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: initProc + + (*destination message field*) Handles initProc call from Clock + + + .. py:method:: initReinit + + (*destination message field*) Handles initReinit call from Clock + + + .. py:method:: xComptIn + + (*destination message field*) Handles arriving pool 'n' values used in cross-compartment reactions. + + + .. py:method:: setUseRandInit + + (*destination message field*) Assigns field value. + + + .. py:method:: getUseRandInit + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setUseClockedUpdate + + (*destination message field*) Assigns field value. + + + .. py:method:: getUseClockedUpdate + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumFire + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: xComptOut + + Id,vector<double> (*source message field*) Sends 'n' of all molecules participating in cross-compartment reactions between any juxtaposed voxels between current compt and another compartment. This includes molecules local to this compartment, as well as proxy molecules belonging elsewhere. A(t+1) = (Alocal(t+1) + AremoteProxy(t+1)) - Alocal(t) A(t+1) = (Aremote(t+1) + Aproxy(t+1)) - Aproxy(t) Then we update A on the respective solvers with: Alocal(t+1) = Aproxy(t+1) = A(t+1) This is equivalent to sending dA over on each timestep. + + + .. py:attribute:: stoich + + Id (*value field*) Stoichiometry object for handling this reaction system. + + + .. py:attribute:: numLocalVoxels + + unsigned int (*value field*) Number of voxels in the core reac-diff system, on the current solver. + + + .. py:attribute:: numAllVoxels + + unsigned int (*value field*) Number of voxels in the entire reac-diff system, including proxy voxels to represent abutting compartments. + + + .. py:attribute:: numPools + + unsigned int (*value field*) Number of molecular pools in the entire reac-diff system, including variable, function and buffered. + + + .. py:attribute:: useRandInit + + bool (*value field*) Flag: True when using probabilistic (random) rounding. + Default: True. + When initializing the mol# from floating-point Sinit values, we have two options. One is to look at each Sinit, and round to the nearest integer. The other is to look at each Sinit, and probabilistically round up or down depending on the value. For example, if we had a Sinit value of 1.49, this would always be rounded to 1.0 if the flag is false, and would be rounded to 1.0 and 2.0 in the ratio 51:49 if the flag is true. + + + .. py:attribute:: useClockedUpdate + + bool (*value field*) Flag: True to cause all reaction propensities to be updated on every clock tick. + Default: False. + This flag should be set when the reaction system includes a function with a dependency on time or on external events. It has a significant speed penalty so the flag should not be set unless there are such functions. + + + .. py:attribute:: nVec + + unsigned int,vector<double> (*lookup field*) vector of pool counts + + + .. py:attribute:: numFire + + unsigned int,vector<unsigned int> (*lookup field*) Vector of the number of times each reaction has fired.Indexed by the voxel number.Zeroed out at reinit. diff --git a/docs/source/user/py/references/HDF5DataWriter.rst b/docs/source/user/py/references/HDF5DataWriter.rst new file mode 100644 index 0000000000000000000000000000000000000000..c5177da92b722f76160e31e5e6a9b3680a49e283 --- /dev/null +++ b/docs/source/user/py/references/HDF5DataWriter.rst @@ -0,0 +1,43 @@ +HDF5DataWriter +-------------- + +.. py:class:: HDF5DataWriter + + HDF5 file writer for saving field values from multiple objects. + Connect the `requestOut` field of this object to the `get{Fieldname}` of other objects where `fieldname` is the target value field of type double. The HDF5DataWriter collects the current values of the fields in all the targets at each time step in a local buffer. When the buffer size exceeds `flushLimit` (default 4M), it will write the data into the HDF5 file specified in its `filename` field (default moose\_output.h5). You can explicitly force writing by calling the `flush` function. + The dataset location in the output file replicates the MOOSE element tree structure. Thus, if you record the Vm field from `/model[0]/neuron[0]/soma[0], the dataset path will be `/model[0]/neuron[0]/soma[0]/vm` + NOTE: The output file remains open until this object is destroyed, or `close()` is called explicitly. + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive process and reinit + + + .. py:method:: setFlushLimit + + (*destination message field*) Assigns field value. + + + .. py:method:: getFlushLimit + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handle process calls. Gets data from connected fields into a local buffer and dumps them to `filename` if the buffer length exceeds `flushLimit` + + + .. py:method:: reinit + + (*destination message field*) Reinitialize the object. If the current file handle is valid, it tries to close that and open the file specified in current filename field. + + + .. py:attribute:: requestOut + + PSt6vectorIdSaIdEE (*source message field*) Sends request for a field to target object + + + .. py:attribute:: flushLimit + + unsigned int (*value field*) Buffer size limit for flushing the data from memory to file. Default is 4M doubles. diff --git a/docs/source/user/py/references/HDF5WriterBase.rst b/docs/source/user/py/references/HDF5WriterBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..b678863215bcc279d402952455687a6a3d06da42 --- /dev/null +++ b/docs/source/user/py/references/HDF5WriterBase.rst @@ -0,0 +1,190 @@ +HDF5WriterBase +-------------- + +.. py:class:: HDF5WriterBase + + HDF5 file writer base class. This is not to be used directly. Instead, it should be subclassed to provide specific data writing functions. This class provides most basic properties like filename, file opening mode, file open status. + + .. py:method:: setFilename + + (*destination message field*) Assigns field value. + + + .. py:method:: getFilename + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIsOpen + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setChunkSize + + (*destination message field*) Assigns field value. + + + .. py:method:: getChunkSize + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCompressor + + (*destination message field*) Assigns field value. + + + .. py:method:: getCompressor + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCompression + + (*destination message field*) Assigns field value. + + + .. py:method:: getCompression + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setStringAttr + + (*destination message field*) Assigns field value. + + + .. py:method:: getStringAttr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDoubleAttr + + (*destination message field*) Assigns field value. + + + .. py:method:: getDoubleAttr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLongAttr + + (*destination message field*) Assigns field value. + + + .. py:method:: getLongAttr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setStringVecAttr + + (*destination message field*) Assigns field value. + + + .. py:method:: getStringVecAttr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDoubleVecAttr + + (*destination message field*) Assigns field value. + + + .. py:method:: getDoubleVecAttr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLongVecAttr + + (*destination message field*) Assigns field value. + + + .. py:method:: getLongVecAttr + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: flush + + (*destination message field*) Write all buffer contents to file and clear the buffers. + + + .. py:method:: close + + (*destination message field*) Close the underlying file. This is a safety measure so that file is not in an invalid state even if a crash happens at exit. + + + .. py:attribute:: filename + + string (*value field*) Name of the file associated with this HDF5 writer object. + + + .. py:attribute:: isOpen + + bool (*value field*) True if this object has an open file handle. + + + .. py:attribute:: mode + + unsigned int (*value field*) Depending on mode, if file already exists, if mode=1, data will be appended to existing file, if mode=2, file will be truncated, if mode=4, no writing will happen. + + + .. py:attribute:: chunkSize + + unsigned int (*value field*) Chunksize for writing array data. Defaults to 100. + + + .. py:attribute:: compressor + + string (*value field*) Compression type for array data. zlib and szip are supported. Defaults to zlib. + + + .. py:attribute:: compression + + unsigned int (*value field*) Compression level for array data. Defaults to 6. + + + .. py:attribute:: stringAttr + + string,string (*lookup field*) String attributes. The key is attribute name, value is attribute value (string). + + + .. py:attribute:: doubleAttr + + string,double (*lookup field*) Double precision floating point attributes. The key is attribute name, value is attribute value (double). + + + .. py:attribute:: longAttr + + string,long (*lookup field*) Long integer attributes. The key is attribute name, value is attribute value (long). + + + .. py:attribute:: stringVecAttr + + string,vector<string> (*lookup field*) String vector attributes. The key is attribute name, value is attribute value (string). + + + .. py:attribute:: doubleVecAttr + + string,vector<double> (*lookup field*) Double vector attributes. The key is attribute name, value is attribute value (vector of double). + + + .. py:attribute:: longVecAttr + + string,vector<long> (*lookup field*) Long integer vector attributes. The key is attribute name, value is attribute value (vector of long). diff --git a/docs/source/user/py/references/HHChannel.rst b/docs/source/user/py/references/HHChannel.rst new file mode 100644 index 0000000000000000000000000000000000000000..ab3b6379341e0de1e594503cad9fe3e9a2fdaa95 --- /dev/null +++ b/docs/source/user/py/references/HHChannel.rst @@ -0,0 +1,6 @@ +HHChannel +--------- + +.. py:class:: HHChannel + + HHChannel: Hodgkin-Huxley type voltage-gated Ion channel. Something like the old tabchannel from GENESIS, but also presents a similar interface as hhchan from GENESIS. diff --git a/docs/source/user/py/references/HHChannel2D.rst b/docs/source/user/py/references/HHChannel2D.rst new file mode 100644 index 0000000000000000000000000000000000000000..88436ce190b213ad3ac29eaec6c7ce1d35273f07 --- /dev/null +++ b/docs/source/user/py/references/HHChannel2D.rst @@ -0,0 +1,195 @@ +HHChannel2D +----------- + +.. py:class:: HHChannel2D + + HHChannel2D: Hodgkin-Huxley type voltage-gated Ion channel. Something like the old tabchannel from GENESIS, but also presents a similar interface as hhchan from GENESIS. + + .. py:method:: setXindex + + (*destination message field*) Assigns field value. + + + .. py:method:: getXindex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYindex + + (*destination message field*) Assigns field value. + + + .. py:method:: getYindex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZindex + + (*destination message field*) Assigns field value. + + + .. py:method:: getZindex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXpower + + (*destination message field*) Assigns field value. + + + .. py:method:: getXpower + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYpower + + (*destination message field*) Assigns field value. + + + .. py:method:: getYpower + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZpower + + (*destination message field*) Assigns field value. + + + .. py:method:: getZpower + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInstant + + (*destination message field*) Assigns field value. + + + .. py:method:: getInstant + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX + + (*destination message field*) Assigns field value. + + + .. py:method:: getX + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY + + (*destination message field*) Assigns field value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: concen + + (*destination message field*) Incoming message from Concen object to specific conc to useas the first concen variable + + + .. py:method:: concen2 + + (*destination message field*) Incoming message from Concen object to specific conc to useas the second concen variable + + + .. py:method:: setNumGateX + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumGateX + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumGateY + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumGateY + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumGateZ + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumGateZ + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: Xindex + + string (*value field*) String for setting X index. + + + .. py:attribute:: Yindex + + string (*value field*) String for setting Y index. + + + .. py:attribute:: Zindex + + string (*value field*) String for setting Z index. + + + .. py:attribute:: Xpower + + double (*value field*) Power for X gate + + + .. py:attribute:: Ypower + + double (*value field*) Power for Y gate + + + .. py:attribute:: Zpower + + double (*value field*) Power for Z gate + + + .. py:attribute:: instant + + int (*value field*) Bitmapped flag: bit 0 = Xgate, bit 1 = Ygate, bit 2 = ZgateWhen true, specifies that the lookup table value should beused directly as the state of the channel, rather than usedas a rate term for numerical integration for the state + + + .. py:attribute:: X + + double (*value field*) State variable for X gate + + + .. py:attribute:: Y + + double (*value field*) State variable for Y gate + + + .. py:attribute:: Z + + double (*value field*) State variable for Y gate diff --git a/docs/source/user/py/references/HHChannelBase.rst b/docs/source/user/py/references/HHChannelBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..883df6b40e6309b09c81722e278e1f50246bc99a --- /dev/null +++ b/docs/source/user/py/references/HHChannelBase.rst @@ -0,0 +1,165 @@ +HHChannelBase +------------- + +.. py:class:: HHChannelBase + + HHChannelBase: Base class for Hodgkin-Huxley type voltage-gated Ion channels. Something like the old tabchannel from GENESIS, but also presents a similar interface as hhchan from GENESIS. + + .. py:method:: setXpower + + (*destination message field*) Assigns field value. + + + .. py:method:: getXpower + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYpower + + (*destination message field*) Assigns field value. + + + .. py:method:: getYpower + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZpower + + (*destination message field*) Assigns field value. + + + .. py:method:: getZpower + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInstant + + (*destination message field*) Assigns field value. + + + .. py:method:: getInstant + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setX + + (*destination message field*) Assigns field value. + + + .. py:method:: getX + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setY + + (*destination message field*) Assigns field value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZ + + (*destination message field*) Assigns field value. + + + .. py:method:: getZ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setUseConcentration + + (*destination message field*) Assigns field value. + + + .. py:method:: getUseConcentration + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: concen + + (*destination message field*) Incoming message from Concen object to specific conc to usein the Z gate calculations + + + .. py:method:: createGate + + (*destination message field*) Function to create specified gate.Argument: Gate type [X Y Z] + + + .. py:method:: setNumGateX + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumGateX + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumGateY + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumGateY + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumGateZ + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumGateZ + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: Xpower + + double (*value field*) Power for X gate + + + .. py:attribute:: Ypower + + double (*value field*) Power for Y gate + + + .. py:attribute:: Zpower + + double (*value field*) Power for Z gate + + + .. py:attribute:: instant + + int (*value field*) Bitmapped flag: bit 0 = Xgate, bit 1 = Ygate, bit 2 = ZgateWhen true, specifies that the lookup table value should beused directly as the state of the channel, rather than usedas a rate term for numerical integration for the state + + + .. py:attribute:: X + + double (*value field*) State variable for X gate + + + .. py:attribute:: Y + + double (*value field*) State variable for Y gate + + + .. py:attribute:: Z + + double (*value field*) State variable for Y gate + + + .. py:attribute:: useConcentration + + int (*value field*) Flag: when true, use concentration message rather than Vm tocontrol Z gate diff --git a/docs/source/user/py/references/HHGate.rst b/docs/source/user/py/references/HHGate.rst new file mode 100644 index 0000000000000000000000000000000000000000..29f85ade9d7bf8127f32e97974293d9dfca8f553 --- /dev/null +++ b/docs/source/user/py/references/HHGate.rst @@ -0,0 +1,215 @@ +HHGate +------ + +.. py:class:: HHGate + + HHGate: Gate for Hodkgin-Huxley type channels, equivalent to the m and h terms on the Na squid channel and the n term on K. This takes the voltage and state variable from the channel, computes the new value of the state variable and a scaling, depending on gate power, for the conductance. + + .. py:method:: getA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAlpha + + (*destination message field*) Assigns field value. + + + .. py:method:: getAlpha + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setBeta + + (*destination message field*) Assigns field value. + + + .. py:method:: getBeta + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTau + + (*destination message field*) Assigns field value. + + + .. py:method:: getTau + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMInfinity + + (*destination message field*) Assigns field value. + + + .. py:method:: getMInfinity + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMin + + (*destination message field*) Assigns field value. + + + .. py:method:: getMin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMax + + (*destination message field*) Assigns field value. + + + .. py:method:: getMax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDivs + + (*destination message field*) Assigns field value. + + + .. py:method:: getDivs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTableA + + (*destination message field*) Assigns field value. + + + .. py:method:: getTableA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTableB + + (*destination message field*) Assigns field value. + + + .. py:method:: getTableB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setUseInterpolation + + (*destination message field*) Assigns field value. + + + .. py:method:: getUseInterpolation + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAlphaParms + + (*destination message field*) Assigns field value. + + + .. py:method:: getAlphaParms + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setupAlpha + + (*destination message field*) Set up both gates using 13 parameters, as follows:setupAlpha AA AB AC AD AF BA BB BC BD BF xdivs xmin xmaxHere AA-AF are Coefficients A to F of the alpha (forward) termHere BA-BF are Coefficients A to F of the beta (reverse) termHere xdivs is the number of entries in the table,xmin and xmax define the range for lookup.Outside this range the returned value will be the low [high]entry of the table.The equation describing each table is:y(x) = (A + B * x) / (C + exp((x + D) / F))The original HH equations can readily be cast into this form + + + .. py:method:: setupTau + + (*destination message field*) Identical to setupAlpha, except that the forms specified bythe 13 parameters are for the tau and m-infinity curves ratherthan the alpha and beta terms. So the parameters are:setupTau TA TB TC TD TF MA MB MC MD MF xdivs xmin xmaxAs before, the equation describing each curve is:y(x) = (A + B * x) / (C + exp((x + D) / F)) + + + .. py:method:: tweakAlpha + + (*destination message field*) Dummy function for backward compatibility. It used to convertthe tables from alpha, beta values to alpha, alpha+betabecause the internal calculations used these forms. Notneeded now, deprecated. + + + .. py:method:: tweakTau + + (*destination message field*) Dummy function for backward compatibility. It used to convertthe tables from tau, minf values to alpha, alpha+betabecause the internal calculations used these forms. Notneeded now, deprecated. + + + .. py:method:: setupGate + + (*destination message field*) Sets up one gate at a time using the alpha/beta form.Has 9 parameters, as follows:setupGate A B C D F xdivs xmin xmax is\_betaThis sets up the gate using the equation:y(x) = (A + B * x) / (C + exp((x + D) / F))Deprecated. + + + .. py:attribute:: alpha + + vector<double> (*value field*) Parameters for voltage-dependent rates, alpha:Set up alpha term using 5 parameters, as follows:y(x) = (A + B * x) / (C + exp((x + D) / F))The original HH equations can readily be cast into this form + + + .. py:attribute:: beta + + vector<double> (*value field*) Parameters for voltage-dependent rates, beta:Set up beta term using 5 parameters, as follows:y(x) = (A + B * x) / (C + exp((x + D) / F))The original HH equations can readily be cast into this form + + + .. py:attribute:: tau + + vector<double> (*value field*) Parameters for voltage-dependent rates, tau:Set up tau curve using 5 parameters, as follows:y(x) = (A + B * x) / (C + exp((x + D) / F)) + + + .. py:attribute:: mInfinity + + vector<double> (*value field*) Parameters for voltage-dependent rates, mInfinity:Set up mInfinity curve using 5 parameters, as follows:y(x) = (A + B * x) / (C + exp((x + D) / F))The original HH equations can readily be cast into this form + + + .. py:attribute:: min + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: max + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: divs + + unsigned int (*value field*) Divisions for lookup. Zero means to use linear interpolation + + + .. py:attribute:: tableA + + vector<double> (*value field*) Table of A entries + + + .. py:attribute:: tableB + + vector<double> (*value field*) Table of alpha + beta entries + + + .. py:attribute:: useInterpolation + + bool (*value field*) Flag: use linear interpolation if true, else direct lookup + + + .. py:attribute:: alphaParms + + vector<double> (*value field*) Set up both gates using 13 parameters, as follows:setupAlpha AA AB AC AD AF BA BB BC BD BF xdivs xmin xmaxHere AA-AF are Coefficients A to F of the alpha (forward) termHere BA-BF are Coefficients A to F of the beta (reverse) termHere xdivs is the number of entries in the table,xmin and xmax define the range for lookup.Outside this range the returned value will be the low [high]entry of the table.The equation describing each table is:y(x) = (A + B * x) / (C + exp((x + D) / F))The original HH equations can readily be cast into this form + + + .. py:attribute:: A + + double,double (*lookup field*) lookupA: Look up the A gate value from a double. Usually doesso by direct scaling and offset to an integer lookup, usinga fine enough table granularity that there is little error.Alternatively uses linear interpolation.The range of the double is predefined based on knowledge ofvoltage or conc ranges, and the granularity is specified bythe xmin, xmax, and dV fields. + + + .. py:attribute:: B + + double,double (*lookup field*) lookupB: Look up the B gate value from a double.Note that this looks up the raw tables, which are transformedfrom the reference parameters. diff --git a/docs/source/user/py/references/HHGate2D.rst b/docs/source/user/py/references/HHGate2D.rst new file mode 100644 index 0000000000000000000000000000000000000000..148b44c08b555a6d068f2134c1f1804d5f7a6ead --- /dev/null +++ b/docs/source/user/py/references/HHGate2D.rst @@ -0,0 +1,235 @@ +HHGate2D +-------- + +.. py:class:: HHGate2D + + HHGate2D: Gate for Hodkgin-Huxley type channels, equivalent to the m and h terms on the Na squid channel and the n term on K. This takes the voltage and state variable from the channel, computes the new value of the state variable and a scaling, depending on gate power, for the conductance. These two terms are sent right back in a message to the channel. + + .. py:method:: getA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTableA + + (*destination message field*) Assigns field value. + + + .. py:method:: getTableA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTableB + + (*destination message field*) Assigns field value. + + + .. py:method:: getTableB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXminA + + (*destination message field*) Assigns field value. + + + .. py:method:: getXminA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmaxA + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmaxA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXdivsA + + (*destination message field*) Assigns field value. + + + .. py:method:: getXdivsA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYminA + + (*destination message field*) Assigns field value. + + + .. py:method:: getYminA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYmaxA + + (*destination message field*) Assigns field value. + + + .. py:method:: getYmaxA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYdivsA + + (*destination message field*) Assigns field value. + + + .. py:method:: getYdivsA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXminB + + (*destination message field*) Assigns field value. + + + .. py:method:: getXminB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmaxB + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmaxB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXdivsB + + (*destination message field*) Assigns field value. + + + .. py:method:: getXdivsB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYminB + + (*destination message field*) Assigns field value. + + + .. py:method:: getYminB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYmaxB + + (*destination message field*) Assigns field value. + + + .. py:method:: getYmaxB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYdivsB + + (*destination message field*) Assigns field value. + + + .. py:method:: getYdivsB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: tableA + + vector< vector<double> > (*value field*) Table of A entries + + + .. py:attribute:: tableB + + vector< vector<double> > (*value field*) Table of B entries + + + .. py:attribute:: xminA + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: xmaxA + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: xdivsA + + unsigned int (*value field*) Divisions for lookup. Zero means to use linear interpolation + + + .. py:attribute:: yminA + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: ymaxA + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: ydivsA + + unsigned int (*value field*) Divisions for lookup. Zero means to use linear interpolation + + + .. py:attribute:: xminB + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: xmaxB + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: xdivsB + + unsigned int (*value field*) Divisions for lookup. Zero means to use linear interpolation + + + .. py:attribute:: yminB + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: ymaxB + + double (*value field*) Minimum range for lookup + + + .. py:attribute:: ydivsB + + unsigned int (*value field*) Divisions for lookup. Zero means to use linear interpolation + + + .. py:attribute:: A + + vector<double>,double (*lookup field*) lookupA: Look up the A gate value from two doubles, passedin as a vector. Uses linear interpolation in the 2D tableThe range of the lookup doubles is predefined based on knowledge of voltage or conc ranges, and the granularity is specified by the xmin, xmax, and dx field, and their y-axis counterparts. + + + .. py:attribute:: B + + vector<double>,double (*lookup field*) lookupB: Look up B gate value from two doubles in a vector. diff --git a/docs/source/user/py/references/HSolve.rst b/docs/source/user/py/references/HSolve.rst new file mode 100644 index 0000000000000000000000000000000000000000..d0be86cd15248f0cfdaf185221b9030aba073e37 --- /dev/null +++ b/docs/source/user/py/references/HSolve.rst @@ -0,0 +1,170 @@ +HSolve +------ + +.. py:class:: HSolve + + HSolve: Hines solver, for solving branching neuron models. + + .. py:attribute:: proc + + void (*shared message field*) Handles 'reinit' and 'process' calls from a clock. + + + .. py:method:: setSeed + + (*destination message field*) Assigns field value. + + + .. py:method:: getSeed + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTarget + + (*destination message field*) Assigns field value. + + + .. py:method:: getTarget + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDt + + (*destination message field*) Assigns field value. + + + .. py:method:: getDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaAdvance + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaAdvance + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVDiv + + (*destination message field*) Assigns field value. + + + .. py:method:: getVDiv + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVMin + + (*destination message field*) Assigns field value. + + + .. py:method:: getVMin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVMax + + (*destination message field*) Assigns field value. + + + .. py:method:: getVMax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaDiv + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaDiv + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaMin + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaMin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCaMax + + (*destination message field*) Assigns field value. + + + .. py:method:: getCaMax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles 'process' call: Solver advances by one time-step. + + + .. py:method:: reinit + + (*destination message field*) Handles 'reinit' call: Solver reads in model. + + + .. py:attribute:: seed + + Id (*value field*) Use this field to specify path to a 'seed' compartment, that is, any compartment within a neuron. The HSolve object uses this seed as a handle to discover the rest of the neuronal model, which means all the remaining compartments, channels, synapses, etc. + + + .. py:attribute:: target + + string (*value field*) Specifies the path to a compartmental model to be taken over. This can be the path to any container object that has the model under it (found by performing a deep search). Alternatively, this can also be the path to any compartment within the neuron. This compartment will be used as a handle to discover the rest of the model, which means all the remaining compartments, channels, synapses, etc. + + + .. py:attribute:: dt + + double (*value field*) The time-step for this solver. + + + .. py:attribute:: caAdvance + + int (*value field*) This flag determines how current flowing into a calcium pool is computed. A value of 0 means that the membrane potential at the beginning of the time-step is used for the calculation. This is how GENESIS does its computations. A value of 1 means the membrane potential at the middle of the time-step is used. This is the correct way of integration, and is the default way. + + + .. py:attribute:: vDiv + + int (*value field*) Specifies number of divisions for lookup tables of voltage-sensitive channels. + + + .. py:attribute:: vMin + + double (*value field*) Specifies the lower bound for lookup tables of voltage-sensitive channels. Default is to automatically decide based on the tables of the channels that the solver reads in. + + + .. py:attribute:: vMax + + double (*value field*) Specifies the upper bound for lookup tables of voltage-sensitive channels. Default is to automatically decide based on the tables of the channels that the solver reads in. + + + .. py:attribute:: caDiv + + int (*value field*) Specifies number of divisions for lookup tables of calcium-sensitive channels. + + + .. py:attribute:: caMin + + double (*value field*) Specifies the lower bound for lookup tables of calcium-sensitive channels. Default is to automatically decide based on the tables of the channels that the solver reads in. + + + .. py:attribute:: caMax + + double (*value field*) Specifies the upper bound for lookup tables of calcium-sensitive channels. Default is to automatically decide based on the tables of the channels that the solver reads in. diff --git a/docs/source/user/py/references/InputVariable.rst b/docs/source/user/py/references/InputVariable.rst new file mode 100644 index 0000000000000000000000000000000000000000..6f3c2c5ea1c659f377f4f6a54de5e43847e1a30a --- /dev/null +++ b/docs/source/user/py/references/InputVariable.rst @@ -0,0 +1,10 @@ +InputVariable +------------- + +.. py:class:: InputVariable + + Variable for capturing incoming values and updating them in owner object. + + .. py:method:: input + + (*destination message field*) Handles input message, inserts into variable queue on owner. diff --git a/docs/source/user/py/references/IntFire.rst b/docs/source/user/py/references/IntFire.rst new file mode 100644 index 0000000000000000000000000000000000000000..01ac9d8a9a5c26b7bfc9bc4e844ddf53dd781780 --- /dev/null +++ b/docs/source/user/py/references/IntFire.rst @@ -0,0 +1,89 @@ +IntFire +------- + +.. py:class:: IntFire + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTau + + (*destination message field*) Assigns field value. + + + .. py:method:: getTau + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setThresh + + (*destination message field*) Assigns field value. + + + .. py:method:: getThresh + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRefractoryPeriod + + (*destination message field*) Assigns field value. + + + .. py:method:: getRefractoryPeriod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: activation + + (*destination message field*) Handles value of synaptic activation arriving on this IntFire + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: spikeOut + + double (*source message field*) Sends out spike events. The argument is the timestamp of the spike. + + + .. py:attribute:: Vm + + double (*value field*) Membrane potential + + + .. py:attribute:: tau + + double (*value field*) charging time-course + + + .. py:attribute:: thresh + + double (*value field*) firing threshold + + + .. py:attribute:: refractoryPeriod + + double (*value field*) Minimum time between successive spikes diff --git a/docs/source/user/py/references/IntFireBase.rst b/docs/source/user/py/references/IntFireBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..6db3b0c7d4a11d7f4ee233f68e12a6f511dc4430 --- /dev/null +++ b/docs/source/user/py/references/IntFireBase.rst @@ -0,0 +1,80 @@ +IntFireBase +----------- + +.. py:class:: IntFireBase + + Base class for Integrate-and-fire compartment. + + .. py:method:: setThresh + + (*destination message field*) Assigns field value. + + + .. py:method:: getThresh + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVReset + + (*destination message field*) Assigns field value. + + + .. py:method:: getVReset + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRefractoryPeriod + + (*destination message field*) Assigns field value. + + + .. py:method:: getRefractoryPeriod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getHasFired + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getLastEventTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: activation + + (*destination message field*) Handles value of synaptic activation arriving on this object + + + .. py:attribute:: spikeOut + + double (*source message field*) Sends out spike events. The argument is the timestamp of the spike. + + + .. py:attribute:: thresh + + double (*value field*) firing threshold + + + .. py:attribute:: vReset + + double (*value field*) voltage is set to vReset after firing + + + .. py:attribute:: refractoryPeriod + + double (*value field*) Minimum time between successive spikes + + + .. py:attribute:: hasFired + + bool (*value field*) The object has fired within the last timestep + + + .. py:attribute:: lastEventTime + + double (*value field*) Timestamp of last firing. diff --git a/docs/source/user/py/references/Interpol.rst b/docs/source/user/py/references/Interpol.rst new file mode 100644 index 0000000000000000000000000000000000000000..9aa26130d6b3fda8be1fe48f1b25ed79cf80a51d --- /dev/null +++ b/docs/source/user/py/references/Interpol.rst @@ -0,0 +1,70 @@ +Interpol +-------- + +.. py:class:: Interpol + + Interpol: Interpolation class. Handles lookup from a 1-dimensional array of real-numbered values.Returns 'y' value based on given 'x' value. Can either use interpolation or roundoff to the nearest index. + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setXmin + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Interpolates using the input as x value. + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: lookupOut + + double (*source message field*) respond to a request for a value lookup + + + .. py:attribute:: xmin + + double (*value field*) Minimum value of x. x below this will result in y[0] being returned. + + + .. py:attribute:: xmax + + double (*value field*) Maximum value of x. x above this will result in y[last] being returned. + + + .. py:attribute:: y + + double (*value field*) Looked up value. diff --git a/docs/source/user/py/references/Interpol2D.rst b/docs/source/user/py/references/Interpol2D.rst new file mode 100644 index 0000000000000000000000000000000000000000..7aadf4099bde313a6b81028b6d27a89652c62ebe --- /dev/null +++ b/docs/source/user/py/references/Interpol2D.rst @@ -0,0 +1,180 @@ +Interpol2D +---------- + +.. py:class:: Interpol2D + + Interpol2D: Interpolation class. Handles lookup from a 2-dimensional grid of real-numbered values. Returns 'z' value based on given 'x' and 'y' values. Can either use interpolation or roundoff to the nearest index. + + .. py:attribute:: lookupReturn2D + + void (*shared message field*) This is a shared message for doing lookups on the table. Receives 2 doubles: x, y. Sends back a double with the looked-up z value. + + + .. py:method:: lookup + + (*destination message field*) Looks up table value based on indices v1 and v2, and sendsvalue back using the 'lookupOut' message + + + .. py:method:: setXmin + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXdivs + + (*destination message field*) Assigns field value. + + + .. py:method:: getXdivs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDx + + (*destination message field*) Assigns field value. + + + .. py:method:: getDx + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYmin + + (*destination message field*) Assigns field value. + + + .. py:method:: getYmin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getYmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYdivs + + (*destination message field*) Assigns field value. + + + .. py:method:: getYdivs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDy + + (*destination message field*) Assigns field value. + + + .. py:method:: getDy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTable + + (*destination message field*) Assigns field value. + + + .. py:method:: getTable + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getZ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTableVector2D + + (*destination message field*) Assigns field value. + + + .. py:method:: getTableVector2D + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: lookupOut + + double (*source message field*) respond to a request for a value lookup + + + .. py:attribute:: xmin + + double (*value field*) Minimum value for x axis of lookup table + + + .. py:attribute:: xmax + + double (*value field*) Maximum value for x axis of lookup table + + + .. py:attribute:: xdivs + + unsigned int (*value field*) # of divisions on x axis of lookup table + + + .. py:attribute:: dx + + double (*value field*) Increment on x axis of lookup table + + + .. py:attribute:: ymin + + double (*value field*) Minimum value for y axis of lookup table + + + .. py:attribute:: ymax + + double (*value field*) Maximum value for y axis of lookup table + + + .. py:attribute:: ydivs + + unsigned int (*value field*) # of divisions on y axis of lookup table + + + .. py:attribute:: dy + + double (*value field*) Increment on y axis of lookup table + + + .. py:attribute:: tableVector2D + + vector< vector<double> > (*value field*) Get the entire table. + + + .. py:attribute:: table + + vector<unsigned int>,double (*lookup field*) Lookup an entry on the table + + + .. py:attribute:: z + + vector<double>,double (*lookup field*) Interpolated value for specified x and y. This is provided for debugging. Normally other objects will retrieve interpolated values via lookup message. diff --git a/docs/source/user/py/references/IzhIF.rst b/docs/source/user/py/references/IzhIF.rst new file mode 100644 index 0000000000000000000000000000000000000000..5cd783652ba2138dc6ce0ce92f1a292cc79a8369 --- /dev/null +++ b/docs/source/user/py/references/IzhIF.rst @@ -0,0 +1,140 @@ +IzhIF +----- + +.. py:class:: IzhIF + + Izhikevich neuron (integrate and fire).d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm d u / dt = a * ( b * Vm - u ) at each spike, u -> u + d by default, a0 = 0.04e6/V/s, b0 = 5e3/s, c0 = 140 V/s are set to SI units, so use SI consistently, or change a0, b0, c0 also if you wish to use other units. Rm, Em from Compartment are not used here, vReset is same as c in the usual formalism. At rest, u0 = b V0, and V0 = ( -(-b0-b) +/- sqrt((b0-b)^2 - 4*a0*c0)) / (2*a0) equivalently, to obtain resting Em, set b = (a0*Em^2 + b0*Em + c0)/Em + + .. py:method:: setA0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getA0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setB0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getB0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setC0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getC0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setA + + (*destination message field*) Assigns field value. + + + .. py:method:: getA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setB + + (*destination message field*) Assigns field value. + + + .. py:method:: getB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setD + + (*destination message field*) Assigns field value. + + + .. py:method:: getD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setU + + (*destination message field*) Assigns field value. + + + .. py:method:: getU + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setUInit + + (*destination message field*) Assigns field value. + + + .. py:method:: getUInit + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVPeak + + (*destination message field*) Assigns field value. + + + .. py:method:: getVPeak + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: a0 + + double (*value field*) factor for Vm^2 term in evolution equation for Vm: d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm + + + .. py:attribute:: b0 + + double (*value field*) factor for Vm term in evolution equation for Vm: d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm + + + .. py:attribute:: c0 + + double (*value field*) constant term in evolution equation for Vm: d Vm /dt = a0 * Vm^2 + b0 * Vm + c0 - u + I/Cm + + + .. py:attribute:: a + + double (*value field*) a as in d u / dt = a * ( b * Vm - u ) + + + .. py:attribute:: b + + double (*value field*) b as in d u / dt = a * ( b * Vm - u ) + + + .. py:attribute:: d + + double (*value field*) u jumps by d at every spike + + + .. py:attribute:: u + + double (*value field*) u is an adaptation variable + + + .. py:attribute:: uInit + + double (*value field*) Initial value of u. It is reset at reinit() + + + .. py:attribute:: vPeak + + double (*value field*) Vm is reset when Vm > vPeak diff --git a/docs/source/user/py/references/IzhikevichNrn.rst b/docs/source/user/py/references/IzhikevichNrn.rst new file mode 100644 index 0000000000000000000000000000000000000000..c2b7d573a05d4826f9f3163cc04b5a6d60348fda --- /dev/null +++ b/docs/source/user/py/references/IzhikevichNrn.rst @@ -0,0 +1,320 @@ +IzhikevichNrn +------------- + +.. py:class:: IzhikevichNrn + + Izhikevich model of spiking neuron (Izhikevich,EM. 2003. Simple model of spiking neurons. Neural Networks, IEEE Transactions on 14(6). pp 1569-1572). + This class obeys the equations (in physiological units): + dVm/dt = 0.04 * Vm^2 + 5 * Vm + 140 - u + inject + du/dt = a * (b * Vm - u) + if Vm >= Vmax then Vm = c and u = u + d + Vmax = 30 mV in the paper. + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive Process message from scheduler + + + .. py:attribute:: channel + + void (*shared message field*) This is a shared message from a IzhikevichNrn to channels.The first entry is a MsgDest for the info coming from the channel. It expects Gk and Ek from the channel as args. The second entry is a MsgSrc sending Vm + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: setVmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getVmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setC + + (*destination message field*) Assigns field value. + + + .. py:method:: getC + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setD + + (*destination message field*) Assigns field value. + + + .. py:method:: getD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setA + + (*destination message field*) Assigns field value. + + + .. py:method:: getA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setB + + (*destination message field*) Assigns field value. + + + .. py:method:: getB + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getU + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInject + + (*destination message field*) Assigns field value. + + + .. py:method:: getInject + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRmByTau + + (*destination message field*) Assigns field value. + + + .. py:method:: getRmByTau + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAccommodating + + (*destination message field*) Assigns field value. + + + .. py:method:: getAccommodating + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setU0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getU0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInitVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getInitVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInitU + + (*destination message field*) Assigns field value. + + + .. py:method:: getInitU + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAlpha + + (*destination message field*) Assigns field value. + + + .. py:method:: getAlpha + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setBeta + + (*destination message field*) Assigns field value. + + + .. py:method:: getBeta + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGamma + + (*destination message field*) Assigns field value. + + + .. py:method:: getGamma + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: injectMsg + + (*destination message field*) Injection current into the neuron. + + + .. py:method:: cDest + + (*destination message field*) Destination message to modify parameter c at runtime. + + + .. py:method:: dDest + + (*destination message field*) Destination message to modify parameter d at runtime. + + + .. py:method:: bDest + + (*destination message field*) Destination message to modify parameter b at runtime + + + .. py:method:: aDest + + (*destination message field*) Destination message modify parameter a at runtime. + + + .. py:method:: handleChannel + + (*destination message field*) Handles conductance and reversal potential arguments from Channel + + + .. py:attribute:: VmOut + + double (*source message field*) Sends out Vm + + + .. py:attribute:: spikeOut + + double (*source message field*) Sends out spike events + + + .. py:attribute:: VmOut + + double (*source message field*) Sends out Vm + + + .. py:attribute:: Vmax + + double (*value field*) Maximum membrane potential. Membrane potential is reset to c whenever it reaches Vmax. NOTE: Izhikevich model specifies the PEAK voltage, rather than THRSHOLD voltage. The threshold depends on the previous history. + + + .. py:attribute:: c + + double (*value field*) Reset potential. Membrane potential is reset to c whenever it reaches Vmax. + + + .. py:attribute:: d + + double (*value field*) Parameter d in Izhikevich model. Unit is V/s. + + + .. py:attribute:: a + + double (*value field*) Parameter a in Izhikevich model. Unit is s^{-1} + + + .. py:attribute:: b + + double (*value field*) Parameter b in Izhikevich model. Unit is s^{-1} + + + .. py:attribute:: u + + double (*value field*) Parameter u in Izhikevich equation. Unit is V/s + + + .. py:attribute:: Vm + + double (*value field*) Membrane potential, equivalent to v in Izhikevich equation. + + + .. py:attribute:: Im + + double (*value field*) Total current going through the membrane. Unit is A. + + + .. py:attribute:: inject + + double (*value field*) External current injection into the neuron + + + .. py:attribute:: RmByTau + + double (*value field*) Hidden coefficient of input current term (I) in Izhikevich model. Defaults to 1e9 Ohm/s. + + + .. py:attribute:: accommodating + + bool (*value field*) True if this neuron is an accommodating one. The equation for recovery variable u is special in this case. + + + .. py:attribute:: u0 + + double (*value field*) This is used for accommodating neurons where recovery variables u is computed as: u += tau*a*(b*(Vm-u0)) + + + .. py:attribute:: initVm + + double (*value field*) Initial membrane potential. Unit is V. + + + .. py:attribute:: initU + + double (*value field*) Initial value of u. + + + .. py:attribute:: alpha + + double (*value field*) Coefficient of v^2 in Izhikevich equation. Defaults to 0.04 in physiological unit. In SI it should be 40000.0. Unit is V^-1 s^{-1} + + + .. py:attribute:: beta + + double (*value field*) Coefficient of v in Izhikevich model. Defaults to 5 in physiological unit, 5000.0 for SI units. Unit is s^{-1} + + + .. py:attribute:: gamma + + double (*value field*) Constant term in Izhikevich model. Defaults to 140 in both physiological and SI units. unit is V/s. diff --git a/docs/source/user/py/references/Ksolve.rst b/docs/source/user/py/references/Ksolve.rst new file mode 100644 index 0000000000000000000000000000000000000000..1c428b74615bc50a1efbbc6eee0fb095ace28a2f --- /dev/null +++ b/docs/source/user/py/references/Ksolve.rst @@ -0,0 +1,189 @@ +Ksolve +------ + +.. py:class:: Ksolve + + + .. py:attribute:: xCompt + + void (*shared message field*) Shared message for pool exchange for cross-compartment reactions. Exchanges latest values of all pools that participate in such reactions. + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit. These are used for all regular Ksolve calculations including interfacing with the diffusion calculations by a Dsolve. + + + .. py:attribute:: init + + void (*shared message field*) Shared message for initProc and initReinit. This is used when the system has cross-compartment reactions. + + + .. py:method:: setMethod + + (*destination message field*) Assigns field value. + + + .. py:method:: getMethod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setEpsAbs + + (*destination message field*) Assigns field value. + + + .. py:method:: getEpsAbs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setEpsRel + + (*destination message field*) Assigns field value. + + + .. py:method:: getEpsRel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCompartment + + (*destination message field*) Assigns field value. + + + .. py:method:: getCompartment + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumLocalVoxels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNVec + + (*destination message field*) Assigns field value. + + + .. py:method:: getNVec + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumAllVoxels + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumAllVoxels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumPools + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getEstimatedDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStoich + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: voxelVol + + (*destination message field*) Handles updates to all voxels. Comes from parent ChemCompt object. + + + .. py:method:: xComptIn + + (*destination message field*) Handles arriving pool 'n' values used in cross-compartment reactions. + + + .. py:method:: process + + (*destination message field*) Handles process call from Clock + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call from Clock + + + .. py:method:: initProc + + (*destination message field*) Handles initProc call from Clock + + + .. py:method:: initReinit + + (*destination message field*) Handles initReinit call from Clock + + + .. py:attribute:: xComptOut + + Id,vector<double> (*source message field*) Sends 'n' of all molecules participating in cross-compartment reactions between any juxtaposed voxels between current compt and another compartment. This includes molecules local to this compartment, as well as proxy molecules belonging elsewhere. A(t+1) = (Alocal(t+1) + AremoteProxy(t+1)) - Alocal(t) A(t+1) = (Aremote(t+1) + Aproxy(t+1)) - Aproxy(t) Then we update A on the respective solvers with: Alocal(t+1) = Aproxy(t+1) = A(t+1) This is equivalent to sending dA over on each timestep. + + + .. py:attribute:: method + + string (*value field*) Integration method, using GSL. So far only explict. Options are:rk5: The default Runge-Kutta-Fehlberg 5th order adaptive dt methodgsl: alias for the aboverk4: The Runge-Kutta 4th order fixed dt methodrk2: The Runge-Kutta 2,3 embedded fixed dt methodrkck: The Runge-Kutta Cash-Karp (4,5) methodrk8: The Runge-Kutta Prince-Dormand (8,9) method + + + .. py:attribute:: epsAbs + + double (*value field*) Absolute permissible integration error range. + + + .. py:attribute:: epsRel + + double (*value field*) Relative permissible integration error range. + + + .. py:attribute:: compartment + + Id (*value field*) Compartment in which the Ksolve reaction system lives. + + + .. py:attribute:: numLocalVoxels + + unsigned int (*value field*) Number of voxels in the core reac-diff system, on the current solver. + + + .. py:attribute:: numAllVoxels + + unsigned int (*value field*) Number of voxels in the entire reac-diff system, including proxy voxels to represent abutting compartments. + + + .. py:attribute:: numPools + + unsigned int (*value field*) Number of molecular pools in the entire reac-diff system, including variable, function and buffered. + + + .. py:attribute:: estimatedDt + + double (*value field*) Estimated timestep for reac system based on Euler error + + + .. py:attribute:: stoich + + Id (*value field*) Id for stoichiometry object tied to this Ksolve + + + .. py:attribute:: nVec + + unsigned int,vector<double> (*lookup field*) vector of pool counts. Index specifies which voxel. diff --git a/docs/source/user/py/references/LIF.rst b/docs/source/user/py/references/LIF.rst new file mode 100644 index 0000000000000000000000000000000000000000..7735fe1ffa526768ba4fbc5ac97f275ebd7695cc --- /dev/null +++ b/docs/source/user/py/references/LIF.rst @@ -0,0 +1,6 @@ +LIF +--- + +.. py:class:: LIF + + Leaky Integrate-and-Fire neuron diff --git a/docs/source/user/py/references/Leakage.rst b/docs/source/user/py/references/Leakage.rst new file mode 100644 index 0000000000000000000000000000000000000000..eb49fa6a794cfa013404e9a4d019582d83dad918 --- /dev/null +++ b/docs/source/user/py/references/Leakage.rst @@ -0,0 +1,6 @@ +Leakage +------- + +.. py:class:: Leakage + + Leakage: Passive leakage channel. diff --git a/docs/source/user/py/references/MarkovChannel.rst b/docs/source/user/py/references/MarkovChannel.rst new file mode 100644 index 0000000000000000000000000000000000000000..81e4c31d692ef0af5b8900afd3065d9c729e62db --- /dev/null +++ b/docs/source/user/py/references/MarkovChannel.rst @@ -0,0 +1,131 @@ +MarkovChannel +------------- + +.. py:class:: MarkovChannel + + MarkovChannel : Multistate ion channel class.It deals with ion channels which can be found in one of multiple states, some of which are conducting. This implementation assumes the occurence of first order kinetics to calculate the probabilities of the channel being found in all states. Further, the rates of transition between these states can be constant, voltage-dependent or ligand dependent (only one ligand species). The current flow obtained from the channel is calculated in a deterministic method by solving the system of differential equations obtained from the assumptions above. + + .. py:method:: setLigandConc + + (*destination message field*) Assigns field value. + + + .. py:method:: getLigandConc + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumStates + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumStates + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumOpenStates + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumOpenStates + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getState + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInitialState + + (*destination message field*) Assigns field value. + + + .. py:method:: getInitialState + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLabels + + (*destination message field*) Assigns field value. + + + .. py:method:: getLabels + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGbar + + (*destination message field*) Assigns field value. + + + .. py:method:: getGbar + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: handleLigandConc + + (*destination message field*) Deals with incoming messages containing information of ligand concentration + + + .. py:method:: handleState + + (*destination message field*) Deals with incoming message from MarkovSolver object containing state information of the channel. + + + + .. py:attribute:: ligandConc + + double (*value field*) Ligand concentration. + + + .. py:attribute:: Vm + + double (*value field*) Membrane voltage. + + + .. py:attribute:: numStates + + unsigned int (*value field*) The number of states that the channel can occupy. + + + .. py:attribute:: numOpenStates + + unsigned int (*value field*) The number of states which are open/conducting. + + + .. py:attribute:: state + + vector<double> (*value field*) This is a row vector that contains the probabilities of finding the channel in each state. + + + .. py:attribute:: initialState + + vector<double> (*value field*) This is a row vector that contains the probabilities of finding the channel in each state at t = 0. The state of the channel is reset to this value during a call to reinit() + + + .. py:attribute:: labels + + vector<string> (*value field*) Labels for each state. + + + .. py:attribute:: gbar + + vector<double> (*value field*) A row vector containing the conductance associated with each of the open/conducting states. diff --git a/docs/source/user/py/references/MarkovGslSolver.rst b/docs/source/user/py/references/MarkovGslSolver.rst new file mode 100644 index 0000000000000000000000000000000000000000..b4623c77d3cdf570cb58e2f9d0caf385df4d00b7 --- /dev/null +++ b/docs/source/user/py/references/MarkovGslSolver.rst @@ -0,0 +1,105 @@ +MarkovGslSolver +--------------- + +.. py:class:: MarkovGslSolver + + Solver for Markov Channel. + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: getIsInitialized + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMethod + + (*destination message field*) Assigns field value. + + + .. py:method:: getMethod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRelativeAccuracy + + (*destination message field*) Assigns field value. + + + .. py:method:: getRelativeAccuracy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAbsoluteAccuracy + + (*destination message field*) Assigns field value. + + + .. py:method:: getAbsoluteAccuracy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInternalDt + + (*destination message field*) Assigns field value. + + + .. py:method:: getInternalDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: init + + (*destination message field*) Initialize solver parameters. + + + .. py:method:: handleQ + + (*destination message field*) Handles information regarding the instantaneous rate matrix from the MarkovRateTable class. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: stateOut + + vector<double> (*source message field*) Sends updated state to the MarkovChannel class. + + + .. py:attribute:: isInitialized + + bool (*value field*) True if the message has come in to set solver parameters. + + + .. py:attribute:: method + + string (*value field*) Numerical method to use. + + + .. py:attribute:: relativeAccuracy + + double (*value field*) Accuracy criterion + + + .. py:attribute:: absoluteAccuracy + + double (*value field*) Another accuracy criterion + + + .. py:attribute:: internalDt + + double (*value field*) internal timestep to use. diff --git a/docs/source/user/py/references/MarkovRateTable.rst b/docs/source/user/py/references/MarkovRateTable.rst new file mode 100644 index 0000000000000000000000000000000000000000..ec6fd4107332840ef6e46a05ee4a1f4384123a67 --- /dev/null +++ b/docs/source/user/py/references/MarkovRateTable.rst @@ -0,0 +1,110 @@ +MarkovRateTable +--------------- + +.. py:class:: MarkovRateTable + + Rate Table for Markov channel calculations. + + .. py:attribute:: channel + + void (*shared message field*) This message couples the rate table to the compartment. The rate table needs updates on voltage in order to compute the rate table. + + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process message from thescheduler. The first entry is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt andso on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: handleVm + + (*destination message field*) Handles incoming message containing voltage information. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: init + + (*destination message field*) Initialization of the class. Allocates memory for all the tables. + + + .. py:method:: handleLigandConc + + (*destination message field*) Handles incoming message containing ligand concentration. + + + .. py:method:: set1d + + (*destination message field*) Setting up of 1D lookup table for the (i,j)'th rate. + + + .. py:method:: set2d + + (*destination message field*) Setting up of 2D lookup table for the (i,j)'th rate. + + + .. py:method:: setconst + + (*destination message field*) Setting a constant value for the (i,j)'th rate. Internally, this is stored as a 1-D rate with a lookup table containing 1 entry. + + + .. py:method:: setVm + + (*destination message field*) Assigns field value. + + + .. py:method:: getVm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLigandConc + + (*destination message field*) Assigns field value. + + + .. py:method:: getLigandConc + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getQ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSize + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: instratesOut + + vector< vector<double> > (*source message field*) Sends out instantaneous rate information of varying transition ratesat each time step. + + + .. py:attribute:: Vm + + double (*value field*) Membrane voltage. + + + .. py:attribute:: ligandConc + + double (*value field*) Ligand concentration. + + + .. py:attribute:: Q + + vector< vector<double> > (*value field*) Instantaneous rate matrix. + + + .. py:attribute:: size + + unsigned int (*value field*) Dimension of the families of lookup tables. Is always equal to the number of states in the model. diff --git a/docs/source/user/py/references/MarkovSolver.rst b/docs/source/user/py/references/MarkovSolver.rst new file mode 100644 index 0000000000000000000000000000000000000000..68e8c97d8120c5126b80d0158901e967c37464bb --- /dev/null +++ b/docs/source/user/py/references/MarkovSolver.rst @@ -0,0 +1,19 @@ +MarkovSolver +------------ + +.. py:class:: MarkovSolver + + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process message from thescheduler. The first entry is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt andso on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call diff --git a/docs/source/user/py/references/MarkovSolverBase.rst b/docs/source/user/py/references/MarkovSolverBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..e6cc366750011beba8c7b3baeede84bf80371924 --- /dev/null +++ b/docs/source/user/py/references/MarkovSolverBase.rst @@ -0,0 +1,190 @@ +MarkovSolverBase +---------------- + +.. py:class:: MarkovSolverBase + + Solver for Markov Channel. + + .. py:attribute:: channel + + void (*shared message field*) This message couples the MarkovSolverBase to the Compartment. The compartment needs Vm in order to look up the correct matrix exponential for computing the state. + + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process message from thescheduler. The first entry is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt andso on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: handleVm + + (*destination message field*) Handles incoming message containing voltage information. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: ligandConc + + (*destination message field*) Handles incoming message containing ligand concentration. + + + .. py:method:: init + + (*destination message field*) Setups the table of matrix exponentials associated with the solver object. + + + .. py:method:: getQ + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getState + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInitialState + + (*destination message field*) Assigns field value. + + + .. py:method:: getInitialState + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmin + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXdivs + + (*destination message field*) Assigns field value. + + + .. py:method:: getXdivs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getInvdx + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYmin + + (*destination message field*) Assigns field value. + + + .. py:method:: getYmin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getYmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setYdivs + + (*destination message field*) Assigns field value. + + + .. py:method:: getYdivs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getInvdy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: stateOut + + vector<double> (*source message field*) Sends updated state to the MarkovChannel class. + + + .. py:attribute:: Q + + vector< vector<double> > (*value field*) Instantaneous rate matrix. + + + .. py:attribute:: state + + vector<double> (*value field*) Current state of the channel. + + + .. py:attribute:: initialState + + vector<double> (*value field*) Initial state of the channel. + + + .. py:attribute:: xmin + + double (*value field*) Minimum value for x axis of lookup table + + + .. py:attribute:: xmax + + double (*value field*) Maximum value for x axis of lookup table + + + .. py:attribute:: xdivs + + unsigned int (*value field*) # of divisions on x axis of lookup table + + + .. py:attribute:: invdx + + double (*value field*) Reciprocal of increment on x axis of lookup table + + + .. py:attribute:: ymin + + double (*value field*) Minimum value for y axis of lookup table + + + .. py:attribute:: ymax + + double (*value field*) Maximum value for y axis of lookup table + + + .. py:attribute:: ydivs + + unsigned int (*value field*) # of divisions on y axis of lookup table + + + .. py:attribute:: invdy + + double (*value field*) Reciprocal of increment on y axis of lookup table diff --git a/docs/source/user/py/references/Melement.rst b/docs/source/user/py/references/Melement.rst new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/source/user/py/references/MeshEntry.rst b/docs/source/user/py/references/MeshEntry.rst new file mode 100644 index 0000000000000000000000000000000000000000..719f5d23cd1cb66db44f00dcad438653e9940655 --- /dev/null +++ b/docs/source/user/py/references/MeshEntry.rst @@ -0,0 +1,110 @@ +MeshEntry +--------- + +.. py:class:: MeshEntry + + One voxel in a chemical reaction compartment + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:attribute:: mesh + + void (*shared message field*) Shared message for updating mesh volumes and subdivisions,typically controls pool volumes + + + .. py:method:: getVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDimensions + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMeshType + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getCoordinates + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNeighbors + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDiffusionArea + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDiffusionScaling + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: getVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: remeshOut + + double,unsigned int,unsigned int,vector<unsigned int>,vector<double> (*source message field*) Tells the target pool or other entity that the compartment subdivision(meshing) has changed, and that it has to redo its volume and memory allocation accordingly.Arguments are: oldvol, numTotalEntries, startEntry, localIndices, volsThe vols specifies volumes of each local mesh entry. It also specifieshow many meshEntries are present on the local node.The localIndices vector is used for general load balancing only.It has a list of the all meshEntries on current node.If it is empty, we assume block load balancing. In this secondcase the contents of the current node go from startEntry to startEntry + vols.size(). + + + .. py:attribute:: remeshReacsOut + + void (*source message field*) Tells connected enz or reac that the compartment subdivision(meshing) has changed, and that it has to redo its volume-dependent rate terms like numKf\_ accordingly. + + + .. py:attribute:: volume + + double (*value field*) Volume of this MeshEntry + + + .. py:attribute:: dimensions + + unsigned int (*value field*) number of dimensions of this MeshEntry + + + .. py:attribute:: meshType + + unsigned int (*value field*) The MeshType defines the shape of the mesh entry. 0: Not assigned 1: cuboid 2: cylinder 3. cylindrical shell 4: cylindrical shell segment 5: sphere 6: spherical shell 7: spherical shell segment 8: Tetrahedral + + + .. py:attribute:: Coordinates + + vector<double> (*value field*) Coordinates that define current MeshEntry. Depend on MeshType. + + + .. py:attribute:: neighbors + + vector<unsigned int> (*value field*) Indices of other MeshEntries that this one connects to + + + .. py:attribute:: DiffusionArea + + vector<double> (*value field*) Diffusion area for geometry of interface + + + .. py:attribute:: DiffusionScaling + + vector<double> (*value field*) Diffusion scaling for geometry of interface diff --git a/docs/source/user/py/references/MgBlock.rst b/docs/source/user/py/references/MgBlock.rst new file mode 100644 index 0000000000000000000000000000000000000000..3a26d31e049571536eb8ed52774ef6c0942a7fa9 --- /dev/null +++ b/docs/source/user/py/references/MgBlock.rst @@ -0,0 +1,70 @@ +MgBlock +------- + +.. py:class:: MgBlock + + MgBlock: Hodgkin-Huxley type voltage-gated Ion channel. Something like the old tabchannel from GENESIS, but also presents a similar interface as hhchan from GENESIS. + + .. py:method:: origChannel + + (*destination message field*) + + + .. py:method:: setKMg\_A + + (*destination message field*) Assigns field value. + + + .. py:method:: getKMg\_A + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKMg\_B + + (*destination message field*) Assigns field value. + + + .. py:method:: getKMg\_B + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCMg + + (*destination message field*) Assigns field value. + + + .. py:method:: getCMg + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setZk + + (*destination message field*) Assigns field value. + + + .. py:method:: getZk + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: KMg\_A + + double (*value field*) 1/eta + + + .. py:attribute:: KMg\_B + + double (*value field*) 1/gamma + + + .. py:attribute:: CMg + + double (*value field*) [Mg] in mM + + + .. py:attribute:: Zk + + double (*value field*) Charge on ion diff --git a/docs/source/user/py/references/Moose_BuiltIn.rst b/docs/source/user/py/references/Moose_BuiltIn.rst new file mode 100644 index 0000000000000000000000000000000000000000..7977542a1b31e93b0dfddc1ee5f4d9567f2aa44e --- /dev/null +++ b/docs/source/user/py/references/Moose_BuiltIn.rst @@ -0,0 +1,18 @@ +MOOSE builtins +-------------- + +This document describes classes and functions specific to the MOOSE +Python module. This is an API reference. + +* If you are looking for basic tutorials for getting started with + moose, then check :doc:`../quickstart/index_qs`. + +* If you want recipes for particular tasks, check out + :doc:`../cookbook/index_ckbk`. + +* If you want the reference for specific moose classes, then go to + :doc:`moose_classes`. + +.. automodule:: moose + :show-inheritance: + :members: DestField, ElementField, LookupField, ce, connect, copy, delete, doc, element, exists, getCwe, getField, getFieldDict, getFieldNames, isRunning, le, loadModel, melement, move, pwe, quit, rand, reinit, seed, setClock, setCwe, showfield, showmsg, start, stop, useClock, vec, wildcardFind, mooseWriteSBML, mooseReadSBML, mooseWriteKkit, mooseaddChemSolver, moosedeleteChemSolver diff --git a/docs/source/user/py/references/Msg.rst b/docs/source/user/py/references/Msg.rst new file mode 100644 index 0000000000000000000000000000000000000000..c6f5a2bb5ee9f392a5abfb53e3699a7f789db706 --- /dev/null +++ b/docs/source/user/py/references/Msg.rst @@ -0,0 +1,74 @@ +Msg +--- + +.. py:class:: Msg + + + .. py:method:: getE1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getE2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSrcFieldsOnE1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDestFieldsOnE2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSrcFieldsOnE2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDestFieldsOnE1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getAdjacent + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: e1 + + Id (*value field*) Id of source Element. + + + .. py:attribute:: e2 + + Id (*value field*) Id of source Element. + + + .. py:attribute:: srcFieldsOnE1 + + vector<string> (*value field*) Names of SrcFinfos for messages going from e1 to e2. There arematching entries in the destFieldsOnE2 vector + + + .. py:attribute:: destFieldsOnE2 + + vector<string> (*value field*) Names of DestFinfos for messages going from e1 to e2. There arematching entries in the srcFieldsOnE1 vector + + + .. py:attribute:: srcFieldsOnE2 + + vector<string> (*value field*) Names of SrcFinfos for messages going from e2 to e1. There arematching entries in the destFieldsOnE1 vector + + + .. py:attribute:: destFieldsOnE1 + + vector<string> (*value field*) Names of destFinfos for messages going from e2 to e1. There arematching entries in the srcFieldsOnE2 vector + + + .. py:attribute:: adjacent + + ObjId,ObjId (*lookup field*) The element adjacent to the specified element diff --git a/docs/source/user/py/references/Mstring.rst b/docs/source/user/py/references/Mstring.rst new file mode 100644 index 0000000000000000000000000000000000000000..cede1513c0356e914cc6b58f1c35c0c6b792679c --- /dev/null +++ b/docs/source/user/py/references/Mstring.rst @@ -0,0 +1,34 @@ +Mstring +------- + +.. py:class:: Mstring + + + .. py:method:: setThis + + (*destination message field*) Assigns field value. + + + .. py:method:: getThis + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setValue + + (*destination message field*) Assigns field value. + + + .. py:method:: getValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: this + + string (*value field*) Access function for entire Mstring object. + + + .. py:attribute:: value + + string (*value field*) Access function for value field of Mstring object,which happens also to be the entire contents of the object. diff --git a/docs/source/user/py/references/NMDAChan.rst b/docs/source/user/py/references/NMDAChan.rst new file mode 100644 index 0000000000000000000000000000000000000000..8bccd335a83e83c816bf07b26f84a513738471ca --- /dev/null +++ b/docs/source/user/py/references/NMDAChan.rst @@ -0,0 +1,175 @@ +NMDAChan +-------- + +.. py:class:: NMDAChan + + NMDAChan: Ligand-gated ion channel incorporating both the Mg block and a GHK calculation for Calcium component of the current carried by the channel. Assumes a steady reversal potential regardless of Ca gradients. Derived from SynChan. + + .. py:method:: setKMg\_A + + (*destination message field*) Assigns field value. + + + .. py:method:: getKMg\_A + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKMg\_B + + (*destination message field*) Assigns field value. + + + .. py:method:: getKMg\_B + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCMg + + (*destination message field*) Assigns field value. + + + .. py:method:: getCMg + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTemperature + + (*destination message field*) Assigns field value. + + + .. py:method:: getTemperature + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setExtCa + + (*destination message field*) Assigns field value. + + + .. py:method:: getExtCa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setIntCa + + (*destination message field*) Assigns field value. + + + .. py:method:: getIntCa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setIntCaScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getIntCaScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setIntCaOffset + + (*destination message field*) Assigns field value. + + + .. py:method:: getIntCaOffset + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCondFraction + + (*destination message field*) Assigns field value. + + + .. py:method:: getCondFraction + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getICa + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setPermeability + + (*destination message field*) Assigns field value. + + + .. py:method:: getPermeability + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: assignIntCa + + (*destination message field*) Assign the internal concentration of Ca. The final value is computed as: intCa = assignIntCa * intCaScale + intCaOffset + + + .. py:attribute:: ICaOut + + double (*source message field*) Calcium current portion of the total current carried by the NMDAR + + + .. py:attribute:: KMg\_A + + double (*value field*) 1/eta + + + .. py:attribute:: KMg\_B + + double (*value field*) 1/gamma + + + .. py:attribute:: CMg + + double (*value field*) [Mg] in mM + + + .. py:attribute:: temperature + + double (*value field*) Temperature in degrees Kelvin. + + + .. py:attribute:: extCa + + double (*value field*) External concentration of Calcium in millimolar + + + .. py:attribute:: intCa + + double (*value field*) Internal concentration of Calcium in millimolar.This is the final value used by the internal calculations, and may also be updated by the assignIntCa message after offset and scaling. + + + .. py:attribute:: intCaScale + + double (*value field*) Scale factor for internal concentration of Calcium in mM, applied to values coming in through the assignIntCa message. Required because in many models the units of calcium may differ. + + + .. py:attribute:: intCaOffset + + double (*value field*) Offsetfor internal concentration of Calcium in mM, applied \_after\_ the scaling to mM is done. Applied to values coming in through the assignIntCa message. Required because in many models the units of calcium may differ. + + + .. py:attribute:: condFraction + + double (*value field*) Fraction of total channel conductance that is due to the passage of Ca ions. This is related to the ratio of permeabilities of different ions, and is typically in the range of 0.02. This small fraction is largely because the concentrations of Na and K ions are far larger than that of Ca. Thus, even though the channel is more permeable to Ca, the conductivity and hence current due to Ca is smaller. + + + .. py:attribute:: ICa + + double (*value field*) Current carried by Ca ions + + + .. py:attribute:: permeability + + double (*value field*) Permeability. Alias for Gbar. Note that the mapping is not really correct. Permeability is in units of m/s whereas Gbar is 1/ohm. Some nasty scaling is involved in the conversion, some of which itself involves concentration variables. Done internally. diff --git a/docs/source/user/py/references/NSDFWriter.rst b/docs/source/user/py/references/NSDFWriter.rst new file mode 100644 index 0000000000000000000000000000000000000000..b8b12b4fe9cb7e2d5977322a1db09fd8b1197e34 --- /dev/null +++ b/docs/source/user/py/references/NSDFWriter.rst @@ -0,0 +1,30 @@ +NSDFWriter +---------- + +.. py:class:: NSDFWriter + + NSDF file writer for saving data. + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive process and reinit + + + .. py:method:: setNumEventInput + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumEventInput + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handle process calls. Collects data in buffer and if number of steps since last write exceeds flushLimit, writes to file. + + + .. py:method:: reinit + + (*destination message field*) Reinitialize the object. If the current file handle is valid, it tries to close that and open the file specified in current filename field. diff --git a/docs/source/user/py/references/Nernst.rst b/docs/source/user/py/references/Nernst.rst new file mode 100644 index 0000000000000000000000000000000000000000..a88aff9689a7929c916acce17721ac62a3f2c3ac --- /dev/null +++ b/docs/source/user/py/references/Nernst.rst @@ -0,0 +1,105 @@ +Nernst +------ + +.. py:class:: Nernst + + Nernst: Calculates Nernst potential for a given ion based on Cin and Cout, the inside and outside concentrations. Immediately sends out the potential to all targets. + + .. py:method:: getE + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTemperature + + (*destination message field*) Assigns field value. + + + .. py:method:: getTemperature + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setValence + + (*destination message field*) Assigns field value. + + + .. py:method:: getValence + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCin + + (*destination message field*) Assigns field value. + + + .. py:method:: getCin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCout + + (*destination message field*) Assigns field value. + + + .. py:method:: getCout + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: ci + + (*destination message field*) Set internal conc of ion, and immediately send out the updated E + + + .. py:method:: co + + (*destination message field*) Set external conc of ion, and immediately send out the updated E + + + .. py:attribute:: Eout + + double (*source message field*) Computed reversal potential + + + .. py:attribute:: E + + double (*value field*) Computed reversal potential + + + .. py:attribute:: Temperature + + double (*value field*) Temperature of cell + + + .. py:attribute:: valence + + int (*value field*) Valence of ion in Nernst calculation + + + .. py:attribute:: Cin + + double (*value field*) Internal conc of ion + + + .. py:attribute:: Cout + + double (*value field*) External conc of ion + + + .. py:attribute:: scale + + double (*value field*) Voltage scale factor diff --git a/docs/source/user/py/references/NeuroMesh.rst b/docs/source/user/py/references/NeuroMesh.rst new file mode 100644 index 0000000000000000000000000000000000000000..3ccca7d06378b63febdbd00ff68564f83989ee56 --- /dev/null +++ b/docs/source/user/py/references/NeuroMesh.rst @@ -0,0 +1,189 @@ +NeuroMesh +--------- + +.. py:class:: NeuroMesh + + + .. py:method:: setSubTree + + (*destination message field*) Assigns field value. + + + .. py:method:: getSubTree + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSubTreePath + + (*destination message field*) Assigns field value. + + + .. py:method:: getSubTreePath + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSeparateSpines + + (*destination message field*) Assigns field value. + + + .. py:method:: getSeparateSpines + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumSegments + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumDiffCompts + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getParentVoxel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElecComptList + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElecComptMap + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStartVoxelInCompt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getEndVoxelInCompt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSpineVoxelOnDendVoxel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDendVoxelsOnCompartment + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSpineVoxelsOnCompartment + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiffLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiffLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGeometryPolicy + + (*destination message field*) Assigns field value. + + + .. py:method:: getGeometryPolicy + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: spineListOut + + vector<Id>,vector<Id>,vector<unsigned int> (*source message field*) Request SpineMesh to construct self based on list of electrical compartments that this NeuroMesh has determined are spine shaft and spine head respectively. Also passes in the info about where each spine is connected to the NeuroMesh. Arguments: shaft compartment Ids, head compartment Ids,index of matching parent voxels for each spine + + + .. py:attribute:: psdListOut + + vector<double>,vector<Id>,vector<unsigned int> (*source message field*) Tells PsdMesh to build a mesh. Arguments: (Cell Id, Coordinates of each psd, Id of electrical compartment mapped to each voxel, index of matching parent voxels for each spine.) The coordinates each have 8 entries:xyz of centre of psd, xyz of vector perpendicular to psd, psd diameter, diffusion distance from parent compartment to PSD + + + .. py:attribute:: subTree + + vector<ObjId> (*value field*) Set of compartments in which to embed chemical reaction systems. If the compartments happen to be contiguousthen also set up diffusion between them. Can alsohandle cases where the same cell is divided into multiplenon-diffusively-coupled compartments + + + .. py:attribute:: subTreePath + + string (*value field*) Set of compartments to model, defined as a path string. If they happen to be contiguous then also set up diffusion between the compartments. Can alsohandle cases where the same cell is divided into multiplenon-diffusively-coupled compartments + + + .. py:attribute:: separateSpines + + bool (*value field*) Flag: when separateSpines is true, the traversal separates any compartment with the strings 'spine', 'head', 'shaft' or 'neck' in its name,Allows to set up separate mesh for spines, based on the same cell model. Requires for the spineListOut message tobe sent to the target SpineMesh object. + + + .. py:attribute:: numSegments + + unsigned int (*value field*) Number of cylindrical/spherical segments in model + + + .. py:attribute:: numDiffCompts + + unsigned int (*value field*) Number of diffusive compartments in model + + + .. py:attribute:: parentVoxel + + vector<unsigned int> (*value field*) Vector of indices of parents of each voxel. + + + .. py:attribute:: elecComptList + + vector<Id> (*value field*) Vector of Ids of all electrical compartments in this NeuroMesh. Ordering is as per the tree structure built in the NeuroMesh, and may differ from Id order. Ordering matches that used for startVoxelInCompt and endVoxelInCompt + + + .. py:attribute:: elecComptMap + + vector<Id> (*value field*) Vector of Ids of electrical compartments that map to each voxel. This is necessary because the order of the IDs may differ from the ordering of the voxels. Additionally, there are typically many more voxels than there are electrical compartments. So many voxels point to the same elecCompt. + + + .. py:attribute:: startVoxelInCompt + + vector<unsigned int> (*value field*) Index of first voxel that maps to each electrical compartment. Each elecCompt has one or more voxels. The voxels in a compartment are numbered sequentially. + + + .. py:attribute:: endVoxelInCompt + + vector<unsigned int> (*value field*) Index of end voxel that maps to each electrical compartment. In keeping with C and Python convention, this is one more than the last voxel. Each elecCompt has one or more voxels. The voxels in a compartment are numbered sequentially. + + + .. py:attribute:: spineVoxelOnDendVoxel + + vector<int> (*value field*) Voxel index of spine voxel on each dend voxel. Assume that there is never more than one spine per dend voxel. If no spine present, the entry is -1. Note that the same index is used both for spine head and PSDs. + + + .. py:attribute:: diffLength + + double (*value field*) Diffusive length constant to use for subdivisions. The system willattempt to subdivide cell using diffusive compartments ofthe specified diffusion lengths as a maximum.In order to get integral numbersof compartments in each segment, it may subdivide more finely.Uses default of 0.5 microns, that is, half typical lambda.For default, consider a tau of about 1 second for mostreactions, and a diffusion const of about 1e-12 um^2/sec.This gives lambda of 1 micron + + + .. py:attribute:: geometryPolicy + + string (*value field*) Policy for how to interpret electrical model geometry (which is a branching 1-dimensional tree) in terms of 3-D constructslike spheres, cylinders, and cones.There are three options, default, trousers, and cylinder:default mode: - Use frustrums of cones. Distal diameter is always from compt dia. - For linear dendrites (no branching), proximal diameter is diameter of the parent compartment - For branching dendrites and dendrites emerging from soma, proximal diameter is from compt dia. Don't worry about overlap. - Place somatic dendrites on surface of spherical soma, or at ends of cylindrical soma - Place dendritic spines on surface of cylindrical dendrites, not emerging from their middle.trousers mode: - Use frustrums of cones. Distal diameter is always from compt dia. - For linear dendrites (no branching), proximal diameter is diameter of the parent compartment - For branching dendrites, use a trouser function. Avoid overlap. - For soma, use some variant of trousers. Here we must avoid overlap - For spines, use a way to smoothly merge into parent dend. Radius of curvature should be similar to that of the spine neck. - Place somatic dendrites on surface of spherical soma, or at ends of cylindrical soma - Place dendritic spines on surface of cylindrical dendrites, not emerging from their middle.cylinder mode: - Use cylinders. Diameter is just compartment dia. - Place somatic dendrites on surface of spherical soma, or at ends of cylindrical soma - Place dendritic spines on surface of cylindrical dendrites, not emerging from their middle. - Ignore spatial overlap. + + + .. py:attribute:: dendVoxelsOnCompartment + + ObjId,vector<unsigned int> (*lookup field*) Returns vector of all chem voxels on specified electrical compartment of the dendrite. Returns empty vec if none found, or if the compartment isn't on the dendrite. + + + .. py:attribute:: spineVoxelsOnCompartment + + ObjId,vector<unsigned int> (*lookup field*) Returns vector of all chem voxels on specified electrical compartment, which should be a spine head or shaft . Returns empty vec if no chem voxels found, or if the compartment isn't on the dendrite. Note that spine and PSD voxel indices are the same for a given spine head. diff --git a/docs/source/user/py/references/Neuron.rst b/docs/source/user/py/references/Neuron.rst new file mode 100644 index 0000000000000000000000000000000000000000..edf1c08b3445fd4c8783436e771e9f977cdc1c1f --- /dev/null +++ b/docs/source/user/py/references/Neuron.rst @@ -0,0 +1,392 @@ +Neuron +------ + +.. py:class:: Neuron + + Neuron - Manager for neurons. Handles high-level specification of distribution of spines, channels and passive properties. Also manages spine resizing through a Spine FieldElement. + + .. py:method:: setRM + + (*destination message field*) Assigns field value. + + + .. py:method:: getRM + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRA + + (*destination message field*) Assigns field value. + + + .. py:method:: getRA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCM + + (*destination message field*) Assigns field value. + + + .. py:method:: getCM + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setEm + + (*destination message field*) Assigns field value. + + + .. py:method:: getEm + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTheta + + (*destination message field*) Assigns field value. + + + .. py:method:: getTheta + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setPhi + + (*destination message field*) Assigns field value. + + + .. py:method:: getPhi + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSourceFile + + (*destination message field*) Assigns field value. + + + .. py:method:: getSourceFile + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCompartmentLengthInLambdas + + (*destination message field*) Assigns field value. + + + .. py:method:: getCompartmentLengthInLambdas + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumCompartments + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumSpines + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumBranches + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getPathDistanceFromSoma + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getGeometricalDistanceFromSoma + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElectrotonicDistanceFromSoma + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getCompartments + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setChannelDistribution + + (*destination message field*) Assigns field value. + + + .. py:method:: getChannelDistribution + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setPassiveDistribution + + (*destination message field*) Assigns field value. + + + .. py:method:: getPassiveDistribution + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSpineDistribution + + (*destination message field*) Assigns field value. + + + .. py:method:: getSpineDistribution + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getCompartmentsFromExpression + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getValuesFromExpression + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSpinesFromExpression + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSpinesOnCompartment + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getParentCompartmentOfSpine + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: buildSegmentTree + + (*destination message field*) Build the reference segment tree structure using the child compartments of the current Neuron. Fills in all the coords and length constant information into the segments, for later use when we build reduced compartment trees and channel distributions. Should only be called once, since subsequent use on a reduced model will lose the original full cell geometry. + + + .. py:method:: setSpineAndPsdMesh + + (*destination message field*) Assigns the spine and psd mesh to the Neuron. This is used to build up a mapping from Spine entries on the Neuron to chem spines and PSDs, so that volume change operations from the Spine can propagate to the chem systems. + + + .. py:method:: setSpineAndPsdDsolve + + (*destination message field*) Assigns the Dsolves used by spine and PSD to the Neuron. This is used to handle the rescaling of diffusion rates when spines are resized. + + + .. py:method:: setNumSpine + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumSpine + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: RM + + double (*value field*) Membrane resistivity, in ohm.m^2. Default value is 1.0. + + + .. py:attribute:: RA + + double (*value field*) Axial resistivity of cytoplasm, in ohm.m. Default value is 1.0. + + + .. py:attribute:: CM + + double (*value field*) Membrane Capacitance, in F/m^2. Default value is 0.01 + + + .. py:attribute:: Em + + double (*value field*) Resting membrane potential of compartments, in Volts. Default value is -0.065. + + + .. py:attribute:: theta + + double (*value field*) Angle to rotate cell geometry, around long axis of neuron. Think Longitude. Units are radians. Default value is zero, which means no rotation. + + + .. py:attribute:: phi + + double (*value field*) Angle to rotate cell geometry, around elevation of neuron. Think Latitude. Units are radians. Default value is zero, which means no rotation. + + + .. py:attribute:: sourceFile + + string (*value field*) Name of source file from which to load a model. Accepts swc and dotp formats at present. Both these formats require that the appropriate channel definitions should have been loaded into /library. + + + .. py:attribute:: compartmentLengthInLambdas + + double (*value field*) Units: meters (SI). + Electrotonic length to use for the largest compartment in the model. Used to define subdivision of branches into compartments. For example, if we set *compartmentLengthInLambdas* to 0.1, and *lambda* (electrotonic length) is 250 microns, then it sets the compartment length to 25 microns. Thus a dendritic branch of 500 microns is subdivided into 20 commpartments. If the branch is shorter than *compartmentLengthInLambdas*, then it is not subdivided. If *compartmentLengthInLambdas* is set to 0 then the original compartmental structure of the model is preserved. Note that this routine does NOT merge branches, even if *compartmentLengthInLambdas* is bigger than the branch. While all this subdivision is being done, the Neuron class preserves as detailed a geometry as it can, so it can rebuild the more detailed version if needed. Default value of *compartmentLengthInLambdas* is 0. + + + .. py:attribute:: numCompartments + + unsigned int (*value field*) Number of electrical compartments in model. + + + .. py:attribute:: numSpines + + unsigned int (*value field*) Number of dendritic spines in model. + + + .. py:attribute:: numBranches + + unsigned int (*value field*) Number of branches in dendrites. + + + .. py:attribute:: pathDistanceFromSoma + + vector<double> (*value field*) geometrical path distance of each segment from soma, measured by threading along the dendrite. + + + .. py:attribute:: geometricalDistanceFromSoma + + vector<double> (*value field*) geometrical distance of each segment from soma. + + + .. py:attribute:: electrotonicDistanceFromSoma + + vector<double> (*value field*) geometrical distance of each segment from soma, as measured along the dendrite. + + + .. py:attribute:: compartments + + vector<ObjId> (*value field*) Vector of ObjIds of electrical compartments. Order matches order of segments, and also matches the order of the electrotonic and geometricalDistanceFromSoma vectors. + + + .. py:attribute:: channelDistribution + + vector<string> (*value field*) Specification for distribution of channels, CaConcens and any other model components that are defined as prototypes and have to be placed on the electrical compartments. + Arguments: proto path field expr [field expr]... + Each entry is terminated with an empty string. The prototype is any object created in */library*, If a channel matching the prototype name already exists, then all subsequent operations are applied to the extant channel and a new one is not created. The paired arguments are as follows: + The *field* argument specifies the name of the parameter that is to be assigned by the expression. + The *expression* argument is a mathematical expression in the muparser framework, which permits most operations including trig and transcendental ones. Of course it also handles simple numerical values like 1.0, 1e-10 and so on. Available arguments for muParser are: + p, g, L, len, dia, maxP, maxG, maxL + p: path distance from soma, measured along dendrite, in metres. + g: geometrical distance from soma, in metres. + L: electrotonic distance (# of lambdas) from soma, along dend. No units. + len: length of compartment, in metres. + dia: for diameter of compartment, in metres. + maxP: Maximum value of *p* for this neuron. + maxG: Maximum value of *g* for this neuron. + maxL: Maximum value of *L* for this neuron. + The expression for the first field must evaluate to > 0 for the channel to be installed. For example, for channels, if Field == Gbar, and func( r, L, len, dia) < 0, + then the channel is not installed. This feature is typically used with the sign() or Heaviside H() function to limit range: for example: H(1 - L) will only put channels closer than one length constant from the soma, and zero elsewhere. + Available fields are: + Channels: Gbar (install), Ek + CaConcen: shellDia (install), shellFrac (install), tau, min + Unless otherwise noted, all fields are scaled appropriately by the dimensions of their compartment. Thus the channel maximal conductance Gbar is automatically scaled by the area of the compartment, and the user does not need to insert this scaling into the calculations. + All parameters are expressed in SI units. Conductance, for example, is Siemens/sq metre. + + Some example function forms might be for a channel Gbar: + p < 10e-6 ? 400 : 0.0 + equivalently, + H(10e-6 - p) * 400 + equivalently, + ( sign(10e-6 - p) + 1) * 200 + Each of these forms instruct the function to set channel Gbar to 400 S/m^2 only within 10 microns path distance of soma + + L < 1.0 ? 100 * exp( -L ) : 0.0 + ->Set channel Gbar to an exponentially falling function of electrotonic distance from soma, provided L is under 1.0 lambdas. + + + + .. py:attribute:: passiveDistribution + + vector<string> (*value field*) Specification for distribution of passive properties of cell. + Arguments: . path field expr [field expr]... + Note that the arguments list starts with a period. Each entry is terminated with an empty string. The paired arguments are as follows: + The *field* argument specifies the name of the parameter that is to be assigned by the expression. + The *expression* argument is a mathematical expression in the muparser framework, which permits most operations including trig and transcendental ones. Of course it also handles simple numerical values like 1.0, 1e-10 and so on. Available arguments for muParser are: + p, g, L, len, dia, maxP, maxG, maxL + p: path distance from soma, measured along dendrite, in metres. + g: geometrical distance from soma, in metres. + L: electrotonic distance (# of lambdas) from soma, along dend. No units. + len: length of compartment, in metres. + dia: for diameter of compartment, in metres. + maxP: Maximum value of *p* for this neuron. + maxG: Maximum value of *g* for this neuron. + maxL: Maximum value of *L* for this neuron. + Available fields are: + RM, RA, CM, Rm, Ra, Cm, Em, initVm + The first three fields are scaled appropriately by the dimensions of their compartment. Thus the membrane resistivity RM (ohms.m^2) is automatically scaled by the area of the compartment, and the user does not need to insert this scaling into the calculations to compute Rm.Using the Rm field lets the user directly assign the membrane resistance (in ohms), presumably using len and dia. + Similarly, RA (ohms.m) and CM (Farads/m^2) are specific units and the actual values for each compartment are assigned by scaling by length and diameter. Ra (ohms) and Cm (Farads) require explicit evaluation of the expression. All parameters are expressed in SI units. Conductance, for example, is Siemens/sq metre. + Note that time these calculations do NOT currently include spines + + + + .. py:attribute:: spineDistribution + + vector<string> (*value field*) Specification for distribution of spines on dendrite. + Arguments: proto path spacing expr [field expr]... + Each entry is terminated with an empty string. The *prototype* is any spine object created in */library*, + The *path* is the wildcard path of compartments on which to place the spine. + The *spacing* is the spacing of spines, in metres. + The *expression* argument is a mathematical expression in the muparser framework, which permits most operations including trig and transcendental ones. Of course it also handles simple numerical values like 1.0, 1e-10 and so on. The paired arguments are as follows: + The *field* argument specifies the name of the parameter that is to be assigned by the expression. + The *expression* argument is a mathematical expression as above. Available arguments for muParser are:: + + p, g, L, len, dia, maxP, maxG, maxL + + p: path distance from soma, measured along dendrite, in metres. + g: geometrical distance from soma, in metres. + L: electrotonic distance (# of lambdas) from soma, along dend. No units. + len: length of compartment, in metres. + dia: for diameter of compartment, in metres. + maxP: Maximum value of *p* for this neuron. + maxG: Maximum value of *g* for this neuron. + maxL: Maximum value of *L* for this neuron. + The expression for the *spacing* field must evaluate to > 0 for the spine to be installed. For example, if the expresssion is + H(1 - L) + then the systemwill only put spines closer than one length constant from the soma, and zero elsewhere. + Available spine parameters are: + spacing, minSpacing, size, sizeDistrib angle, angleDistrib + + + + .. py:attribute:: compartmentsFromExpression + + string,vector<ObjId> (*lookup field*) Vector of ObjIds of electrical compartments that match the 'path expression' pair in the argument string. + + + .. py:attribute:: valuesFromExpression + + string,vector<double> (*lookup field*) Vector of values computed for each electrical compartment that matches the 'path expression' pair in the argument string.This has 13 times the number of entries as # of compartments.For each compartment the entries are: + val, p, g, L, len, dia, maxP, maxG, maxL, x, y, z, 0 + + + .. py:attribute:: spinesFromExpression + + string,vector<ObjId> (*lookup field*) Vector of ObjIds of compartments comprising spines/heads that match the 'path expression' pair in the argument string. + + + .. py:attribute:: spinesOnCompartment + + ObjId,vector<ObjId> (*lookup field*) Vector of ObjIds of spines shafts/heads sitting on the specified electrical compartment. If each spine has a shaft and a head,and there are 10 spines on the compartment, there will be 20 entries in the returned vector, ordered shaft0, head0, shaft1, head1, ... + + + .. py:attribute:: parentCompartmentOfSpine + + ObjId,ObjId (*lookup field*) Returns parent compartment of specified spine compartment.Both the spine head or its shaft will return the same parent. diff --git a/docs/source/user/py/references/Neutral.rst b/docs/source/user/py/references/Neutral.rst new file mode 100644 index 0000000000000000000000000000000000000000..317485f543c3e9ef03ade428aef9825d8d59445a --- /dev/null +++ b/docs/source/user/py/references/Neutral.rst @@ -0,0 +1,270 @@ +Neutral +------- + +.. py:class:: Neutral + + Neutral: Base class for all MOOSE classes. Providesaccess functions for housekeeping fields and operations, messagetraversal, and so on. + + .. py:method:: parentMsg + + (*destination message field*) Message from Parent Element(s) + + + .. py:method:: setThis + + (*destination message field*) Assigns field value. + + + .. py:method:: getThis + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setName + + (*destination message field*) Assigns field value. + + + .. py:method:: getName + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMe + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getParent + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getChildren + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getPath + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getClassName + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumData + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumData + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumField + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumField + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIdValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIndex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getFieldIndex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTick + + (*destination message field*) Assigns field value. + + + .. py:method:: getTick + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getValueFields + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSourceFields + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDestFields + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMsgOut + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMsgIn + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNeighbors + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMsgDests + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMsgDestFunctions + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIsA + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: childOut + + int (*source message field*) Message to child Elements + + + .. py:attribute:: this + + Neutral (*value field*) Access function for entire object + + + .. py:attribute:: name + + string (*value field*) Name of object + + + .. py:attribute:: me + + ObjId (*value field*) ObjId for current object + + + .. py:attribute:: parent + + ObjId (*value field*) Parent ObjId for current object + + + .. py:attribute:: children + + vector<Id> (*value field*) vector of ObjIds listing all children of current object + + + .. py:attribute:: path + + string (*value field*) text path for object + + + .. py:attribute:: className + + string (*value field*) Class Name of object + + + .. py:attribute:: numData + + unsigned int (*value field*) # of Data entries on Element.Note that on a FieldElement this does NOT refer to field entries,but to the number of DataEntries on the parent of the FieldElement. + + + .. py:attribute:: numField + + unsigned int (*value field*) For a FieldElement: number of entries of self.For a regular Element: One. + + + .. py:attribute:: idValue + + unsigned int (*value field*) Object id of self, converted to an unsigned int. + + + .. py:attribute:: index + + unsigned int (*value field*) For a FieldElement: Object index of parent.For a regular Element: Object index (dataId) of self. + + + .. py:attribute:: fieldIndex + + unsigned int (*value field*) For a FieldElement: field Index of self.For a regular Element: zero. + + + .. py:attribute:: tick + + int (*value field*) Clock tick for this Element for periodic execution in the main simulation event loop. A default is normally assigned, based on object class, but one can override to any value between 0 and 19. Assigning to -1 means that the object is disabled and will not be called during simulation execution The actual timestep (dt) belonging to a clock tick is defined by the Clock object. + + + .. py:attribute:: dt + + double (*value field*) Timestep used for this Element. Zero if not scheduled. + + + .. py:attribute:: valueFields + + vector<string> (*value field*) List of all value fields on Element.These fields are accessed through the assignment operations in the Python interface.These fields may also be accessed as functions through the set<FieldName> and get<FieldName> commands. + + + .. py:attribute:: sourceFields + + vector<string> (*value field*) List of all source fields on Element, that is fields that can act as message sources. + + + .. py:attribute:: destFields + + vector<string> (*value field*) List of all destination fields on Element, that is, fieldsthat are accessed as Element functions. + + + .. py:attribute:: msgOut + + vector<ObjId> (*value field*) Messages going out from this Element + + + .. py:attribute:: msgIn + + vector<ObjId> (*value field*) Messages coming in to this Element + + + .. py:attribute:: neighbors + + string,vector<Id> (*lookup field*) Ids of Elements connected this Element on specified field. + + + .. py:attribute:: msgDests + + string,vector<ObjId> (*lookup field*) ObjIds receiving messages from the specified SrcFinfo + + + .. py:attribute:: msgDestFunctions + + string,vector<string> (*lookup field*) Matching function names for each ObjId receiving a msg from the specified SrcFinfo + + + .. py:attribute:: isA + + string,bool (*lookup field*) Returns true if the current object is derived from the specified the specified class diff --git a/docs/source/user/py/references/NormalRng.rst b/docs/source/user/py/references/NormalRng.rst new file mode 100644 index 0000000000000000000000000000000000000000..5a0a00e353fc97ec172d395c4865a850eccb0956 --- /dev/null +++ b/docs/source/user/py/references/NormalRng.rst @@ -0,0 +1,50 @@ +NormalRng +--------- + +.. py:class:: NormalRng + + Normally distributed random number generator. + + .. py:method:: setMean + + (*destination message field*) Assigns field value. + + + .. py:method:: getMean + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVariance + + (*destination message field*) Assigns field value. + + + .. py:method:: getVariance + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMethod + + (*destination message field*) Assigns field value. + + + .. py:method:: getMethod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: mean + + double (*value field*) Mean of the normal distribution + + + .. py:attribute:: variance + + double (*value field*) Variance of the normal distribution + + + .. py:attribute:: method + + int (*value field*) Algorithm used for computing the sample. The default is 0 = alias method by Ahrens and Dieter. Other options are: 1 = Box-Mueller method and 2 = ziggurat method. diff --git a/docs/source/user/py/references/OneToAllMsg.rst b/docs/source/user/py/references/OneToAllMsg.rst new file mode 100644 index 0000000000000000000000000000000000000000..32156b2cfd0c4b4081551bbb0d7a11d211e9ef7f --- /dev/null +++ b/docs/source/user/py/references/OneToAllMsg.rst @@ -0,0 +1,19 @@ +OneToAllMsg +----------- + +.. py:class:: OneToAllMsg + + + .. py:method:: setI1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getI1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: i1 + + unsigned int (*value field*) DataId of source Element. diff --git a/docs/source/user/py/references/PIDController.rst b/docs/source/user/py/references/PIDController.rst new file mode 100644 index 0000000000000000000000000000000000000000..a03f484ecaaf43f6c17dd59fd8559722a4f9c603 --- /dev/null +++ b/docs/source/user/py/references/PIDController.rst @@ -0,0 +1,176 @@ +PIDController +------------- + +.. py:class:: PIDController + + PID feedback controller.PID stands for Proportional-Integral-Derivative. It is used to feedback control dynamical systems. It tries to create a feedback output such that the sensed (measured) parameter is held at command value. Refer to wikipedia (http://wikipedia.org) for details on PID Controller. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: setGain + + (*destination message field*) Assigns field value. + + + .. py:method:: getGain + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSaturation + + (*destination message field*) Assigns field value. + + + .. py:method:: getSaturation + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCommand + + (*destination message field*) Assigns field value. + + + .. py:method:: getCommand + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSensed + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauI + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauI + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauD + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauD + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getError + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIntegral + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getDerivative + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getE\_previous + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: commandIn + + (*destination message field*) Command (desired value) input. This is known as setpoint (SP) in control theory. + + + .. py:method:: sensedIn + + (*destination message field*) Sensed parameter - this is the one to be tuned. This is known as process variable (PV) in control theory. This comes from the process we are trying to control. + + + .. py:method:: gainDest + + (*destination message field*) Destination message to control the PIDController gain dynamically. + + + .. py:method:: process + + (*destination message field*) Handle process calls. + + + .. py:method:: reinit + + (*destination message field*) Reinitialize the object. + + + .. py:attribute:: output + + double (*source message field*) Sends the output of the PIDController. This is known as manipulated variable (MV) in control theory. This should be fed into the process which we are trying to control. + + + .. py:attribute:: gain + + double (*value field*) This is the proportional gain (Kp). This tuning parameter scales the proportional term. Larger gain usually results in faster response, but too much will lead to instability and oscillation. + + + .. py:attribute:: saturation + + double (*value field*) Bound on the permissible range of output. Defaults to maximum double value. + + + .. py:attribute:: command + + double (*value field*) The command (desired) value of the sensed parameter. In control theory this is commonly known as setpoint(SP). + + + .. py:attribute:: sensed + + double (*value field*) Sensed (measured) value. This is commonly known as process variable(PV) in control theory. + + + .. py:attribute:: tauI + + double (*value field*) The integration time constant, typically = dt. This is actually proportional gain divided by integral gain (Kp/Ki)). Larger Ki (smaller tauI) usually leads to fast elimination of steady state errors at the cost of larger overshoot. + + + .. py:attribute:: tauD + + double (*value field*) The differentiation time constant, typically = dt / 4. This is derivative gain (Kd) times proportional gain (Kp). Larger Kd (tauD) decreases overshoot at the cost of slowing down transient response and may lead to instability. + + + .. py:attribute:: outputValue + + double (*value field*) Output of the PIDController. This is given by: gain * ( error + INTEGRAL[ error dt ] / tau\_i + tau\_d * d(error)/dt ) + Where gain = proportional gain (Kp), tau\_i = integral gain (Kp/Ki) and tau\_d = derivative gain (Kd/Kp). In control theory this is also known as the manipulated variable (MV) + + + .. py:attribute:: error + + double (*value field*) The error term, which is the difference between command and sensed value. + + + .. py:attribute:: integral + + double (*value field*) The integral term. It is calculated as INTEGRAL(error dt) = previous\_integral + dt * (error + e\_previous)/2. + + + .. py:attribute:: derivative + + double (*value field*) The derivative term. This is (error - e\_previous)/dt. + + + .. py:attribute:: e\_previous + + double (*value field*) The error term for previous step. diff --git a/docs/source/user/py/references/PoissonRng.rst b/docs/source/user/py/references/PoissonRng.rst new file mode 100644 index 0000000000000000000000000000000000000000..ae0dc78c75170a671be1843ebd72abdc0f0ecf40 --- /dev/null +++ b/docs/source/user/py/references/PoissonRng.rst @@ -0,0 +1,20 @@ +PoissonRng +---------- + +.. py:class:: PoissonRng + + Poisson distributed random number generator. + + .. py:method:: setMean + + (*destination message field*) Assigns field value. + + + .. py:method:: getMean + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: mean + + double (*value field*) Mean of the Poisson distribution. diff --git a/docs/source/user/py/references/Pool.rst b/docs/source/user/py/references/Pool.rst new file mode 100644 index 0000000000000000000000000000000000000000..9a97b45956747b9ade11dd28df65b8a396548916 --- /dev/null +++ b/docs/source/user/py/references/Pool.rst @@ -0,0 +1,19 @@ +Pool +---- + +.. py:class:: Pool + + + .. py:method:: increment + + (*destination message field*) Increments mol numbers by specified amount. Can be +ve or -ve + + + .. py:method:: decrement + + (*destination message field*) Decrements mol numbers by specified amount. Can be +ve or -ve + + + .. py:method:: nIn + + (*destination message field*) Set the number of molecules by specified amount diff --git a/docs/source/user/py/references/PoolBase.rst b/docs/source/user/py/references/PoolBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..1cf5748fefc442ba65ee7892c6519d322f5b4b0a --- /dev/null +++ b/docs/source/user/py/references/PoolBase.rst @@ -0,0 +1,170 @@ +PoolBase +-------- + +.. py:class:: PoolBase + + Abstract base class for pools. + + .. py:attribute:: reac + + void (*shared message field*) Connects to reaction + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:attribute:: species + + void (*shared message field*) Shared message for connecting to species objects + + + .. py:method:: setN + + (*destination message field*) Assigns field value. + + + .. py:method:: getN + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNInit + + (*destination message field*) Assigns field value. + + + .. py:method:: getNInit + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDiffConst + + (*destination message field*) Assigns field value. + + + .. py:method:: getDiffConst + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMotorConst + + (*destination message field*) Assigns field value. + + + .. py:method:: getMotorConst + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setConc + + (*destination message field*) Assigns field value. + + + .. py:method:: getConc + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setConcInit + + (*destination message field*) Assigns field value. + + + .. py:method:: getConcInit + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setVolume + + (*destination message field*) Assigns field value. + + + .. py:method:: getVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSpeciesId + + (*destination message field*) Assigns field value. + + + .. py:method:: getSpeciesId + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: reacDest + + (*destination message field*) Handles reaction input + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: handleMolWt + + (*destination message field*) Separate finfo to assign molWt, and consequently diffusion const.Should only be used in SharedMsg with species. + + + .. py:attribute:: nOut + + double (*source message field*) Sends out # of molecules in pool on each timestep + + + .. py:attribute:: requestMolWt + + void (*source message field*) Requests Species object for mol wt + + + .. py:attribute:: n + + double (*value field*) Number of molecules in pool + + + .. py:attribute:: nInit + + double (*value field*) Initial value of number of molecules in pool + + + .. py:attribute:: diffConst + + double (*value field*) Diffusion constant of molecule + + + .. py:attribute:: motorConst + + double (*value field*) Motor transport rate molecule. + is away from soma, - is towards soma. Only relevant for ZombiePool subclasses. + + + .. py:attribute:: conc + + double (*value field*) Concentration of molecules in this pool + + + .. py:attribute:: concInit + + double (*value field*) Initial value of molecular concentration in pool + + + .. py:attribute:: volume + + double (*value field*) Volume of compartment. Units are SI. Utility field, the actual volume info is stored on a volume mesh entry in the parent compartment.This mapping is implicit: the parent compartment must be somewhere up the element tree, and must have matching mesh entries. If the compartment isn'tavailable the volume is just taken as 1 + + + .. py:attribute:: speciesId + + unsigned int (*value field*) Species identifier for this mol pool. Eventually link to ontology. diff --git a/docs/source/user/py/references/PostMaster.rst b/docs/source/user/py/references/PostMaster.rst new file mode 100644 index 0000000000000000000000000000000000000000..c6cadf9954d5b6fc72bf3b2f27610e179c3d9497 --- /dev/null +++ b/docs/source/user/py/references/PostMaster.rst @@ -0,0 +1,54 @@ +PostMaster +---------- + +.. py:class:: PostMaster + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: getNumNodes + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMyNode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setBufferSize + + (*destination message field*) Assigns field value. + + + .. py:method:: getBufferSize + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: numNodes + + unsigned int (*value field*) Returns number of nodes that simulation runs on. + + + .. py:attribute:: myNode + + unsigned int (*value field*) Returns index of current node. + + + .. py:attribute:: bufferSize + + unsigned int (*value field*) Size of the send a receive buffers for each node. diff --git a/docs/source/user/py/references/PsdMesh.rst b/docs/source/user/py/references/PsdMesh.rst new file mode 100644 index 0000000000000000000000000000000000000000..817d36a37af8a57fa6cfd881fb2ffb4f01c501a8 --- /dev/null +++ b/docs/source/user/py/references/PsdMesh.rst @@ -0,0 +1,311 @@ +PsdMesh +------- + +.. py:class:: PsdMesh + + + .. py:method:: setThickness + + (*destination message field*) Assigns field value. + + + .. py:method:: getThickness + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNeuronVoxel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElecComptMap + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElecComptList + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStartVoxelInCompt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getEndVoxelInCompt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: psdList + + (*destination message field*) Specifies the geometry of the spine,and the associated parent voxelArguments: disk params vector with 8 entries per psd, vector of Ids of electrical compts mapped to voxels, parent voxel index + + + .. py:attribute:: thickness + + double (*value field*) An assumed thickness for PSD. The volume is computed as thePSD area passed in to each PSD, times this value.defaults to 50 nanometres. For reference, membranes are 5 nm. + + + .. py:attribute:: neuronVoxel + + vector<unsigned int> (*value field*) Vector of indices of voxels on parent NeuroMesh, from which the respective spines emerge. + + + .. py:attribute:: elecComptMap + + vector<Id> (*value field*) Vector of Ids of electrical compartments that map to each voxel. This is necessary because the order of the IDs may differ from the ordering of the voxels. Note that there is always just one voxel per PSD. + + + .. py:attribute:: elecComptList + + vector<Id> (*value field*) Vector of Ids of all electrical compartments in this PsdMesh. Ordering is as per the tree structure built in the NeuroMesh, and may differ from Id order. Ordering matches that used for startVoxelInCompt and endVoxelInCompt + + + .. py:attribute:: startVoxelInCompt + + vector<unsigned int> (*value field*) Index of first voxel that maps to each electrical compartment. This is a trivial function in the PsdMesh, aswe have a single voxel per spine. So just a vector of its own indices. + + + .. py:attribute:: endVoxelInCompt + + vector<unsigned int> (*value field*) Index of end voxel that maps to each electrical compartment. Since there is just one voxel per electrical compartment in the spine, this is just a vector of index+1 + + +.. py:class:: PulseGen + + PulseGen: general purpose pulse generator. This can generate any number of pulses with specified level and duration. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setBaseLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getBaseLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFirstLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getFirstLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFirstWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getFirstWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFirstDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getFirstDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSecondLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getSecondLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSecondWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getSecondWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSecondDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getSecondDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCount + + (*destination message field*) Assigns field value. + + + .. py:method:: getCount + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTrigMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getTrigMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Handle incoming input that determines gating/triggering onset. Note that although this is a double field, the underlying field is integer. So fractional part of input will be truncated + + + .. py:method:: levelIn + + (*destination message field*) Handle level value coming from other objects + + + .. py:method:: widthIn + + (*destination message field*) Handle width value coming from other objects + + + .. py:method:: delayIn + + (*destination message field*) Handle delay value coming from other objects + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: output + + double (*source message field*) Current output level. + + + .. py:attribute:: outputValue + + double (*value field*) Output amplitude + + + .. py:attribute:: baseLevel + + double (*value field*) Basal level of the stimulus + + + .. py:attribute:: firstLevel + + double (*value field*) Amplitude of the first pulse in a sequence + + + .. py:attribute:: firstWidth + + double (*value field*) Width of the first pulse in a sequence + + + .. py:attribute:: firstDelay + + double (*value field*) Delay to start of the first pulse in a sequence + + + .. py:attribute:: secondLevel + + double (*value field*) Amplitude of the second pulse in a sequence + + + .. py:attribute:: secondWidth + + double (*value field*) Width of the second pulse in a sequence + + + .. py:attribute:: secondDelay + + double (*value field*) Delay to start of of the second pulse in a sequence + + + .. py:attribute:: count + + unsigned int (*value field*) Number of pulses in a sequence + + + .. py:attribute:: trigMode + + unsigned int (*value field*) Trigger mode for pulses in the sequence. + 0 : free-running mode where it keeps looping its output + 1 : external trigger, where it is triggered by an external input (and stops after creating the first train of pulses) + 2 : external gate mode, where it keeps generating the pulses in a loop as long as the input is high. + + + .. py:attribute:: level + + unsigned int,double (*lookup field*) Level of the pulse at specified index + + + .. py:attribute:: width + + unsigned int,double (*lookup field*) Width of the pulse at specified index + + + .. py:attribute:: delay + + unsigned int,double (*lookup field*) Delay of the pulse at specified index diff --git a/docs/source/user/py/references/PulseGen.rst b/docs/source/user/py/references/PulseGen.rst new file mode 100644 index 0000000000000000000000000000000000000000..4cfd6e2dd51c58f0340e1f3563cc3212c39103c3 --- /dev/null +++ b/docs/source/user/py/references/PulseGen.rst @@ -0,0 +1,238 @@ +PulseGen +-------- + +.. py:class:: PulseGen + + PulseGen: general purpose pulse generator. This can generate any number of pulses with specified level and duration. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setBaseLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getBaseLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFirstLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getFirstLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFirstWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getFirstWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFirstDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getFirstDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSecondLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getSecondLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSecondWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getSecondWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSecondDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getSecondDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCount + + (*destination message field*) Assigns field value. + + + .. py:method:: getCount + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTrigMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getTrigMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLevel + + (*destination message field*) Assigns field value. + + + .. py:method:: getLevel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Handle incoming input that determines gating/triggering onset. Note that although this is a double field, the underlying field is integer. So fractional part of input will be truncated + + + .. py:method:: levelIn + + (*destination message field*) Handle level value coming from other objects + + + .. py:method:: widthIn + + (*destination message field*) Handle width value coming from other objects + + + .. py:method:: delayIn + + (*destination message field*) Handle delay value coming from other objects + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: output + + double (*source message field*) Current output level. + + + .. py:attribute:: outputValue + + double (*value field*) Output amplitude + + + .. py:attribute:: baseLevel + + double (*value field*) Basal level of the stimulus + + + .. py:attribute:: firstLevel + + double (*value field*) Amplitude of the first pulse in a sequence + + + .. py:attribute:: firstWidth + + double (*value field*) Width of the first pulse in a sequence + + + .. py:attribute:: firstDelay + + double (*value field*) Delay to start of the first pulse in a sequence + + + .. py:attribute:: secondLevel + + double (*value field*) Amplitude of the second pulse in a sequence + + + .. py:attribute:: secondWidth + + double (*value field*) Width of the second pulse in a sequence + + + .. py:attribute:: secondDelay + + double (*value field*) Delay to start of of the second pulse in a sequence + + + .. py:attribute:: count + + unsigned int (*value field*) Number of pulses in a sequence + + + .. py:attribute:: trigMode + + unsigned int (*value field*) Trigger mode for pulses in the sequence. + 0 : free-running mode where it keeps looping its output + 1 : external trigger, where it is triggered by an external input (and stops after creating the first train of pulses) + 2 : external gate mode, where it keeps generating the pulses in a loop as long as the input is high. + + + .. py:attribute:: level + + unsigned int,double (*lookup field*) Level of the pulse at specified index + + + .. py:attribute:: width + + unsigned int,double (*lookup field*) Width of the pulse at specified index + + + .. py:attribute:: delay + + unsigned int,double (*lookup field*) Delay of the pulse at specified index diff --git a/docs/source/user/py/references/PyRun.rst b/docs/source/user/py/references/PyRun.rst new file mode 100644 index 0000000000000000000000000000000000000000..b87e02f440079a01b7728c6ecf3390f1fc1c7cb4 --- /dev/null +++ b/docs/source/user/py/references/PyRun.rst @@ -0,0 +1,110 @@ +PyRun +----- + +.. py:class:: PyRun + + Runs Python statements from inside MOOSE. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: setRunString + + (*destination message field*) Assigns field value. + + + .. py:method:: getRunString + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInitString + + (*destination message field*) Assigns field value. + + + .. py:method:: getInitString + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setInputVar + + (*destination message field*) Assigns field value. + + + .. py:method:: getInputVar + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOutputVar + + (*destination message field*) Assigns field value. + + + .. py:method:: getOutputVar + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: trigger + + (*destination message field*) Executes the current runString whenever a message arrives. It stores the incoming value in local variable named `input\_`, which can be used in the `runString` (the underscore is added to avoid conflict with Python's builtin function `input`). If debug is True, it prints the input value. + + + .. py:method:: run + + (*destination message field*) Runs a specified string. Does not modify existing run or init strings. + + + .. py:method:: process + + (*destination message field*) Handles process call. Runs the current runString. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. Runs the current initString. + + + .. py:attribute:: output + + double (*source message field*) Sends out the value of local variable called `output`. Thus, you can have Python statements which compute some value and assign it to the variable called `output` (which is defined at `reinit` call). This will be sent out to any target connected to the `output` field. + + + .. py:attribute:: runString + + string (*value field*) String to be executed at each time step. + + + .. py:attribute:: initString + + string (*value field*) String to be executed at initialization (reinit). + + + .. py:attribute:: mode + + int (*value field*) Flag to indicate whether runString should be executed for both trigger and process, or one of them + + + .. py:attribute:: inputVar + + string (*value field*) Name of local variable in which input balue is to be stored. Default is `input\_` (to avoid conflict with Python's builtin function `input`). + + + .. py:attribute:: outputVar + + string (*value field*) Name of local variable for storing output. Default is `output` diff --git a/docs/source/user/py/references/QIF.rst b/docs/source/user/py/references/QIF.rst new file mode 100644 index 0000000000000000000000000000000000000000..8f8984e4937fa4d0e0ee111d8295eea83bbc8104 --- /dev/null +++ b/docs/source/user/py/references/QIF.rst @@ -0,0 +1,35 @@ +QIF +--- + +.. py:class:: QIF + + Leaky Integrate-and-Fire neuron with Quadratic term in Vm.Based on Spiking Neuron Models book by Gerstner and Kistler.Rm*Cm * dVm/dt = a0*(Vm-Em)*(Vm-vCritical) + Rm*I + + .. py:method:: setVCritical + + (*destination message field*) Assigns field value. + + + .. py:method:: getVCritical + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setA0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getA0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: vCritical + + double (*value field*) Critical voltage for spike initiation + + + .. py:attribute:: a0 + + double (*value field*) Parameter in Rm*Cm dVm/dt = a0*(Vm-Em)*(Vm-vCritical) + Rm*I, a0>0 diff --git a/docs/source/user/py/references/RandGenerator.rst b/docs/source/user/py/references/RandGenerator.rst new file mode 100644 index 0000000000000000000000000000000000000000..6c67c84f84e0d5adedf4d485743a0a3fb5326118 --- /dev/null +++ b/docs/source/user/py/references/RandGenerator.rst @@ -0,0 +1,55 @@ +RandGenerator +------------- + +.. py:class:: RandGenerator + + Base class for random number generators for sampling various probability distributions. This class should not be used directly. Instead, its subclasses named after specific distributions should be used. + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: getSample + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMean + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getVariance + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: output + + double (*source message field*) Generated random number. + + + .. py:attribute:: sample + + double (*value field*) Generated pseudorandom number. + + + .. py:attribute:: mean + + double (*value field*) Mean of the distribution. + + + .. py:attribute:: variance + + double (*value field*) Variance of the distribution. diff --git a/docs/source/user/py/references/RandSpike.rst b/docs/source/user/py/references/RandSpike.rst new file mode 100644 index 0000000000000000000000000000000000000000..608f555de3ad8bf524d1f263964e86df231dc7a0 --- /dev/null +++ b/docs/source/user/py/references/RandSpike.rst @@ -0,0 +1,80 @@ +RandSpike +--------- + +.. py:class:: RandSpike + + RandSpike object, generates random spikes at.specified mean rate. Based closely on GENESIS randspike. + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive Process message from scheduler + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: setRate + + (*destination message field*) Assigns field value. + + + .. py:method:: getRate + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRefractT + + (*destination message field*) Assigns field value. + + + .. py:method:: getRefractT + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAbs\_refract + + (*destination message field*) Assigns field value. + + + .. py:method:: getAbs\_refract + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getHasFired + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: spikeOut + + double (*source message field*) Sends out a trigger for an event. + + + .. py:attribute:: rate + + double (*value field*) Specifies rate for random spike train. Note that this isprobabilistic, so the instantaneous rate may differ. If the rate is assigned be message and it varies slowly then the average firing rate will approach the specified rate + + + .. py:attribute:: refractT + + double (*value field*) Refractory Time. + + + .. py:attribute:: abs\_refract + + double (*value field*) Absolute refractory time. Synonym for refractT. + + + .. py:attribute:: hasFired + + bool (*value field*) True if RandSpike has just fired diff --git a/docs/source/user/py/references/ReacBase.rst b/docs/source/user/py/references/ReacBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..a530d7710e0678e0505a5dbcac505f5b60984f89 --- /dev/null +++ b/docs/source/user/py/references/ReacBase.rst @@ -0,0 +1,130 @@ +ReacBase +-------- + +.. py:class:: ReacBase + + Base class for reactions. Provides the MOOSE APIfunctions, but ruthlessly refers almost all of them to derivedclasses, which have to provide the man page output. + + .. py:attribute:: sub + + void (*shared message field*) Connects to substrate pool + + + .. py:attribute:: prd + + void (*shared message field*) Connects to substrate pool + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setNumKf + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumKf + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNumKb + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumKb + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKf + + (*destination message field*) Assigns field value. + + + .. py:method:: getKf + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKb + + (*destination message field*) Assigns field value. + + + .. py:method:: getKb + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumSubstrates + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumProducts + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: subDest + + (*destination message field*) Handles # of molecules of substrate + + + .. py:method:: prdDest + + (*destination message field*) Handles # of molecules of product + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: subOut + + double,double (*source message field*) Sends out increment of molecules on product each timestep + + + .. py:attribute:: prdOut + + double,double (*source message field*) Sends out increment of molecules on product each timestep + + + .. py:attribute:: numKf + + double (*value field*) Forward rate constant, in # units + + + .. py:attribute:: numKb + + double (*value field*) Reverse rate constant, in # units + + + .. py:attribute:: Kf + + double (*value field*) Forward rate constant, in concentration units + + + .. py:attribute:: Kb + + double (*value field*) Reverse rate constant, in concentration units + + + .. py:attribute:: numSubstrates + + unsigned int (*value field*) Number of substrates of reaction + + + .. py:attribute:: numProducts + + unsigned int (*value field*) Number of products of reaction diff --git a/docs/source/user/py/references/STDPSynHandler.rst b/docs/source/user/py/references/STDPSynHandler.rst new file mode 100644 index 0000000000000000000000000000000000000000..b7a2f86acd3cad4deb2145fda234c66e469b7ce9 --- /dev/null +++ b/docs/source/user/py/references/STDPSynHandler.rst @@ -0,0 +1,125 @@ +STDPSynHandler +-------------- + +.. py:class:: STDPSynHandler + + The STDPSynHandler handles synapses with spike timing dependent plasticity (STDP). It uses two priority queues to manage pre and post spikes. + + .. py:method:: setNumSynapse + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumSynapse + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: addPostSpike + + (*destination message field*) Handles arriving spike messages from post-synaptic neuron, inserts into postEvent queue. + + + .. py:method:: setAMinus0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getAMinus0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAMinus + + (*destination message field*) Assigns field value. + + + .. py:method:: getAMinus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauMinus + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauMinus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAPlus0 + + (*destination message field*) Assigns field value. + + + .. py:method:: getAPlus0 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTauPlus + + (*destination message field*) Assigns field value. + + + .. py:method:: getTauPlus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWeightMax + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeightMax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWeightMin + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeightMin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: aMinus0 + + double (*value field*) aMinus0 is added to aMinus on every pre-spike + + + .. py:attribute:: aMinus + + double (*value field*) aMinus is a post-synaptic variable that keeps a decaying 'history' of previous post-spike(s)and is used to update the synaptic weight when a pre-synaptic spike appears.It determines the t\_pre > t\_post (pre after post) part of the STDP window. + + + .. py:attribute:: tauMinus + + double (*value field*) aMinus decays with tauMinus time constant + + + .. py:attribute:: aPlus0 + + double (*value field*) aPlus0 is added to aPlus on every pre-spike + + + .. py:attribute:: tauPlus + + double (*value field*) aPlus decays with tauPlus time constant + + + .. py:attribute:: weightMax + + double (*value field*) an upper bound on the weight + + + .. py:attribute:: weightMin + + double (*value field*) a lower bound on the weight diff --git a/docs/source/user/py/references/STDPSynapse.rst b/docs/source/user/py/references/STDPSynapse.rst new file mode 100644 index 0000000000000000000000000000000000000000..ad695e05f9ab4a9b9e2bba366f31db72b7bb3774 --- /dev/null +++ b/docs/source/user/py/references/STDPSynapse.rst @@ -0,0 +1,20 @@ +STDPSynapse +----------- + +.. py:class:: STDPSynapse + + Subclass of Synapse including variables for Spike Timing Dependent Plasticity (STDP). + + .. py:method:: setAPlus + + (*destination message field*) Assigns field value. + + + .. py:method:: getAPlus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: aPlus + + double (*value field*) aPlus is a pre-synaptic variable that keeps a decaying 'history' of previous pre-spike(s)and is used to update the synaptic weight when a post-synaptic spike appears.It determines the t\_pre < t\_post (pre before post) part of the STDP window. diff --git a/docs/source/user/py/references/SeqSynHandler.rst b/docs/source/user/py/references/SeqSynHandler.rst new file mode 100644 index 0000000000000000000000000000000000000000..fe5debc567455a1db7e98bb2ddd37039346d8fe2 --- /dev/null +++ b/docs/source/user/py/references/SeqSynHandler.rst @@ -0,0 +1,150 @@ +SeqSynHandler +------------- + +.. py:class:: SeqSynHandler + + The SeqSynHandler handles synapses that recognize sequentially ordered input, where the ordering is both in space and time. It assumes that the N input synapses are ordered and equally spaced along a single linear vector. + To do this it maintains a record of recent synaptic input, for a duration of *historyTime*, at a time interval *seqDt*. *SeqDt* is typically longer than the simulation timestep *dt* for the synapse, and cannot be shorter. *SeqDt* should represent the characteristic time of advance of the sequence. + The SeqSynHandler uses a 2-D kernel to define how to recognize a sequence, with dependence both on space and history. This kernel is defined by the *kernelEquation* as a mathematical expression in x (synapse number) and t (time).It computes a vector with the local *response* term for each point along all inputs, by taking a 2-d convolution of the kernel with the history[time][synapse#] matrix. + The local response can affect the synapse in three ways: 1. It can sum the entire response vector, scale by the *responseScale* term, and send to the synapse as a steady activation. Consider this a cell-wide immediate response to a sequence that it likes. + 2. It do an instantaneous scaling of the weight of each individual synapse by the corresponding entry in the response vector. It uses the *weightScale* term to do this. Consider this a short-term plasticity effect on specific synapses. + 3. It can do long-term plasticity of each individual synapse using the matched local entries in the response vector and individual synapse history as inputs to the learning rule. This is not yet implemented. + + .. py:method:: setNumSynapse + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumSynapse + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKernelEquation + + (*destination message field*) Assigns field value. + + + .. py:method:: getKernelEquation + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKernelWidth + + (*destination message field*) Assigns field value. + + + .. py:method:: getKernelWidth + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSeqDt + + (*destination message field*) Assigns field value. + + + .. py:method:: getSeqDt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setHistoryTime + + (*destination message field*) Assigns field value. + + + .. py:method:: getHistoryTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setResponseScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getResponseScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSeqActivation + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWeightScale + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeightScale + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getWeightScaleVec + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getKernel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getHistory + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: kernelEquation + + string (*value field*) Equation in x and t to define kernel for sequence recognition + + + .. py:attribute:: kernelWidth + + unsigned int (*value field*) Width of kernel, i.e., number of synapses taking part in seq. + + + .. py:attribute:: seqDt + + double (*value field*) Characteristic time for advancing the sequence. + + + .. py:attribute:: historyTime + + double (*value field*) Duration to keep track of history of inputs to all synapses. + + + .. py:attribute:: responseScale + + double (*value field*) Scaling factor for sustained activation of synapse by seq + + + .. py:attribute:: seqActivation + + double (*value field*) Reports summed activation of synaptic channel by sequence + + + .. py:attribute:: weightScale + + double (*value field*) Scaling factor for weight of each synapse by response vector + + + .. py:attribute:: weightScaleVec + + vector<double> (*value field*) Vector of weight scaling for each synapse + + + .. py:attribute:: kernel + + vector<double> (*value field*) All entries of kernel, as a linear vector + + + .. py:attribute:: history + + vector<double> (*value field*) All entries of history, as a linear vector diff --git a/docs/source/user/py/references/Shell.rst b/docs/source/user/py/references/Shell.rst new file mode 100644 index 0000000000000000000000000000000000000000..0af6e2dcfa7ad7ececa9f701b4e754cc602e7735 --- /dev/null +++ b/docs/source/user/py/references/Shell.rst @@ -0,0 +1,61 @@ +Shell +----- + +.. py:class:: Shell + + + .. py:method:: setclock + + (*destination message field*) Assigns clock ticks. Args: tick#, dt + + + .. py:method:: create + + (*destination message field*) create( class, parent, newElm, name, numData, isGlobal ) + + + .. py:method:: delete + + (*destination message field*) When applied to a regular object, this function operates on the Id (element) specified by the ObjId argument. The function deletes the entire object array on this Id, including all dataEntries on it,all its messages, and all its children. The DataIndex here is ignored, and all dataEntries are destroyed. + When applied to a message: Destroys only that one specific message identified by the full ObjId. + Args: ObjId + + + + .. py:method:: copy + + (*destination message field*) handleCopy( vector< Id > args, string newName, unsigned int nCopies, bool toGlobal, bool copyExtMsgs ): The vector< Id > has Id orig, Id newParent, Id newElm. This function copies an Element and all its children to a new parent. May also expand out the original into nCopies copies. Normally all messages within the copy tree are also copied. If the flag copyExtMsgs is true, then all msgs going out are also copied. + + + .. py:method:: move + + (*destination message field*) handleMove( Id orig, Id newParent ): moves an Element to a new parent + + + .. py:method:: addMsg + + (*destination message field*) Makes a msg. Arguments are: msgtype, src object, src field, dest object, dest field + + + .. py:method:: quit + + (*destination message field*) Stops simulation running and quits the simulator + + + .. py:method:: useClock + + (*destination message field*) Deals with assignment of path to a given clock. Arguments: path, field, tick number. + + +.. py:class:: SimpleSynHandler + + The SimpleSynHandler handles simple synapses without plasticity. It uses a priority queue to manage them. + + .. py:method:: setNumSynapse + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumSynapse + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. diff --git a/docs/source/user/py/references/SimpleSynHandler.rst b/docs/source/user/py/references/SimpleSynHandler.rst new file mode 100644 index 0000000000000000000000000000000000000000..d4cd3638f8a65b5c9ea4ea0847ac8157c5bb82a4 --- /dev/null +++ b/docs/source/user/py/references/SimpleSynHandler.rst @@ -0,0 +1,15 @@ +SimpleSynHandler +---------------- + +.. py:class:: SimpleSynHandler + + The SimpleSynHandler handles simple synapses without plasticity. It uses a priority queue to manage them. + + .. py:method:: setNumSynapse + + (*destination message field*) Assigns number of field entries in field array. + + + .. py:method:: getNumSynapse + + (*destination message field*) Requests number of field entries in field array.The requesting Element must provide a handler for the returned value. diff --git a/docs/source/user/py/references/SingleMsg.rst b/docs/source/user/py/references/SingleMsg.rst new file mode 100644 index 0000000000000000000000000000000000000000..8a9d6905009c0bcb7503ed7fb7e18d4091416858 --- /dev/null +++ b/docs/source/user/py/references/SingleMsg.rst @@ -0,0 +1,34 @@ +SingleMsg +--------- + +.. py:class:: SingleMsg + + + .. py:method:: setI1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getI1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setI2 + + (*destination message field*) Assigns field value. + + + .. py:method:: getI2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: i1 + + unsigned int (*value field*) Index of source object. + + + .. py:attribute:: i2 + + unsigned int (*value field*) Index of dest object. diff --git a/docs/source/user/py/references/SparseMsg.rst b/docs/source/user/py/references/SparseMsg.rst new file mode 100644 index 0000000000000000000000000000000000000000..0ae51702bf2d7d570a23266528d95284d2fc7d8d --- /dev/null +++ b/docs/source/user/py/references/SparseMsg.rst @@ -0,0 +1,99 @@ +SparseMsg +--------- + +.. py:class:: SparseMsg + + + .. py:method:: getNumRows + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumColumns + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumEntries + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setProbability + + (*destination message field*) Assigns field value. + + + .. py:method:: getProbability + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setSeed + + (*destination message field*) Assigns field value. + + + .. py:method:: getSeed + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRandomConnectivity + + (*destination message field*) Assigns connectivity with specified probability and seed + + + .. py:method:: setEntry + + (*destination message field*) Assigns single row,column value + + + .. py:method:: unsetEntry + + (*destination message field*) Clears single row,column entry + + + .. py:method:: clear + + (*destination message field*) Clears out the entire matrix + + + .. py:method:: transpose + + (*destination message field*) Transposes the sparse matrix + + + .. py:method:: pairFill + + (*destination message field*) Fills entire matrix using pairs of (x,y) indices to indicate presence of a connection. If the target is a FieldElement itautomagically assigns FieldIndices. + + + .. py:method:: tripletFill + + (*destination message field*) Fills entire matrix using triplets of (x,y,fieldIndex) to fully specify every connection in the sparse matrix. + + + .. py:attribute:: numRows + + unsigned int (*value field*) Number of rows in matrix. + + + .. py:attribute:: numColumns + + unsigned int (*value field*) Number of columns in matrix. + + + .. py:attribute:: numEntries + + unsigned int (*value field*) Number of Entries in matrix. + + + .. py:attribute:: probability + + double (*value field*) connection probability for random connectivity. + + + .. py:attribute:: seed + + long (*value field*) Random number seed for generating probabilistic connectivity. diff --git a/docs/source/user/py/references/Species.rst b/docs/source/user/py/references/Species.rst new file mode 100644 index 0000000000000000000000000000000000000000..b5801b93b77ab92f16c85de8e01d6bf11dc6ca40 --- /dev/null +++ b/docs/source/user/py/references/Species.rst @@ -0,0 +1,34 @@ +Species +------- + +.. py:class:: Species + + + .. py:attribute:: pool + + void (*shared message field*) Connects to pools of this Species type + + + .. py:method:: setMolWt + + (*destination message field*) Assigns field value. + + + .. py:method:: getMolWt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: handleMolWtRequest + + (*destination message field*) Handle requests for molWt. + + + .. py:attribute:: molWtOut + + double (*source message field*) returns molWt. + + + .. py:attribute:: molWt + + double (*value field*) Molecular weight of species diff --git a/docs/source/user/py/references/SpikeGen.rst b/docs/source/user/py/references/SpikeGen.rst new file mode 100644 index 0000000000000000000000000000000000000000..dd2a9377c2386f6446e90f917a1f5df3c85b319f --- /dev/null +++ b/docs/source/user/py/references/SpikeGen.rst @@ -0,0 +1,130 @@ +SpikeGen +-------- + +.. py:class:: SpikeGen + + SpikeGen object, for detecting threshold crossings.The threshold detection can work in multiple modes. + If the refractT < 0.0, then it fires an event only at the rising edge of the input voltage waveform + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive Process message from scheduler + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: Vm + + (*destination message field*) Handles Vm message coming in from compartment + + + .. py:method:: setThreshold + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshold + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setRefractT + + (*destination message field*) Assigns field value. + + + .. py:method:: getRefractT + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setAbs\_refract + + (*destination message field*) Assigns field value. + + + .. py:method:: getAbs\_refract + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getHasFired + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setEdgeTriggered + + (*destination message field*) Assigns field value. + + + .. py:method:: getEdgeTriggered + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: spikeOut + + double (*source message field*) Sends out a trigger for an event. + + + .. py:attribute:: threshold + + double (*value field*) Spiking threshold, must cross it going up + + + .. py:attribute:: refractT + + double (*value field*) Refractory Time. + + + .. py:attribute:: abs\_refract + + double (*value field*) Absolute refractory time. Synonym for refractT. + + + .. py:attribute:: hasFired + + bool (*value field*) True if SpikeGen has just fired + + + .. py:attribute:: edgeTriggered + + bool (*value field*) When edgeTriggered = 0, the SpikeGen will fire an event in each timestep while incoming Vm is > threshold and at least abs\_refracttime has passed since last event. This may be problematic if the incoming Vm remains above threshold for longer than abs\_refract. Setting edgeTriggered to 1 resolves this as the SpikeGen generatesan event only on the rising edge of the incoming Vm and will remain idle unless the incoming Vm goes below threshold. + + +.. py:class:: SpikeStats + + Object to do some minimal stats on rate of a spike train. Derived from the Stats object and returns the same set of stats.Can take either predigested spike event input, or can handle a continuous sampling of membrane potential Vm and decide if a spike has occured based on a threshold. + + .. py:method:: setThreshold + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshold + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: addSpike + + (*destination message field*) Handles spike event time input, converts into a rate to do stats upon. + + + .. py:method:: Vm + + (*destination message field*) Handles continuous voltage input, can be coming in much than update rate of the SpikeStats. Looks for transitions above threshold to register the arrival of a spike. Doesn't do another spike till Vm falls below threshold. + + + .. py:attribute:: threshold + + double (*value field*) Spiking threshold. If Vm crosses this going up then the SpikeStats object considers that a spike has happened and adds it to the stats. diff --git a/docs/source/user/py/references/SpikeStats.rst b/docs/source/user/py/references/SpikeStats.rst new file mode 100644 index 0000000000000000000000000000000000000000..602c823d2592d0c0d43039ea35c8b6e78fbaa8c0 --- /dev/null +++ b/docs/source/user/py/references/SpikeStats.rst @@ -0,0 +1,30 @@ +SpikeStats +---------- + +.. py:class:: SpikeStats + + Object to do some minimal stats on rate of a spike train. Derived from the Stats object and returns the same set of stats.Can take either predigested spike event input, or can handle a continuous sampling of membrane potential Vm and decide if a spike has occured based on a threshold. + + .. py:method:: setThreshold + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshold + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: addSpike + + (*destination message field*) Handles spike event time input, converts into a rate to do stats upon. + + + .. py:method:: Vm + + (*destination message field*) Handles continuous voltage input, can be coming in much than update rate of the SpikeStats. Looks for transitions above threshold to register the arrival of a spike. Doesn't do another spike till Vm falls below threshold. + + + .. py:attribute:: threshold + + double (*value field*) Spiking threshold. If Vm crosses this going up then the SpikeStats object considers that a spike has happened and adds it to the stats. diff --git a/docs/source/user/py/references/Spine.rst b/docs/source/user/py/references/Spine.rst new file mode 100644 index 0000000000000000000000000000000000000000..b763aef32f2eafcd1d1a30e02113c736e611e5d8 --- /dev/null +++ b/docs/source/user/py/references/Spine.rst @@ -0,0 +1,112 @@ +Spine +----- + +.. py:class:: Spine + + Spine wrapper, used to change its morphology typically by a message from an adaptor. The Spine class takes care of a lot of resultant scaling to electrical, chemical, and diffusion properties. + + .. py:method:: setShaftLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getShaftLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setShaftDiameter + + (*destination message field*) Assigns field value. + + + .. py:method:: getShaftDiameter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setHeadLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getHeadLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setHeadDiameter + + (*destination message field*) Assigns field value. + + + .. py:method:: getHeadDiameter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setPsdArea + + (*destination message field*) Assigns field value. + + + .. py:method:: getPsdArea + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setHeadVolume + + (*destination message field*) Assigns field value. + + + .. py:method:: getHeadVolume + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTotalLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getTotalLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: shaftLength + + double (*value field*) Length of spine shaft. + + + .. py:attribute:: shaftDiameter + + double (*value field*) Diameter of spine shaft. + + + .. py:attribute:: headLength + + double (*value field*) Length of spine head. + + + .. py:attribute:: headDiameter + + double (*value field*) Diameter of spine head, and also the diameter of the PSD. + + + .. py:attribute:: psdArea + + double (*value field*) Area of the Post synaptic density, PSD. This is the same as the cross-section area of spine head, perpendicular to shaft. Assumes that the head is a cylinder and that its length does not change. + This is useful to scale # of surface molecules on the PSD. + + + .. py:attribute:: headVolume + + double (*value field*) Volume of spine head, treating it as a cylinder. When this is scaled by the user, both the diameter and the length of the spine head scale by the cube root of the ratio to the previous volume. The diameter of the PSD is pegged to the diameter fo the spine head. + This is useful to scale total # of molecules in the head. + + + .. py:attribute:: totalLength + + double (*value field*) Length of entire spine. Scales both the length of the shaft and of the spine head, without changing any of the diameters. diff --git a/docs/source/user/py/references/SpineMesh.rst b/docs/source/user/py/references/SpineMesh.rst new file mode 100644 index 0000000000000000000000000000000000000000..ab60716dfdc9f9034f26fca130ed2a3006e74769 --- /dev/null +++ b/docs/source/user/py/references/SpineMesh.rst @@ -0,0 +1,69 @@ +SpineMesh +--------- + +.. py:class:: SpineMesh + + + .. py:method:: getParentVoxel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNeuronVoxel + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElecComptMap + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getElecComptList + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStartVoxelInCompt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getEndVoxelInCompt + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: spineList + + (*destination message field*) Specifies the list of electrical compartments for the spine,and the associated parent voxelArguments: shaft compartments, head compartments, parent voxel index + + + .. py:attribute:: parentVoxel + + vector<unsigned int> (*value field*) Vector of indices of proximal voxels within this mesh.Spines are at present modeled with just one compartment,so each entry in this vector is always set to EMPTY == -1U + + + .. py:attribute:: neuronVoxel + + vector<unsigned int> (*value field*) Vector of indices of voxels on parent NeuroMesh, from which the respective spines emerge. + + + .. py:attribute:: elecComptMap + + vector<Id> (*value field*) Vector of Ids of electrical compartments that map to each voxel. This is necessary because the order of the IDs may differ from the ordering of the voxels. Note that there is always just one voxel per spine head. + + + .. py:attribute:: elecComptList + + vector<Id> (*value field*) Vector of Ids of all electrical compartments in this SpineMesh. Ordering is as per the tree structure built in the NeuroMesh, and may differ from Id order. Ordering matches that used for startVoxelInCompt and endVoxelInCompt + + + .. py:attribute:: startVoxelInCompt + + vector<unsigned int> (*value field*) Index of first voxel that maps to each electrical compartment. This is a trivial function in the SpineMesh, aswe have a single voxel per spine. So just a vector of its own indices. + + + .. py:attribute:: endVoxelInCompt + + vector<unsigned int> (*value field*) Index of end voxel that maps to each electrical compartment. Since there is just one voxel per electrical compartment in the spine, this is just a vector of index+1 diff --git a/docs/source/user/py/references/Stats.rst b/docs/source/user/py/references/Stats.rst new file mode 100644 index 0000000000000000000000000000000000000000..940b24857b1287ef679e917b2e79421b82d90f40 --- /dev/null +++ b/docs/source/user/py/references/Stats.rst @@ -0,0 +1,124 @@ +Stats +----- + +.. py:class:: Stats + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: getMean + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSdev + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSum + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNum + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getWmean + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getWsdev + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getWsum + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getWnum + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setWindowLength + + (*destination message field*) Assigns field value. + + + .. py:method:: getWindowLength + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Handles continuous value input as a time-series. Multiple inputs are allowed, they will be merged. + + + .. py:method:: process + + (*destination message field*) Handles process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: requestOut + + PSt6vectorIdSaIdEE (*source message field*) Sends request for a field to target object + + + .. py:attribute:: mean + + double (*value field*) Mean of all sampled values or of spike rate. + + + .. py:attribute:: sdev + + double (*value field*) Standard Deviation of all sampled values, or of rate. + + + .. py:attribute:: sum + + double (*value field*) Sum of all sampled values, or total number of spikes. + + + .. py:attribute:: num + + unsigned int (*value field*) Number of all sampled values, or total number of spikes. + + + .. py:attribute:: wmean + + double (*value field*) Mean of sampled values or of spike rate within window. + + + .. py:attribute:: wsdev + + double (*value field*) Standard Deviation of sampled values, or rate, within window. + + + .. py:attribute:: wsum + + double (*value field*) Sum of all sampled values, or total number of spikes, within window. + + + .. py:attribute:: wnum + + unsigned int (*value field*) Number of all sampled values, or total number of spikes, within window. + + + .. py:attribute:: windowLength + + unsigned int (*value field*) Number of bins for windowed stats. Ignores windowing if this value is zero. diff --git a/docs/source/user/py/references/SteadyState.rst b/docs/source/user/py/references/SteadyState.rst new file mode 100644 index 0000000000000000000000000000000000000000..f5dda17b701d7f903f056d4222ca2254c1521afa --- /dev/null +++ b/docs/source/user/py/references/SteadyState.rst @@ -0,0 +1,203 @@ +SteadyState +----------- + +.. py:class:: SteadyState + + SteadyState: works out a steady-state value for a reaction system. This class uses the GSL multidimensional root finder algorithms to find the fixed points closest to the current molecular concentrations. When it finds the fixed points, it figures out eigenvalues of the solution, as a way to help classify the fixed points. Note that the method finds unstable as well as stable fixed points. + The SteadyState class also provides a utility function *randomInit()* to randomly initialize the concentrations, within the constraints of stoichiometry. This is useful if you are trying to find the major fixed points of the system. Note that this is probabilistic. If a fixed point is in a very narrow range of state space the probability of finding it is small and you will have to run many iterations with different initial conditions to find it. + The numerical calculations used by the SteadyState solver are prone to failing on individual calculations. All is not lost, because the system reports the solutionStatus. It is recommended that you test this field after every calculation, so you can simply ignore cases where it failed and try again with different starting conditions. + Another rule of thumb is that the SteadyState object is more likely to succeed in finding solutions from a new starting point if you numerically integrate the chemical system for a short time (typically under 1 second) before asking it to find the fixed point. + + .. py:method:: setStoich + + (*destination message field*) Assigns field value. + + + .. py:method:: getStoich + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getBadStoichiometry + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getIsInitialized + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNIter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStatus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMaxIter + + (*destination message field*) Assigns field value. + + + .. py:method:: getMaxIter + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setConvergenceCriterion + + (*destination message field*) Assigns field value. + + + .. py:method:: getConvergenceCriterion + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumVarPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getRank + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStateType + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNNegEigenvalues + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNPosEigenvalues + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSolutionStatus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTotal + + (*destination message field*) Assigns field value. + + + .. py:method:: getTotal + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getEigenvalues + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setupMatrix + + (*destination message field*) This function initializes and rebuilds the matrices used in the calculation. + + + .. py:method:: settle + + (*destination message field*) Finds the nearest steady state to the current initial conditions. This function rebuilds the entire calculation only if the object has not yet been initialized. + + + .. py:method:: resettle + + (*destination message field*) Finds the nearest steady state to the current initial conditions. This function rebuilds the entire calculation + + + .. py:method:: showMatrices + + (*destination message field*) Utility function to show the matrices derived for the calculations on the reaction system. Shows the Nr, gamma, and total matrices + + + .. py:method:: randomInit + + (*destination message field*) Generate random initial conditions consistent with the massconservation rules. Typically invoked in order to scanstates + + + .. py:attribute:: stoich + + Id (*value field*) Specify the Id of the stoichiometry system to use + + + .. py:attribute:: badStoichiometry + + bool (*value field*) Bool: True if there is a problem with the stoichiometry + + + .. py:attribute:: isInitialized + + bool (*value field*) True if the model has been initialized successfully + + + .. py:attribute:: nIter + + unsigned int (*value field*) Number of iterations done by steady state solver + + + .. py:attribute:: status + + string (*value field*) Status of solver + + + .. py:attribute:: maxIter + + unsigned int (*value field*) Max permissible number of iterations to try before giving up + + + .. py:attribute:: convergenceCriterion + + double (*value field*) Fractional accuracy required to accept convergence + + + .. py:attribute:: numVarPools + + unsigned int (*value field*) Number of variable molecules in reaction system. + + + .. py:attribute:: rank + + unsigned int (*value field*) Number of independent molecules in reaction system + + + .. py:attribute:: stateType + + unsigned int (*value field*) 0: stable; 1: unstable; 2: saddle; 3: osc?; 4: one near-zero eigenvalue; 5: other + + + .. py:attribute:: nNegEigenvalues + + unsigned int (*value field*) Number of negative eigenvalues: indicates type of solution + + + .. py:attribute:: nPosEigenvalues + + unsigned int (*value field*) Number of positive eigenvalues: indicates type of solution + + + .. py:attribute:: solutionStatus + + unsigned int (*value field*) 0: Good; 1: Failed to find steady states; 2: Failed to find eigenvalues + + + .. py:attribute:: total + + unsigned int,double (*lookup field*) Totals table for conservation laws. The exact mapping ofthis to various sums of molecules is given by the conservation matrix, and is currently a bit opaque.The value of 'total' is set to initial conditions whenthe 'SteadyState::settle' function is called.Assigning values to the total is a special operation:it rescales the concentrations of all the affectedmolecules so that they are at the specified total.This happens the next time 'settle' is called. + + + .. py:attribute:: eigenvalues + + unsigned int,double (*lookup field*) Eigenvalues computed for steady state diff --git a/docs/source/user/py/references/StimulusTable.rst b/docs/source/user/py/references/StimulusTable.rst new file mode 100644 index 0000000000000000000000000000000000000000..8bcd2d92442a85990f10bceffe10faef23498046 --- /dev/null +++ b/docs/source/user/py/references/StimulusTable.rst @@ -0,0 +1,114 @@ +StimulusTable +------------- + +.. py:class:: StimulusTable + + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setStartTime + + (*destination message field*) Assigns field value. + + + .. py:method:: getStartTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setStopTime + + (*destination message field*) Assigns field value. + + + .. py:method:: getStopTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setLoopTime + + (*destination message field*) Assigns field value. + + + .. py:method:: getLoopTime + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setStepSize + + (*destination message field*) Assigns field value. + + + .. py:method:: getStepSize + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setStepPosition + + (*destination message field*) Assigns field value. + + + .. py:method:: getStepPosition + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDoLoop + + (*destination message field*) Assigns field value. + + + .. py:method:: getDoLoop + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: output + + double (*source message field*) Sends out tabulated data according to lookup parameters. + + + .. py:attribute:: startTime + + double (*value field*) Start time used when table is emitting values. For lookupvalues below this, the table just sends out its zero entry.Corresponds to zeroth entry of table. + + + .. py:attribute:: stopTime + + double (*value field*) Time to stop emitting values.If time exceeds this, then the table sends out its last entry.The stopTime corresponds to the last entry of table. + + + .. py:attribute:: loopTime + + double (*value field*) If looping, this is the time between successive cycle starts.Defaults to the difference between stopTime and startTime, so that the output waveform cycles with precisely the same duration as the table contents.If larger than stopTime - startTime, then it pauses at the last table value till it is time to go around again.If smaller than stopTime - startTime, then it begins the next cycle even before the first one has reached the end of the table. + + + .. py:attribute:: stepSize + + double (*value field*) Increment in lookup (x) value on every timestep. If it isless than or equal to zero, the StimulusTable uses the current timeas the lookup value. + + + .. py:attribute:: stepPosition + + double (*value field*) Current value of lookup (x) value.If stepSize is less than or equal to zero, this is set tothe current time to use as the lookup value. + + + .. py:attribute:: doLoop + + bool (*value field*) Flag: Should it loop around to startTime once it has reachedstopTime. Default (zero) is to do a single pass. diff --git a/docs/source/user/py/references/Stoich.rst b/docs/source/user/py/references/Stoich.rst new file mode 100644 index 0000000000000000000000000000000000000000..f92cd9c252610bce095efbe893f5fe26bfee4e43 --- /dev/null +++ b/docs/source/user/py/references/Stoich.rst @@ -0,0 +1,203 @@ +Stoich +------ + +.. py:class:: Stoich + + + .. py:method:: setPath + + (*destination message field*) Assigns field value. + + + .. py:method:: getPath + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setKsolve + + (*destination message field*) Assigns field value. + + + .. py:method:: getKsolve + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDsolve + + (*destination message field*) Assigns field value. + + + .. py:method:: getDsolve + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setCompartment + + (*destination message field*) Assigns field value. + + + .. py:method:: getCompartment + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumVarPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumBufPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumAllPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumProxyPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getPoolIdMap + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getNumRates + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getMatrixEntry + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getColumnIndex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getRowStart + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getProxyPools + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getStatus + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: unzombify + + (*destination message field*) Restore all zombies to their native state + + + .. py:method:: buildXreacs + + (*destination message field*) Build cross-reaction terms between current stoich and argument. This function scans the voxels at which there are junctions between different compartments, and orchestrates set up of interfaces between the Ksolves that implement the X reacs at those junctions. + + + .. py:method:: filterXreacs + + (*destination message field*) Filter cross-reaction terms on current stoichThis function clears out absent rate terms that would otherwise try to compute cross reactions where the junctions are not present. + + + .. py:method:: scaleBufsAndRates + + (*destination message field*) Args: voxel#, volRatio + Handles requests for runtime volume changes in the specified voxel#, Used in adaptors changing spine vols. + + + .. py:attribute:: path + + string (*value field*) Wildcard path for reaction system handled by Stoich + + + .. py:attribute:: ksolve + + Id (*value field*) Id of Kinetic reaction solver class that works with this Stoich. Must be of class Ksolve, or Gsolve (at present) Must be assigned before the path is set. + + + .. py:attribute:: dsolve + + Id (*value field*) Id of Diffusion solver class that works with this Stoich. Must be of class Dsolve If left unset then the system will be assumed to work in a non-diffusive, well-stirred cell. If it is going to be used it must be assigned before the path is set. + + + .. py:attribute:: compartment + + Id (*value field*) Id of chemical compartment class that works with this Stoich. Must be derived from class ChemCompt. If left unset then the system will be assumed to work in a non-diffusive, well-stirred cell. If it is going to be used it must be assigned before the path is set. + + + .. py:attribute:: numVarPools + + unsigned int (*value field*) Number of time-varying pools to be computed by the numerical engine + + + .. py:attribute:: numBufPools + + unsigned int (*value field*) Number of buffered pools to be computed by the numerical engine. Includes pools controlled by functions. + + + .. py:attribute:: numAllPools + + unsigned int (*value field*) Total number of pools handled by the numerical engine. This includes variable ones, buffered ones, and functions. It includes local pools as well as cross-solver proxy pools. + + + .. py:attribute:: numProxyPools + + unsigned int (*value field*) Number of pools here by proxy as substrates of a cross-compartment reaction. + + + .. py:attribute:: poolIdMap + + vector<unsigned int> (*value field*) Map to look up the index of the pool from its Id.poolIndex = poolIdMap[ Id::value() - poolOffset ] where the poolOffset is the smallest Id::value. poolOffset is passed back as the last entry of this vector. Any Ids that are not pools return EMPTY=~0. + + + .. py:attribute:: numRates + + unsigned int (*value field*) Total number of rate terms in the reaction system. + + + .. py:attribute:: matrixEntry + + vector<int> (*value field*) The non-zero matrix entries in the sparse matrix. Theircolumn indices are in a separate vector and the rowinformatino in a third + + + .. py:attribute:: columnIndex + + vector<unsigned int> (*value field*) Column Index of each matrix entry + + + .. py:attribute:: rowStart + + vector<unsigned int> (*value field*) Row start for each block of entries and column indices + + + .. py:attribute:: status + + int (*value field*) Status of Stoich in the model building process. Values are: -1: Reaction path not yet assigned. + 0: Successfully built stoichiometry matrix. + 1: Warning: Missing a reactant in a Reac or Enz. + 2: Warning: Missing a substrate in an MMenz. + 3: Warning: Missing substrates as well as reactants. + 4: Warning: Compartment not defined. + 8: Warning: Neither Ksolve nor Dsolve defined. + 16: Warning: No objects found on path. + + + + .. py:attribute:: proxyPools + + Id,vector<Id> (*lookup field*) Return vector of proxy pools for X-compt reactions between current stoich, and the argument, which is a StoichId. The returned pools belong to the compartment handling the Stoich specified in the argument. If no pools are found, return an empty vector. diff --git a/docs/source/user/py/references/Streamer.rst b/docs/source/user/py/references/Streamer.rst new file mode 100644 index 0000000000000000000000000000000000000000..9c430dfe40e06b921ad4dac57e69753bc963cb8d --- /dev/null +++ b/docs/source/user/py/references/Streamer.rst @@ -0,0 +1,81 @@ +Streamer +-------- + +.. py:class:: Streamer + + Streamer: Stream moose.Table data to out-streams + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setOutfile + + (*destination message field*) Assigns field value. + + + .. py:method:: getOutfile + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFormat + + (*destination message field*) Assigns field value. + + + .. py:method:: getFormat + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handle process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:method:: addTable + + (*destination message field*) Add a table to Streamer + + + .. py:method:: addTables + + (*destination message field*) Add many tables to Streamer + + + .. py:method:: removeTable + + (*destination message field*) Remove a table from Streamer + + + .. py:method:: removeTables + + (*destination message field*) Remove tables -- if found -- from Streamer + + + .. py:method:: getNumTables + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: outfile + + string (*value field*) File/stream to write table data to. Default is is \_\_moose\_tables\_\_.dat.n By default, this object writes data every second + + + + .. py:attribute:: format + + string (*value field*) Format of output file, default is csv + + + .. py:attribute:: numTables + + unsigned long (*value field*) Number of Tables handled by Streamer diff --git a/docs/source/user/py/references/SymCompartment.rst b/docs/source/user/py/references/SymCompartment.rst new file mode 100644 index 0000000000000000000000000000000000000000..7aa7478c5c134ce7be72fe23a73c0494bc72caab --- /dev/null +++ b/docs/source/user/py/references/SymCompartment.rst @@ -0,0 +1,220 @@ +SymCompartment +-------------- + +.. py:class:: SymCompartment + + SymCompartment object, for branching neuron models. In symmetric + compartments the axial resistance is equally divided on two sides of + the node. The equivalent circuit of the passive compartment becomes: + (NOTE: you must use a fixed-width font like Courier for correct rendition of the diagrams below):: + + Ra/2 B Ra/2 + A-/\/\/\\_\_\_\_\_/\/\/\-- C + | + \_\_\_\_|\_\_\_\_ + | | + | \ + | / Rm + ---- Cm \ + ---- / + | | + | \_\_\_\_\_ + | --- Em + |\_\_\_\_\_\_\_\_\_| + | + \_\_|\_\_ + ///// + + + In case of branching, the B-C part of the parent's axial resistance + forms a Y with the A-B part of the children:: + + B' + | + / + \ + / + \ + / + |A' + B | + A-----/\/\/\-----/\/\/\------|C + | + |A" + / + \ + / + \ + / + | + B" + As per basic circuit analysis techniques, the C node is replaced using + star-mesh transform. This requires all sibling compartments at a + branch point to be connected via 'sibling' messages by the user (or + by the cell reader in case of prototypes). For the same reason, the + child compartment must be connected to the parent by + distal-proximal message pair. The calculation of the + coefficient for computing equivalent resistances in the mesh is done + at reinit. + + .. py:attribute:: proximal + + void (*shared message field*) This is a shared message between symmetric compartments. + It goes from the proximal end of the current compartment to + distal end of the compartment closer to the soma. + + + + .. py:attribute:: distal + + void (*shared message field*) This is a shared message between symmetric compartments. + It goes from the distal end of the current compartment to the + proximal end of one further from the soma. + The Ra values collected from children and + sibling nodes are used for computing the equivalent resistance + between each pair of nodes using star-mesh transformation. + Mathematically this is the same as the proximal message, but + the distinction is important for traversal and clarity. + + + + .. py:attribute:: sibling + + void (*shared message field*) This is a shared message between symmetric compartments. + Conceptually, this goes from the proximal end of the current + compartment to the proximal end of a sibling compartment + on a branch in a dendrite. However, + this works out to the same as a 'distal' message in terms of + equivalent circuit. The Ra values collected from siblings + and parent node are used for + computing the equivalent resistance between each pair of + nodes using star-mesh transformation. + + + + .. py:attribute:: sphere + + void (*shared message field*) This is a shared message between a spherical compartment + (typically soma) and a number of evenly spaced cylindrical + compartments, typically primary dendrites. + The sphere contributes the usual Ra/2 to the resistance + between itself and children. The child compartments + do not connect across to each other + through sibling messages. Instead they just connect to the soma + through the 'proximalOnly' message + + + + .. py:attribute:: cylinder + + void (*shared message field*) This is a shared message between a cylindrical compartment + (typically a dendrite) and a number of evenly spaced child + compartments, typically dendritic spines, protruding from the + curved surface of the cylinder. We assume that the resistance + from the cylinder curved surface to its axis is negligible. + The child compartments do not need to connect across to each + other through sibling messages. Instead they just connect to the + parent dendrite through the 'proximalOnly' message + + + + .. py:attribute:: proximalOnly + + void (*shared message field*) This is a shared message between a dendrite and a parent + compartment whose offspring are spatially separated from each + other. For example, evenly spaced dendrites emerging from a soma + or spines emerging from a common parent dendrite. In these cases + the sibling dendrites do not need to connect to each other + through 'sibling' messages. Instead they just connect to the + parent compartment (soma or dendrite) through this message + + + + .. py:method:: raxialSym + + (*destination message field*) Expects Ra and Vm from other compartment. + + + .. py:method:: sumRaxial + + (*destination message field*) Expects Ra from other compartment. + + + .. py:method:: raxialSym + + (*destination message field*) Expects Ra and Vm from other compartment. + + + .. py:method:: sumRaxial + + (*destination message field*) Expects Ra from other compartment. + + + .. py:method:: raxialSym + + (*destination message field*) Expects Ra and Vm from other compartment. + + + .. py:method:: sumRaxial + + (*destination message field*) Expects Ra from other compartment. + + + .. py:method:: raxialSphere + + (*destination message field*) Expects Ra and Vm from other compartment. This is a special case when other compartments are evenly distributed on a spherical compartment. + + + .. py:method:: raxialCylinder + + (*destination message field*) Expects Ra and Vm from other compartment. This is a special case when other compartments are evenly distributed on the curved surface of the cylindrical compartment, so we assume that the cylinder does not add any further resistance. + + + .. py:method:: raxialSphere + + (*destination message field*) Expects Ra and Vm from other compartment. This is a special case when other compartments are evenly distributed on a spherical compartment. + + + .. py:attribute:: proximalOut + + double,double (*source message field*) Sends out Ra and Vm on each timestep, on the proximal end of a compartment. That is, this end should be pointed toward the soma. Mathematically the same as raxialOut but provides a logical orientation of the dendrite. One can traverse proximalOut messages to get to the soma. + + + .. py:attribute:: sumRaxialOut + + double (*source message field*) Sends out Ra + + + .. py:attribute:: distalOut + + double,double (*source message field*) Sends out Ra and Vm on each timestep, on the distal end of a compartment. This end should be pointed away from the soma. Mathematically the same as proximalOut, but gives an orientation to the dendrite and helps traversal. + + + .. py:attribute:: sumRaxialOut + + double (*source message field*) Sends out Ra + + + .. py:attribute:: distalOut + + double,double (*source message field*) Sends out Ra and Vm on each timestep, on the distal end of a compartment. This end should be pointed away from the soma. Mathematically the same as proximalOut, but gives an orientation to the dendrite and helps traversal. + + + .. py:attribute:: sumRaxialOut + + double (*source message field*) Sends out Ra + + + .. py:attribute:: distalOut + + double,double (*source message field*) Sends out Ra and Vm on each timestep, on the distal end of a compartment. This end should be pointed away from the soma. Mathematically the same as proximalOut, but gives an orientation to the dendrite and helps traversal. + + + .. py:attribute:: cylinderOut + + double,double (*source message field*) Sends out Ra and Vm to compartments (typically spines) on the curved surface of a cylinder. Ra is set to nearly zero, since we assume that the resistance from axis to surface is negligible. + + + .. py:attribute:: proximalOut + + double,double (*source message field*) Sends out Ra and Vm on each timestep, on the proximal end of a compartment. That is, this end should be pointed toward the soma. Mathematically the same as raxialOut but provides a logical orientation of the dendrite. One can traverse proximalOut messages to get to the soma. diff --git a/docs/source/user/py/references/SynChan.rst b/docs/source/user/py/references/SynChan.rst new file mode 100644 index 0000000000000000000000000000000000000000..5a91bffb8e071c8525b9869dfc060bb23c6176b1 --- /dev/null +++ b/docs/source/user/py/references/SynChan.rst @@ -0,0 +1,56 @@ +SynChan +------- + +.. py:class:: SynChan + + SynChan: Synaptic channel incorporating weight and delay. Does not handle actual arrival of synaptic events, that is done by one of the derived classes of SynHandlerBase. + In use, the SynChan sits on the compartment connected to it by the **channel** message. One or more of the SynHandler objects connects to the SynChan through the **activation** message. The SynHandlers each manage multiple synapses, and the handlers can be fixed weight or have a learning rule. + + .. py:method:: setTau1 + + (*destination message field*) Assigns field value. + + + .. py:method:: getTau1 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTau2 + + (*destination message field*) Assigns field value. + + + .. py:method:: getTau2 + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setNormalizeWeights + + (*destination message field*) Assigns field value. + + + .. py:method:: getNormalizeWeights + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: activation + + (*destination message field*) Sometimes we want to continuously activate the channel + + + .. py:attribute:: tau1 + + double (*value field*) Decay time constant for the synaptic conductance, tau1 >= tau2. + + + .. py:attribute:: tau2 + + double (*value field*) Rise time constant for the synaptic conductance, tau1 >= tau2. + + + .. py:attribute:: normalizeWeights + + bool (*value field*) Flag. If true, the overall conductance is normalized by the number of individual synapses in this SynChan object. diff --git a/docs/source/user/py/references/SynHandlerBase.rst b/docs/source/user/py/references/SynHandlerBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..880df9aa010a8b9ae81c8316d0445d627d68b796 --- /dev/null +++ b/docs/source/user/py/references/SynHandlerBase.rst @@ -0,0 +1,40 @@ +SynHandlerBase +-------------- + +.. py:class:: SynHandlerBase + + Base class for handling synapse arrays converging onto a given channel or integrate-and-fire neuron. This class provides the interface for channels/intFires to connect to a range of synapse types, including simple synapses, synapses with different plasticity rules, and variants yet to be implemented. + + .. py:attribute:: proc + + void (*shared message field*) Shared Finfo to receive Process messages from the clock. + + + .. py:method:: setNumSynapses + + (*destination message field*) Assigns field value. + + + .. py:method:: getNumSynapses + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handles 'process' call. Checks if any spike events are due forhandling at this timestep, and does learning rule stuff if needed + + + .. py:method:: reinit + + (*destination message field*) Handles 'reinit' call. Initializes all the synapses. + + + .. py:attribute:: activationOut + + double (*source message field*) Sends out level of activation on all synapses converging to this SynHandler + + + .. py:attribute:: numSynapses + + unsigned int (*value field*) Number of synapses on SynHandler. Duplicate field for num\_synapse diff --git a/docs/source/user/py/references/Synapse.rst b/docs/source/user/py/references/Synapse.rst new file mode 100644 index 0000000000000000000000000000000000000000..075b8ae64758f00e31898cfb362ea723a77a2a98 --- /dev/null +++ b/docs/source/user/py/references/Synapse.rst @@ -0,0 +1,40 @@ +Synapse +------- + +.. py:class:: Synapse + + Synapse using ring buffer for events. + + .. py:method:: setWeight + + (*destination message field*) Assigns field value. + + + .. py:method:: getWeight + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setDelay + + (*destination message field*) Assigns field value. + + + .. py:method:: getDelay + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: addSpike + + (*destination message field*) Handles arriving spike messages, inserts into event queue. + + + .. py:attribute:: weight + + double (*value field*) Synaptic weight + + + .. py:attribute:: delay + + double (*value field*) Axonal propagation delay to this synapse diff --git a/docs/source/user/py/references/Table.rst b/docs/source/user/py/references/Table.rst new file mode 100644 index 0000000000000000000000000000000000000000..720b29a8911ef22b82e638770492231e7409928f --- /dev/null +++ b/docs/source/user/py/references/Table.rst @@ -0,0 +1,114 @@ +Table +----- + +.. py:class:: Table + + Table for accumulating data values, or spike timings. Can either receive incoming doubles, or can explicitly request values from fields provided they are doubles. The latter mode of use is preferable if you wish to have independent control of how often you sample from the output variable. + Typically used for storing simulation output into memory, or to file when stream is set to True + There are two functionally identical variants of the Table class: Table and Table2. Their only difference is that the default scheduling of the Table (Clock Tick 8, dt = 0.1 ms ) makes it suitable for tracking electrical compartmental models of neurons and networks. + Table2 (Clock Tick 18, dt = 1.0 s) is good for tracking biochemical signaling pathway outputs. + These are just the default values and Tables can be assigned to any Clock Tick and timestep in the usual manner. + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setThreshold + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshold + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFormat + + (*destination message field*) Assigns field value. + + + .. py:method:: getFormat + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setName + + (*destination message field*) Assigns field value. + + + .. py:method:: getName + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOutfile + + (*destination message field*) Assigns field value. + + + .. py:method:: getOutfile + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setUseStreamer + + (*destination message field*) Assigns field value. + + + .. py:method:: getUseStreamer + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Fills data into table. Also handles data sent back following request + + + .. py:method:: spike + + (*destination message field*) Fills spike timings into the Table. Signal has to exceed thresh + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: requestOut + + PSt6vectorIdSaIdEE (*source message field*) Sends request for a field to target object + + + .. py:attribute:: threshold + + double (*value field*) threshold used when Table acts as a buffer for spikes + + + .. py:attribute:: format + + string (*value field*) Data format for table: default csv + + + .. py:attribute:: name + + string (*value field*) Name of the table. + + + .. py:attribute:: outfile + + string (*value field*) Set the name of file to which data is written to. If set, streaming support is automatically enabled. + + + .. py:attribute:: useStreamer + + bool (*value field*) When set to true, write to a file instead writing in memory. If `outfile` is not set, streamer writes to default path. diff --git a/docs/source/user/py/references/Table2.rst b/docs/source/user/py/references/Table2.rst new file mode 100644 index 0000000000000000000000000000000000000000..d4dc0700983b0b32953bc8143d23031e4354265f --- /dev/null +++ b/docs/source/user/py/references/Table2.rst @@ -0,0 +1,114 @@ +Table2 +------ + +.. py:class:: Table2 + + Table for accumulating data values, or spike timings. Can either receive incoming doubles, or can explicitly request values from fields provided they are doubles. The latter mode of use is preferable if you wish to have independent control of how often you sample from the output variable. + Typically used for storing simulation output into memory, or to file when stream is set to True + There are two functionally identical variants of the Table class: Table and Table2. Their only difference is that the default scheduling of the Table (Clock Tick 8, dt = 0.1 ms ) makes it suitable for tracking electrical compartmental models of neurons and networks. + Table2 (Clock Tick 18, dt = 1.0 s) is good for tracking biochemical signaling pathway outputs. + These are just the default values and Tables can be assigned to any Clock Tick and timestep in the usual manner. + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setThreshold + + (*destination message field*) Assigns field value. + + + .. py:method:: getThreshold + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setFormat + + (*destination message field*) Assigns field value. + + + .. py:method:: getFormat + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setName + + (*destination message field*) Assigns field value. + + + .. py:method:: getName + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setOutfile + + (*destination message field*) Assigns field value. + + + .. py:method:: getOutfile + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setUseStreamer + + (*destination message field*) Assigns field value. + + + .. py:method:: getUseStreamer + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Fills data into table. Also handles data sent back following request + + + .. py:method:: spike + + (*destination message field*) Fills spike timings into the Table. Signal has to exceed thresh + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. + + + .. py:attribute:: requestOut + + PSt6vectorIdSaIdEE (*source message field*) Sends request for a field to target object + + + .. py:attribute:: threshold + + double (*value field*) threshold used when Table acts as a buffer for spikes + + + .. py:attribute:: format + + string (*value field*) Data format for table: default csv + + + .. py:attribute:: name + + string (*value field*) Name of the table. + + + .. py:attribute:: outfile + + string (*value field*) Set the name of file to which data is written to. If set, streaming support is automatically enabled. + + + .. py:attribute:: useStreamer + + bool (*value field*) When set to true, write to a file instead writing in memory. If `outfile` is not set, streamer writes to default path. diff --git a/docs/source/user/py/references/TableBase.rst b/docs/source/user/py/references/TableBase.rst new file mode 100644 index 0000000000000000000000000000000000000000..b5b7baa8f3192cfa149263321aa1e596bfaef8fb --- /dev/null +++ b/docs/source/user/py/references/TableBase.rst @@ -0,0 +1,94 @@ +TableBase +--------- + +.. py:class:: TableBase + + + .. py:method:: setVector + + (*destination message field*) Assigns field value. + + + .. py:method:: getVector + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getOutputValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSize + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getY + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: linearTransform + + (*destination message field*) Linearly scales and offsets data. Scale first, then offset. + + + .. py:method:: xplot + + (*destination message field*) Dumps table contents to xplot-format file. Argument 1 is filename, argument 2 is plotname + + + .. py:method:: plainPlot + + (*destination message field*) Dumps table contents to single-column ascii file. Uses scientific notation. Argument 1 is filename + + + .. py:method:: loadCSV + + (*destination message field*) Reads a single column from a CSV file. Arguments: filename, column#, starting row#, separator + + + .. py:method:: loadXplot + + (*destination message field*) Reads a single plot from an xplot file. Arguments: filename, plotnameWhen the file has 2 columns, the 2nd column is loaded. + + + .. py:method:: loadXplotRange + + (*destination message field*) Reads a single plot from an xplot file, and selects a subset of points from it. Arguments: filename, plotname, startindex, endindexUses C convention: startindex included, endindex not included.When the file has 2 columns, the 2nd column is loaded. + + + .. py:method:: compareXplot + + (*destination message field*) Reads a plot from an xplot file and compares with contents of TableBase.Result is put in 'output' field of table.If the comparison fails (e.g., due to zero entries), the return value is -1.Arguments: filename, plotname, comparison\_operationOperations: rmsd (for RMSDifference), rmsr (RMSratio ), dotp (Dot product, not yet implemented). + + + .. py:method:: compareVec + + (*destination message field*) Compares contents of TableBase with a vector of doubles.Result is put in 'output' field of table.If the comparison fails (e.g., due to zero entries), the return value is -1.Arguments: Other vector, comparison\_operationOperations: rmsd (for RMSDifference), rmsr (RMSratio ), dotp (Dot product, not yet implemented). + + + .. py:method:: clearVec + + (*destination message field*) Handles request to clear the data vector + + + .. py:attribute:: vector + + vector<double> (*value field*) vector with all table entries + + + .. py:attribute:: outputValue + + double (*value field*) Output value holding current table entry or output of a calculation + + + .. py:attribute:: size + + unsigned int (*value field*) size of table. Note that this is the number of x divisions +1since it must represent the largest value as well as thesmallest + + + .. py:attribute:: y + + unsigned int,double (*lookup field*) Value of table at specified index diff --git a/docs/source/user/py/references/TimeTable.rst b/docs/source/user/py/references/TimeTable.rst new file mode 100644 index 0000000000000000000000000000000000000000..799beb0f6971cf67bc4846ff242cb463515ad566 --- /dev/null +++ b/docs/source/user/py/references/TimeTable.rst @@ -0,0 +1,68 @@ +TimeTable +--------- + +.. py:class:: TimeTable + + TimeTable: Read in spike times from file and send out eventOut messages + at the specified times. + + .. py:attribute:: proc + + void (*shared message field*) Shared message for process and reinit + + + .. py:method:: setFilename + + (*destination message field*) Assigns field value. + + + .. py:method:: getFilename + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMethod + + (*destination message field*) Assigns field value. + + + .. py:method:: getMethod + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getState + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: process + + (*destination message field*) Handle process call + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call + + + .. py:attribute:: eventOut + + double (*source message field*) Sends out spike time if it falls in current timestep. + + + .. py:attribute:: filename + + string (*value field*) File to read lookup data from. The file should be contain two columns + separated by any space character. + + + .. py:attribute:: method + + int (*value field*) Method to use for filling up the entries. Currently only method 4 + (loading from file) is supported. + + + .. py:attribute:: state + + double (*value field*) Current state of the time table. diff --git a/docs/source/user/py/references/UniformRng.rst b/docs/source/user/py/references/UniformRng.rst new file mode 100644 index 0000000000000000000000000000000000000000..3194fe216908fa0258cfe110b9947e6e3f256705 --- /dev/null +++ b/docs/source/user/py/references/UniformRng.rst @@ -0,0 +1,35 @@ +UniformRng +---------- + +.. py:class:: UniformRng + + Generates pseudorandom number from a unform distribution. + + .. py:method:: setMin + + (*destination message field*) Assigns field value. + + + .. py:method:: getMin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMax + + (*destination message field*) Assigns field value. + + + .. py:method:: getMax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: min + + double (*value field*) The lower bound on the numbers generated + + + .. py:attribute:: max + + double (*value field*) The upper bound on the numbers generated diff --git a/docs/source/user/py/references/VClamp.rst b/docs/source/user/py/references/VClamp.rst new file mode 100644 index 0000000000000000000000000000000000000000..3ad0ba3eb72e5601b0e3c6643d4c1c986ec10442 --- /dev/null +++ b/docs/source/user/py/references/VClamp.rst @@ -0,0 +1,153 @@ +VClamp +------ + +.. py:class:: VClamp + + Voltage clamp object for holding neuronal compartments at a specific voltage. + This implementation uses a builtin RC circuit to filter the command input and then use a PID to bring the sensed voltage (Vm from compartment) to the filtered command potential. + Usage: Connect the `currentOut` source of VClamp to `injectMsg` dest of Compartment. Connect the `VmOut` source of Compartment to `set\_sensed` dest of VClamp. Either set `command` field to a fixed value, or connect an appropriate source of command potential (like the `outputOut` message of an appropriately configured PulseGen) to `set\_command` dest. + The default settings for the RC filter and PID controller should be fine. For step change in command voltage, good defaults withintegration time step dt are as follows: + time constant of RC filter, tau = 5 * dt + proportional gain of PID, gain = Cm/dt where Cm is the membrane capacitance of the compartment + integration time of PID, ti = dt + derivative time of PID, td = 0 + + .. py:attribute:: proc + + void (*shared message field*) Shared message to receive Process messages from the scheduler + + + .. py:method:: getCommand + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getCurrent + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getSensed + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setMode + + (*destination message field*) Assigns field value. + + + .. py:method:: getMode + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTi + + (*destination message field*) Assigns field value. + + + .. py:method:: getTi + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTd + + (*destination message field*) Assigns field value. + + + .. py:method:: getTd + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTau + + (*destination message field*) Assigns field value. + + + .. py:method:: getTau + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setGain + + (*destination message field*) Assigns field value. + + + .. py:method:: getGain + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: sensedIn + + (*destination message field*) The `VmOut` message of the Compartment object should be connected here. + + + .. py:method:: commandIn + + (*destination message field*) The command voltage source should be connected to this. + + + .. py:method:: process + + (*destination message field*) Handles 'process' call on each time step. + + + .. py:method:: reinit + + (*destination message field*) Handles 'reinit' call + + + .. py:attribute:: currentOut + + double (*source message field*) Sends out current output of the clamping circuit. This should be connected to the `injectMsg` field of a compartment to voltage clamp it. + + + .. py:attribute:: command + + double (*value field*) Command input received by the clamp circuit. + + + .. py:attribute:: current + + double (*value field*) The amount of current injected by the clamp into the membrane. + + + .. py:attribute:: sensed + + double (*value field*) Membrane potential read from compartment. + + + .. py:attribute:: mode + + unsigned int (*value field*) Working mode of the PID controller. + + mode = 0, standard PID with proportional, integral and derivative all acting on the error. + + mode = 1, derivative action based on command input + + mode = 2, proportional action and derivative action are based on command input. + + + .. py:attribute:: ti + + double (*value field*) Integration time of the PID controller. Defaults to 1e9, i.e. integral action is negligibly small. + + + .. py:attribute:: td + + double (*value field*) Derivative time of the PID controller. This defaults to 0,i.e. derivative action is unused. + + + .. py:attribute:: tau + + double (*value field*) Time constant of the lowpass filter at input of the PID controller. This smooths out abrupt changes in the input. Set it to 5 * dt or more to avoid overshoots. + + + .. py:attribute:: gain + + double (*value field*) Proportional gain of the PID controller. diff --git a/docs/source/user/py/references/Variable.rst b/docs/source/user/py/references/Variable.rst new file mode 100644 index 0000000000000000000000000000000000000000..46451c6de8e5c845843e304c7615049111a0c74a --- /dev/null +++ b/docs/source/user/py/references/Variable.rst @@ -0,0 +1,25 @@ +Variable +-------- + +.. py:class:: Variable + + Variable for storing double values. This is used in Function class. + + .. py:method:: setValue + + (*destination message field*) Assigns field value. + + + .. py:method:: getValue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: input + + (*destination message field*) Handles incoming variable value. + + + .. py:attribute:: value + + double (*value field*) Variable value diff --git a/docs/source/user/py/references/VectorTable.rst b/docs/source/user/py/references/VectorTable.rst new file mode 100644 index 0000000000000000000000000000000000000000..7b7b180113def593618406c0da065dd062d50f69 --- /dev/null +++ b/docs/source/user/py/references/VectorTable.rst @@ -0,0 +1,95 @@ +VectorTable +----------- + +.. py:class:: VectorTable + + This is a minimal 1D equivalent of the Interpol2D class. Provides simple functions for getting and setting up the table, along with a lookup function. This class is to be used while supplying lookup tables to the MarkovChannel class, in cases where the transition rate varies with either membrane voltage or ligand concentration. + + .. py:method:: setXdivs + + (*destination message field*) Assigns field value. + + + .. py:method:: getXdivs + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmin + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmin + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setXmax + + (*destination message field*) Assigns field value. + + + .. py:method:: getXmax + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getInvdx + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: setTable + + (*destination message field*) Assigns field value. + + + .. py:method:: getTable + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getLookupvalue + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:method:: getLookupindex + + (*destination message field*) Requests field value. The requesting Element must provide a handler for the returned value. + + + .. py:attribute:: xdivs + + unsigned int (*value field*) Number of divisions. + + + .. py:attribute:: xmin + + double (*value field*) Minimum value in table. + + + .. py:attribute:: xmax + + double (*value field*) Maximum value in table. + + + .. py:attribute:: invdx + + double (*value field*) Maximum value in table. + + + .. py:attribute:: table + + vector<double> (*value field*) The lookup table. + + + .. py:attribute:: lookupvalue + + double,double (*lookup field*) Lookup function that performs interpolation to return a value. + + + .. py:attribute:: lookupindex + + unsigned int,double (*lookup field*) Lookup function that returns value by index. diff --git a/docs/source/user/py/references/ZombieCaConc.rst b/docs/source/user/py/references/ZombieCaConc.rst new file mode 100644 index 0000000000000000000000000000000000000000..4b61078cb68beaf649525538778674b7c52734af --- /dev/null +++ b/docs/source/user/py/references/ZombieCaConc.rst @@ -0,0 +1,6 @@ +ZombieCaConc +------------ + +.. py:class:: ZombieCaConc + + ZombieCaConc: Calcium concentration pool. Takes current from a channel and keeps track of calcium buildup and depletion by a single exponential process. diff --git a/docs/source/user/py/references/ZombieCompartment.rst b/docs/source/user/py/references/ZombieCompartment.rst new file mode 100644 index 0000000000000000000000000000000000000000..b36b9c8565b0119d70d209061790acb781d19827 --- /dev/null +++ b/docs/source/user/py/references/ZombieCompartment.rst @@ -0,0 +1,6 @@ +ZombieCompartment +----------------- + +.. py:class:: ZombieCompartment + + Compartment object, for branching neuron models. diff --git a/docs/source/user/py/references/ZombieFunction.rst b/docs/source/user/py/references/ZombieFunction.rst new file mode 100644 index 0000000000000000000000000000000000000000..42b5219be2961105fdc3ef97d5d6e2da408e4c03 --- /dev/null +++ b/docs/source/user/py/references/ZombieFunction.rst @@ -0,0 +1,21 @@ +ZombieFunction +-------------- + + +.. py:class:: ZombieFunction + + ZombieFunction: Takes over Function, which is a general purpose function calculator using real numbers. + + .. py:attribute:: proc + + void (*shared message field*) This is a shared message to receive Process messages from the scheduler objects.The first entry in the shared msg is a MsgDest for the Process operation. It has a single argument, ProcInfo, which holds lots of information about current time, thread, dt and so on. The second entry is a MsgDest for the Reinit operation. It also uses ProcInfo. + + + .. py:method:: process + + (*destination message field*) Handles process call, updates internal time stamp. + + + .. py:method:: reinit + + (*destination message field*) Handles reinit call. diff --git a/docs/source/user/py/references/moose_classes.rst b/docs/source/user/py/references/moose_classes.rst new file mode 100644 index 0000000000000000000000000000000000000000..1b8bbe115cb29006577ce915bf0c5b56580f68bc --- /dev/null +++ b/docs/source/user/py/references/moose_classes.rst @@ -0,0 +1,136 @@ +Class Hierarchy +--------------- + +- __builtin__.object + - Melement + - :doc:`Neutral` + - :doc:`Adaptor` + - :doc:`Annotator` + - :doc:`Arith` + - :doc:`CaConcBase` + - :doc:`CaConc` + - :doc:`ZombieCaConc` + - :doc:`ChanBase` + - :doc:`HHChannel2D` + - :doc:`HHChannelBase` + - :doc:`HHChannel` + - ZombieHChannel + - :doc:`Leakage` + - :doc:`MarkovChannel` + - :doc:`MgBlock` + - :doc:`SynChan` + - :doc:`NMDAChan` + - :doc:`ChemCompt` + - :doc:`CubeMesh` + - :doc:`CylMesh` + - :doc:`NeuroMesh` + - :doc:`PsdMesh` + - :doc:`SpineMesh` + - :doc:`Cinfo` + - :doc:`Clock` + - :doc:`CompartmentBase` + - :doc:`Compartment` + - :doc:`IntFireBase` + - :doc:`AdThreshIF` + - :doc:`ExIF` + - :doc:`AdExIF` + - :doc:`IzhIF` + - :doc:`LIF` + - :doc:`QIF` + - :doc:`SymCompartment` + - :doc:`ZombieCompartment` + - DifBufferBase + - DifBuffer + - DifShellBase + - :doc:`DifShell` + - :doc:`DiffAmp` + - :doc:`Dsolve` + - :doc:`EnzBase` + - :doc:`CplxEnzBase` + - :doc:`Enz` + - ZombieEnz + - MMenz + - ZombieMMenz + - :doc:`Finfo` + - :doc:`Func` + - :doc:`Function` + - :doc:`ZombieFunction` + - :doc:`GapJunction` + - :doc:`Group` + - :doc:`Gsolve` + - :doc:`HDF5WriterBase` + - :doc:`HDF5DataWriter` + - :doc:`NSDFWriter` + - :doc:`HHGate` + - :doc:`HHGate2D` + - :doc:`HSolve` + - :doc:`IntFire` + - :doc:`Interpol2D` + - :doc:`IzhikevichNrn` + - :doc:`Ksolve` + - MMPump + - :doc:`MarkovGslSolver` + - :doc:`MarkovRateTable` + - :doc:`MarkovSolverBase` + - :doc:`MarkovSolver` + - :doc:`MeshEntry` + - :doc:`Msg` + - :doc:`DiagonalMsg` + - :doc:`OneToAllMsg` + - OneToOneDataIndexMsg + - OneToOneMsg + - :doc:`SingleMsg` + - :doc:`SparseMsg` + - :doc:`Mstring` + - :doc:`Nernst` + - :doc:`Neuron` + - :doc:`PIDController` + - :doc:`PoolBase` + - :doc:`Pool` + - BufPool + - ZombiePool + - ZombieBufPool + - :doc:`PostMaster` + - :doc:`PulseGen` + - :doc:`PyRun` + - RC + - :doc:`RandGenerator` + - :doc:`BinomialRng` + - :doc:`ExponentialRng` + - :doc:`GammaRng` + - :doc:`NormalRng` + - :doc:`PoissonRng` + - :doc:`UniformRng` + - :doc:`RandSpike` + - :doc:`ReacBase` + - Reac + - ZombieReac + - :doc:`Shell` + - :doc:`Species` + - :doc:`SpikeGen` + - :doc:`Spine` + - :doc:`Stats` + - Spike + - :doc:`SteadyState` + - :doc:`Stoich` + - :doc:`SynHandlerBase` + - :doc:`GraupnerBrunel2012CaPlasticitySynHandler` + - :doc:`STDPSynHandler` + - :doc:`SeqSynHandler` + - :doc:`SimpleSynHandler` + - :doc:`Synapse` + - :doc:`STDPSynapse` + - :doc:`TableBase` + - :doc:`Interpol` + - :doc:`StimulusTable` + - :doc:`Streamer` + - :doc:`Table` + - :doc:`Table2` + - :doc:`TimeTable` + - :doc:`VClamp` + - :doc:`Variable` + - :doc:`InputVariable` + - :doc:`VectorTable` + - :doc:`testSched` + - vec + - :doc:`Moose_BuiltIn` diff --git a/docs/source/user/py/references/moose_functions.rst b/docs/source/user/py/references/moose_functions.rst new file mode 100644 index 0000000000000000000000000000000000000000..b0f46afb9bfd4848b6a99de08fb02a52683da87d --- /dev/null +++ b/docs/source/user/py/references/moose_functions.rst @@ -0,0 +1,349 @@ +MOOSE Functions +--------------- + +element +^^^^^^^ +moose.element(arg) -> moose object + +Convert a path or an object to the appropriate builtin moose class instance. + +`arg` : str/vec/moose object + path of the moose element to be converted or another element (possibly available as a superclass instance). + +Returns - melement + MOOSE element (object) corresponding to the `arg` converted to write subclass. + +getFieldNames +^^^^^^^^^^^^^ +moose.getFieldNames(className, finfoType='valueFinfo') -> tuple + +Get a tuple containing the name of all the fields of `finfoType` kind. + +`className` : string + Name of the class to look up. +`finfoType` : string + The kind of field - + `valueFinfo` - + `srcFinfo` - + `destFinfo` - + `lookupFinfo`- + `fieldElementFinfo` - + +Returns - tuple + Names of the fields of type `finfoType` in class `className`. + +copy +^^^^ +moose.copy(src, dest, name, n, toGlobal, copyExtMsg) -> bool + +Make copies of a moose object. + +`src` : vec, element or str + source object. +`dest` : vec, element or str + Destination object to copy into. +`name` : str + Name of the new object. If omitted, name of the original will be used. +`n` : int + Number of copies to make. +`toGlobal` : int + Relevant for parallel environments only. If false, the copies will + reside on local node, otherwise all nodes get the copies. +`copyExtMsg` : int + If true, messages to/from external objects are also copied. + +Returns - vec + newly copied vec + +move +^^^^ +moose.move(...) + Move a vec object to a destination. + +delete +^^^^^^ +moose.delete(...) + delete(obj)->None + +Delete the underlying moose object. This does not delete any of the +Python objects referring to this vec but does invalidate them. Any +attempt to access them will raise a ValueError. + +`id` : vec + vec of the object to be deleted. + +Returns - None + +useClock +^^^^^^^^ +moose.useClock(tick, path, fn) + +schedule `fn` function of every object that matches `path` on tick no. `tick`. + +Most commonly the function is 'process'. NOTE: unlike earlier versions, now +autoschedule is not available. You have to call useClock for every element that +should be updated during the simulation. + +The sequence of clockticks with the same dt is according to their number. +This is utilized for controlling the order of updates in various objects where it matters. The following convention should be observed when assigning clockticks to various components of a model: + +Clock ticks 0-3 are for electrical (biophysical) components, 4 and 5 are for chemical kinetics, 6 and 7 are for lookup tables and stimulus, 8 and 9 are for recording tables. + +Generally, `process` is the method to be assigned a clock tick. Notable exception is `init` method of Compartment class which is assigned tick 0. + + - 0 : Compartment: `init` + - 1 : Compartment: `process` + - 2 : HHChannel and other channels: `process` + - 3 : CaConc : `process` + - 4,5 : Elements for chemical kinetics : `process` + - 6,7 : Lookup (tables), stimulus : `process` + - 8,9 : Tables for plotting : `process` + +`tick` : int + tick number on which the targets should be scheduled. +`path` : str + path of the target element(s). This can be a wildcard also. +`fn` : str + name of the function to be called on each tick. Commonly `process`. + +Examples - + +In multi-compartmental neuron model a compartment's membrane potential (Vm) is dependent on its neighbours' membrane potential. Thus it must get the neighbour's present Vm before computing its own Vm in next time step. This ordering is achieved by scheduling the `init` function, which communicates membrane potential, on tick 0 and `process` function on tick 1.:: + + >>> moose.useClock(0, '/model/compartment_1', 'init') + >>> moose.useClock(1, '/model/compartment_1', 'process') + +setClock +^^^^^^^^ +moose.setClock(tick, dt) + +set the ticking interval of `tick` to `dt`. + +A tick with interval `dt` will call the functions scheduled on that tick every `dt` timestep. + +`tick` : int + tick number +`dt` : double + ticking interval + +start +^^^^^ +moose.start(time, notify = False) -> None + +Run simulation for `t` time. Advances the simulator clock by `t` +time. If 'notify = True', a message is written to terminal whenever +10% of simulation time is over. + +After setting up a simulation, YOU MUST CALL MOOSE.REINIT() before +CALLING MOOSE.START() TO EXECUTE THE SIMULATION. Otherwise, the +simulator behaviour will be undefined. Once moose.reinit() has been +called, you can call moose.start(t) as many time as you like. This +will continue the simulation from the last state for `t` time. + +`t` : float + duration of simulation. +`notify` : bool + default False. If True, notify user whenever 10% of simultion + is over. + +Returns - None + +reinit +^^^^^^ +moose.reinit() -> None + +Reinitialize simulation. + +This function (re)initializes moose simulation. It must be called +before you start the simulation (see moose.start). If you want to +continue simulation after you have called moose.reinit() and +moose.start(), you must NOT call moose.reinit() again. Calling +moose.reinit() again will take the system back to initial setting +(like clear out all data recording tables, set state variables to +their initial values, etc. + +stop +^^^^ +moose.stop(...) + Stop simulation + +isRunning +^^^^^^^^^ +moose.isRunning(...) + True if the simulation is currently running. + +exists +^^^^^^ +moose.exists(...) + True if there is an object with specified path. + +loadModel +^^^^^^^^^ +moose.loadModel(...) + loadModel(filename, modelpath, solverclass) -> vec + + Load model from a file to a specified path. + +`filename` : str + model description file. +`modelpath` : str + moose path for the top level element of the model to be created. +`solverclass` : str, optional + solver type to be used for simulating the model. + +Returns - vec + loaded model container vec. + +connect +^^^^^^^ +moose.connect(src, srcfield, destobj, destfield[,msgtype]) -> bool + + Create a message between `src_field` on `src` object to `dest_field` on `dest` object. + This function is used mainly, to say, connect two entities, and to denote what kind of + give-and-take relationship they share.It enables the 'destfield' (of + the 'destobj') to acquire the data, from 'srcfield'(of the 'src'). + +`src` : element/vec/string + the source object (or its path) + (the one that provides information) +`srcfield` : str + source field on self.(type of the information) +`destobj` : element + Destination object to connect to. + (The one that need to get information) +`destfield` : str + field to connect to on `destobj`. +`msgtype` : str + type of the message. Can be + `Single` - + `OneToAll` - + `AllToOne` - + `OneToOne` - + `Reduce` - + `Sparse` - + Default: `Single`. + +Returns - `msgmanager` : melement + message-manager for the newly created message. + +Examples - +Connect the output of a pulse generator to the input of a spike generator:: + + >>> pulsegen = moose.PulseGen('pulsegen') + >>> spikegen = moose.SpikeGen('spikegen') + >>> pulsegen.connect('output', spikegen, 'Vm') + +getCwe +^^^^^^ +moose.getCwe(...) + Get the current working element. 'pwe' is an alias of this function. + +setCwe +^^^^^^ +moose.setCwe(...) + Set the current working element. 'ce' is an alias of this function + +getFieldDict +^^^^^^^^^^^^ +moose.getFieldDict(className, finfoType) -> dict + + Get dictionary of field names and types for specified class. + +`className` : str + MOOSE class to find the fields of. +`finfoType` : str (optional) + Finfo type of the fields to find. If empty or not specified, all + fields will be retrieved. + +Returns - dict + field names and their types. + +Notes - + This behaviour is different from `getFieldNames` where only + `valueFinfo`s are returned when `finfoType` remains unspecified. + +Examples - + List all the source fields on class Neutral:: + + >>> moose.getFieldDict('Neutral', 'srcFinfo') + >>> {'childMsg': 'int'} + +getField +^^^^^^^^ +moose.getField(...) + getField(element, field, fieldtype) -- Get specified field of specified type from object vec. + +seed +^^^^ +moose.seed(...) + moose.seed(seedvalue) -> seed + + Reseed MOOSE random number generator. + +`seed` : int + Value to use for seeding. + All RNGs in moose except rand functions in moose.Function + expression use this seed. + By default (when this function is not called) seed is initializecd + to some random value using system random device (if available). + + + default: random number generated using system random device + + Returns - None + +rand +^^^^ +moose.rand(...) + moose.rand() -> [0,1) + + Returns - float in [0, 1) real interval generated by MT19937. + + Notes - + MOOSE does not automatically seed the random number generator. You + must explicitly call moose.seed() to create a new sequence of random + numbers each time. + +wildcardFind +^^^^^^^^^^^^ +moose.wildcardFind(expression) -> tuple of melements. + + Find an object by wildcard. + +`expression` : str + MOOSE allows wildcard expressions of the form:: + + {PATH}/{WILDCARD}[{CONDITION}] + + where {PATH} is valid path in the element tree. + `{WILDCARD}` can be `#` or `##`. + + `#` causes the search to be restricted to the children of the + element specified by {PATH}. + + `##` makes the search to recursively go through all the descendants + of the {PATH} element. + {CONDITION} can be:: + + TYPE={CLASSNAME} : an element satisfies this condition if it is of + class {CLASSNAME}. + ISA={CLASSNAME} : alias for TYPE={CLASSNAME} + CLASS={CLASSNAME} : alias for TYPE={CLASSNAME} + FIELD({FIELDNAME}){OPERATOR}{VALUE} : compare field {FIELDNAME} with + {VALUE} by {OPERATOR} where {OPERATOR} is a comparison operator (=, + !=, >, <, >=, <=). + + For example, /mymodel/##[FIELD(Vm)>=-65] will return a list of all + the objects under /mymodel whose Vm field is >= -65. + + Returns - tuple + all elements that match the wildcard. + +quit +^^^^ + Finalize MOOSE threads and quit MOOSE. This is made available for + debugging purpose only. It will automatically get called when moose + module is unloaded. End user should not use this function. + +moose.quit(...) + Finalize MOOSE threads and quit MOOSE. This is made available for debugging purpose only. It will automatically get called when moose module is unloaded. End user should not use this function. diff --git a/docs/source/user/py/references/testSched.rst b/docs/source/user/py/references/testSched.rst new file mode 100644 index 0000000000000000000000000000000000000000..11f49b1f8741f46e7124c2152e12932495cc6b08 --- /dev/null +++ b/docs/source/user/py/references/testSched.rst @@ -0,0 +1,9 @@ +testSched +--------- + +.. py:class:: testSched + + + .. py:method:: process + + (*destination message field*) handles process call