From 9e0ffcf30656c3a34b964e74204b5b2e614d85b7 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Tue, 6 Aug 2024 09:11:23 +0200 Subject: [PATCH 1/4] issue 2633 --- doc/htmldoc/synapses/connectivity_concepts.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/htmldoc/synapses/connectivity_concepts.rst b/doc/htmldoc/synapses/connectivity_concepts.rst index b50e086cf3..962428ac73 100644 --- a/doc/htmldoc/synapses/connectivity_concepts.rst +++ b/doc/htmldoc/synapses/connectivity_concepts.rst @@ -69,6 +69,7 @@ Projections are created in NEST with the :py:func:`.Connect` function: nest.Connect(pre, post) nest.Connect(pre, post, conn_spec) nest.Connect(pre, post, conn_spec, syn_spec) + nest.Connect(pre, post, conn_spec, syn_spec, return_synapsecollection=True) In the simplest case, the function just takes the ``NodeCollections`` ``pre`` and ``post``, defining the nodes of origin (`sources`) and termination (`targets`) for the connections to be established with the default rule ``all-to-all`` and the synapse model :ref:`static_synapse`. From 06f037237d07965797c2819661cd001e4b9803d4 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Tue, 6 Aug 2024 09:14:32 +0200 Subject: [PATCH 2/4] issue #3202 --- pynest/examples/one_neuron_with_noise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynest/examples/one_neuron_with_noise.py b/pynest/examples/one_neuron_with_noise.py index df2d7f009d..ea64005bd2 100755 --- a/pynest/examples/one_neuron_with_noise.py +++ b/pynest/examples/one_neuron_with_noise.py @@ -56,7 +56,7 @@ ############################################################################### # Third, the Poisson generator is configured using ``SetStatus``, which expects # a list of node handles and a list of parameter dictionaries. We set the -# Poisson generators to 8,000 Hz and 15,000 Hz, respectively. Note that we do +# Poisson generators to 80,000 Hz and 15,000 Hz, respectively. Note that we do # not need to set parameters for the neuron and the voltmeter, since they have # satisfactory defaults. From 12a5a9c8bc2ff9552da5faf0aca81969d2c7b8eb Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Tue, 6 Aug 2024 09:29:03 +0200 Subject: [PATCH 3/4] issue #3264 --- doc/htmldoc/neurons/exact-integration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/htmldoc/neurons/exact-integration.rst b/doc/htmldoc/neurons/exact-integration.rst index 0980d968b0..48df29b759 100644 --- a/doc/htmldoc/neurons/exact-integration.rst +++ b/doc/htmldoc/neurons/exact-integration.rst @@ -22,9 +22,9 @@ The leaky integrate-and fire model In the leaky integrate-and-fire model, the memory problem is solved by adding a "leak" term :math:`\frac{-1}{R}V` (:math:`R` is the resistance and :math:`\tau=RC`) to the membrane potential: .. math:: + :label: membrane \frac{dV}{dt}=\frac{-1}{\tau}V+\frac{1}{C}I. - :label: membrane This reflects the diffusion of ions that occurs through the membrane when some equilibrium is not reached in the cell. From 51604879ea84da0b66378120bdbbb55d2c1bc639 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Tue, 6 Aug 2024 09:47:56 +0200 Subject: [PATCH 4/4] fix sphinx warnings --- doc/htmldoc/synapses/index.rst | 2 +- models/iaf_bw_2001.h | 34 +++++++++++++++---------- models/iaf_bw_2001_exact.h | 24 +++++++++-------- models/iaf_psc_exp.h | 3 +++ pynest/examples/wang_decision_making.py | 4 +-- 5 files changed, 40 insertions(+), 27 deletions(-) diff --git a/doc/htmldoc/synapses/index.rst b/doc/htmldoc/synapses/index.rst index 855d398095..c4fedf12d4 100644 --- a/doc/htmldoc/synapses/index.rst +++ b/doc/htmldoc/synapses/index.rst @@ -9,7 +9,7 @@ Guides on using synapses in NEST .. grid:: 1 1 2 2 - .. grid-item-card:: Managing coonnections + .. grid-item-card:: Managing coonnections * :ref:`connectivity_concepts` * :ref:`connection_generator` diff --git a/models/iaf_bw_2001.h b/models/iaf_bw_2001.h index f28ce10610..3efbace816 100644 --- a/models/iaf_bw_2001.h +++ b/models/iaf_bw_2001.h @@ -88,7 +88,7 @@ The membrane potential and synaptic variables evolve according to I_\mathrm{NMDA} &= \frac{(V(t) - V_E)}{1+[\mathrm{Mg^{2+}}]\mathrm{exp}(-0.062V(t))/3.57}\sum_{j \in \Gamma_\mathrm{ex}}^{N_E}w_jS_{j,\mathrm{NMDA}}(t) \\[3ex] I_\mathrm{GABA} &= (V(t) - V_I)\sum_{j \in \Gamma_\mathrm{in}}^{N_E}w_jS_{j,\mathrm{GABA}}(t) \\[5ex] \frac{dS_{j,\mathrm{AMPA}}}{dt} &= -\frac{j,S_{\mathrm{AMPA}}}{\tau_\mathrm{AMPA}}+\sum_{k \in \Delta_j} \delta (t - t_j^k) \\[3ex] - \frac{dS_{j,\mathrm{GABA}}}{dt} &= -\frac{S_{j,\mathrm{GABA}}}{\tau_\mathrm{GABA}} + \sum_{k \in \Delta_j} \delta (t - t_j^k) \\[3ex] + \frac{dS_{j,\mathrm{GABA}}}{dt} &= -\frac{S_{j,\mathrm{GABA}}}{\tau_\mathrm{GABA}} + \sum_{k \in \Delta_j} \delta (t - t_j^k) \\[3ex] \frac{dS_{j,\mathrm{NMDA}}}{dt} &= -\frac{S_{j,\mathrm{NMDA}}}{\tau_\mathrm{NMDA,decay}} + \sum_{k \in \Delta_j} (k_0 + k_1 S(t)) \delta (t - t_j^k) \\[3ex] where :math:`\Gamma_\mathrm{ex}` and :math:`\Gamma_\mathrm{in}` are index sets for presynaptic excitatory and inhibitory neurons respectively, and :math:`\Delta_j` is an index set for the spike times of neuron :math:`j`. @@ -105,6 +105,8 @@ The specification of this model differs slightly from the one in [1]_. The param :math:`g_\mathrm{GABA}`, and :math:`g_\mathrm{NMDA}` have been absorbed into the respective synaptic weights. Additionally, the synapses from the external population are not separated from the recurrent AMPA-synapses. +See also [2]_ and [3]_. + For more implementation details and a comparison to the exact version, see: - `Brunel_Wang_2001_Model_Approximation <../model_details/Brunel_Wang_2001_Model_Approximation.ipynb>`_ @@ -118,16 +120,16 @@ The following parameters can be set in the status dictionary. **Parameter** **Default** **Math equivalent** **Description** =================== ================== ================================= ======================================================================== ``E_L`` -70.0 mV :math:`E_\mathrm{L}` Leak reversal potential -``E_ex`` 0.0 mV :math:`E_\mathrm{ex}` Excitatory reversal potential -``E_in`` -70.0 mV :math:`E_\mathrm{in}` Inhibitory reversal potential -``V_th`` -55.0 mV :math:`V_\mathrm{th}` Spike threshold +``E_ex`` 0.0 mV :math:`E_\mathrm{ex}` Excitatory reversal potential +``E_in`` -70.0 mV :math:`E_\mathrm{in}` Inhibitory reversal potential +``V_th`` -55.0 mV :math:`V_\mathrm{th}` Spike threshold ``V_reset`` -60.0 mV :math:`V_\mathrm{reset}` Reset potential of the membrane -``C_m`` 250.0 pF :math:`C_\mathrm{m}` Capacitance of the membrane -``g_L`` 25.0 nS :math:`g_\mathrm{L}` Leak conductance -``t_ref`` 2.0 ms :math:`t_\mathrm{ref}` Duration of refractory period +``C_m`` 250.0 pF :math:`C_\mathrm{m}` Capacitance of the membrane +``g_L`` 25.0 nS :math:`g_\mathrm{L}` Leak conductance +``t_ref`` 2.0 ms :math:`t_\mathrm{ref}` Duration of refractory period ``tau_AMPA`` 2.0 ms :math:`\tau_\mathrm{AMPA}` Time constant of AMPA synapse ``tau_GABA`` 5.0 ms :math:`\tau_\mathrm{GABA}` Time constant of GABA synapse -``tau_rise_NMDA`` 2.0 ms :math:`\tau_\mathrm{NMDA,rise}` Rise time constant of NMDA synapse +``tau_rise_NMDA`` 2.0 ms :math:`\tau_\mathrm{NMDA,rise}` Rise time constant of NMDA synapse ``tau_decay_NMDA`` 100.0 ms :math:`\tau_\mathrm{NMDA,decay}` Decay time constant of NMDA synapse ``alpha`` 0.5 ms^{-1} :math:`\alpha` Rise-time coupling strength for NMDA synapse ``conc_Mg2`` 1.0 mM :math:`[\mathrm{Mg}^+]` Extracellular magnesium concentration @@ -140,9 +142,9 @@ The following state variables evolve during simulation and are available either **State variable** **Initial value** **Math equivalent** **Description** ================== ================= ========================== ================================= ``V_m`` -70 mV :math:`V_{\mathrm{m}}` Membrane potential -``s_AMPA`` 0 :math:`s_\mathrm{AMPA}` AMPA gating variable -``s_GABA`` 0 :math:`s_\mathrm{GABA}` GABA gating variable -``s_NMDA`` 0 :math:`s_\mathrm{NMDA}` NMDA gating variable +``s_AMPA`` 0 :math:`s_\mathrm{AMPA}` AMPA gating variable +``s_GABA`` 0 :math:`s_\mathrm{GABA}` GABA gating variable +``s_NMDA`` 0 :math:`s_\mathrm{NMDA}` NMDA gating variable ``I_NMDA`` 0 pA :math:`I_\mathrm{NMDA}` NMDA current ``I_AMPA`` 0 pA :math:`I_\mathrm{AMPA}` AMPA current ``I_GABA`` 0 pA :math:`I_\mathrm{GABA}` GABA current @@ -170,8 +172,14 @@ SpikeEvent, CurrentEvent, DataLoggingRequest References ++++++++++ -.. [1] Wang, X.-J. (1999). Synaptic Basis of Cortical Persistent Activity: The Importance of NMDA Receptors to Working Memory. Journal of Neuroscience, 19(21), 9587–9603. https://doi.org/10.1523/JNEUROSCI.19-21-09587.1999 -.. [2] Brunel, N., & Wang, X.-J. (2001). Effects of Neuromodulation in a Cortical Network Model of Object Working Memory Dominated by Recurrent Inhibition. Journal of Computational Neuroscience, 11(1), 63–85. https://doi.org/10.1023/A:1011204814320 +.. [1] Wang, X.-J. (1999). Synaptic Basis of Cortical Persistent Activity: The + Importance of NMDA Receptors to Working Memory. Journal of Neuroscience, + 19(21), 9587–9603. https://doi.org/10.1523/JNEUROSCI.19-21-09587.1999 + +.. [2] Brunel, N., & Wang, X.-J. (2001). Effects of Neuromodulation in a Cortical + Network Model of Object Working Memory Dominated by Recurrent Inhibition. + Journal of Computational Neuroscience, 11(1), 63–85. https://doi.org/10.1023/A:1011204814320 + .. [3] Wang, X. J. (2002). Probabilistic decision making by slow reverberation in cortical circuits. Neuron, 36(5), 955-968. https://doi.org/10.1016/S0896-6273(02)01092-9 diff --git a/models/iaf_bw_2001_exact.h b/models/iaf_bw_2001_exact.h index 4d863a4440..c9c1bf50e2 100644 --- a/models/iaf_bw_2001_exact.h +++ b/models/iaf_bw_2001_exact.h @@ -87,7 +87,7 @@ The membrane potential and synaptic variables evolve according to I_\mathrm{NMDA} &= \frac{(V(t) - V_E)}{1+[\mathrm{Mg^{2+}}]\mathrm{exp}(-0.062V(t))/3.57}\sum_{j \in \Gamma_\mathrm{ex}}^{N_E}w_jS_{j,\mathrm{NMDA}}(t) \\[3ex] I_\mathrm{GABA} &= (V(t) - V_I)\sum_{j \in \Gamma_\mathrm{in}}^{N_E}w_jS_{j,\mathrm{GABA}}(t) \\[5ex] - \frac{dS_{j,\mathrm{AMPA}}}{dt} &=-\frac{j,S_{\mathrm{AMPA}}}{\tau_\mathrm{AMPA}}+\sum_{k \in \Delta_j} \delta (t - t_j^k) \\[3ex] + \frac{dS_{j,\mathrm{AMPA}}}{dt} &=-\frac{j,S_{\mathrm{AMPA}}}{\tau_\mathrm{AMPA}}+\sum_{k \in \Delta_j} \delta (t - t_j^k) \\[3ex] \frac{dS_{j,\mathrm{GABA}}}{dt} &= -\frac{S_{j,\mathrm{GABA}}}{\tau_\mathrm{GABA}} + \sum_{k \in \Delta_j} \delta (t - t_j^k) \\[3ex] \frac{dS_{j,\mathrm{NMDA}}}{dt} &= -\frac{S_{j,\mathrm{NMDA}}}{\tau_\mathrm{NMDA,decay}}+ \alpha x_j (1 - S_{j,\mathrm{NMDA}})\\[3ex] \frac{dx_j}{dt} &= -\frac{x_j}{\tau_\mathrm{NMDA,rise}} + \sum_{k \in \Delta_j} \delta (t - t_j^k) @@ -106,6 +106,8 @@ The specification of this model differs slightly from the one in [1]_. The param Additionally, the synapses from the external population is not separated from the recurrent AMPA-synapses. This model is slow to simulate when there are many neurons with NMDA-synapses, since each post-synaptic neuron simulates each pre-synaptic connection explicitly. The model :doc:`iaf_bw_2001 ` is an approximation to this model which is significantly faster. +See also [2]_, [3]_ + Parameters ++++++++++ @@ -115,16 +117,16 @@ The following parameters can be set in the status dictionary. **Parameter** **Default** **Math equivalent** **Description** =================== ================== ================================= ======================================================================== ``E_L`` -70.0 mV :math:`E_\mathrm{L}` Leak reversal potential -``E_ex`` 0.0 mV :math:`E_\mathrm{ex}` Excitatory reversal potential -``E_in`` -70.0 mV :math:`E_\mathrm{in}` Inhibitory reversal potential -``V_th`` -55.0 mV :math:`V_\mathrm{th}` Spike threshold +``E_ex`` 0.0 mV :math:`E_\mathrm{ex}` Excitatory reversal potential +``E_in`` -70.0 mV :math:`E_\mathrm{in}` Inhibitory reversal potential +``V_th`` -55.0 mV :math:`V_\mathrm{th}` Spike threshold ``V_reset`` -60.0 mV :math:`V_\mathrm{reset}` Reset potential of the membrane -``C_m`` 250.0 pF :math:`C_\mathrm{m}` Capacitance of the membrane -``g_L`` 25.0 nS :math:`g_\mathrm{L}` Leak conductance -``t_ref`` 2.0 ms :math:`t_\mathrm{ref}` Duration of refractory period +``C_m`` 250.0 pF :math:`C_\mathrm{m}` Capacitance of the membrane +``g_L`` 25.0 nS :math:`g_\mathrm{L}` Leak conductance +``t_ref`` 2.0 ms :math:`t_\mathrm{ref}` Duration of refractory period ``tau_AMPA`` 2.0 ms :math:`\tau_\mathrm{AMPA}` Time constant of AMPA synapse ``tau_GABA`` 5.0 ms :math:`\tau_\mathrm{GABA}` Time constant of GABA synapse -``tau_rise_NMDA`` 2.0 ms :math:`\tau_\mathrm{NMDA,rise}` Rise time constant of NMDA synapse +``tau_rise_NMDA`` 2.0 ms :math:`\tau_\mathrm{NMDA,rise}` Rise time constant of NMDA synapse ``tau_decay_NMDA`` 100.0 ms :math:`\tau_\mathrm{NMDA,decay}` Decay time constant of NMDA synapse ``alpha`` 0.5 ms^{-1} :math:`\alpha` Rise-time coupling strength for NMDA synapse ``conc_Mg2`` 1.0 mM :math:`[\mathrm{Mg}^+]` Extracellular magnesium concentration @@ -137,9 +139,9 @@ The following state variables evolve during simulation and are available either **State variable** **Initial value** **Math equivalent** **Description** ================== ================= ========================== ================================= ``V_m`` -70 mV :math:`V_{\mathrm{m}}` Membrane potential -``s_AMPA`` 0 :math:`s_\mathrm{AMPA}` AMPA gating variable -``s_GABA`` 0 :math:`s_\mathrm{GABA}` GABA gating variable -``s_NMDA`` 0 :math:`s_\mathrm{NMDA}` NMDA gating variable +``s_AMPA`` 0 :math:`s_\mathrm{AMPA}` AMPA gating variable +``s_GABA`` 0 :math:`s_\mathrm{GABA}` GABA gating variable +``s_NMDA`` 0 :math:`s_\mathrm{NMDA}` NMDA gating variable ``I_NMDA`` 0 pA :math:`I_\mathrm{NMDA}` NMDA current ``I_AMPA`` 0 pA :math:`I_\mathrm{AMPA}` AMPA current ``I_GABA`` 0 pA :math:`I_\mathrm{GABA}` GABA current diff --git a/models/iaf_psc_exp.h b/models/iaf_psc_exp.h index 0fc324a0ab..caab9f74e0 100644 --- a/models/iaf_psc_exp.h +++ b/models/iaf_psc_exp.h @@ -135,6 +135,9 @@ on the synaptic time constant according to will numerically behave as if ``tau_m`` is equal to ``tau_syn_ex`` or ``tau_syn_in``, respectively, to avoid numerical instabilities. + NEST uses exact integration [2]_, [3]_ to integrate subthreshold membrane dynamics + with maximum precision. + For implementation details see the `IAF Integration Singularity notebook <../model_details/IAF_Integration_Singularity.ipynb>`_. diff --git a/pynest/examples/wang_decision_making.py b/pynest/examples/wang_decision_making.py index 764e18b537..16d712b43d 100644 --- a/pynest/examples/wang_decision_making.py +++ b/pynest/examples/wang_decision_making.py @@ -36,8 +36,8 @@ References ~~~~~~~~~~ .. [1] Wang X-J (2002). Probabilistic Decision Making by Slow Reverberation in -Cortical Circuits. Neuron, Volume 36, Issue 5, Pages 955-968. -https://doi.org/10.1016/S0896-6273(02)01092-9. + Cortical Circuits. Neuron, Volume 36, Issue 5, Pages 955-968. + https://doi.org/10.1016/S0896-6273(02)01092-9. """