Page 1 of 1

Setting concentrations in rxd.State nodes as a function of concentrations in other rxd.State nodes

Posted: Sun Apr 14, 2024 1:50 pm
by Robert Claar

I have been using the rxd module to model paracrine signaling between pancreatic islet cells. While creating a simple example I have run into a problem.

I have three cell (nrn.Section) types: A cells that secrete rxd.State G, B cells that secrete rxd.State I, and D cells that secrete rxd.State S. Each cell type has a corresponding density mechanism mod file that defines the secretion rates of their respective hormones into one rxd.Region. I followed this tutorial on how to connect mod file ion channels with rxd and this forum post showing how to negate the effect of my "hormone" current on membrane potential.

Code: Select all

# Create h.Sections
A = h.Section(name="A")
B = h.Section(name="B")
D = h.Section(name="D")

# Insert respective mechanisms

# Create rxd.Region. Specify nrn_region='o' so that
# hormone "currents" secrete their hormones out of the cell 
hormone_compartment = rxd.Region(secs=[A, B, D], name="hormone_compartment", nrn_region="o")

# Create rxd.State's
G = rxd.State(regions=hormone_compartment, name="G", charge=1)
I = rxd.State(regions=hormone_compartment, name="I", charge=1)
S = rxd.State(regions=hormone_compartment, name="S", charge=1)
In this simple 3 cell example each rxd.State has a node for each cell. Each cell is secreting its rxd.State into its corresponding rxd.State node exactly how I expect (i.e., the A cell is secreting rxd.State G into the A node of G as expected, same for B and D cells) and I am successfully negating the effect of my hormone "currents" on membrane potential.

Now what I would like to do to model the effect of each cells rxd.State on the other cell types. What I would like to do is, using cell B secreting I which affects cell A as an example, set the concentration in the I node corresponding to cell A as a function of the concentration of I in the B node (e.g., set the concentration of I in the A node to I in the B node divided by the distance between cells A and B). The G_secretion mechanism has a POINTER I that I would then like to be set by this concentration.

I don't think my simple, distance-weighted concentrations would be worth the overhead of using rxd.Extracellular for this. I have tried to set this in multiple ways

Code: Select all

# Set distance between cells A and B to 2 for simplicity.
A2B_dist = 2

# Node 0 of I corresponds to cell A and node 1 corresponds to cell B
# Attempt 1
I.nodes[0]._ref_concentration = I.nodes[1]._ref_concentration / A2B**2

# Attempt 2
I.nodes[0].concentration = I.nodes[1]._ref_concentration / A2B**2
And I keep getting an error relating to dividing the hoc reference to I concentration in node 1 by the integer 4. Is there anyway to do this?

Any help with this is greatly appreciated!

Re: Setting concentrations in rxd.State nodes as a function of concentrations in other rxd.State nodes

Posted: Tue Apr 23, 2024 11:47 am
by Robert Claar

Just following up on this. It is the last thing I need to figure out to set up my simulations. My other approach not using rxd is to use more POINTERs in my mod files and use of rxd in the way I explain above actually gave me a performance boost in some test simulations. Also the structure of my model would match what I am attempting to model much better so I would love to be able to use the rxd module.

Since extracellular diffusion is possible I would imagine that node concentrations have to be able to access the concentrations of other nodes somehow in the backend. I'm just not sure if there is a prescribed way for me to do it.

Any help is appreciated!