Getting the GUI to recognize parameters of new mechanisms

NMODL and the Channel Builder.
Post Reply
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Getting the GUI to recognize parameters of new mechanisms

Post by Annik »

Hopefully this is the right place to put this question.

I have written mod files for chloride ion management, one for intracellular and one for extracellular management. In the extracellular management file, I have specified parameters in the PARAMETER block (clbath, fhspace, txfer, DFree), all of which show up in the GUI when I load these files. However, the intracellular file loads with no problems, but one of the parameters is missing (cli0, which is used instead of clbath for the intracellular management).

I want to be able to modify cli0 in the GUI, but there is no button for it. Also, it does not appear in the model specification when I type "forall psection()" into the main window. What have I done wrong?
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Getting the GUI to recognize parameters of new mechanism

Post by ted »

If a mechanism foo has a USEION x statement is inserted into a section, that section will automatically also get a mechanism called x_ion. If the foo mechanism WRITEs xi and has a PARAMETER called xi0, insertion of foo into a section automatically creates a variable called xi0_xi_ion that is global i.e. it has the same value in all segments of all sections that have the foo mechanism. The same is true if foo WRITEs xo and has an xo0 parameter.

PARAMETERs are GLOBALs by default, and GLOBALs do not generate "button and edit field" widgets in GUI tools such as the CellBuilder or the parameter panels that are brought up by clicking on sections in the "Distributed Mechanism / Viewers / Shape Name" tool (let's call this the Distributed Mechanism Viewer for short). Instead, they are accessible by selecting from the list that is revealed by
Tools / Distributed Mechanisms / Viewers / Mechanisms (Globals)

For your particular example, the automatically generated mechanism is called cli_ion and the global parameter is called cli0_cl_ion.

If you declare
RANGE cli0
in the NEURON block, cli0 will be a range variable (can have different values at different locations), and it will have a "button and numeric field widget" in the CellBuilder and the Distributed Mechanism Viewer. The INITIAL block should still contain the assignment statement
cl = cli0
but the fact that you can specify different values for cli0 in different segments means that the initial value of cl can vary with location.
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Re: Getting the GUI to recognize parameters of new mechanism

Post by Annik »

If instead I wanted a particular parameter of a point process or distributed mechanism available to edit in the GUI, would I need something extra?
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Getting the GUI to recognize parameters of new mechanism

Post by ted »

The question is rather vague. Please be more specific.
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Re: Getting the GUI to recognize parameters of new mechanism

Post by Annik »

Sorry, I meant to ask if the concept is the same for point processes/distributed mechanisms. That is, to appear as a button in the GUI, a parameter must be declared as a RANGE variable in the NEURON block.

I was having some problems with one parameter of a point process appearing in the point process manager window, even when declaring it as a RANGE variable in the NEURON block. I thought that I needed to do something differently because it was a point process, but I found the reason it wasn't working - a typo in the RANGE statement.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Getting the GUI to recognize parameters of new mechanism

Post by ted »

Annik wrote:I meant to ask if the concept is the same for point processes/distributed mechanisms. That is, to appear as a button in the GUI, a parameter must be declared as a RANGE variable in the NEURON block.
Buttons and edit fields for range variable parameters are automatically displayed by CellBuilder, PointProcessManager, and windows spawned by the "Section Parameter" tool (NEURONMainMenu / Tools / Distributed Mechanisms / Viewers / Shape Name). Panels that contain buttons and edit fields for global parameters that belong to density mechanisms ("distributed mechanisms") are launched by choosing an item from the list brought up by NEURONMainMenu / Tools / Distributed Mechanisms / Viewers / Mechanisms (Globals). It is also possible to write a few lines of hoc that use xpanel() and related functions (see the Programmer's Reference) to create custom "parameter panels" that show only what you want.
Post Reply