Syncronized concentrations in and out the membrane

NMODL and the Channel Builder.
Post Reply
bremen
Posts: 45
Joined: Mon Apr 24, 2017 8:15 am
Location: Italy

Syncronized concentrations in and out the membrane

Post by bremen »

Hi.

I'm trying to define a MOD file capable of reading the internal concentration of a substance and, with a slim to none delay, "transpose" the same concentration in a ecs.
The ecs is defined with rxd.Extracellular(). The substance is generated by a MOD file in the inside and as an rxd.species on the outside, with a diffusion value to prevent local accumulation.

I'm following a leak current and pump schemes:

Code: Select all

USEION x READ xi WRITE xo CHARGE 1

INITIAL {
    imax = 1
}

ASSIGNED {
    xo      (mM)
    xi      (mM)
}

BREAKPOINT {
    xo = imax *xi
}
When i record the variable inside the mod with printf("xi: %g \n", xi) or printf("xo: %g \n", xo) they are correct.
When i use vec.record(cell.section[0](0.5)._ref_xo) it stays at 1 for one integration step and than it falls at 0 for the rest of the simulation.
bremen
Posts: 45
Joined: Mon Apr 24, 2017 8:15 am
Location: Italy

Re: Syncronized concentrations in and out the membrane

Post by bremen »

Never mind. I have found the underlying issue.
Post Reply