-
Notifications
You must be signed in to change notification settings - Fork 7
Home
NetPyNE (www.netpyne.org) is a high-level Python interface to NEURON that facilitates the development, parallel simulation and analysis of biological neuronal networks. NetPyNE-UI is a simple user interface that can be used to control NetPyNE in a graphical environment. The UI splits the workflows in two tabs available at the top of the screen: define your network and create network.
From the first tab it is possible to define the network and all the rules that will be used for its generation. Network definition comprises 7 different sections:
- Populations
- Cell Rules
- Synapses
- Connectivity Rules
- Stimulation sources
- Stimulation targets
- Configuration configuration
At the bottom of the screen two consoles, a Javascript and a Python one, will let you interact programmatically with the environment. In particular through the Python console it is possible to interact programmatically with the NetPyNE model. Any changes made through the Python console will reflect immediately to the UI and vice versa.
If you would like to import an example into the UI you can copy and paste the following lines into one cell of the Python console to load a network from a tutorial.
from netpyne_ui.tests.tut3 import netParams, simConfig
netpyne_geppetto.netParams=netParams
netpyne_geppetto.simConfig=simConfig
To execute the cell just press Shift + Enter
.
Once you have defined your network you can click on the second tab at the top of the screen to explore its structural properties and visualise its morphology in 3D. This will result in NetPyNE instantiating the network and a confirmation dialog will prompt you to confirm. The larger the model the longer the instantiation will take.
Once you confirm you the network will be loaded and you will be able to explore it.
The icon on the top left corner will let you open a control panel to inspect in a tabular form all the populations and single cells that were created from your network definition.
For each cell or population you can (in order) show or hide the element, change its colour, assign a random one, or zoom.
From the plot menu (the bottom icon on the left column) you can choose among a range of available plots to inspect the structural properties of your network.
Once in the second tab, clicking on the rocket icon on the top right corner of the ui you can proceed with a simulation of the network.
A confirmation dialog will once again prompt you to confirm presenting the option to run the simulation in parallel specifying the number of cores (this requires having MPI installed). Once you confirm the network simulation will be loaded and you will be able to analyse it. The larger the model the longer the simulation will take.
From the same plot menu (the bottom icon on the left column) you can now choose among a range of available plots to inspect the simulation results and analyse them. Moving back to the first tab you can change the definition of your network, from the definition tab you can jump to back to the second tab where you can re-sync the new network defined with the one instantiated clicking on the sync icon on the top right corner of the UI, above the rocket icon.
Finally below a description of all the options available with our new AppBar, available with the hamburger icon on the top left corner. Once clicked on the icon these are the options available:
-
New : Clean the current model and let the user define or load a new one.
-
Open : Loads a JSON that might contain any of the following:
- High-level network parameters (netParams) -- populates most of the Define network tab.
- Simulation configuration (simConfig) -- populates the 2 bottom configuration cards in the Define network tab.
- Instantiated network (sim.net) -- parameters of all the cells and connections used to visualise and simulate the network in the Create and simualate tab.
- Simulation results (sim.simData) -- simulation outputs required for the analysis plots.
-
Save : Save the network parameters (netParams), simulation configuaration (simConfig), instantiated network and/or simulation results to a JSON file.
-
Import : Import the netParams and/or simConfig from a Python script.
-
Export : Export the netParams and/or simConfig to a Python script.
-
Import Template : Extracts the parameters from a NEURON .hoc or .py cell template and creates a cell rule (netParams.cellParams) in NetPyNE, so the cell can be used in the network model. To check and visualise how the cell template was imported (sections, mechanisms, etc) go to the "Cell rules" section.
Below is an example where the user imports netParams and simConfig from a Python script:
Here, the user exports netParams and simConfig to a Python script: