.hoc to .nml or .xml file conversion

Anything that doesn't fit elsewhere.
Post Reply
cushing95
Posts: 1
Joined: Sun Sep 10, 2017 12:11 pm

.hoc to .nml or .xml file conversion

Post by cushing95 »

Hi everyone,

First, I'm new to this community, so thanks for hearing my question! I'm an undergrad student at Brandeis Univ who has been doing comparative morphology work. My programming skills are very limited, but I'm slowly learning. My first question for you is whether or not it's possible to convert .hoc files back to .nml or .xml format. Does anyone have experience with this, or know where I might find answers?

Thanks in advance! I look forward to visiting here more

Matt
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: .hoc to .nml or .xml file conversion

Post by ted »

cushing95 wrote:whether or not it's possible to convert .hoc files back to .nml or .xml format.
"convert back" does not apply because most hoc or Python for NEURON was never any kind of XML in the first place.

NEURON's Model View tool can export the model specification of a single cell to NeuroML level 1 or 2. 1. Make sure that the model already exists in NEURON.
2. If define_shape() has not already been called, either
execute define_shape() at the oc> prompt (h.define_shape() if you're using Python as NEURON's interpreter)
or
make sure that a shape plot of the cell already exists (e.g. a GUI tool such as a PointProcessManager that has a shape plot, or a shape plot brought up by NEURON Main Menu / Graph / Shape plot)
3. Open a Model View tool
NEURON Main Menu / Tools / Model View
4. In the Model View tool click on
File / Export to NeuroML
and choose whether you want NeuroML Level 1 or 2 (you'll probably want Level 2).
Post Reply