functions
hocmech("suffix", "Template", "parm1 parm2 parm3 ...")
section insert suffix
and after insertion
the public names are accessible via the normal range variable notation
as in: section.name_suffix(x)
At this time the functionality of such interpreter defined membrane
mechanisms is a small subset of the functionality of mechanisms described
by the model description language. Furthermore, being interpreted, they
are much ( more than 100 times) slower than compiled model descriptions.
However, it is a very powerful way to
watch variables, specify events for delivery as specific times,
receive events, and discontinuously (or continuously) modify parameters
during a simulation. And it works in the context of all the integration
methods, including local variable time steps. The following procedure
names within a template, if they exist, are analogous to the
indicated block in the model description language. In each case
the currently accessed section is set to the location of this instance
of the Template and one argument is passed, x, which is the
range variable arc position (0 < x < 1)
.
INITIAL: proc initial()
Called when finitialize is executed.
BREAKPOINT {SOLVE ... METHOD after_cvode}: proc after_step()
For the standard staggered time step and global variable time step
integration methods, called at every fadvance when t = t+dt.
For the local variable step method, the instance is called when
the individual cell CVode instance finished its solve step.
In any case, it is safe to send an event any time after t-dt.
begintemplate Max public V proc initial() { V = v($1) } proc after_step() { if (V < v($1)) { V = v($1) } } endtemplate Max makemech("max", "Max") insert max run() print "V_max=", soma.V_max(.5)