Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-organise tripartite connectivity generation to support multiple primary connection rules #3204

Merged
merged 53 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
72c7b88
Experimental work on new tripartite implementation; does not yet compile
heplesser Feb 22, 2024
4f34121
Code now compiles, not complete
heplesser Feb 23, 2024
3f6f7e9
All tests not related to disconnect, structural plasticity or tripart…
heplesser Feb 23, 2024
0dab76e
First minimal example works
heplesser Feb 23, 2024
4e1d0d9
Version working for single MPI process, random pool, no disconnect/st…
heplesser Feb 25, 2024
7376c6b
Adapted tripartite tests to new syntax
heplesser Feb 26, 2024
dce1ef1
Structural plasticity and disconnect work
heplesser Feb 26, 2024
240f553
Block pools now supported again
heplesser Feb 26, 2024
9adaf6f
Add MPI support for new tripartite scheme
heplesser Feb 26, 2024
a403765
Fix formatting and pylint problems; improve example names
heplesser Feb 26, 2024
a16cbea
Fix conngen builder
heplesser Feb 26, 2024
a883317
Prohibit 'make_symmetric' in for tripartite connectivity and extend t…
heplesser Feb 27, 2024
4a3396b
Merge branch 'master' of github.com:nest/nest-simulator into new_trip…
heplesser May 6, 2024
6fd3995
Unregister third-factor conn factories on ResetKernel
heplesser May 6, 2024
3e78a18
Merge branch 'master' of github.com:nest/nest-simulator into new_trip…
heplesser Jun 20, 2024
1eaa37a
Remove superfluous checks
heplesser Jun 20, 2024
95299f0
Make ThirdInBuilder final and improve class doc
heplesser Jun 20, 2024
9a862e6
Fix typo.
heplesser Jun 20, 2024
a8a9373
Add comment
heplesser Jun 20, 2024
636b865
Merge branch 'new_tripartite' of github.com:heplesser/nest-simulator …
heplesser Jun 20, 2024
4dce0b4
Fix links to examples
heplesser Jun 26, 2024
bdf6bc6
Merge branch 'master' into new_tripartite
heplesser Aug 8, 2024
92ff702
Ensure script also works for networks with single neuron per layer.
heplesser Aug 8, 2024
725725d
Updated example documentation to new tripartite scheme
heplesser Aug 8, 2024
a49f97b
Update pynest/examples/astrocytes/astrocyte_brunel_fixed_indegree.py
heplesser Aug 8, 2024
39d86d7
Update pynest/examples/astrocytes/astrocyte_brunel_fixed_indegree.py
heplesser Aug 8, 2024
11e67ba
Update pynest/examples/astrocytes/astrocyte_brunel_fixed_indegree.py
heplesser Aug 8, 2024
c67b1ad
Merging suggestions from Github.
heplesser Aug 8, 2024
8229ddb
Merge branch 'new_tripartite' of github.com:heplesser/nest-simulator …
heplesser Aug 8, 2024
0290888
Update connectivity_concepts documentation to new tripartite scheme
heplesser Aug 8, 2024
7f5c12e
Fix typos
heplesser Aug 8, 2024
6a819fe
Stop timer for gather secondary correctly
heplesser Aug 9, 2024
2756180
Revised pool caching to support connection rules with arbitrary targe…
heplesser Aug 12, 2024
a8c30d2
Add detailed timers for third_inner connect
heplesser Aug 14, 2024
1f39884
Add stopwatch for SyncProcesses
heplesser Aug 17, 2024
f833675
Remove detailed timers for third_in and sync
heplesser Aug 23, 2024
ead840a
Merge branch 'master' into new_tripartite_nc
heplesser Aug 26, 2024
742c36f
Fill ThirdIn buffers more efficiently
heplesser Aug 26, 2024
c5a22fb
Parse ThirdIn receive buffer more efficiently
heplesser Aug 26, 2024
7c5cd28
Change parameter values in astrocyte example scripts according to Iir…
HanjiaJiang Aug 26, 2024
2e65b02
Replace astrocyte_interaction.png with new version
HanjiaJiang Aug 26, 2024
a53ce91
Change astrocyte_lr_1994 parameter default value for delta_IP3 to phy…
HanjiaJiang Aug 26, 2024
f62ddac
Update test_astrocyte.dat and astrocyte_model_implementation.ipynb du…
HanjiaJiang Aug 26, 2024
a3f9536
Merge pull request #28 from HanjiaJiang/new_tripartite_hj
heplesser Aug 27, 2024
0f981d4
Fix wording in comment
heplesser Aug 27, 2024
ca73b3e
Remove dead code
heplesser Aug 27, 2024
672008e
Improved naming and comments for conn builder factories
heplesser Aug 27, 2024
518f964
Minor fixes to examples based on code review
heplesser Aug 27, 2024
a2eee24
Extended comments on and some code improvements for conn builders
heplesser Aug 27, 2024
4291be7
Merge branch 'new_tripartite' of github.com:heplesser/nest-simulator …
heplesser Aug 27, 2024
6744b09
Fix formatting
heplesser Aug 27, 2024
5dda6c6
Correct pool type in small network example
heplesser Aug 27, 2024
1233e08
Fixed formatting
heplesser Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
heplesser marked this conversation as resolved.
Show resolved Hide resolved
third_factor_conn_spec = {'rule': 'third_factor_bernoulli_with_pool',
'p': p_third_if_primary,
heplesser marked this conversation as resolved.
Show resolved Hide resolved
'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
Loading