Skip to main content.
(home) > Tutorials

V.2 Tutorial 2: definition of a simple network

This tutorial teaches how to build a simple real network. It can be run with the simulator in a later tutorial.

Run NMLPlay as explained in section II.B of this user guide. The application automatically loads BasicModel.xml that has been defined in Tutorial0. You will start by clicking on the tab Environment on the top left of the NMLPlay window (Figure 7).

Figure 7: The environment tab.

You will then type Small Network in the description field, your name in the field "author" and Easy model in keywords.

There are already some cell modes which have been defined in BasicModel.xmlImplementationNeuron and HodgkinHuxleyNeuron. You can click on ImplementationNeuron and then "Edit" in order to visualize the parameters set previously. A window will appear below, as shown in Figure 8.


Figure 8: Window allowing to edit a cell model.

The name of the cell model is displayed at the top of Figure 8 and can be edited. It is a "ModuleNeuron". That means that the class specifying the behaviour of this cell model can be selected among a set of classes inheriting from the same superclass. An advanced user can defines his own classes which could be used at this level. The behaviour of ImplementationNeuron is described by the class Holger_modules.module.iafneuron.IAFNeuronFactory.

Basically all the classes defined in this combo box inherit  from neuroml.util.module.BasicRunnableCellFactory which is a NeuroML interface (see the introduction on NeuroML). Actually, all known classes could be selected from this combo box, but the policy defined by <ImplementionModules> in the file EmptyModel.xml restricts the access to classes which inherit from     neuroml.util.module.BasicRunnableCellFactory.  This is a quite loose policy and actually, you should only select Holger_modules.module.iafneuron.IafNeuronFactory for a ModuleNeuron.

Under the combo box for the choice of the implementation class, there is another combo box called which displays neuroml.core.ModuleRef. This parameter should not be edited. Below, there is a panel which display all the properties of the integrative neuron that can be edited. The resistance (R), Capacity (C), Theta, epsilon and eta describe which random voltage needs to be reach for a spike to occur. dt is the time step. I is an intensity function (there are other intensity functions available). Below is a set of measures that can be done on the cell (external intensity, internal intensity, total intensity, voltage). The measurement to be performed should not be defined at this level but have to be specified for each population.

Now it is time to design a simple network. Left-Click on NewPop (it should turn red when the mouse pointer is on the rectangle). Then bring the mouse pointer on the Network design panel. A green rectangle should be following the mouse pointer. At this stage:

 Lef-click. A population called NewPop0 is created. Create a projection and drop it on the network design panel likewise. There are three green squares on the new projection Projection0 (ends and centre). Left-click (and hold) on one of the green square (referred from now on as control point) at an end of the arrow, drag the mouse pointer towards NewPop0 (which should turn white once hit), and release the mouse button. Do the same for the other green square at the opposite end of the arrow. The Networks design panel should look like Figure 9.

Figure 9: NewPop0 is connected on itself.

Actually you can check the projection by double clicking with the left button on it. Rename the projection "GeneralProjection_0" instead of "Projection0" On the top combo box, please select There are two module panels called "sourceMethod" and "destMethod" similar to the one showed in Figure 8. These methods are supposed to define some filters on the way the connection operates. Please select Holger_modules.module.sourcemethod.SpikeSourceMethod for the source method. "destMethod" should be set on Holger_modules.module.destmethod.SpikeDestMethod. Both module references should point at the location of Holger_module.jar on the disk. Set "srcPort" to 1. The source and destination port of a projection should be equal. The "delay" should be set at 0.7 . Normally, you should get something similar to Figure 10.

Figure 10: parameters for Projection0.

Basically, the selected sourceMethod ensures that all neurons in the source population NewPop0 will try to establish a connection to the destination population  NewPop0.  The selected destMethod ensures that all requested connections will be accepted. The delay is the axonal delay, so to speak the duration for a spike to browse the axon. The source port is an identifier. If there were more than one projection from a population towards another, two neurons can be connected by more than two connections, as log as each connection has  ports that identify them. It is better to think that each connection between two neurons is unique, in order to simplify the communication process, hence the port should be one by default.

