How to enter the parameters of a number of channels for a neuron?

The basics of how to develop, test, and use models.
Post Reply
guanbc
Posts: 9
Joined: Mon Feb 18, 2019 6:37 am

How to enter the parameters of a number of channels for a neuron?

Post by guanbc »

I am a beginner to studying NEURON, and have just read some relevant materials online. Now my colleague has given me the list of channels existing in a species of neuron she is studying, including 9 channels (eg.A channel, Kdr channel, HCN channel, Nav, CaHVA...) with their maximal conductances, reversal potentials, activation and inactivation parameters. How can I enter them into NEURON? It seems not enough to use Biophysics in Cell Builder only. Should I use Channel Builder or NMODL? I wonder whether the Channel Builder is enough or not.
BTW, our aim is to simulate the effect (voltage response) of square waveform current stimulation on the cell with all these channels. Our operation system is Windows 7.
Thanks.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to enter the parameters of a number of channels for a neuron?

Post by ted »

Your first step has nothing to do with any of NEURON's tools. It is to use your most important tool: your own knowledge and judgement.

If you have the complete mathematical description for a particular channel--by which I mean the equations that describe the voltage dependency of the gating states' rate constants AND the numerical values of the parameters of those equations--then it might be easiest to use the Channel Builder to add it to NEURON. Or maybe you'd rather check ModelDB for NEURON models of the same type of neuron (or similar types of neurons), see whether those models include mod files that define ion channels with properties identical to what you need, or at least similar enough to what you need so that you can reuse them after making minor changes.

If you don't have a complete mathematical description for a particular channel, then you definitely should check ModelDB for NEURON models with mod files that define similar channels.

Whatever you do, you need to test each channel to make sure that it does what you think it should do. Make a single compartment model, add just one channel to it, then do some voltage clamp experiments to verify that its conductance and current have the correct dependence on voltage and time.
guanbc
Posts: 9
Joined: Mon Feb 18, 2019 6:37 am

Re: How to enter the parameters of a number of channels for a neuron?

Post by guanbc »

I tried a simple SEClamp "experiment"after entering a HH Na Channel and a HH K channel in the Cell builder(instead of in the Channnel Builder).Basically, it seemed OK and the i-t curve looked like what I expected. There are two problems:
1) I used a three-epoch voltage stimulation, the first and the last being the holding potential, and the middle being the stimulation pulse.Unless I used a specific holding potential level (-77 in my case), the current in the first epoch was not a flat baseline but a changing curve (much slower than expected for voltage clamp).
2) If I also use Channel Builder to enter HH channels, what are the relationships between the HH channels in the Cell Builder and those in the Channel Builder?
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to enter the parameters of a number of channels for a neuron?

Post by ted »

I used a three-epoch voltage stimulation, the first and the last being the holding potential, and the middle being the stimulation pulse.Unless I used a specific holding potential level (-77 in my case), the current in the first epoch was not a flat baseline but a changing curve (much slower than expected for voltage clamp).
What was the value of v_init?
If I also use Channel Builder to enter HH channels, what are the relationships between the HH channels in the Cell Builder and those in the Channel Builder?
There isn't any.
guanbc
Posts: 9
Joined: Mon Feb 18, 2019 6:37 am

Re: How to enter the parameters of a number of channels for a neuron?

Post by guanbc »

After adjusting the initial potential, the result looked OK with flat baseline. Now several other questions:
1) How to removed the capacitive transients in SEClamp?
2) In the Channel Builder, is there a way to change the equilibrium potential value of HH sodium currents or HH potassium currents if we do not want to use the default value?
3) In the Channel Builder tutorial, it says:“What if our mechanism used some new ion x whose equilibrium potential ex is not already known to NEURON?
The Channel Builder would automatically assign ex a default value of 0.
The "Default gmax" window would offer a second row with widgets and and a numeric field so we could specify a nonzero value for ex.”
But, even if I add a new ion, I can not find the numeric field for specify a nonzero value. There is only a field for entering the gmax.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to enter the parameters of a number of channels for a neuron?

Post by ted »

