File: stdrun.rst

package info (click to toggle)
neuron 8.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,760 kB
  • sloc: cpp: 149,571; python: 58,465; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (627 lines) | stat: -rw-r--r-- 14,556 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627

.. _hoc_0stdrun:


.. _hoc_standardruntools:

Standard Run Tools
------------------


All standard tools are available from the NEURONMainMenu. The fastest 
way to load these tools is to execute 

.. code-block::
    none

    load_file("nrngui.hoc") 

which avoids inefficiencies of the :hoc:func:`load_proc` command on
mswindows machines. 

Brief summaries of the menu options are provided below, for more information on select functions see also:

.. toctree::
    :maxdepth: 1
    
    runctrl.rst
    family.rst

Implementations of the standard tools are in `$NEURONHOME/lib/hoc/*.hoc <http://neuron.yale.edu/hg/neuron/nrn/file/tip/share/lib/hoc>`_ 
     

.. _hoc_NEURONMainMenu:

NEURON Main Menu
~~~~~~~~~~~~~~~~

 
Main menu for standard control, graphing, menu generation. 
 
To pop up the panel execute: 

.. code-block::
    none

    	load_file("nrngui.hoc") 

 
Serious users should peruse the init and run procedures. 
The run chain that eventually calls :hoc:func:`fadvance` is

.. code-block::
    none

    		run continuerun step advance fadvance

There is often reason to substitute a new step or advance 
procedure to do intermediate calculations on the fly. 
Sometimes it is useful to replace the init() procedure. If so 
make sure you don't take away functionality which is already 
there. See `$NEURONHOME/lib/hoc/stdrun.hoc <http://neuron.yale.edu/hg/neuron/nrn/file/tip/share/lib/hoc/stdrun.hoc>`_ for the 
implementations of these procedures. 
     
     

File
====

LoadSession
"""""""""""

Pop up a File chooser for loading a previously save graphical 
interface session (default extension .ses) Session files may be loaded 
several times. 

LoadHoc
"""""""

Pop up a File chooser for loading and executing a hoc file. 
Selected Hoc files are loaded only once. 

LoadDLL
"""""""

Pop up a File chooser for dynamically loading a dll containing 
compiled and linked model descriptions. This is available only under mac os 
and mswin. 

savesession
"""""""""""

Save all the windows, mapped and hidden, in a session file. 
Greater control over exactly which windows are saved is given by the 
:ref:`hoc_GroupManager` and the
:ref:`hoc_PWM`.


.. _hoc_workingdir:

workingdir
""""""""""

Pops up a Directory chooser for 
changing to a specified working directory. 
If a dll file has not already been loaded 
and if a :file:`nrnmech.dll` (under mswin) or a :file:`nrnmac.dll`
(under macos) exists in the "changed to" 
directory then the dll file is loaded. 

recentdir
"""""""""

A list of the last 10 directories chosen from the :ref:`hoc_workingdir` menu
item. On the mac and mswin, if a dll file has not been previously 
loaded and such a file exists in the directory, then it will be 
loaded. 

Quit
""""

Exits NEURON. 
 


Edit
====


Build
=====

singlecompartment
"""""""""""""""""


CellBuilder
"""""""""""

Pops up a new instance of a :ref:`hoc_celbild`
for specifying the topology, 
shape, and biophysical properties of a neuron. 


.. _hoc_networkcell:

NetworkCell
"""""""""""


FromCellBuilder
...............

Pops up two tools used to specify 
synapse types and the locations of instances of these synapse types 
on a cell type defined by the :ref:`hoc_celbild`
This makes a network ready cell type that can be used by the 
Note that the only Point Processes used to construct synapse types are those 
whose model description contains a NET_RECEIVE block. e.g. see 
:hoc:class:`ExpSyn` and :ref:`hoc_NetworkBuilder`.

ArtificialCell
..............

Pops up a tool for constructing artificial network ready cells from 
PointProcess types containing a NetReceive block 
that can also act as a :hoc:class:`NetCon` source.
e.g. see :hoc:class:`IntFire1`.


.. _hoc_networkbuilder:

NetworkBuilder
""""""""""""""

Pops up a new instance of a NetBuild class 
for specifying cells and their :hoc:class:`NetCon` connections.
Only network ready cells defined by the :ref:`hoc_NetworkCell` tools can be
used with this class. 




Tools
=====

Fitting
"""""""


Parameterized Function
......................

Starts a :ref:`hoc_funfit` tool for plotting a parameterized function and
easily exploring its behaviour while varying the parameters. 
Also can fit the function to data using either the simplex 
or principal axis methods. 
The more powerful :ref:`hoc_mulfit` is now recommended.


.. _hoc_runfitter:

Run Fitter
..........

Starts a :ref:`hoc_runfit` tool for
optimizing simulation parameters to best fit data. 
The more powerful :ref:`hoc_MulFit` is now recommended.

Multiple Run Fitter
...................

