% % hefib_ampanmda.m Steve Cox, 2/1/09 % % solve the active sealed fiber problem with an AMPA/NMDA synapse on a spine % % usage: hefib_ampanmda(a,ell,N,dt,Tfin,Ns,pinc) % % a = fiber radius (cm) % ell = fiber length (cm) % N = number of compartments % dt = timestep (ms) % Tfin = end time (ms) % Ns = spine compartment number(s) % pinc = number of time steps between plot3 calls % % example: hefib_ampanmda(2e-4,.5,400,.02,14.9,120,10) % function hefib_ampanmda(a,ell,N,dt,Tfin,Ns,pinc) close all Cm = 1; % micro F / cm^2 R2 = 0.1; % k Ohm cm dx = ell/N; % patch length A = 2*pi*a*dx; % patch surface area x = dx/2:dx:ell-dx/2; % vector of patch midpoints VL = -60; % leak potential mV GL = 0.3; % mS/(cm)^2 tau = Cm/GL; % membrane time constant lam2 = a/2/R2/GL; % square of space constant % spine and synapse parameters ass = 5e-5; % cm ellss = 1e-4; % cm Ash = 5e-8; % cm gss = pi*ass^2/R2/ellss; km = 2*0.19; % off rate, 1/ms kp = 1.1; % on rate, 1/(mM ms) T0 = 1; % transmitter conc, mM r0 = T0/(T0+km/kp); % effective fraction of open receptors t1 = 4; % start neurotran release t2 = 5; % stop neurotran release gbarsyn = 0*1.3*9e4/55; % mS/cm^2 Vsyn = 0; % synaptic reversal potential r = 0; % time course of synaptic conductance T1 = 0; k1 = kp*T1+km; rN = 0; kmN = 4*0.0066; kpN = 0.072; KdN = kmN/kpN; r0N = T0/(T0+KdN); gbarsynN = 2e2; k1N = kpN*T1+kmN; e = ones(N,1); v = VL*e; % initial conditions w = VL; vK = -72; % mV vNa = 55; % mV vCl = -60; % mV VL = vCl; GK = 40 - 20*(x'>0.05).*(x'<0.1); % mS/(cm)^2 GNa = 44 + 560*(x'>0.05).*(x'<0.1); % mS/(cm)^2 GL = 0.3; % mS/(cm)^2 GK = GK/GL; GNa = GNa/GL; tau = Cm/GL; lam2 = a/2/R2/GL; Vr = -62.4; e = ones(N,1); v = Vr*e; % initial conditions w = v(1); n = an(v(1))*e/(an(v(1))+bn(v(1))); m = am(v(1))*e/(am(v(1))+bm(v(1))); h = ah(v(1))*e/(ah(v(1))+bh(v(1))); B = spdiags([-e 2*e -e], -1:1, N, N)/dx/dx; B(1,1) = 1/dx/dx; B(N,N) = 1/dx/dx; B = dt*lam2*B/tau; dB = diag(B); t = 0; tcnt = 1; plot3(x,t*ones(N,1),v) hold on Nt = 1+round(Tfin/dt); tim = zeros(Nt,1); GsynA = tim; GsynN = tim; W = tim; W(1) = VL; Iampa = tim; Inmda = tim; while (t <= Tfin) t = t + dt; tm = mod(t,20); T2 = T0*(tm>t1)*(tm