[quote}How to removed the capacitive transients in SEClamp?[/quote]Not sure what you mean by "capacitive transients." Do you mean the lag between the command potential waveform and the actual membrane potential that the clamp is supposed to control? Or do you mean the brief but often large spike of clamp current that happens when the command potential jumps abruptly from one value to another?
In the Channel Builder, is there a way to change the equilibrium potential value of HH sodium currents or HH potassium currents
No. The Channel Builder is designed for specifying the properties of ion channels. Equilibrium potentials are not properties of ion channels.

Equilibrium potential names have the form
ex
where x is the name of the ionic speciesFor example, the equilibrium potentials for sodium na and potassium k are called ena and ek. Equilibrium potentials are range variables, and they are generated automatically on a section by section basis. For example, if a density mechanism (or point process) uses sodium ions, every segment (compartment) of every section that has that mechanism will automatically have its own value for ena.

Where does the value of ena come from? In the real world, equilibrium potentials result from chemical potential gradients of ionic solutes. The phenomena that generate chemical potential gradients include active transport, ion exchange, and diffusion. Most computational neuroscience models ignore these phenomena and simply treat ionic equilibrium potentials as constant parameters. That's fine as long as the research question that inspired the model doesn't involve the effects of changes of ionic concentration or equilibrium potential. In some cases, it is necessary to allow certain ionic concentrations to change (usually calcium) but OK for equilibrium potentials and other ion concentrations to remain constant. In other cases, it is important that one or more ionic concentrations can change AND affect the equilibrium potentials of those particular ionic species.

NEURON gives modelers the ability to deal with all of these cases. The simplest and most common case is that equilibrium potentials are constant. In that case, you can just assign a numerical value to whatever equilibrium potential you want. How can you discover if you're dealing with the "simplest case"? First, check your model's NMODL files for USEION statements. If you see a USEION statement of the form
USEION x . . . WRITE ex
then check that mod file to see if it calculates a value for ex.

Also check for USEION statements that WRITE intracellular and/or extracellular concentrations (statements of the form
USEION x . . . WRITE xi
or
USEION x . . . WRITE xo
or even
USEION x . . . WRITE xi, xo
). If your model involves such a mechanism, by default NEURON will automatically recalculate ex at each time step.

NEURON's computational engine is pretty good at deciding how to deal with each section's ionic concentrations and their equilibrium potentials. However, there are times when it is necessary to force NEURON to do something different, or to verify that NEURON is doing what you expected it to. NEURON provides a function called ion_style that can be called from hoc or Python to check, or specify, how reversal potential and ionic concentration are handled for any ion in any section. You might want to read about this in the Programmer's Reference.
In the Channel Builder tutorial, it says:“What if our mechanism used some new ion x whose equilibrium potential ex is not already known to NEURON?
The Channel Builder would automatically assign ex a default value of 0.
The "Default gmax" window would offer a second row with widgets and and a numeric field so we could specify a nonzero value for ex.”
But, even if I add a new ion, I can not find the numeric field for specify a nonzero value.
You're right, that's a mistake in the tutorial that needs to be fixed. It's up to you to use hoc or Python statement(s) to specify the value of ex. For example, suppose a Channel Builder has been used to create a density mechanism with the name foo that uses an ionic species x. After foo has been inserted into one or more sections, this hoc statement
forall if (ismembrane("x_ion")) ex = -90
will set the value of ex to -90 mV in all sections that have mechanisms that use ion x--whether they got ion x from
insert foo
or from insertion of some other mechanism that also used ion x.
guanbc
Posts: 9
Joined: Mon Feb 18, 2019 6:37 am

Re: How to enter the parameters of a number of channels for a neuron?

Post by guanbc »

Ted, Thank you very much for your detailed answers. They are very helpful to me.
1) By ‘capacitive transients’ I mean the electrode or membrane capacitance mediated charging/discharging currents while the clamping voltage changes in single electrode voltage clamp experiments. In real such experiments, we use capacitance compensation function of the amplifier to remove these artifacts. Can we do similar thing in modeling experiments?
2) A theoretical question: Should the relationships of the time constants of n, m or h for voltage dependent K or Na channels against the potential be like kind of bell shape or sigmoid? In HH papers, they are like kind of bell shape and follow empirical formulas. But in other papers, they are sigmoid and the authors used Boltzmann equation to fit them. I wonder whether the latter was right or not. (eg: J Comput Neurosci (2017) 42:275–305 Ionic currents influencing spontaneous firing and pacemaker frequency in dopamine neurons of the ventrolateral periaqueductal gray and dorsal raphe nucleus (vlPAG/DRN): A voltage-clamp and computational modelling study)
3) Another theoretical question: For HH Na channels, if the activation time constant is measured in real experiments, it should be the time constant of m^3, not that of m, and taking the measured activation time constant as being that of m should be wrong when entering parameters for modelling. Do I understand it right ?
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to enter the parameters of a number of channels for a neuron?

