Importing NeuroML model spec using python

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
foxy1987
Posts: 1
Joined: Sat Oct 20, 2012 3:11 am

Importing NeuroML model spec using python

Post by foxy1987 »

Hi all,
I have developed a parallel multi-objective evolutionary algorithm (NSGA-II) and would like to interface it with neuron.
I know how to setup model anatomy and biophysics and numerical instrumentation in python and then run and plot the results using matplotlib.
But I still can't figure out how to import a neuroml file using python. If anyone can shed any light on this matter, I would very much appreciate it!
Thanks
David
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Importing NeuroML model spec using python

Post by hines »

With the GUI, start a
NEURONMainMenu/Build/CellBuilder
and select the "Management" page followed by "Import" radio buttons.
In the menu bar "Import" select the NeuroML menu item then in the
file chooser that pops up, select the neuroml file.

This assumes that the NeuroML version 2 from several years ago remains the
format of your file. If not, please send the file to me and I'll work on updating the
importer.

If you wish to do this under program control without showing windows, try

Code: Select all

{load_file("stdgui.hoc")}
{load_file("celbild.hoc")}
objref cb
cb = new CellBuild(0)
cb.manage.neuroml("neuromlfilename")
cb.cexport(1) // turn continuous_create on 
Post Reply