Bonic wrote: ↑Thu Nov 22, 2018 5:34 amwith a Tutorial provided by the MIT
Never heard of it--the tutorial, that is, not MIT. Where did you find it? How do you know it's any good?
it was striking that in HOC you always have to declare "objectvariables" with for example "objectvar stim".
From one perspective, that might seem just another inexplicable manifestation of a hostile or indifferent universe, but actually it's merely an accident of history. Why don't you use Python instead of hoc? Here's a tutorial that will help you get going:
https://neuron.yale.edu/neuron/static/d ... index.html Of course you are free to do whatever you like, but you will bear the consequences of your choice.
We recommend that all new user-written code be in Python. All existing hoc code still works, and can be used from Python, so there's no need to rewrite any old hoc code. And you can use hoc code generated by the CellBuilder and Import3d tool with Python.
Here's some documentation that will help you deal with legacy hoc code that you may encounter
https://www.neuron.yale.edu/ftp/neuron/ ... wledge.pdf
and here's a concise introduction to hoc syntax
https://www.neuron.yale.edu/ftp/neuron/ ... slides.pdf
in the HOC Tutorial the term "objectvariable" revers to something what would be an object/instance in Python.
True.
does in HOC the term "template" means the same as the term "class" in Python?
A template is a definition of a hoc class. It's trivial to reuse hoc classes from Python. For example, suppose cell.hoc contains a template that defines a cell class called Pyr, and that an instance of the Pyr class has sections called soma and dend that are public. Then this Python script
from neuron import h
h.load_file("cell.hoc")
pyramid = h.Pyr()
will create an instance of the Pyr class and its sections will be known to Python as pyramid.soma and pyramid.dend--exactly the same as if you had used Python to define a cell class that has two sections called soma and dend. By the way, this means that you can use the CellBuilder to create new cell class definitions and use those hoc files with your own Python code.
begintemplate STHcell
I see--you stumbled across the tutorial that Gillies and Sterratt wrote years ago. Interesting from a historical perspective, but no need for it now. Stick with Python.
In the tutorial it is written: "To avoid the transient phase, its a good idea to let the simulation run for a while before performing the experimental manipulations. In the example above, we wait 100 ms before injecting current"
Why does NEURON simulate the transient phase? It is to make the simulation biologically more realistic? Without the transient phase one could start the simulation immedeatly...
A mechanistic computational model of a neuron consists of a system of one or more ordinary differential equations (ODEs) that govern the time course of a set of variables called state variables. The ODEs are solved by numerical integration, a process in which the future values of the state variables are calculated from their current values. This poses a question: what values should the state variables have at time t==0? In all but the very simplest cases, it is impossible to know in advance what values to assign to the state variables at t==0, even if you expect that the model will be "at rest." Now you know something new.