Precompute initial stabilization phase of RMP

Particularly useful chunks of hoc and/or NMODL code. May be pedestrian or stunningly brilliant, may make you gasp or bring tears to your eyes, but always makes you think "I wish I had written that; I'm sure going to steal it."
Post Reply
ephraim
Posts: 2
Joined: Tue May 19, 2020 10:15 am

Precompute initial stabilization phase of RMP

Post by ephraim »

Hi,

Is there a way to precompute a given time period of an axon model in resting state and then use the result to set initial conditions for a separate run of the same model?

This question is with respect to the model from Gaines et al. (2018) published under http://modeldb.yale.edu/243841.

When running the model as downloaded, it goes through an initial phase of instability in the resting membrane potential (RMP). A delay of 50ms before the onset of the extracellular stimulus is implemented, during which the RMP stabilizes.

The authors of the model have confirmed to me that providing time for stabilization was indeed the reason for the implementation of this rather large delay and that they did not have a solution without it.

My issue here is that I would like to use the model at a large scale for the simulation of extracellular current injections. More specifically I'm using a set of about 100 nerve fiber types, on which I intend to apply about 200'000 different extracellular stimulus configurations. The fiber types differ in terms of parameters like diameter etc., whereas the extracellular stimuli are taken from a FEM potential distribution and then applied to the fiber's nodes and myelin sections. In all of these runs I only need to know one thing: whether or not the stimulus evokes an action potential (AP) in the chosen fiber type.

This means that the initial 50ms for stabilization are independent of the extracellular stimulus, and only depend on the predefined fiber types. Running the model for the entire duration before every stimulus would mean a lot of redundant computation, which I need to avoid at this scale. It seems to me now that ideally I would be able to run the stabilization phase just once for each fiber type and then use the end state of that run to parametrize the model for the beginning of each current injection. In other words the model would be frozen at 50ms for every fiber type, so that in every stimulation run I could just access my "stable state freezer", get the model for the adequate fiber type at t=50ms and inject the stimulus right away.

So far, I haven't found a way to do this. A last resort would be to try and adjust the model parameters until the instability is removed sufficiently, but that would raise new questions of validity.

I am new to NEURON, any help is appreciated.
ted
Site Admin
Posts: 5797
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Precompute initial stabilization phase of RMP

Post by ted »

Chapter 8 in The NEURON Book covers the topic of initialization in great detail, with several practical examples of custom initializations. The question is: which strategy is most appropriate for your particular application. If you like, we can take this discussion to email, because only this initial exchange touches on things that are of general interest.
When running the model as downloaded, it goes through an initial phase of instability in the resting membrane potential (RMP).
Of course. Given all that heterogeneity of membrane properties, each different kind of section has its own preferred resting potential--which means that the model does not have a uniform resting potential. I'd like to see this in operation, and also see a typical run execute to completion--but the authors have cleverly shackled their code to MATLAB, which I don't use. Can you email me [ted dot carnevale at yale dot edu] the MATLAB-generated data files that are required for a single simulation of a single axon with what you regard as "average diameter"?
Is there a way to precompute a given time period of an axon model in resting state and then use the result to set initial conditions for a separate run of the same model?
Yes, but that may not be the most appropriate way to deal with your problem. I'll need to know a bit more in order to give the best advice.
My issue here is that I would like to use the model at a large scale for the simulation of extracellular current injections. More specifically I'm using a set of about 100 nerve fiber types, on which I intend to apply about 200'000 different extracellular stimulus configurations.
Are you assuming that the extracellular medium (tissue etc.) is purely resistive, or will it be dispersive? Will you be using the same stimulus waveform that Gaines et al. did? i.e. a single rectangular pulse generated by current applied to a single pair of electrodes? Or will extracellular potential follow a more complex time course and/or involve different stimulus currents applied by more than two electrodes?

Their methods section suggests that the cathode was aligned with one end of the axon, but the MATLAB code suggests that it was midway between the ends of the axon. Which of these is correct?
In all of these runs I only need to know one thing: whether or not the stimulus evokes an action potential (AP) in the chosen fiber type.
Then simulation can be terminated 1 or 2 ms after a spike is elicited (you'll want to capture much of the spike waveform, if only to satisfy challenges from vigilant reviewers). Will spike threshold (more properly, the threshold stimulus) be of interest?
It seems to me now that ideally I would be able to run the stabilization phase just once for each fiber type and then use the end state of that run to parametrize the model for the beginning of each current injection
Yes, but a thoughtful reviewer would point out that, if resting membrane potential varies with fiber diameter (does it in this model?), then the initial state of voltage-gated ion channels will vary with fiber diameter, and that will alter axon excitability from what it would have been if resting membrane potential were independent of diameter. That confound makes it hard to know how much of an observed change of excitability can be attributed to geometric factors (diameter effects on net membrane capacitance and conductance, and axial resistance) versus the extent to which it reflects the effect of altered resting potential on ion channel gating. After all, a little steady-state depolarization reduces excitability by activating the delayed rectifier and inactivating the fast sodium current.
ephraim
Posts: 2
Joined: Tue May 19, 2020 10:15 am

Re: Precompute initial stabilization phase of RMP

Post by ephraim »

Thank you very much for your helpful answer.

Chapter 8.4.3. with the "groundhog day initialization" seems to be just what I was looking for, so pointing me towards there might already allow me to solve this.

Of course I'm very interested in more effective strategies, so I'll gladly continue the exchange via email.
Post Reply