## Equation for Single compartment models with external input

The basics of how to develop, test, and use models.

### Equation for Single compartment models with external input

Hello! I am struggling to find what exactly are the equations that NEURON integrates when I create a section with just one segment, insert hh, insert Exp2Syn and insert IClamp.

Code: Select all
`soma = h.Section(name='soma')soma2 = h.Section(name='soma2')soma.insert('hh')soma2.insert('hh')syn = h.Exp2Syn(0.5, sec=soma2)syn.e = 0syn.tau1 = 1syn.tau2 = 3net_con = h.NetCon(soma(0.5)._ref_v, syn, 0, 5, 0.07)stim = h.IClamp(soma(0.5))stim.delay = 1stim.dur = 5stim.amp = 20`

I have read many parts of Hines & Carnevale 1997 at https://www.neuron.yale.edu/neuron/static/papers/nc97/nctoc.htm), but I still don't understand how does neuron compute the voltage in the compartment including synapses and external inputs like IClamp. Is it including it at the equation 2 on the right side of the equal sign in this part of the explanation https://www.neuron.yale.edu/neuron/static/papers/nc97/nc3p1.htm ?

I mean: c dv/dt + i_ion = sum[(v_k-v_j)/r_jk] + Isyn + Iext . Is that it?

And what happens in the case of a single compartment, as the case I illustrated? Is (v_k-v_j)/r_jk=0 in this case?
homerobse

Posts: 2
Joined: Thu Apr 13, 2017 12:50 am

### Re: Equation for Single compartment models with external inp

The discretized cable equation (Equation 2 in that paper) is the key. Currents produced by synapses and other point sources attached to a compartment, such as current or voltage clamps, are added to the right hand side of Equation 2.
what happens in the case of a single compartment . . . Is (v_k-v_j)/r_jk=0
Yes. There can be no current flow between compartments if there is only a single compartment.
ted

Posts: 5039
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

### Re: Equation for Single compartment models with external inp

Thank you very much!
homerobse

Posts: 2
Joined: Thu Apr 13, 2017 12:50 am