Using setpointer() and RXD concentrations

Extending NEURON to handle reaction-diffusion problems.

Moderators: hines, wwlytton, ramcdougal

Post Reply
amerg
Posts: 4
Joined: Wed Jul 31, 2019 5:14 pm

Using setpointer() and RXD concentrations

Post by amerg » Mon Aug 26, 2019 6:16 pm

I'm having an issue using setpointer() to connect a species concentration to a density mechanism. If I use a normal reference variable such as h._ref_t, then I don't get errors. However, if I use a line like

Code: Select all

h.setpointer(my_species.nodes(my_sec(0.5))[0]._ref_concentration, 'my_ptr', sec(0.5).mech_name)
I get these errors when the simulation tries to evaluate the line h.cvode.active(1)

Code: Select all

corrupted size vs. prev_size
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
I reformatted the mechanism to be a Point Process, but got the same error. Is there a mistake in how I'm trying to set the pointer?

Also, if I use a density mechanism, would I need to step through all of the segments and set each pointer to the concentrations of the appropriate nodes or are density mechanisms+pointers not supported/advised?

adamjhn
Posts: 34
Joined: Tue Apr 18, 2017 10:05 am

Re: Using setpointer() and RXD concentrations

Post by adamjhn » Tue Aug 27, 2019 11:48 am

The rxd Species, State and Parameter can be accessed in density mechanisms by their name. For example in the extracellular diffusion example;
The species has name='k', charge=1 which is accessed in steady_k.mod with

Code: Select all

USEION k WRITE ik CHARGE 1
Note the names have to match and the charge must equal the CHARGE (sometimes called VALENCE in nmodl).
Importantly, for intracellular regions, the region must be tagged with nrn_region='i' as the cyt region is in the varying initial concentrations and parameters example.

With a point process you will need to set the pointer, here is an mGluR example;
The Species Glu is linked to a pointer ‘G’ in a point process that increases the concentration in response to stimulation.

Code: Select all

h.setpointer(Glu.nodes[0]._ref_concentration, 'G', syn)
As of 7.7.2 you can also set the pointer using;

Code: Select all

syn._ref_G = Glu.nodes[0]._ref_concentration

Post Reply