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

Align documentation of connection management with connectivity concepts publication #2992

Merged
merged 39 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2e76e52
Connectivity Concept change
clemensk0 Jul 20, 2023
f6af9eb
connection management documentation
clemensk0 Sep 19, 2023
2a6401a
Merge branch 'master' of https://github.com/clemensk0/nest-simulator-doc
clemensk0 Sep 19, 2023
3c273c4
Move introduction of Connect() function to top
jhnnsnk Oct 20, 2023
8bdb691
Start editing connection management
jhnnsnk Nov 13, 2023
ef37424
Merge branch 'nest:master' into master
clemensk0 Nov 13, 2023
d16fab2
Merge remote-tracking branch 'clemensk0/master' into doc_connconcepts
jhnnsnk Nov 16, 2023
a3adb69
Further revise connection management
jhnnsnk Nov 16, 2023
1369690
More edits on connection management
jhnnsnk Nov 16, 2023
6a688d8
Update connection rule names in synapse specifications
jhnnsnk Nov 16, 2023
f47bf31
Final edits
jhnnsnk Nov 16, 2023
46ce4f3
Merge pull request #1 from jhnnsnk/doc_connconcepts
clemensk0 Nov 16, 2023
8356375
Merge branch 'nest:master' into master
clemensk0 Nov 16, 2023
27a68fe
Update connection_management.rst
clemensk0 Nov 16, 2023
90e22ea
Update doc/htmldoc/synapses/connection_management.rst
jessica-mitchell Nov 17, 2023
f4164c0
Update doc/htmldoc/synapses/connection_management.rst
jessica-mitchell Nov 20, 2023
a0d8915
Manually merged connection_management.rst
jhnnsnk Dec 5, 2023
0004962
Add cross-reference to tripartite rule
jhnnsnk Dec 5, 2023
d5ab6fc
Reorder figure and text of tripartite examples, fix indentation in code
jhnnsnk Dec 5, 2023
08a8ea0
Suggestion to cite
jhnnsnk Dec 5, 2023
9b2b4d6
Reword in handling_connections as suggested by @heplesser
jhnnsnk Dec 5, 2023
d892bc8
Add to whats new
jhnnsnk Dec 5, 2023
e57b8ee
Minor
jhnnsnk Dec 5, 2023
9071b8d
Merge pull request #2 from jhnnsnk/nest_docs_conn
clemensk0 Dec 5, 2023
c8d9f65
Remove template, minor edits
jhnnsnk Dec 6, 2023
97fbf0f
Merge pull request #3 from jhnnsnk/nest_docs_conn
clemensk0 Dec 6, 2023
7482a5f
add class and directive to center text in rst
jessica-mitchell Dec 6, 2023
5e29139
Merge pull request #4 from jessica-mitchell/conn_mgn
clemensk0 Dec 6, 2023
8c51aab
add links and change overview
clemensk0 Dec 6, 2023
5601e69
Merge pull request #5 from clemensk0/connectivity
clemensk0 Dec 6, 2023
e237dae
Merge branch 'nest:master' into master
clemensk0 Dec 6, 2023
e390aaf
change heading and restructuring
clemensk0 Dec 6, 2023
ff60ff0
Merge pull request #6 from clemensk0/connectivity
clemensk0 Dec 6, 2023
93cce46
modify top grid images
jessica-mitchell Dec 7, 2023
b299d07
add modified images
jessica-mitchell Dec 7, 2023
6259a9c
update links to new label names
jessica-mitchell Dec 7, 2023
77b4501
Merge pull request #7 from jessica-mitchell/conn_mgn
clemensk0 Dec 7, 2023
30fbfe6
fix links
jessica-mitchell Dec 8, 2023
5f8e9fa
Merge pull request #8 from jessica-mitchell/conn_mgn
clemensk0 Dec 8, 2023
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
2 changes: 1 addition & 1 deletion doc/htmldoc/installation/cmake_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ follwing switch for the invocation of ``cmake``. It expects either
-Dwith-libneurosim=[OFF|ON|</path/to/libneurosim>]

For details on how to use the Connection Generator Interface, see the
:ref:`guide on connection management <conn_builder_conngen>`.
:ref:`guide on connection generation <connection_generator>`.

.. _compile_with_python:

Expand Down
2 changes: 1 addition & 1 deletion doc/htmldoc/nest_behavior/running_simulations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ NEST also has some models that determine the precise time of the
threshold crossing during the interval. Please see the documentation on
:ref:`precise spike time neurons <sim_precise_spike_times>`
for details about neuron update in continuous time and the
:ref:`documentation on connection management <connection_management>`
:ref:`documentation on the connectivty concept <connectivity_concept>`
for how to set the delay when creating synapses.

.. _stepped_simulations:
Expand Down
2 changes: 1 addition & 1 deletion doc/htmldoc/networks/spatially_structured_networks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ The following table presents some query functions provided by NEST.
+---------------------------------+-----------------------------------------------------+
| ``nest.GetConnections()`` | Retrieve connections (all or for a given |
| | source or target); see also |
| | http://www.nest-simulator.org/connection_management.|
| | :ref:`connectivity_concept`. |
+---------------------------------+-----------------------------------------------------+
| ``nest.GetNodes()`` | Returns a NodeCollection of all elements with given |
| | properties. |
Expand Down
17 changes: 11 additions & 6 deletions doc/htmldoc/static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Customize css to define NEST specific colors, style and format
*
primary styles, for custom index.html and layout.html pages (see templates/ folder)
Expand All @@ -8,7 +8,7 @@

Sphinx theme: sphinx-material
https://bashtage.github.io/sphinx-material/index.html
Sphinx material theme properties use 'md' in variable names
Sphinx material theme properties use 'md' in variable names
Extesion for grid / cards in reStructured Text see sphinx-design
https://sphinx-design.readthedocs.io/
Sphinx design properties use the sd in variable names
Expand Down Expand Up @@ -123,9 +123,14 @@ figure.align-default {
outline-style: groove;
}

.center {

text-align: center;
font-style: italic;
}

/**************************************************************************************
Settings for overriding material design theme
Settings for overriding material design theme
Setting nest colors to override sphinx material "orange" and other default colors

**************************************************************************************/
Expand All @@ -140,7 +145,7 @@ figure.align-default {
font-weight: 600;
}
.md-typeset h1[id]:before,
.md-typeset h2[id]:before,
.md-typeset h2[id]:before,
.md-typeset h3[id]:before,
.md-typeset h4[id]:before {
margin-top: -3.4rem;
Expand Down Expand Up @@ -199,7 +204,7 @@ div[role="main"] .md-source {
div.sd-card-title.sd-font-weight-bold.sd-d-flex-row.docutils a.reference.internal img {
margin-right: 2em;
margin-bottom: 0.5em;

}

.md-typeset .admonition, .md-typeset .admonition.tip {
Expand Down Expand Up @@ -228,7 +233,7 @@ div.sd-card-title.sd-font-weight-bold.sd-d-flex-row.docutils a.reference.interna
}
.md-typeset .admonition.warning {
border-left-color: #be1717;
}
}
.md-typeset .admonition.warning > .admonition-title {
background-color: #be1717;
}
Expand Down
Binary file modified doc/htmldoc/static/img/All_to_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/All_to_all_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Autapse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Autapse_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Autapse_multapse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Autapse_multapse_v.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Connection_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/htmldoc/static/img/Fixed_indegree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Fixed_indegree_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/htmldoc/static/img/Fixed_outdegree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Fixed_outdegree_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Fixed_total_number.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Fixed_total_number_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Multapse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Multapse_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/htmldoc/static/img/One_to_one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/One_to_one_H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/htmldoc/static/img/Pairwise_bernoulli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions doc/htmldoc/synapses/connection_generator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. _connection_generator:

Connection generator interface
------------------------------

.. admonition:: Availability

This connection rule is only available if NEST was compiled with
:ref:`support for libneurosim <compile_with_libneurosim>`.

To allow the generation of connectivity by means of an external
library, NEST supports the Connection Generator Interface [2]_. For
more details on this interface, see the git repository of `libneurosim
<https://github.com/INCF/libneurosim>`_.

In contrast to the other rules for creating connections, this rule
relies on a Connection Generator object to describe the connectivity
pattern in a library-specific way. The Connection Generator is handed
to :py:func:`.Connect` under the key ``cg`` of the connection specification
dictionary and evaluated internally. If the Connection Generator
provides values for connection weights and delays, their respective
indices can be specified under the key ``params_map``. Alternatively,
all synapse parameters can be specified using the synapse
specification argument to ``Connect()``.

The following listing shows an example for using CSA (`Connection Set Algebra <https://github.com/INCF/csa>`_ [1]_) in NEST via the Connection
generator interface and randomly connects 10% of the neurons from
``A`` to the neurons in ``B``, each connection having a weight of
10000.0 pA and a delay of 1.0 ms:

.. code-block:: python

A = nest.Create('iaf_psc_alpha', 100)
B = nest.Create('iaf_psc_alpha', 100)

# Create the Connection Generator object
import csa
cg = csa.cset(csa.random(0.1), 10000.0, 1.0)

# Map weight and delay indices to values from cg
params_map = {'weight': 0, 'delay': 1}

conn_spec = {'rule': 'conngen', 'cg': cg, 'params_map': params_map}
nest.Connect(A, B, conn_spec)


References
----------
.. [1] Djurfeldt M. The Connection-set Algebra—A Novel Formalism for the Representation of Connectivity Structure in Neuronal Network Models. Neuroinformatics. 2012; 10: 287–304. https://doi.org/10.1007/s12021-012-9146-1
.. [2] Djurfeldt M, Davison AP and Eppler JM (2014). Efficient generation of
connectivity in neuronal networks from simulator-independent
descriptions. Front. Neuroinform.
https://doi.org/10.3389/fninf.2014.00043
Loading
Loading