Post by ted »

By ‘capacitive transients’ I mean the electrode or membrane capacitance mediated charging/discharging currents while the clamping voltage changes in single electrode voltage clamp experiments. In real such experiments, we use capacitance compensation function of the amplifier to remove these artifacts. Can we do similar thing in modeling experiments?
You could use the Linear Circuit Builder to do that, but if your real interest is in the time course of ionic conductances and the resulting ionic currents, why not just examine those? NEURON computes their numerical values, and if you know the names of those variables, you can plot and/or record them to Vectors for post-run analysis.
A theoretical question: Should the relationships of the time constants of n, m or h for voltage dependent K or Na channels against the potential be like kind of bell shape or sigmoid?
The original HH model's voltage-dependent rate constants did indeed result in time constants for m, h, and n that were maximum at the membrane potentials where those variables were half-activated.
But in other papers, they are sigmoid and the authors used Boltzmann equation to fit them. I wonder whether the latter was right or not. (eg: J Comput Neurosci (2017) 42:275–305 Ionic currents influencing spontaneous firing and pacemaker frequency in dopamine neurons of the ventrolateral periaqueductal gray and dorsal raphe nucleus (vlPAG/DRN): A voltage-clamp and computational modelling study)
Did that paper present the experimental data to which the gating equations were fit, and the full form of the gating equations? Did they demonstrate a close fit?
For HH Na channels, if the activation time constant is measured in real experiments, it should be the time constant of m^3, not that of m, and taking the measured activation time constant as being that of m should be wrong when entering parameters for modelling.
What did Hodgkin and Huxley do? Their papers are freely available for download.
guanbc
Posts: 9
Joined: Mon Feb 18, 2019 6:37 am

Re: How to enter the parameters of a number of channels for a neuron?

Post by guanbc »

Only using GUI, if I have created a cell using Cell Builder with hh Na and hh K channels. If I create another channel using Channel Builder, how can I insert this channel to that cell I have created? I mean, how can I insert the channel created by Channel Builder to the cell created by Cell Builder using only GUI (without writing any code)?
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to enter the parameters of a number of channels for a neuron?

Post by ted »

Save your configured ChannelBuilder to its own session file. Read this
https://neuron.yale.edu/neuron/static/d ... veses.html
for more information about session files and how to save them.

If you need to use your new channel in a model, use load_file() or xopen() to make NEURON read its session file. You have to do this before doing anything that needs to know about your new channel. After NEURON reads the session file, your channel's name will become a new NEURON keyword that is known to hoc and Python, and it will automatically appear in the menus of any new GUI tools (like the CellBuilder if your channel is a density mechanism, or the PointProcessManager if it is a point process).

For example, suppose you have configured a ChannelBuilder as a density mechanism that is a new kind of potassium channel that you call ka. Save the ChannelBuilder to a file called ka.ses. Then if you want to start NEURON and use ka in a new model, first create a hoc file called
loadka.hoc
which contains the statement
load_file("ka.ses")
Then you can execute the command
nrngui loadka.hoc
(or double click on the loadka.hoc file)
and NEURON will start, read ka.ses, and be ready for you to start building models that involve ka.
If you're a Python user, you can get the same effect by making a file called loadka.py that contains the statements

Code: Select all

from neuron import h # if you plan to use the GUI, from neuron import h, gui
h.load_file("ka.ses")
and then at the system prompt execute the command
python -i loadka.py

And of course it's easy to work with ses files for two or more ChannelBuilders--just include a load_file() statement for each channel builder.
guanbc
Posts: 9
Joined: Mon Feb 18, 2019 6:37 am

Re: How to enter the parameters of a number of channels for a neuron?

Post by guanbc »

