Multicompartment and large network models

Jason Sherfey edited this page Dec 15, 2017 · 30 revisions

Currently, DynaSim is best suited to modeling networks with populations of single-compartment neurons. However, it can be used to model cells and networks with arbitrary complexity. In practice, implementing cell models with a few compartments is straightforward in DynaSim; however, custom scripts (see below) are needed to implement complex morphologies; we would recommend using NEURON for modeling morphologically-detailed neurons.

Compartments can be specified in DynaSim using the populations field or the compartments field; the latter is an alias for the former; it was added for conceptual clarity in the model specification.

Excitatory cell S driving the dendrite (Edend) of a two-comparmtent E-cell:

s=[];
s.populations(1).name='S';
s.populations(1).equations='dv/dt=@current+10;{iNa,iK}';
s.compartments(1).name='Edend';
s.compartments(1).equations='dv/dt=@current;{iNa,iK}';
s.compartments(2).name='Esoma';
s.compartments(2).equations='dv/dt=@current;{iNa,iK}';
s.connections(1).direction='S->Edend';
s.connections(1).mechanism_list='iAMPA';
s.connections(2).direction='Edend->Esoma';
s.connections(2).mechanism_list='iCOM';

d=dsSimulate(s);
dsPlot(d);

For more examples that include compartmental dimensions/geometry, see https://github.com/DynaSim/DynaSim/blob/master/demos/examples/Multicompartment_PFC_neurons/Multicompartment_PFC_neurons.m

  • This script walks through the DynaSim implementation of a NEURON model including 2-compartment pyramidal cells and fast spiking interneurons.
  • It also demonstrates using for-loops to construct more complex dendritic morphologies.

Below is one approach to connecting cylindrical compartments into arbors with complex morphologies. As presented, it demonstrates the implementation of bidirectional axial currents between compartments Ed and Es; it can be extended to connect larger sets of compartments by adding elements for each compartment to the variables compartments, lengths, and diameters, as well as adding to the variable connections the corresponding direction ([from to]) for each inter-compartmental connection (e.g., axial current via the iCOM mechanism).

% Given: 
% - DynaSim specification structure 'spec' with two compartments ('Es', 'Ed')
% - Compartment dimensions stored in variables (ls, ds) and (ld, dd) for Es and Ed, respectively.

% Add intercompartmental connections to 'spec'
Ri=1.5; % axial resistance [MOhm-um], Ri=150 Ohm-cm
% collect relevant info
compartments={'Es' 'Ed'};  % list of names for compartments (or populations) in the specification structure
lengths     =[ls   ld];    % cylinder lengths for the elements of "compartments"
diameters   =[ds   dd];    % cylinder diameters for the elements of "compartments"
connections={[1 2],[2 1]}; % directed connections with indices into the variable "compartments". e.g.) [1 2] means to connect the first element of "compartments" to the second element of "compartments".
% add connections to specification
for c=1:length(connections)
  src=connections{c}(1);
  dst=connections{c}(2);
  spec.connections(c).direction=[compartments{src} '->' compartments{dst}];
  spec.connections(c).mechanism_list={'iCOM'};
  gCOM=1/mean(Ri*4*lengths./(pi*diameters.^2));
  spec.connections(c).parameters={'gCOM',gCOM};
end

% alternative calculation for asymmetric and heterogeneous coupling strength (gCOM):
% g12=@(r1,L1,r2,L2)(r1*r2^2)/(Ri*L1*(L1*r2^2+L2*r1^2));
% gCOM=g12*(surface area)=g12*(2*pi*r1*L1)
% d->s: g12(ds/2,ls,dd/2,ld)*(pi*ls*ds)
% s->d: g12(dd/2,ld,ds/2,ls)*(pi*ld*dd)
% Units: [Ri]=MOhm*um, [r]=[L]=um, then [g12]=uS/um2 and [gCOM]=uS. Ra=1/gCOM
% Reference: https://en.wikipedia.org/wiki/Compartmental_modelling_of_dendrites

A similar for-loop approach can be used to connect large sets of populations into large networks; however, different connection mechanisms (e.g., iAMPA, iNMDA, iGABAa) should be used in that case, and connectivity matrices (e.g., netcon) will need to be specified, in addition to maximal conductance (e.g., gAMPA, gNMDA, gGABAa).

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.