is there a way I can parameter sweep various channel types in multiple identical setups without having to resort to a perl script that will spit out all the sims I need? (Ideally in hoc).
Of course. In the most general terms, you need to iterate over a range of parameters,
and for each new parameter set do the following:
--initialize the model (see comments at very end)
--run a simulation while recording simulation results
--possibly do some postrun analysis
--save results to a file
hoc is a fully qualified programming language with all the features that you might need to
deal with general programming aspects of these tasks, and NEURON's standard run
system (which you get by executing load_file("nrngui.hoc") or load_file("noload.hoc"))
gives you everything else.
General programming
* flow control (iteration, conditional execution)--for, while, iterator, break, continue
* pseudorandom sequence generation--the Random class
* sprint--to create run-specific file names
* file i/o--the File class
Instrumentation
* recording results in the course of a simulation--Vector and CVode record() methods
* stimuli--e.g. synaptic inputs (ExpSyn, Exp2Syn), NetCon class's event() method,
voltage clamp (SEClamp class) and current clamp (IClamp) that can do the usual "3 step
protocols" or be driven by events via FInitializeHandler or "continuously" by Vector play
(see below).
Simulation control
The standard run system gives you full control over initialization and execution of
simulations, plus the ability to customize either or both--see chapters 7 and 8 of The
NEURON Book. In addition to the features discussed in those chapters, you can
implement
* time-varying parameters during a simulation--Vector play() method
* complex "experimental protocols" involving sudden parameter changes in mid-run--CVode
class's event method with the FInitializeHandler class
Comments about initialization
Custom initialization may be necessary in the following cases. For information about how
to deal with them, read chapter 8 of The NEURON Book, and search The NEURON
Forum for
custom initialization
1. Models that have nonuniform biophysical properties, because resting potential is not
likely to be uniform. NEURON's default initialization starts the entire cell at the same
potential.
2. Models that involve ion accumulation mechanisms (diffusion, buffers, pumps etc.).
3. Adjustment of any ionic conductance (e.g. during exploration of parameter space).
4. Adjustment of temperature.
5. Spontaneously active model.