1) Thanks a lot, Ted, for your great support! I tried as you said, it worked well. But, can we do it the other way round? That is, can I create the cell model first using Cell Builder and save it as ses. File, and then load it, and use it when I create channels using the Channel Builder?
2) If we have saved the Cell Builder window, the Channel Builder window, the PointProces Manager window, the RunControl window and the Graph window as SEPARATE ses. Files, and if we restart Neuron, load them one by one and press Init & Run button, do they automatically know each other and work coordinately as if they were the different organs of the human body?
3) Is there a full glossary for us to the check the meanings of the definitions used in Neuron? Many symbols are confusing and difficult to guess, such as Ra (surely not access resistance, seeming to be axial resistance), xml (?, in Cell Builder), PointProcess (why such naming?)
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to enter the parameters of a number of channels for a neuron?

Post by ted »

can I create the cell model first using Cell Builder and save it as ses. File, and then load it, and use it when I create channels using the Channel Builder?
If you want to use a user-specified density mechanism (whether it is an ion channel, a pump, or some other density mechanism) in a CellBuilder, NEURON must already know about that mechanism before you create that CellBuilder. This is true regardless of whether the channel is specified by an nmodl file or by a Channel Builder. Otherwise the density mechanism will not appear on the CellBuilder's Biophysics Strategy page. If you recreate a CellBuilder from a ses file and that CellBuilder refers to a density mechanism, if NEURON doesn't know about that density mechanism you will get an error message and program execution will stop.
If we have saved the Cell Builder window, the Channel Builder window, the PointProces Manager window, the RunControl window and the Graph window as SEPARATE ses. Files, and if we restart Neuron, load them one by one and press Init & Run button, do they automatically know each other and work coordinately as if they were the different organs of the human body?
If a configured GUI tool refers to a particular section, range variable, density mechanism, or object instance, the thing(s) to which it refers must exist before the ses file that recreates the GUI tool is read by xopen or load_file. Example: if g.ses is a session file that recreates an instance of the Graph class that has been configured to plot dend[3].nai(0.5) vs. time, then before you xopen("g.ses") or load_file("g.ses") there should be a section called dend[3] that has nai. If there isn't, NEURON will issue an error message and execution will stop.

NEURON Main Menu / File / save session
and
Print and File Window Manager / Session / Save all
will save NEURON's GUI tools in the correct sequence so that when you recreate them (via xopen or load_file) each one will be launched in the proper sequence and you won't get an error message.

It is often useful to save one or more GUI tools to individual ses files. For example, suppose you have used the GUI to do voltage clamp experiments on a model cell that is patch clamped at the soma. The GUI tools include a RunControl panel, a CellBuilder for a model cell that has a soma section, a PointProcessManager configured as an SEClamp attached to soma(0.5), a Graph that plots soma.v(0.5) vs. t, and another Graph that plots the SEClamp's current i vs. t. You could save all of these tools to a single ses file. But if you want to do voltage clamp experiments on other model cells, you might want to save all of the GUI tools _except_ for the CellBuilder to a ses file that you call rig.ses. Then you write a file called
initsec.hoc
that contains these statements

load_file("nrngui.hoc")
load_file("cell1.ses") // CellBuilder that specifies the properties of cell 1
load_file("rig.ses")

and you can experiment on cell 1. When it comes time to experiment on cell 2, just comment out the line that loads the ses file for cell1 and insert a line that loads the ses file or hoc file that specifies the properties of cell 2, like so

load_file("nrngui.hoc")
// load_file("cell1.ses") // CellBuilder that specifies the properties of cell 1
load_file("cell2.hoc") // hoc code that specifies properties of cell 2
load_file("rig.ses")

FYI: this is a simple example of modular programming.
Is there a full glossary for us to the check the meanings of the definitions used in Neuron? Many symbols are confusing and difficult to guess, such as Ra (surely not access resistance, seeming to be axial resistance), xml (?, in Cell Builder), PointProcess (why such naming?)
Check the Index of the Programmer's Reference. If you don't see what you want, use the Programmer's Reference's Search box. If you still don't see what you want, ask on the Forum. IMO these things should be easy to find in the Index.

FYI Ra is cytoplasmic resistivity. What NEURON calls a "point process" was originally something used to emulate a very localized current source, like a synapse or a sharp or patch electrode attached to a cell at a particular location.
Post Reply