NetPyNE Showcase
Files for testing NetPyNE & NeuroML interactions. See here for more info.
NetPyNE & NeuroML interactions
Home Page: http://www.opensourcebrain.org/projects/netpyneshowcase
@salvadord was asking about options for examples of models built in NetPyNE, converted to NeuroML and then run successfully in another simulator. For various reasons EDEN is currently the best option for trying this.
I've added various OMV tests for running the generated NeuroML equivalents of NetPyNE models in EDEN, and the results are good so far. See test files ending jnmleden.omt here, the results of these are at https://github.com/OpenSourceBrain/NetPyNEShowcase/runs/6374237602?check_suite_focus=true.
As an example this: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NetPyNE/HybridSmall/HybridSmall.py builds a small net with HH & Izhikevich cells, it gets generated to NML here: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NeuroML2/HybridSmall.net.nml (see here for generating script).
The LEMS simulation file generated also (https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NeuroML2/LEMS_HybridSmall.xml) can be used to generate a Python script which loads the NML using the latest jnml or pynml:
jnml LEMS_HybridSmall.xml -eden
# or ...
pynml LEMS_HybridSmall.xml -eden
# then ...
python LEMS_HybridSmall_eden.py
This is what gets tested in OMV files like: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/master/NeuroML2/.test.hyizh.jnmleden.omt
cc @spanag
@pgleeson I tested connecting the Izhi07a (artificial cell) to HH and viceversa and it works. I added the code to the tut_import.py so you can try it yourself: https://github.com/Neurosim-lab/netpyne/blob/development/doc/source/code/tut_import.py
The key so that cells that don't use the section voltage work, is to specify in the 'vref' param what is the point process variable that will be used as voltage, eg. in the Izhi07a the variables is called 'V':
cellRule['secs']['soma']['pointps']['Izhi2007a_0']['vref'] = 'V' # specify that uses its own voltage V
I then changed my branch to the neuroml_export and pulled, to try to test your code here: https://github.com/OpenSourceBrain/NetPyNEShowcase/blob/a239a2818a361610b64cccb92028b42c04948f45/NeuroML2/LEMS_Spikers_netpyne.py
However, I got the following error:
Salvador-Duras-MacBook-Pro% ipython -i LEMS_Spikers_netpyne.py
Python 2.7.12 |Anaconda 2.0.1 (x86_64)| (default, Jul 2 2016, 17:43:17)
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
NEURON -- VERSION 7.5 (1454:2350fc838a79) 2016-08-01
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
TypeError Traceback (most recent call last)
/u/salvadord/Documents/ISB/Models/NetPyNEShowcase/NeuroML2/LEMS_Spikers_netpyne.py in ()
85 print("Running a NetPyNE based simulation for %sms (dt: %sms) at %s degC"%(simConfig.duration, simConfig.dt, h.celsius))
86
---> 87 gids = sim.importNeuroML2SimulateAnalyze(nml2_file_name,simConfig)
88
89 print("Finished simulation")
/u/salvadord/Documents/ISB/Models/netpyne_repo/netpyne/wrappers.pyc in importNeuroML2SimulateAnalyze(fileName, simConfig)
141 def importNeuroML2SimulateAnalyze(fileName, simConfig):
142
--> 143 return sim.importNeuroML2(fileName, simConfig)
/u/salvadord/Documents/ISB/Models/netpyne_repo/netpyne/simFuncs.py in importNeuroML2(fileName, simConfig)
2196 currParser = NeuroMLXMLParser(nmlHandler) # The XML handler knows of the structure of NeuroML and calls appropriate functions in NetworkHandler
2197
-> 2198 currParser.parse(fileName)
2199
2200 nmlHandler.finalise()
/u/salvadord/anaconda/lib/python2.7/site-packages/neuroml/hdf5/NeuroMLXMLParser.pyc in parse(self, filename)
53 self.netHandler.handlePopulation(population.id,
54 population.component,
---> 55 len(population.instances))
56 for inst in population.instances:
57
TypeError: handlePopulation() takes exactly 5 arguments (4 given)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.