Skip to content

Commit

Permalink
Merge pull request #3172 from jhnnsnk/doc_connconcepts
Browse files Browse the repository at this point in the history
Align documentation of connection management with connectivity concepts publication (v2)
  • Loading branch information
jessica-mitchell authored Apr 5, 2024
2 parents 32953e8 + d01691c commit 799ab2d
Show file tree
Hide file tree
Showing 34 changed files with 767 additions and 513 deletions.
5 changes: 3 additions & 2 deletions doc/htmldoc/get-started_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ Next steps: Create your own network model

|random| Connect neurons, synapses, and devices
^^^

* :ref:`connection_management`: A guide to building connections in NEST
* :ref:`connectivity_concepts`: A guide to define network connectivity in NEST
* :ref:`spatial_networks`: A deep dive into building 2D and 3D networks
* :ref:`connection_generator`: Using an external library for generating connections
* :ref:`synapse_spec`: Details on parameterizing synapses

.. grid-item-card::
:class-header: sd-d-flex-row sd-align-minor-center sd-bg-info sd-text-white
Expand Down
2 changes: 1 addition & 1 deletion doc/htmldoc/installation/cmake_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,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 concepts <connectivity_concepts>`
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 @@ -1339,7 +1339,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_concepts`. |
+---------------------------------+-----------------------------------------------------+
| ``nest.GetNodes()`` | Returns a NodeCollection of all elements with given |
| | properties. |
Expand Down
6 changes: 6 additions & 0 deletions doc/htmldoc/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ figure.align-default {
outline-style: groove;
}

.center {

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

/**************************************************************************************
* Rules for carousel
* ***********************************************************************************/
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
import csa
A = nest.Create('iaf_psc_alpha', 100)
B = nest.Create('iaf_psc_alpha', 100)
# Create the Connection Generator object
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

0 comments on commit 799ab2d

Please sign in to comment.