create dend

dend {
  nseg = 1
  L = 20
  diam = 4
}

dend {
  insert leak

  insert cdp5

for(x,0) {
        insert cdp5
        Nannuli_cdp5(x) = 0.326 + (1.94 * diam(x)) + (0.289*diam(x)*diam(x)) - ((3.33e-2)*diam(x)*diam(x)*diam(x)) + ((1.55e-3)*diam(x)*diam(x)*diam(x)*diam(x)) - (2.55e-5*diam(x)*diam(x)*diam(x)*diam(x)*diam(x))
        Buffnull2_cdp5(x) = 64.2 - 57.3*exp(-diam(x)/1.4)
        rf3_cdp5(x) = 0.162 - 0.106*exp(-diam(x)/2.29)
        if (diam(x)>=2) {
                rf4_cdp5(x) = 0.000267 + 0.0167*exp(-diam(x)/0.722) + 0.0028*exp(-diam(x)/4)
        } else {
                rf4_cdp5(x) = 0.003
        }
}

  insert newCaP
  insert mslo
  insert CaT3_1
  insert SK2
 gbar_leak = 1e-6
  e_leak = -61
  cm = 1.5
  Ra = 250

  gbar_mslo = 7.01e-2
  pcabar_newCaP = 2.2e-4
  gkbar_SK2 = 3.02e-4
  pcabar_CaT3_1 = 8.2e-6

  vshift_newCaP = 4.7

}