Skip to content
Snippets Groups Projects
Unverified Commit 95b38462 authored by thorstenhater's avatar thorstenhater Committed by GitHub
Browse files

Make `pas/e` GLOBAL instead of RANGE (#1372)

- Make reversal potential `e` a global parameter of `pas` to avoid inconsistency 
  (reversal potential is represented by a RANGE parameter, despite it not being a conductance multiplier see #1052)
- Adjust default value of `e` to -70mV (as in Neuron)
- Streamline docs,  which use `passive`, `el`, and `gl` instead of `passive`, `e`, and `g`.

Closes #1052
parent 89fda19d
No related branches found
No related tags found
No related merge requests found
......@@ -137,25 +137,25 @@ Because a global parameter is fixed over the entire spatial extent
of a density mechanism, a new mechanism has to be created for every
combination of global parameter values.
Take for example a mechanism passive leaky dynamics:
Take for example the built-in mechanism for passive leaky dynamics:
* Name: ``"passive"``.
* Global variable: reversal potential ``"el"``.
* Name: ``"pas"``
* Global variable: reversal potential ``"e"``.
* Range variable: conductance ``"g"``.
.. code-block:: Python
# Create pas mechanism with default parameter values (set in NMODL file).
m1 = arbor.mechanism('passive')
# Create passive mechanism with default parameter values (set in NMODL file).
m1 = arbor.mechanism('pas')
# Create default mechanism with custom conductance (range)
m2 = arbor.mechanism('passive', {'g': 0.1})
# Create mechanism with custom conductance (range)
m2 = arbor.mechanism('pas', {'g': 0.1})
# Create a new pas mechanism with that changes reversal potential (global)
m3 = arbor.mechanism('passive/el=-45')
# Create a new passive mechanism with that changes reversal potential (global)
m3 = arbor.mechanism('pas/e=-45')
# Create an instance of the same mechanism, that also sets conductance (range)
m4 = arbor.mechanism('passive/el=-45', {'g': 0.1})
m4 = arbor.mechanism('pas/e=-45', {'g': 0.1})
decor = arbor.decor()
decor.paint('"soma"', m1)
......
......@@ -97,17 +97,17 @@ that specifies values for range parameters.
For example, consider a mechanism that models passive leaky dynamics with
the following parameters:
* *Name*: ``"passive"``.
* *Global parameter*: reversal potential ``el``, default -65 mV.
* *Name*: ``"pas"``.
* *Global parameter*: reversal potential ``e``, default -70 mV.
* *Range parameter*: conductance ``g``, default 0.001 S⋅cm⁻².
The following example mechanism descriptions for our passive mechanism show that parameters and
ion species dependencies only need to be specified when they differ from their defaults:
* ``("passive")``: the passive mechanism with default parameters.
* ``("passive/el=-80")``: derive a new passive mechanism with a non-default value for global parameter.
* ``("passive", {"gl": 0.005})``: passive mechanism with a new a non-default range parameter value.
* ``("passive/el=-80", {"gl": 0.005})``: derive a new passive mechanism that overrides both
* ``("pas")``: the passive mechanism with default parameters.
* ``("pas/e=-80")``: derive a new passive mechanism with a non-default value for global parameter.
* ``("pas", {"g": 0.005})``: passive mechanism with a new a non-default range parameter value.
* ``("pas/e=-80", {"g": 0.005})``: derive a new passive mechanism that overrides both
Similarly to global parameters, ion species can be renamed in the mechanism name.
This allows the use of generic mechanisms that can be adapted to a specific species
......
......@@ -41,7 +41,7 @@ mechanism that is to be painted or placed on the cable cell.
hh = arbor.mechanism('hh')
# A passive leaky channel with custom parameters
pas = arbor.mechanism('pas', {'e': -55, 'gl': 0.02})
pas = arbor.mechanism('pas/e=-55.0', {'g': 0.02})
# Reversal potential using Nernst equation with GLOBAL parameter values
# for Faraday's constant and the target ion species, set with a '/' followed
......@@ -96,13 +96,13 @@ mechanism that is to be painted or placed on the cable cell.
m2 = arbor.mechanism('pas', {'g', 0.1})
# Create a new pas mechanism with that changes reversal potential (global).
m3 = arbor.mechanism('pas/el=-45')
m3 = arbor.mechanism('pas/e=-45')
# Create an instance of the same mechanism, that also sets conductance (range).
m4 = arbor.mechanism('pas/el=-45', {'g', 0.1})
m4 = arbor.mechanism('pas/e=-45', {'g', 0.1})
# This is an equivalent to m4, using set method to specify range parameters.
m5 = arbor.mechanism('pas/el=-45')
m5 = arbor.mechanism('pas/e=-45')
m5.set('g', 0.1)
# Decorate the 'soma' on a cable_cell.
......@@ -110,7 +110,7 @@ mechanism that is to be painted or placed on the cable cell.
cell.paint('"soma"', m1)
cell.paint('"soma"', m2) # Error: can't place the same mechanism on overlapping regions
cell.paint('"soma"', m3) # This would be ok: m3 is a new, derived mechanism by virtue of
# having a different name, i.e. 'pas/el=-45' vs. 'pas'.
# having a different name, i.e. 'pas/e=-45' vs. 'pas'.
.. py:class:: mechanism_info
......
......@@ -302,9 +302,8 @@ arb::cable_cell gj_cell(cell_gid_type gid, unsigned ncell, double stim_duration)
arb::mechanism_desc kamt("kamt");
kamt["gbar"] = 0.004;
arb::mechanism_desc pas("pas");
arb::mechanism_desc pas("pas/e=-65.0");
pas["g"] = 1.0/12000.0;
pas["e"] = -65;
// Paint density channels on all parts of the cell
decor.paint("(all)", nax);
......
......@@ -91,7 +91,7 @@ private:
// Add pas and hh mechanisms:
dec.paint(reg::tagged(1), "hh"); // (default parameters)
dec.paint(reg::tagged(4), mechanism_desc("pas").set("e", -70));
dec.paint(reg::tagged(4), mechanism_desc("pas/e=-70.0"));
// Add exponential synapse at centre of soma.
synapse_location_ = ls::on_components(0.5, reg::tagged(1));
......
NEURON {
SUFFIX pas
NONSPECIFIC_CURRENT i
RANGE g
GLOBAL e
}
UNITS {
(mV) = (millivolt)
(S) = (siemens)
}
NEURON {
SUFFIX pas
NONSPECIFIC_CURRENT i
RANGE g, e
}
INITIAL {}
PARAMETER {
g = .001 (S/cm2)
e = -65 (mV) : we use -65 for the ball and stick model, instead of Neuron default of -70
}
ASSIGNED {
v (mV)
e = -70 (mV) : Taken from nrn
}
BREAKPOINT {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment