capacitance to zero, is this possible in Brian?

31 views
Skip to first unread message

jeandu...@gmail.com

unread,
May 15, 2020, 8:53:45 PM5/15/20
to Brian
Hi,

I'm new to using Brian2 and my goal is to replicate published a model (written in C++, https://www.ncbi.nlm.nih.gov/pubmed/27076422) of slow wave sleep to then change some plasticity rules. It's a hodgkin huxley model with thalamic and cortical cells. The cortical cells have two iso-potential compartments dendrite and soma. The issue I'm running into at the moment is the following: The model assumes the capacitance of the soma of the cortical cells to be 0, so the Vsoma is always at steady state based on the assumption the current dynamics are very fast in the soma. This means the equation

Cm*dV_soma/dt = - g_ds(V_dend - V_soma) - I_intrinsic_soma       (where g_ds is the conductance between the dendrite and soma)

then is obviously 0 on the left side. By solving for V_soma now you end up with the equation 

V_soma = V_dend - I_intrinsic_soma/g_ds 

which raises the error of cyclical dependency as the intrinsic currents are themselves dependent on V_soma. 

Is there any way to still model this in Brian, or is this a complete dealbreaker? I'm currently a little stuck, any help would be greatly appreciated!

Thanks,

Jean-Philippe


Marcel Stimberg

unread,
May 20, 2020, 12:15:58 PM5/20/20
to brians...@googlegroups.com
Hi Jean-Philippe,

indeed, the definition of V_soma is cyclical and Brian therefore refuses
it. In principle, you should be able to solve this by marking the
equation for V_soma as "(constant over dt)" This way, it would calculate
V_soma once at the beginning of the time step, using the current value
of I_intrinsic_soma (i.e., based on the last timestep's values). It
would therefore not run into the issue with the recursive definition. I
assume this is what is done in the C++ code? Or do they really solve
this as an implicit problem (where V_soma(t) depends on V_soma(t))?

Unfortunately, marking the equation as (constant over dt) does not work
in your case, due to the way the equations are analysed currently. I
think that's a bug, I'll open an issue about it.

All that said, you can reproduce the "constant over dt" solution
manually. Instead of writing V_soma as part of the equations, you only
include it as "V_soma : volt". Then, you ask Brian to update it at the
beginning of every time step:

neurons = NeuronGroup(...)
neurons.run_regularly('V_soma = V_dend - I_intrinsic_soma/g_ds',
when='before_groups')

It's a bit of an implementation detail whether to use
when='before_groups' or when='after_groups'. This should only change the
assignments to the V_soma values to the time steps if you record them
with a StateMonitor, i.e. does the updated V_soma value "belong" to the
current or the next time step.

Hope that makes sense, best

  Marcel


Reply all
Reply to author
Forward
0 new messages