Dynamically modifying gmax outside .mod

NMODL and the Channel Builder.
Post Reply
tardebut
Posts: 21
Joined: Thu Sep 18, 2014 8:23 am

Dynamically modifying gmax outside .mod

Post by tardebut »

Hello there,

I'm implementing some neuromodulatory effects, let's say changes in gmax upon phosphorylation triggered upstream by dopamin.
For this purpose I have a .mod file with the ODEs for the signaling cascade. The kinase downstream is declared in the NEURON block so that its level can be seen from outside.
Now I want to change dynamically the gmax of one or more channes as a function of the level of this kinase. Is there some way to implement this whitout modifying the .mod for the channels?

Thanks in advance.
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Dynamically modifying gmax outside .mod

Post by ted »

I want to change dynamically the gmax of one or more channes as a function of the level of this kinase. Is there some way to implement this whitout modifying the .mod for the channels?
Anything is possible through programming, but only some things are practical (efficient, easy to implement and debug). If the kinase level changes only once, or a few times, during a simulation, and each change has an immediate full effect on gmax, then yes, you could implement this without modifying the channel mod files. But you'd have to write a bunch of other NMODL and hoc code to make this work. If the kinase level changes gradually, and those changes have graded effects on gmax, it is best to revise the channel mod files. You might find it useful to examine model 39949 in ModelDB.
https://senselab.med.yale.edu/modeldb/S ... odel=39949
tardebut
Posts: 21
Joined: Thu Sep 18, 2014 8:23 am

Re: Dynamically modifying gmax outside .mod

Post by tardebut »

Thanks Ted.

The kinase changes gradually. The idea of decoupling the simulation of the neuromodulation from that of the chanels seemed very attractive. I will check the example you suggested.

Thanks again.
NeuroRhythms
Posts: 18
Joined: Mon Aug 13, 2012 7:29 pm

Re: Dynamically modifying gmax outside .mod

Post by NeuroRhythms »

So I am just curious as to how the dopamine mechanism coded for the paper you suggested actually works. The authors scale their L-type Ca++ and Kir currents by a term mu, which is dependent on discrete events modeled in their simulation. They want to simulate the rise in dopamine after substantia nigra activity, so they incorporate a synaptic delay from visual input to substantia nigra events and then rise and fall time of the scaling factor mu. Say I want to model the effect of a neuromodulator as they do but instead of simply modifying the currents which already exist in the membrane equation (as these authors do), I would like cause for a conductance to go from zero to value x, x being dependent on how much neuromodulator might be around. How would I do such a thing? Would I create one .mod file for neuromodulator-activated current and hard code the time-dependent effect of the neuromodulator on the g(t).

Thanks
tardebut
Posts: 21
Joined: Thu Sep 18, 2014 8:23 am

Re: Dynamically modifying gmax outside .mod

Post by tardebut »

Hi there NeuroRhythms,

You asked,
Would I create one .mod file for neuromodulator-activated current and hard code the time-dependent effect of the neuromodulator on the g(t).
To solve this kind of problems one can create a .mod for the dynamics of the neuromodulator and then modify the channel's mod introducing the output variable from the neuromodulator's .mod (e.g. receptor occupancy declared as global) which will change the channel's gmax (or any other channel parameter) according to an equation of your choice. One can code all the neuromodulator dynamics within the channel .mod but the advantage to do it in a dedicated .mod is modularity, i.e. you can use it to neuromodulate different channels. Sort of.

Omar
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Dynamically modifying gmax outside .mod

Post by ted »

NeuroRhythms wrote:Say I want to model the effect of a neuromodulator as they do but instead of simply modifying the currents which already exist in the membrane equation (as these authors do), I would like cause for a conductance to go from zero to value x, x being dependent on how much neuromodulator might be around. How would I do such a thing? Would I create one .mod file for neuromodulator-activated current and hard code the time-dependent effect of the neuromodulator on the g(t).
There are 4 different cases, and which is most appropriate depends on exactly what you want to do.
1. The independent variable is treated as a constant, the value of which is specified before the start of the simulation. You already know how to deal with this.
2. The independent variable is treated as a constant, the value of which may be changed at one or "several" points in the course of a simulation. This can be done with events or with the Vector class's play method. Example: much of what is in the Gruber et al. 2003 paper.
3. The independent variable is treated as a constant, the value of which changes continuously in the course of a simulation. Its value can be driven by the Vector class's play method, or if the time course is conveniently expressed by an algebraic expression it may be better to use a mod file with a pointer to generate the function and drive the independent variable--see discussions of zap or fzap elsewhere in the Forum.
4. The independent variable is, or depends on, a state variable (e.g. an ionic concentration or second messenger whose value is computed in the course of the simulation by numerical integration). A mod file is necessary to implement the "accumulation" mechanism that calculates the value of the state variable.

In order to provide more specific suggestions, I would have to know more about the puropse that you intend for your model.
tardebut wrote:To solve this kind of problems one can create a .mod for the dynamics of the neuromodulator and then modify the channel's mod introducing the output variable from the neuromodulator's .mod (e.g. receptor occupancy declared as global) which will change the channel's gmax (or any other channel parameter) according to an equation of your choice.
Actually, that will not work. NMODL's GLOBAL declaration is not like declaring a variable a global in C. First, it can only be applied to ASSIGNED or PARAMETER variables, and second, it means only that the variable(s) declared GLOBAL will have the same value in every instance of the particular mechanism that is defined by that particular mod file. There is no "EXTERNAL" keyword in NMODL that would allow different kinds of mechanism to refer to the same variable.
Post Reply