If you use the scroll bar, you can see a panel called editorInfo. It contains several parameters that can be used to alter the appearance of the projection  on the networks design panel. For instance the colour, the width, the number of control point. You can even add later some more control points if you want to avoid projections to go across one another (in the panels "controls", add), but don't do it know.

In order to edit the parameters of NewPop0, double-click with the left button on it. Some further parameters are needed for NewPop0. The window described by Figure 11 will appear. The "size" parameter allows you to determine the number of neurons in the population. Type 50. If you zoom in many times, you'll notice 50 white spots on NewPop0.

Figure 11: Selection of the number of neurons desired in  NewPop0.

Below the intensity panel shown in Figure 11, there is a combo-box named "elementClass". Select a models.CellModel.neurons.ImplementationNeuron as an implementing class for the neural behavior. This defines a simple neural mechanisms, corresponding to a regular spiking activity. You now need  to indicate how to monitor your simulation. In order to do so, you'll need to define some attachments which will indicate the voltage of a random neuron and the spiking activity of the NewPop0 through the simulation. Left-click on the "Close" button.

Now you need to set the rendering environment for the attachments.  Left-click on the blue item NewProbe in the menu panel, and create a probe like you created a population previously. Edit it by double-clicking on the object created on the Network Design Panel.  Type BiProbe for the name of the probe. Select a in the combo box. Define the parameter class as  Holger_modules.module.multiprobe.ProbeCtrlFactory. Select the location of Holger_module.jar on the disk for the module reference. Select 2 for "NumProbes", since you want to render the result of one voltmeter and one device representing the spiking activity. You can also set the "height" of the rendering window at 320 and the "width" at 640. The active window should look like Figure 12.


Figure 12: parameters required for BiProbe.

The width and height will basically define the dimensions of the rendering window for the attachments. Close the window.

Create an attachment like you created the previous projection. This attachment has to be connected from NewPop0 to BiProbe. Drag and drop the control points accordingly. Double click on the attachment. Select a in the combo box. Choose  Holger_modules.module.multimeter.Multimeter as a "destMethod". In the box below (MeasurementList), there are 4 measurements that can be recorded, the external intensity, the internal intensity, the total intensity, and the voltage. Click on "Not_V" and then "edit" and then enable it by ticking "ToBeSent" of the window which appeared. Close that window.`Select Holger_modules.module.Source_FirstOnly.Source_FirstOnly as a "sourceMethod". Then you need to set the parameters as shown in Figure 13. Set "CellCID" to 7 for the "sourceMethod". By setting it to 7, you indicate that you want the voltmeter to check the voltage of the cell indexed 7 in NewPop0. The Destport for the multimeter should matches 2 (2 is the port for measurements and 1 for spikes), therefore "srcPort" in  "sourceMethod" must be set to 2. Set "panelNdx" to 1. This ensures that the results from the multimeter will be showed on 2nd position on the window displayed by BiProbe. Set the "height" to 50. That will mean that the results from this Attachment1 will be displayed on 50% of the size of the window displayed by BiProbe.

Figure 13: Connection of a voltmeter on ImplementationNeuron0.

Create another attachment. Connect it from NewPop0 to BiProbe. Select a in the combo box. Choose  Holger_modules.module.netactivity.NetActivity as a "destMethod". Select Holger_modules.module.sourcemethod.SpikeSourceMethod as a "sourceMethod". The window should correspond to Figure 14. Set "panelNdx" to 0 and the "height" to 50  so that the results of this attachment will be displayed on the first half of the window displayed by BiProbe. Set "epsilon" on 0.01. The default destination port for this attachment matches 1 (1 is for spikes, since the NetActivity measuring component counts spikes), therefore "srcPort" in  "sourceMethod" must be set to 1.

Figure 14: Set up the monitoring of the spiking activity.

Close the window. You have built a first network which responds to an excitatory delayed coupling of identical integrate&fire neurons. Now save the model by clicking on "Save" if the "File" and choosing "FirstModel.xml".