Sending commands to NEURON from mosaic

It is inefficient to start a separate neuron viewer for every downloaded hoc file and it is often the case that a mosaic document would like to lead the user through a sequence of simulations using a single neuron process. It takes time to start a large neuron process, but once it is started it is very fast to send various hoc files to it for execution.

To install this feature you need to edit two files in your home directory: .mime.types and .mailcap

Add the following lines to $HOME/.mime.types

application/neuron	hoc

Add the following lines to $HOME/.mailcap

application/neuron; mos2nrn %s

Now you can start a neuron process on your machine and execute the contents of a hoc file when you press start. If you did press it, what you eventually see is an xterm running neuron with a little notice that it is accepting input from a pipe. Any commands coming from the pipe are prefixed with a prompt showing the name of the pipe. This does not preclude typing direct commands to the xterm or operating any graphical interface elements of the neuron process. For example one of the things done by the "start" script was to set the value of t to 25. Check this out by typing t in the xterm window.

Press the following in sequence to see an action potential:
start the neuron main menu
insert hh
start up an inserter so we can see what mechanisms are present
set up a current stimulus
show a graph to plot the voltage
run
quit See how everything goes away.