Intracellular resistance and setting a variable

Anything that doesn't fit elsewhere.
Post Reply
stephanmg
Posts: 68
Joined: Tue Jul 03, 2012 4:40 am

Intracellular resistance and setting a variable

Post by stephanmg »

Dear NEURON users,

I've come up with two questions again:

1) I want to access each compartments instracellular resistance variable which is utilized for membrane potential calculation and adjust it, i. e. i want to set for different compartments different intracellular resistances.
2) I have a K+ dependent channel, and I want to set a variable K_IC (Kalium concentration intracellular) for each compartment of my multi-compartment model in each of my timesteps in NEURON which i step through by fadvance() in a loop. This I want to do, because my K+ dependent channel needs this information.

I would be glad to here if this is possible, and if it's possible how.

All the best,
Stephan
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Intracellular resistance and setting a variable

Post by ted »

stephanmg wrote:1) I want to access each compartments instracellular resistance variable which is utilized for membrane potential calculation and adjust it, i. e. i want to set for different compartments different intracellular resistances.
This answer assumes that you're asking how to specify the axial resistance between adjacent internal nodes (i.e. between the centers of adjacent compartments or segments); if this guess is incorrect, please let me know. NEURON computes the value of this resistance from neurite diameter, path length between adjacent compartments, and cytoplasmic resistivity Ra (ohm cm). Ra is a section parameter, which means that Ra has the same value over the entire length of a section, so anything you do to Ra will affect axial resistance everywhere in a section. Path length between adjacent internal nodes is (anatomical length)/(nseg), so anything you do to change the path length between any pair of adjacent internal nodes will affect the path length between all adjacent nodes. This leaves neurite diameter. You can change the diameter of any segment, but this will affect the axial resistances between that segment's node and both of the adjacent internal nodes (i.e. the centers of the adjacent segments.
2) I have a K+ dependent channel, and I want to set a variable K_IC (Kalium concentration intracellular) for each compartment of my multi-compartment model in each of my timesteps
Should ki (intracellular potassium | kalium) be a state variable of your model? that is, should k currents, pumps, or diffusion be allowed to change the value of ki? Or do you already have a precomputed (or experimentally measured) time series of values for ki that you want to use as a forcing function to drive the model's ki variable?
stephanmg
Posts: 68
Joined: Tue Jul 03, 2012 4:40 am

Re: Intracellular resistance and setting a variable

Post by stephanmg »

Dear Ted,

thanks for your quick and excellent answer. (I'm glad to be a NEURON user)

1) Okay, indeed, I wanted to adjust the axial resistance between adjacent internal nodes - I'm sorry for my misleading phrasing. So e. g. I access/modify the Ra for the section to adjust the axial resistance. (If this is wrong, feel free to poke me again)

2) Ah okay, more information is necessary, sorry again. In principle the latter would be sufficient for now. I've got an experimentally measured value for the Potassium/Kalium concentration for each compartment for each timestep! This concentration is required for using the K+-channel model within NEURON to modulate the membrane potential computation of NEURON. If I could make this with NEURON it would be perfect.

In the future it will be necessary to include also diffusion and maybe also pumps, yes. But the previous would be charming enough to have for now.

All the best,
Stephan
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Intracellular resistance and setting a variable

Post by ted »

The Vector class's play() method is the most general way to force a parameter to vary during a simulation. You have empirical data, which are probably time series data. For a single compartment model, the steps are (omitting all details):
1. read the empirical measurements of ki (in mM) and the corresponding times at which the measurements were made into a pair of Vectors; I'll call these kivec and tkivec.
2. use Vector play to make these drive the model's ki.

But there are many details.

1. The section must already contain a mechanism that contains a USEION statement (otherwise there won't be k concentrations or equilibrium potential).

2. You need to specify celsius (the operating temperature in deg C) and ko (the extracellular concentration).

3. You need to tell NEURON what policy to use to deal with k concentrations and equilibrium potential. "What??" In most models, concentrations and equilibrium potentials are assumed to be constant parameters; in a few models, ionic fluxes are allowed to change concentrations, and equilibrium potentials are computed from the concentrations at every time step, while in yet others the concentrations are allowed to change but the equilibirum potentials remain constant, or vice versa, and in some models each ionic species is treated in a different way. NEURON has something called ion_style() which lets the modeler specify exactly what is to be done (read about it in the Programmer's Reference). For your particular application, you want:
k concentrations to be treated as PARAMETERs
ek to be treated as an ASSIGNED variable
finitialize() to calculate ek at the start of the simulation
ek to be recalculated at every fadvance()
ignore the global initial concentrations ki0_k_ion and ko0_k_ion
This you do with the following ion_style statement:
ion_style("k_ion", 1, 2, 1, 1, 0)

4. You need to specify the desired value of ko (extracellular k) before the simulation is run.

5. You will probably want to use "vector play with interpolation" since it is unlikely that your experimental measurements were made at intervals of dt = 0.025 ms (or whatever you'll use in your simulations).

6. Until you're absolutely sure that things are working correctly, you'll want to see that ki and ek and v do change as expected during a simulation.

Get this http://www.neuron.yale.edu/ftp/ted/neur ... ymodel.zip, unzip it, and use NEURON to run inittoy.hoc. toymodel.hoc contains hoc code for a single compartment model, in which I have included statements that take care of items 1-5. toymodelrig.ses is a simple GUI for launching simulations and displaying results. Click on Init & Run to see what happens, and take a look at the code in toymodel.hoc. If you see anything in the hoc file that you don't already know about, be sure to read about it in the Programmer's Reference or the NEURON Book. Then we can talk about how to generalize this to suit your particular needs (mostly what to do about a model that has more than one compartment).
Post Reply