Starts a :ref:`hoc_mulfit` tool for
general optimization problems. This combines and extends 
dramatically the features of the :ref:`hoc_funfit` and


.. _hoc_0stdrun_runcontrol:

Run Control
"""""""""""

Pops up a :ref:`hoc_runctrl` panel for controlling simulation runs.


.. _hoc_variablestepcontrol:

Variable Step Control
"""""""""""""""""""""

Pops up a VariableTimeStep panel for controlling the :hoc:class:`CVode`
variable time step, variable order method. 

Usevariabledt
.............

CVode is the integration method. See :hoc:meth:`CVode.active`.

Localvariabledt
...............

CVode is the integration method and there is a separate dt for 
every cell. 

AbsoluteTolerance
.................

The absolute tolerance used by CVode when it is 
active is given by this value times the specific state scale factor. 
This latter is normally 1, eg, for voltage, 
but if the state is normally found in a range <<1 or >>1 the scale 
factor may be explicitly specified in a model description or in 
the interpreter. 
See :hoc:meth:`CVode.atol` and :hoc:meth:`CVode.atolscale`

PointProcesses
""""""""""""""

Several useful tools for managing PointProcesses 
See :ref:`hoc_mech` for details about built-in point
processes. The corresponding :file:`.mod` file must in general be 
examined in order to understand the particulars about a given 
point process type. 

Distributed Mechanisms
""""""""""""""""""""""

Several useful tools for managing density mechanisms such 
as distributed channels. 
See :ref:`hoc_mech_mechanisms` for details about built-in density
mechanisms. The corresponding :file:`.mod` file must in general be 
examined in order to understand the particulars about a given 
mechanism type.




Managers
........


Inserter
,,,,,,,,

Starts an :ref:`hoc_Inserter` for the currently accessed section that
allows one to insert and uninsert density membrane mechanisms. 
Currently this is most useful for single compartment simulations. 

Homogeneous Spec
,,,,,,,,,,,,,,,,

Starts a :ref:`hoc_ShowMech` tool that is useful for specifying constant parameters for
membrane mechanisms in all sections of a simulation. 

Viewers
.......


.. _hoc_shapename:

ShapeName
,,,,,,,,,

Starts a :ref:`hoc_shapebox` tool that
allows one to figure out the correspondence between the physical 
location of a section and a section name. Also allows one to 
get a parameter menu for the selected section. 

NameValues
,,,,,,,,,,

Pops up a panel for displaying values associated with Sections. 
 
Almost completely superseded by the more complete :ref:`hoc_ShapeName` except that
this tool can make a panel of a single mechanism type. 
 

Mechanisms Globals
,,,,,,,,,,,,,,,,,,

Menu of possible membrane Mechanism's. Selecting an item pops up 
a panel showing the global parameters for this type of Mechanism. 
 

celsius
.......

Pops up a panel for viewing/setting the global temperature 
variable :hoc:data:`celsius` .

globalRa
........

Pops up a panel for assigning a 
uniform value of :hoc:data:`Ra` (ohm-cm) to all sections.
Ra used to be a global variable but is now a Section variable that 
can be different in different sections. This sets Ra forall sections 
equal to the value displayed in the fieldeditor. It used to 
be displayed in the NEURONMainMenu but that location is now 
administratively incorrect and error prone for models which manage 
Ra through the :ref:`hoc_CelBild`.
 
 





Impedance
"""""""""

Menu of tools which use the :hoc:class:`Impedance` class to calculate
voltage attenuation as a function of position and frequency 
 

Frequency
.........

Pops up an :ref:`hoc_ImpRatio` template tool for plotting the
log of voltage attenuation (and other functions of impedance) 
between a selected injection and 
measurement site as a function of frequency. 
 

Path
....

Pops up a :ref:`hoc_impedance_impx` template tool for plotting the
log of voltage attenuation (and other functions of impedance) 
at a specific measurement/injection site 
as a function of a selected path along the neuron in which current is 
injected/measured. 
 

LogAvsX
.......

Pops up a :ref:`hoc_impedance_logavsx`
template tool for plotting the log of voltage attenuation 
(and other functions of impedance) between a specific measurement/injection 
site as a function of distance to every point on the cell. 
 


.. _hoc_stdrun_shape:

Shape
.....

Pops up an :ref:`hoc_ImpShape` template tool for displaying the morphoelectronic transform
of neuron shape in which distance is represented as the negative log of attenuation. 
 



.. _hoc_ArchiveAndHardcopy:

Archive And Hardcopy
""""""""""""""""""""

Checkin this simulation to RCS and print all windows on the printer. 

See :ref:`hoc_project`

Saves all (saveable) windows in this session to the file start.ses 
(:hoc:func:`save_session`).
Prints the entire session to the filter :ref:`hoc_prjnrnpr` (:hoc:func:`print_session`).

This menu item exists only when nrnmainmenu is executed after the file 
RCS/nrnversion exists. Ie when the files in the current working directory 
have been placed under NEURON :ref:`hoc_project` control.




