Skip to content

Commit

Permalink
Merge pull request #3204 from heplesser/new_tripartite
Browse files Browse the repository at this point in the history
Re-organise tripartite connectivity generation to support multiple primary connection rules
  • Loading branch information
heplesser authored Sep 3, 2024
2 parents 589d7a7 + 1233e08 commit ef0074a
Show file tree
Hide file tree
Showing 35 changed files with 2,429 additions and 1,485 deletions.
3 changes: 2 additions & 1 deletion doc/htmldoc/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ PyNEST examples
* :doc:`../auto_examples/astrocytes/astrocyte_single`
* :doc:`../auto_examples/astrocytes/astrocyte_interaction`
* :doc:`../auto_examples/astrocytes/astrocyte_small_network`
* :doc:`../auto_examples/astrocytes/astrocyte_brunel`
* :doc:`../auto_examples/astrocytes/astrocyte_brunel_bernoulli`
* :doc:`../auto_examples/astrocytes/astrocyte_brunel_fixed_indegree`


.. grid:: 1 1 2 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
" y[0, 1] = 1.0\n",
" y[0, 2] = 1.0\n",
" fos = [] # full output dict from odeint()\n",
" delta_ip3 = 5.0 # parameter determining the increase in IP3 induced by synaptic input\n",
" delta_ip3 = p.delta_IP3 # parameter determining the increase in IP3 induced by synaptic input\n",
"\n",
" # update time-step by time-step\n",
" for k in range(1, n):\n",
Expand Down Expand Up @@ -211,7 +211,7 @@
" \"Kd_IP3_2\": 0.9434,\n",
" \"Km_SERCA\": 0.1,\n",
" \"ratio_ER_cyt\": 0.185,\n",
" \"delta_IP3\": 5.0,\n",
" \"delta_IP3\": 0.0002,\n",
" \"k_IP3R\": 0.0002,\n",
" \"rate_L\": 0.00011,\n",
" \"tau_IP3\": 7142.0,\n",
Expand Down Expand Up @@ -318,7 +318,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.12.1"
}
},
"nbformat": 4,
Expand Down
Binary file modified doc/htmldoc/static/img/astrocyte_interaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 27 additions & 34 deletions doc/htmldoc/synapses/connectivity_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -500,18 +500,25 @@ As multapses are per default allowed and possible with this rule, you can disall

.. _tripartite_connectivity:

Tripartite Bernoulli with pool
------------------------------
Third-factor Bernoulli with pool
--------------------------------

For each possible pair of nodes from a source ``NodeCollection`` (e.g., a neuron population ``S``)
and a target ``NodeCollection`` (e.g., a neuron population ``T``), a connection is
created with probability ``p_primary``, and these connections are
called 'primary' connections. For each primary connection, a
created according to the ``conn_spec`` parameter passed to
``TripariteConnect``; any one-directional connection specification can
be used. The connections created between ``S`` and ``T`` are the
*primary* connections.

For each primary connection, a
third-party connection pair involving a node from a third ``NodeCollection``
(e.g., an astrocyte population ``A``) is created with the conditional probability
``p_third_if_primary``. This connection pair includes a connection
(e.g., an astrocyte population ``A``) is created according to the
``third_factor_conn_spec`` provided. This connection pair includes a connection
from the ``S`` node to the ``A`` node, and a connection from the ``A`` node to the
``T`` node. The ``A`` node to connect to is chosen
``T`` node.

At present, ``third_factor_bernoulli_with_pool`` is the only connection rule
available for third-factor connectivity. It chooses the ``A`` node to connect
at random from a pool, a subset of the nodes in ``A``. By default,
this pool is all of ``A``.

Expand Down Expand Up @@ -548,55 +555,41 @@ up to two randomly selected nodes in ``A`` (given ``pool_size == 2``).
S = nest.Create('aeif_cond_alpha_astro', N_S)
T = nest.Create('aeif_cond_alpha_astro', N_T)
A = nest.Create('astrocyte_lr_1994', N_A)
conn_spec = {'rule': 'tripartite_bernoulli_with_pool',
'p_primary': p_primary,
'p_third_if_primary': p_third_if_primary,
'pool_type': pool_type,
'pool_size': pool_size}
conn_spec = {'rule': 'pairwise_bernoulli',
'p': p_primary}
third_factor_conn_spec = {'rule': 'third_factor_bernoulli_with_pool',
'p': p_third_if_primary,
'pool_type': pool_type,
'pool_size': pool_size}
syn_specs = {'third_out': 'sic_connection'}
nest.TripartiteConnect(S, T, A, conn_spec, syn_specs)
nest.TripartiteConnect(S, T, A, conn_spec, third_factor_conn_spec, syn_specs)
(B) In
the first example of ``'block'`` pool type, let ``N_T/N_A`` = 2,
then each node in ``T`` can be connected with one node in ``A``
(``pool_size == 1`` is required because ``N_A < N_T``), and each node in
``A`` can be connected with up to two nodes in ``T``.

The code for this example is identical to the code for example (A),
except for the choice of pool type and size:

.. code-block:: python
N_S, N_T, N_A, p_primary, p_third_if_primary = 6, 6, 3, 0.2, 1.0
pool_type, pool_size = 'block', 1
S = nest.Create('aeif_cond_alpha_astro', N_S)
T = nest.Create('aeif_cond_alpha_astro', N_T)
A = nest.Create('astrocyte_lr_1994', N_A)
conn_spec = {'rule': 'tripartite_bernoulli_with_pool',
'p_primary': p_primary,
'p_third_if_primary': p_third_if_primary,
'pool_type': pool_type,
'pool_size': pool_size}
syn_specs = {'third_out': 'sic_connection'}
nest.TripartiteConnect(S, T, A, conn_spec, syn_specs)
(C) In the second example
of ``'block'`` pool type, let ``N_A/N_T`` = 2, then each node in
``T`` can be connected with up to two nodes in ``A`` (``pool_size == 2`` is
required because ``N_A/N_T`` = 2), and each node in ``A`` can be
connected to one node in ``T``.

In this example, we have different values for ``N_T`` and ``N_A`` than
in examples (A) and (B), and a different pool size than in example (B):

.. code-block:: python
N_S, N_T, N_A, p_primary, p_third_if_primary = 6, 3, 6, 0.2, 1.0
pool_type, pool_size = 'block', 2
S = nest.Create('aeif_cond_alpha_astro', N_S)
T = nest.Create('aeif_cond_alpha_astro', N_T)
A = nest.Create('astrocyte_lr_1994', N_A)
conn_spec = {'rule': 'tripartite_bernoulli_with_pool',
'p_primary': p_primary,
'p_third_if_primary': p_third_if_primary,
'pool_type': pool_type,
'pool_size': pool_size}
syn_specs = {'third_out': 'sic_connection'}
nest.TripartiteConnect(S, T, A, conn_spec, syn_specs)
References
Expand Down
2 changes: 1 addition & 1 deletion models/astrocyte_lr_1994.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ nest::astrocyte_lr_1994::Parameters_::Parameters_()
, Km_SERCA_( 0.1 ) // µM
, SIC_scale_( 1.0 )
, SIC_th_( 0.19669 ) // µM
, delta_IP3_( 5.0 ) // µM
, delta_IP3_( 0.0002 ) // µM
, k_IP3R_( 0.0002 ) // 1/(µM*ms)
, rate_IP3R_( 0.006 ) // 1/ms
, rate_L_( 0.00011 ) // 1/ms
Expand Down
Loading

0 comments on commit ef0074a

Please sign in to comment.