XPP

XPP is a software program designed to solve systems of differential equations. Up to 300 ODEs can be solved at one time. We will learn how to change numerical options, parameters, and initial data. We will also learn how to create hard copy. You can either run this little exercise (i) from within Netscape (if you have set things up correctly); (ii) from a terminal reading along; or (iii) with the hardcopy version of this.
If Netscape is hard to read, you can change the font under the Options, General Preferences, Fonts menu. Change to size 14 or 18 (if you are like me!)

The basic unit for XPP is a file called an ode file that tells XPP the parameter and variable names and other named things. These files are editable ascii files. Use your favorite editor! For class, however, I will give you most of the files so you won't have to learn an editor. However, there will be occasions in which you will have to put in your own equations. It is then advisable to learn a bit about the input files.

The Voltage Clamp

The voltage clamp technique was used by Hodgkin and Huxley to determine the behavior of the ionic conductances responsible for the generation of the action potential. The basic circuit for the squid axon (whose owner is pictured above) is

Click here to load up the voltage clamp file and begin the tutorial. Several windows will pop up that we will look at later. The main window has a menu on the left and a graphics window in the middle. There are several parameter sliders and a thin window at the bottom that contains useful information. The top window is the command window and is often used for input. Three useful windows come up iconified: the parameter window, the initial conditions window, and the data viewer. Click on the parameter window to bring it up. Click in any of the windows to change parameters (don't do it now). Similarly, you can click in the initial conditions window to change initial data. The data viewer lets you look at the numbers that the simulation generates.


Tips


Click on the main window. Commands are given by clicking on the mouse item or using the keyboard short cut. The shortcuts are generally the first letter of the menu item or if this is not possible, the capitalized letter. Click (Initialconds) (Go) to integrate the equations. You will see the current produced when the voltage is held at -60 mV and then clamped to 0 mV. To see that the current is composed of two parts, click on (Graphic stuff) (Add curve). A dialog box appears. Replace the y-axis variable which should be I by INa the sodium current. In the color box, change it from 0 to 1 . Then click (Ok) and the sodium current will appear in red on the graph.

(If it doesnt appear, it could be that Netscape has stolen all the colors. To edit a previously defined curve, click (Graphic stuff) (Edit) and choose curve 1. Check to see that the INa is in the y-axis and change the color to some other number -- 0 will always work but is the same color as I. Then click (Ok))

Now click (Graphic stuff) (Add) and add IK to the picture with another color if you have the colors. Click (Ok) again. Now you will have three curves. The current is the sum of the early sodium current and the delayed rectifier potassium current. Note that negative currents correspond to flow into the cell and positive are currents exiting the cell. Notice that the sodium current is not monotone whereas the potassium current is monotone. The sodium first increases and then decreases. It decreases at a rate similar to the increase of the potassium current. The initial sodium current is very fast. To see what the conductances are doing, click on (Make window) (Create) to get another window. Next click on (Graphic stuff) (Remove all) to get rid of all but the main curve. Now click on (View axes) (2D) to get another dialog box. Fill it in as follows:

Click on (Ok) and you will see the sodium conductance. Click on (Graphic Stuff) (Add) and add the potassium conductance, gk to the graph in color 1.


How did XPP know which window to add the graph? Note that in the upper left of the graphi is a small square. This tells you that the active window is the small one. Click the mouse somewhere in the main window and a rectangle will appear on that one. Click in the conductance graph and make that one the hot one.
Click the mouse inside one of the graphs and holding it down move it around. Notice that the x-y values are given for the cursor position. You should be able to estimate the peak value of the sodium conductance (about 20 mS/cm^2). What is the peak conductance of the potassium conductance? Note that the clamp starts at t=2 msec. From this calculate the time for the sodium conductance to reach its maximum.

Hodgkin and Huxley repeated this experiment for many different voltage clamps. There are several ways to change the amount of the clamp. Click on (Parameter) and then type in Vclamp in the main window. Change it to 20. The type (Return) twice to exit the parameter changing. Alternatively, in the parameter window, edit the number next to Vclamp and click on (Ok) or better type (Tab) on the keyboard. Click on the main graph to make the current window the active window. Click on (Erase) in the main menu to clear the graph. Click (Initial conds) (Go) to run the simulation with a new clamp at 20 mV. Click on the conductance window and then in the main menu, click (Erase) (Restore). This erases the old graph and redraws with the result of the new simulation. Measure the maximum conductances and the time of maximum for the sodium conductance.


To get a print out, click on (Graphic stuff) (Postscript) and change the default name to something like cond.ps and accept the remaining defaults. You will have a nice postscript picture of the conductances. To print the currents, make the current window active by clicking in it and then repeat the above procedure. (Name it something else.)

Change vhold from -60 mv to -80 mv. Re-integrate the equations. What are the maximal conductances? Explain how this is different from the previous values.

Click in the current window. Change vhold back to -60. Click on (Graphic stuff) (Remove all). Now click on (Initial conds) (Range). A dialog box will come up. Fill in the following entries:

Click on (Ok) and you will get a series of voltage clamps from -80 mv to +40 mV.

NOTE XPP only saves the most recent result of a simulation so to get the results of several different simulations on the same plot in order to get hardcopy, you must "freeze" the graphs after each simulation. This is done by running the simulation, then clicking (Graphic stuff) (Freeze) (Freeze). A dialog box occurs. Just accept the defaults. Up to 10 curves can be frozen. They are named crva , crvb , etc. The (Graphic stuff) (Freeze) (Delete curve) lets you delete them one at a time and the (Graphic stuff) (Freeze) (Remove all) deletes all but the most recent curve.


Now, suppose that the sodium concentration was adjusted so the the concentration was the same inside the cell as out. What will VNa be in this case? Change VNA in XPP to the appropriate potential. Now set vhold=-60 and then run the voltage clamp at -80 mV, -40 mV, -20 mV, 0 mV, 20 mV. How is the current different from the normal case? "Freeze" the results of each of your "experiments" and make a hard copy of the currents for each clamping potential. Do the same for the normal sodium medium at the same potentials and make a picture.

Go through the book and look at some other manimulations you could do and try them. Click on (File) (Quit) (Yes) and then exit Netscape.