Miscellaneous
"""""""""""""



Family
......


Family1
,,,,,,,

Starts a :ref:`hoc_Family` tool for controlling a family of simulations.
One defines a variable and set of values for looping over an 
action. 

Command
,,,,,,,

Starts an :ref:`hoc_ExecCommand` tool for specifying and
executing a hoc command. 

Builders
........


Kinetic Scheme Builder
,,,,,,,,,,,,,,,,,,,,,,

Starts a :ref:`hoc_KineticBuild` tool for simulating a
single channel kinetic scheme






Graph
=====

For creating common kinds of graphs of functions of time. 
These graphs are connected to the standard run procedure such 
that at every step (see :ref:`hoc_0stdrun_runcontrol`) the value of the functions
are plotted.



Currentaxis
"""""""""""

Plots values vs t-.5dt 
Suitable for plotting ionic currents (when calculations are :hoc:data:`secondorder`
correct). 

Stateaxis
"""""""""

Plots values vs t+.5dt 
Suitable for plotting states such as m_hh, n_hh, etc. These 
plots may be very accurate when :hoc:data:`secondorder` = 2.

Shapeplot
"""""""""

Starts a :hoc:class:`PlotShape` . A picture of a neuron suitable for specifying
time, space, and shape plots. 

VectorMovie
"""""""""""

Starts a :hoc:class:`Graph` that is flushed when above plots are flushed.
This is suitable for selecting vectors from the PlotWhat menu 
and seeing them change every time step. 

PhasePlane
""""""""""

Starts a :hoc:class:`Graph` for plotting f(t) vs g(t). When started a dialog
box pops up requesting the expression for g(t). As in the PlotWhat 
browser for graphs you may enter any variable or function, but it 
should change when the RunControl's InitRun button is pressed. 

Grapher
"""""""

Starts a :ref:`hoc_Grapher` tool for plotting any expression vs a specified
independent variable. Lines are not drawn on this graph in 
response to a run. However it can be made to control a family 
of runs. 

Voltageaxis
"""""""""""

Plots values vs t. 
Suitable for plotting voltage and concentrations, especially when 
calculations are secondorder correct. 
v(.5) of currently selected section is always plotted but can 
be explicitly removed with the Delete command in the Graph menu. 





Vector
======




.. _hoc_vector_savetofile:

Save to File
""""""""""""

Menu for saving/retrieving the last Vector selection to a file. eg. 
from a :ref:`hoc_gui_PickVector` as well as other Vector tools.
 
The format of the file is:

1)  optional first line with the format 

    .. code-block::
        none

        label:anystring 

2)  optional line with one number which is the count of points. 
3)  a tab separated pair of x, y coordinates 
    each line. If there is no "count" line, there must be 
    no empty lines at the end of the file and the last character must 
    be a newline. 
 
When the file is saved with this menu item, 
the label and count are always present in the file. 
For long files retrieval is much more efficient if the count is present. 
 
The implementation of these operations is in 
`$NEURONHOME/lib/hoc/stdlib.hoc <http://neuron.yale.edu/hg/neuron/nrn/file/tip/share/lib/hoc/stdlib.hoc>`_
vectors and performing simple manipulations on them. 

.. seealso::
    :hoc:data:`hoc_obj_`



.. _hoc_stdrun_retrievefromfile:

RetrievefromFile
""""""""""""""""

See :ref:`hoc_vector_savetofile`
 

GatherValues
""""""""""""

Starts a :ref:`hoc_GatherVec` tool collecting x,y values
where x and y come from variables. 

Play
""""

Starts an :ref:`hoc_VectorPlay` tool for playing a vector into
a variable. 

Display
"""""""

Starts an :ref:`hoc_VecWrap` tool for displaying several
vectors and performing simple manipulations on them. 

Draw
""""

Starts a tool for drawing a curve. 


Window
======

A list of all the ungrouped windows (except the NEURONMainMenu) 
and window groups. 
Windows mapped to the screen are indicated by a checkmark; others are 
hidden. Windows may be hidden by selecting the :guilabel:`Hide` item on the 
menubar under the window title. Windows may be hidden or mapped by selecting 
the item in the ungrouped window list. Selecting a window group will hide 
or map all the windows in that group. 

Ungrouped
"""""""""

A window appears in this list if it is not a member of a window group. 
All ungrouped windows may be mapped or hidden by selection of the show 
or hide menu item. 


.. _hoc_groupmanager:

GroupManager
""""""""""""

Window group names appear in this list. Selecting this item pops up 
a window group manager used for creating, renaming, inserting/deleting 
windows into the group, and saving a selected group to a session file. 
 
The window group manager is a dialog box so it must be closed after use. 
 
When a window group name is defined it may be selected in the WindowGroups 
list. The windows of the group are indicated in the middle list. 
Selecting items in this list and the ungrouped windows list removes or 
inserts the window into the group.