Skip to content

Model Structure

KyrusMama edited this page Jan 24, 2021 · 5 revisions

Model Structure:

Model structure is used to build all neurons and synapses between them. In general, all neurons are built in groups, and each group is given a name which it can be referred to by.
It contains the following commands:

  • group <neuron type> <group name (str)> <number of neurons (int)>:
    This is the command used to build groups of neurons. It specifies the type of neurons being built, the name of the group being built and the number of neurons this group should contain. When neurons are built, each neuron is given a unique identification number, ascending from 0 in the order they are built.
    • The <neuron type> parameter must be equal to one of the following: basic nsn calcium_pyr
  • connect <connection name (str)> <synapse type> {<from>} {<to>} <optional: probability (float)>:
    This command cycles through all the neurons in <from> and <to> and connects them with a new synapse with the specified probability (if unspecified, it assumes 1). Note that this function will not allow neurons to synapse onto themselves.
  • connect_with_reps <connection name (str)> <synapse type> {<from>} {<to>} <optional: probability (float)>:
    This command is identical to connect, except it allows neurons to synapse onto themselves.
  • connect_one_to_one <connection name (str)> <synapse type> {<from>} {<to>} <optional: probability (float)>:
    This command pairs up neurons in <from> and <to> and connects them. <from> and <to> must have the same number of neurons.
    • The <synapse type> parameter must be equal to one of the following: basic no_fireS STDPS hat
    • Note the {} notation in choosing <from> and <to>. This is a way of specifying specifically which neurons should be used. Neurons can be specified by using the name of a group, by using pythons : notation, by specifying individual id numbers, or a combination. Examples are included below.

Examples of Model Structure

  • Create two groups of 100 basic neurons each and make random basic connections from one to the other with a probability of 0.5.
group basic G1 100
group basic G2 100
connect G1_to_G2 basic {G1} {G2} 0.5
  • Create three groups of 100 basic neurons each and make random STDPS connections cycling from one to the other with a probability of 0.2.
group basic first 100
group basic second 100
group basic third 100
connect C1 STDPS {first} {second} 0.2
connect C2 STDPS {second} {third} 0.2
connect C3 STDPS {third} {first} 0.2
  • Create a single group of 20 neurons and connect the first 10 to the second 10 with one to one synapses
group basic Grp 20
connect_one_to_one syn basic {0:10} {10:20}
  • Create a single group of 3 neurons and make guaranteed connections cycling from one to the other.
group basic Cycle 3
connect C1 basic {0} {1}
connect C2 basic {1} {2} 1.0
connect C3 basic {2} {0}
# note that the 1.0 is optional. 

Clone this wiki locally