# Command: GetConnections

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    GetConnections - Retrieve connections between nodes

Synopsis:

      << /source [sgid1 sgid2 ...]
      /target [tgid1 tgid2 ...]
      /synapse_model /smodel
      /synapse_label label	 >> GetConnections -> [ conn1 conn2 ... ]

Description:

      1. If called with an empty dictionary, GetConnections returns all connections of the
      network, as a list of arrays (IntVectorDatum), one array per connection.
      2. Each array (connection object) has the following elements:
      [source-gid target-gid target-thread synapse-model-id port]
      3. The optional dictionary elements /source and /target can be used to filter
      for specific pre- and post-synaptic neurons, respectively.
      4. The optional parameter /synapse_model can be used to filter for a specific synapse model.
      5. The optional parameter /synapse_label can be used to filter for a specific synapse label.
      6. In a parallel simulation, GetConnections only returns connections with *targets*
      on the MPI process executing the function.

Parameters:

      A dictionary that may contain the following fields (all are optional):
      /source 	- array with GIDs of presynaptic nodes whose connections are sought.
      If not given, all neurons are searched as sources.
      /target 	- array with GIDs of post-synaptic nodes whose connections are sought.
      If not given, all neurons are searched as targets.
      /synapse_model	- literal specifying synapse model
      If not given, connections of all synapse models are returned.
      /synapse_label	- integer specifying synapse label
      If not given, connections of all synapse labels are returned.

Remarks:

      1. See synapsedict for the synapse-model-id's for all synapse models.
      2. The /synapse_label property can only be assigned to synapse models with names ending
      with '_lbl'. All other synapses have the default synapse_label UNLABELED_CONNECTION (-1).
      3. The "port" enumerates connections per source, thread and synapse model. It is
      mainly important for NEST internally.
      4. In OpenMP mode, GetConnections works thread-parallel for better performance.
      5. Connection objects can be converted to SLI lists with cva.
      6. Connection objects can be passed to SetSynapseStatus, GetSynapseStatus, and DataConnect

SeeAlso:

- DataConnect
- SetSynapseStatus
- GetSynapseStatus
- synapsedict

Source:

    /opt/conda/conda-bld/nest_1524088722951/work/nest-2.14.0/lib/sli/nest-init.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative