1. See https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=177
2. Work through the tutorials on the Documentation page.
3. Organize your modeling projects into directories. Things will be much easier if each
modeling project has its own directory. Put all the mod files you need in that directory,
and run mknrndll (nrnivmodl for UNIX/Linux users) to compile the mod files. Then make
a plain text file called init.hoc, which contains just this line
load_file("nrngui.hoc")
and put it in the same directory. Under MSWin, use the file browser (they call it
Windows Explorer to deliberately confuse people), double click on init.hoc, and
NEURON will start and automatically load your compiled mechanisms automatically
(UNIX/Linux users should just type
nrngui init.hoc
at the system prompt in an xterm).
After you have built your custom GUI (CellBuilder, RunControl, PointProcessManagers,
Graphs etc.), save them to a session file. Then edit init.hoc and change it to
load_file("nrngui.hoc")
load_file("mysesfile.ses") // or whatever you called the session file
The next time you double click on init.hoc (or type nrngui init.hoc), the mechanisms will
be loaded and your custom user interface and model will pop up.
4. As much as possible, use the GUI to specify model properties and
control simulations.
5. Whether using the GUI, writing hoc code, or combining the two, it is
best to start small and simple, and increase size and complexity
incrementally, with testing after every change.
6. Use the d_lambda rule (selectable from the Cell Builder at the click of
a button, but also usable from hoc--see the FAQ list) to specify spatial
discretization.
7. If it is ever necessary to write hoc code, structure your program as
follows:
- Code: Select all
load_file("nrngui.hoc")
specify model topology (create sections, connect sections)
specify model geometry (stylized (L, diam) or pt3d method as appropriate)
specify instrumentation (IClamps, SEClamps, other Point Processes, graphs)
specify simulation flow control (RunControl panel is sufficient for most purposes)
8. Avoid load_proc()--it's very slow under MSWin, so unless you swear never
to use MSWin or exchange code with MSWin users, it's more bother than
it's worth.
9. Avoid writing your own "main computational loop" (i.e. a "for" or "while"
loop that calls fadvance() to march the simulation through time)--use the
standard run system's run() to launch simulations.
10. Use topology(), psection(), and especially the GUI's Model View tool to
discover what is actually in a model and verify a close match between
the model in the computer and the model in your mind. Especially if there
is a mismatch between what the model does and what you expected it to do.
