Page 1 of 1

.hoc to .nml or .xml file conversion

Posted: Mon Sep 11, 2017 10:46 am
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

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

Posted: Mon Sep 11, 2017 12:11 pm
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).