{# NMODL template for rate equations This template defines the NMODL DERIVATIVE block which is used to compute the derivatives of all rate equations defined in the current system. Template variables are: - indent: the current indentation level - rateEqLocals: a list with the names of all local variables that appear in the system of equations - rateEqDefs: a list of strings with the rate equations in NMODL syntax - externalEqDefs: a list of strings with the external quantity equations in NMODL syntax (this is used for ionic concentrations and v) - assignedEqDefs: a list of strings with the assigned equations in NMODL syntax (this is only used to determine if the "asgns" procedure should be called) #} {% if (not (rateEqDefs == [])) %} DERIVATIVE states { {% if (not (rateEqLocals == [])) %} LOCAL {{rateEqLocals | join (", ")}} {% endif %} {% for externalEqDef in externalEqDefs %} {{externalEqDef}} {% endfor %} {% if (not (assignedEqDefs == [])) %} asgns() {% endif %} {% for rateEqDef in rateEqDefs %} {{rateEqDef}} {% endfor %} } {% endif %}