Hi Jacopo,
> On that point, I was wondering if there is any difference in using
> point current as opposed to a current in amp/meter**2 regarding
> non-linear currents? For example, when I use Hodgkin-Huxley type
> conductances across the neuron (as in
>
http://brian2.readthedocs.io/en/2.0rc/examples/compartmental.hh_with_spikes.html),
> I don't seem to encounter the error. The non-linear dependence on
> voltage is quite similar to the NMDA synapses, but the only difference
> seems to be that the former is not a 'point current'.
the numerical integration of multi-compartmental models is a two-step
process. First, all differential equations are integrated for each
compartment independently. This can use any integration method that
Brian offers and therefore does not have any restriction on the
equations (the "exponential euler" method that is used by default for
SpatialNeuron does require that each differential equation is linear
with respect to the variable it is defining, though). This updates the
Hodgkin-Huxley gating variables n, m, h, etc. The second step updates
the membrane potential based on Im and the membrane potential of
neighbouring compartments -- this step currently requires that Im
depends linearly on "v". The equations for other variables, such as the
gating variables, do not matter, since they have already been
integrated. Your I_NMDA current on the other hand introduces a direct
non-linear dependence of Im on the membrane potential and that is not
supported. The fact that it is a point current is not the relevant
difference.
Hope that makes things clearer, best
Marcel