Assignments in time and time-dependent functions

Extending NEURON to handle reaction-diffusion problems.

Moderators: hines, wwlytton, ramcdougal

Post Reply
duytanph
Posts: 16
Joined: Wed Jul 10, 2019 5:03 pm

Assignments in time and time-dependent functions

Post by duytanph »

Hello, I'd like to ask if two separate functionalities are supported in RxD:
(1) Assignment of a variable by an explicit algebraic equation (rather than a derivative) at every timestep
(2) Assignment of a variable (or rate) by a time-dependent function

To illustrate, I have a snippet of code that accomplishes this in NMODL:

Code: Select all

BREAKPOINT {
  SOLVE states METHOD cnexp
}

DERIVATIVE states {
  E = E0*exp(-t/tau_in)
  Ve = (kcat*E*S)/((1+H/Ka)*(Km + S + S*S/Ki))
  S' = alpha*S0*exp(-delta*(t)) - Ve
  H' = Ve - beta*H
}
(Equations are from Varfolomeev et al. 2020, Kinetic modeling of dynamic processes in the cholinergic synapse)

From above, there are 3 species: E, S, and H.

Ve is an intermediate variable that is calculated at every timestep in order to calculate S' and H', which is a function of the concentrations of the 3 species at the current timestep (and other constant parameters).

E is assigned a value based on exponential decay at every timestep (i.e., not a differential equation).

S' is the derivative of S which contains a time-dependent function -- another exponential decay.

My question is essentially asking if there is an equivalent way in RxD to:
(i) refer to the time variable (like 't' in NMODL) in assignments as in the "E" variable.
(ii) create assignment definitions that are explicitly algebraic (ie, not a derivative) as in the "Ve" variable.
(iii) create assignments including external functions such as exp().

Thank you, and I appreciate any assistance on this matter.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Assignments in time and time-dependent functions

Post by ted »

If you're interested in simulating anything more than "single shot synaptic activations" of the kind illustrated in figs 1-3 and 7 of V. et al., you'll probably want to use NMODL to implement an event-driven synaptic mechanism that can respond to a series of two or more presynaptic spikes.
ramcdougal
Posts: 267
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: Assignments in time and time-dependent functions

Post by ramcdougal »

Unfortunately rxd doesn't directly support expressions that depend on time.

Algebraic expressions should just work. (There's an example of this in the documentation linked below.)

For math functions, you'll want to use rxdmath see the rxdmath discussion in the documentation
Post Reply