tcur_CaT = 0.0 tcur_BK = 0.0 tcur_SK = 0.0 tca_count_det = 0.0 tca_count_stoch = 0.0 for m in submemb_tets: ctriID = submemb_tets_surftris[m] V = sim_stoch.getTriV(ctriID) Si = sim_det.getTetConc(m, 'Ca_det') cur_CaP_sc = cf.getGHKI(CaP_P, V, 2, TEMPERATURE + 273.15, Si * 1.0e3, So * 1.0e3) cur_CaT_sc = cf.getGHKI(CaT_P, V, 2, TEMPERATURE + 273.15, Si * 1.0e3, So * 1.0e3) cur_BK_sc = cf.getOhmI(V, BK_rev, BK_G) cur_L_sc = cf.getOhmI(V, L_rev, L_G) cur_CaP = cur_CaP_sc * (sim_det.getTriCount(ctriID, 'CaP_m3')) cur_CaT = cur_CaT_sc * (sim_det.getTriCount(ctriID, 'CaT_m2h1')) cur_BK = cur_BK_sc * (sim_det.getTriCount(ctriID, 'BK_O0') + sim_det.getTriCount(ctriID, 'BK_O1') + sim_det.getTriCount(ctriID, 'BK_O2') + sim_det.getTriCount(ctriID, 'BK_O3') + sim_det.getTriCount(ctriID, 'BK_O4')) #cur_L corresponding to each surftri has been corrected in the following script line cur_L = cur_L_sc * (round(L_ro * sim_det.getPatchArea('memb_det'))) * ( sim_stoch.getTriArea(ctriID) / sim_det.getPatchArea('memb_det')) ca_count_inj = -1.0 * ( (cur_CaP + cur_CaT) * TIMECONVERTER) / (2 * E_CHARGE)
sim_WM.run(TIMECONVERTER * l) # Now do the communication between the sims for i in range(len(Length)): V = sim_stoch.getTriV(Compborder_triIDs[i][0]) Si = sim_WM.getCompConc('shells' + str(i) + str(0), 'Ca') So = Ca_oconc # Get the single-channel currents first tcur_CaP_sc = cf.getGHKI(CaP_P, V, 2, TEMPERATURE + 273.15, Si * 1.0e3, So * 1.0e3) tcur_CaT_sc = cf.getGHKI(CaT_P, V, 2, TEMPERATURE + 273.15, Si * 1.0e3, So * 1.0e3) tcur_BK_sc = cf.getOhmI(V, BK_rev, BK_G) tcur_SK_sc = cf.getOhmI(V, SK_rev, SK_G) tcur_CaP = tcur_CaP_sc * (sim_WM.getPatchCount( 'rings' + str(i) + str(0), 'CaP_m3')) # alpha is to h1 tcur_CaT = tcur_CaT_sc * (sim_WM.getPatchCount( 'rings' + str(i) + str(0), 'CaT_m2h1')) tcur_BK = tcur_BK_sc*((sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O0')+\ sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O1')+\ sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O2')+\ sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O3')+\ sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O4'))) tcur_SK = tcur_SK_sc*((sim_WM.getPatchCount('rings'+str(i)+str(0), 'SK_O1')+\ sim_WM.getPatchCount('rings'+str(i)+str(0), 'SK_O2')))
sim_WM.setPatchSReacK('rings'+str(i)+str(0), 'BKO2C2', b_2(V)) sim_WM.setPatchSReacK('rings'+str(i)+str(0), 'BKO3C3', b_3(V)) sim_WM.setPatchSReacK('rings'+str(i)+str(0), 'BKO4C4', b_4(V)) sim_WM.run(TIMECONVERTER*l) # Now do the communication between the sims for i in range(len(Length)): V = sim_stoch.getTriV(Compborder_triIDs[i][0]) Si = sim_WM.getCompConc('shells'+str(i)+str(0), 'Ca') So = Ca_oconc # Get the single-channel currents first tcur_CaP_sc = cf.getGHKI(CaP_P, V, 2, TEMPERATURE+273.15, Si*1.0e3, So*1.0e3) tcur_BK_sc = cf.getOhmI(V, BK_rev, BK_G) tcur_SK_sc = cf.getOhmI(V, SK_rev, SK_G) if i>1: tcur_CaT_sc = cf.getGHKI(CaT_P, V, 2, TEMPERATURE+273.15, Si*1.0e3, So*1.0e3) tcur_CaT = tcur_CaT_sc*(sim_WM.getPatchCount('rings'+str(i)+str(0), 'CaT_m2h1')) tcur_AMPA = 0.0 else: tcur_CaT = 0.0 tcur_AMPA_sc = cf.getOhmI(V, AMPA_rev, AMPA_G) tcur_AMPA = tcur_AMPA_sc*(sim_WM.getPatchCount('rings'+str(i)+str(0), 'AMPA_O')) tcur_CaP = tcur_CaP_sc*(sim_WM.getPatchCount('rings'+str(i)+str(0), 'CaP_m3')) # alpha is to h1 tcur_BK = tcur_BK_sc*((sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O0')+\ sim_WM.getPatchCount('rings'+str(i)+str(0), 'BK_O1')+\
tcur_CaT = 0.0 tcur_BK = 0.0 tcur_SK = 0.0 tca_count_det = 0.0 tca_count_stoch = 0.0 for m in submemb_tets: ctriID = submemb_tets_surftris[m] V = sim_stoch.getTriV(ctriID) Si = sim_det.getTetConc(m, 'Ca_det') cur_CaP_sc = cf.getGHKI(CaP_P, V, 2, TEMPERATURE + 273.15, Si * 1.0e3, So * 1.0e3) cur_CaT_sc = cf.getGHKI(CaT_P, V, 2, TEMPERATURE + 273.15, Si * 1.0e3, So * 1.0e3) cur_SK_sc = cf.getOhmI(V, SK_rev, SK_G) cur_L_sc = cf.getOhmI(V, L_rev, L_G) cur_CaP = cur_CaP_sc * (sim_det.getTriCount(ctriID, 'CaP_m3')) cur_CaT = cur_CaT_sc * (sim_det.getTriCount(ctriID, 'CaT_m2h1')) cur_SK = cur_SK_sc * (sim_det.getTriCount(ctriID, 'SK_O1') + sim_det.getTriCount(ctriID, 'SK_O2')) #cur_L corresponding to each surftri has been corrected in the following script line cur_L = cur_L_sc * (round(L_ro * sim_det.getPatchArea('memb_det'))) * ( sim_stoch.getTriArea(ctriID) / sim_det.getPatchArea('memb_det')) ca_count_inj = -1.0 * ( (cur_CaP + cur_CaT) * TIMECONVERTER) / (2 * E_CHARGE) sim_stoch.setTetCount(m, 'Ca_stoch', ca_count_inj + sim_det.getTetCount(m, 'Ca_det'))