Important Distinction!

The basics of how to develop, test, and use models.
Post Reply
Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Important Distinction!

Post by Martenzi »

I have now played around with the neuron environment and I believe I have gotten a better grasp of it. However, one important question I need to confirm with you.

tstop decides how long your computer will continue to read the code from interpreter OR how long the computer will take to read through the hoc code? The reason I ask is that the graph window @ soma (0.5) gives me one graph of the voltage at middle of soma. However, if I want to know the change of voltage every 0.2 ms at soma. How do I graph it?

The scenario is to fire 7 alphasynapses and plot each function individually at soma, thereafter plot the temporal summation for each additional synapse added.

1
12
123
1234
12345
123456
1234567

And compare these at soma. This should give a graph where if "keep lines" is checked, multiple lines showing change in voltage at different intervals. How do I configure this using the GUI or need some help with coding it.

Thank you!
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Important Distinction!

Post by ted »

The source code for NEURON's standard run system is in
c:\nrnxx\lib\hoc\stdrun.hoc
(on my Linux machine where I installed NEURON into /usr/local/nrn, the file is /usr/local/nrn/share/nrn/lib/hoc/stdrun.hoc).
stdrun.hoc defines run(), a procedure that launches a simulation.

Code: Select all

proc run() {
        running_ = 1
        stdinit()
        continuerun(tstop)
}
stdinit() initializes the model and sets t to 0. continuerun(tstop) advances the simulation in time until t >= tstop. You'll discover many other intersting things in stdrun.hoc. You might also want to examine stdlib.hoc
if I want to know the change of voltage every 0.2 ms at soma. How do I graph it?
steps_per_ms controls the interval at which graphs are updated. You'll discover steps_per_ms in stdrun.hoc too. If you want graphs to be updated every 0.2 ms, leave dt unchanged (otherwise you will affect the accuracy of the simulation), but change steps_per_ms to 1/0.2. If you're using the RunControl panel, you can do this by changing "Points plotted/ms" to 1/0.2. To create a graph of v vs. t, use
NEURON Main Menu / Graph / Voltage axis
This graph will automatically plot the default section's v(0.5)
The scenario is to fire 7 alphasynapses and plot each function individually at soma, thereafter plot the temporal summation for each additional synapse added.
If the synapses have identical properties, this is most easily done with the Network Builder without having to write a single line of code.* Make a toy network that has
a single section cell with an Exp2Syn attached to the soma
and
a NetStim
and
a NetCon that conducts spike events from the NetStim to the Exp2Syn.
You can specify the number of spikes and the interspike interval by adjusting the NetStim's parameters. Look at http://www.neuron.yale.edu/neuron/docs for a link to a tutorial about the Network Builder.

*--1. Make sure you save your configured network to a ses file.
2. After everything is working the way you want it, click on the Network Builder's "Hoc File" button, and NEURON will write a hoc file that contains statements that will recreate the network model. Unfortunately that file won't contain any statements that recreate the nice GUI for changing the properties of the model cell, Exp2Syn, NetStim, or NetCon, or any of the graphs.
Post Reply