%******************************************************************************* % Calcium solver, version 5.6.8 % Victor Matveev, matveev@njit.edu % New Jersey Institute of Technology % April 25, 2015 %******************************************************************************* % % This is an example script (parameter) file for the Calcium Calculator % program, implementing Hodgkin-Huxley and HGK equations % % To simplify this demonstration, the same activation variable was used % for Na and Ca channels. Include a separate Ca activation to make the model % more realistic %======================================================================== volume 0 1 0 1 0 1 % Defines the diffusion volume, a cube of 1x1x1 micron grid N N N % The spatial grid will have 30 nodes in each direction N = 30 stretch.factor = 1.02 % The grid will be non-uniform: each successive grid interval stretch x 0 0 % starting from coordinate 0 along each of the 3 stretch y 0 0 % directions will be "stretched" by a factor of 1.02 (the two stretch z 0 0 % values after "stretch x/y/z" define the interval where % the grid will be left uniform) Ca.D = 0.22 % The diffusion coefficient of calcium is 0.22 um^2/ms Ca.bgr = 0.1 % Initial calcium concentration is 0.1 uM (uM = micromolar) Ca.source 0 0 0 % Defines the calcium channel/source location: there % will be one channel located in the corner of the box % By symmetry, this is equivalent to having a channel % in the middle of the (z)boundary of a 2x2x1 micron box. Ca.bc Noflux Noflux ... % Boundary conditions are reflective (Noflux) on x- and Noflux Noflux ... % y-surfaces, and there are "Pump" boundary conditions Pump Pump % on the bottom and top "membranes" z-surfaces bc.define Pump 1 -0.2 0 % while "Noflux" b.c. is defined internally, "Pump" b.c. has % to be defined by the user. At the boundary, the normal derivative % satisfies the condition "d[Ca]/dn - q ([Ca] - [Ca]rest) = 0", with q=0.2, [Ca]rest=0.1. % "q" is equal to the pump rate (in units of um/ms), divided by the diffusion coefficient. buffer Bm % Introducing a buffer named "Bm" Bm.D = 0.1 % Its diffusion coefficient is 0.1 um^2/ms, Bm.KD = 2 % its calcium affinity is 2 uM Bm.kminus = 0.1 % and calcium unbinding rate is 0.1/ms Bm.total = 1000 % The total (bound + unbound) concentration of buffer is 1 mM Bm.bc all Noflux % All boundary conditions are Noflux (this is the default, % so this line could be omitted). Run adaptive 20 current = ICa pA %%%%%%%%%%%%%%%%%%%%% H O D G K I N - H U X L E Y M O D E L %%%%%%%%%%%%%%%%%%%%%%%% % Standard Hodgkin-Huxley model defined below gNa = 120; gK = 36; gL = 0.3; % Maximal conductances VNa = 55; VK = -77; VL = -54.4; % Reversal potentials C = 1 % Membrane capacitance Iext = 0 % No external current: AP is generated via superthreshold initial condition an := 0.01 * (-(55+V)) / (exp(-0.1*(55+V)) - 1); % Rate of K activation bn := 0.125 * exp(-(65+V)/80); % Rate of K de-activation am := -0.1 * (40+V) / (exp(-0.1*(40+V)) - 1); % Rate of Na activation bm := 4 * exp(-(65+V)/18); % Rate of Na de-activation ah := 0.07 * exp(-(65+V)/20); % Rate of Na de-inactivation bh := 1 / (exp(-(35+V)/10) + 1); % Rate of Na inactivation dV/dt = (-gK * n^4 * (V - VK) - gNa * m^3 * h * (V-VNa) - gL * (V-VL) + Iext)/C %% HH model dm/dt = am * (1-m) - bm * m % Differential equation for Na activation dh/dt = ah * (1-h) - bh * h % Differential equation for Na inactivation dn/dt = an * (1-n) - bn * n % Differential equation for K activation V(0) = -40 % Initial conditions are super-threshold, generating a single AP m(0) = 0 n(0) = 0.4 h(0) = 0.4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% G H K E Q U A T I O N %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Ca2+ channel current defined here via standard Goldman-Hodgkin-Katz equations const = 1e-2 % some constant = max permeability per channel (volume/time) * z * e * NA zFRT = 2/61.5 % fundamental constants: z*F/(R*T) = z*e/(kB*T) at T=37 C with z=2 (valence) % NOTE: Ca channel gated by Na+ channel activation variable m(t) % Add another gating variable instead of m(t) to make a more realistic channel ICa := -const * zFRT * V * m^3 * ( CaIn - CaOut * exp(-V * zFRT) ) / (1 - exp(-V * zFRT) ) CaIn = 1e-4 % Internal [Ca2+] in mM *NOTE*: in reality it's not really a constant! CaOut = 10 % External [Ca2+] in mM %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% P L O T S %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Save the plots in files with prefix "demo_HH.": plot.print "demo_HH." % When using xmgr/xmgrace to view the results in real time, uncomment the next line, % and pipe the output into xmgr/xmgrace using "calc demo.par | xmgr -pipe". % plot.method xmgr plot V % Plot membrane potental plot m n h % Plot HH gating variables plot ICa % Plot ICa plot Ca[0.1,0.1,0.1] % Plot Ca close to box corner