home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Science
/
Science.zip
/
hodhux12.zip
/
hsol12.eng
< prev
next >
Wrap
Text File
|
1996-09-28
|
10KB
|
224 lines
Educational Membrane Potential Simulator for OS/2 Ver. 1.2
[What is this?]
This program simulates Hodgkin and Huxley's classical excitatory mem-
brane model. The membrane coditions and stimulations are configurable
by user.
The aim of this program is to help students understanding how the model
works and realising importence of numerical modeling in physiology. Please
refer the article by Hodgkin and Huxley to know the theoretical base of the
model and algorithm to solve it.
[PM application with sources]
This is a 32-bit multithreaded PM application. All source codes for Speed-
Pascal/2 1.5 (SpeedSoft GbR) are included. You can freely modify the codes.
[Requirments]
OS/2 2.x or Warp 3.0 or later are needed. I have tested this program only
under Warp 3.0J (Japanese version).
[Usage]
Here, HSOL12X stands for HSOL12, HSOL120, HSOL121, ...
0) Files
HSOL12X.ZIP Archived file by LHA.EXE
HSOL12X.EXE Executable file
HSOL12X.JPN Japanese document MS-Kanji encoded
HSOL12X.ENG English document (that you read now)
HSOL.TBL Optional numerical table
HSOL12XS.ZIP Archived source files
Only requiered file to run is HSOL12X.EXE. HSOL.TBL is used optionally
(see Preference setting).
1)Start the program
Click the 'Squid' icon (Why squid?, you may imagin the reason easily :) ).
You can olso start it with drag&drop a setting file (*.hxl) onto the icon.
Drag&drop is useful if you want run the program in two or more windows
at the same time to compare the results between different settings.
Of course you can start this program under OS/2 command line;
HSOL12X [setting file name]
2)Window size and position
Size of the window and position are fully adjustable. You can fit
the size of the window to your monitor and save the position and the size
settings into the setting file.
3)Screen Infomation
At the centre of screen, time course of membrane potential etc. are
displayed. Horizontal axis represents time in msec. Vertical axis
stands for:
Yellow Membrane potential, 0 for normal resting potential, upward
defrection indicates depolarisation.
Green gK, upward : increase
Red gNa, upward : increase
Skyblue ionic current, upward : influx
The following values are displayed upside down.
Blue n
Magenta m
White h
Near the bottom of window, very simplified schemes of Na and K gates
are displayed. Numerical outputs were showen at the bottom of the
window.
4)Menus
File
Start Calc - to start calculation / restart paused calculation
Pause Calc - to pause calculation
Abort Calc - to abort calculation
Preference - to setup the running conditions.
Load Alpha/Beta tables
set whether the program use HSOL.TBL or not. File HSOL.TBL
contains reaction rate constants (alpha's and beta's) previously
calculated for various membrane potentials. Usage of this file saves
the number of floating point operations, but requires more memory
(about hundreds KB, tiny size in OS/2 :) ) and results some loss in the
accuracy of caluclation.
Port Animation
Consider Multitask
Checking this makes smooth multitasking in OS/2. I strongly recommend
you to check this if your PC has slow CPU without FPU (like 80486SX/33).
* Technical Note The thread calculating membrane potential uses
floating point operations heavily. Checking this checkbox,
DosSleep(1) is occationaly called while the thread running. This is
normal OS/2 programming. No checking makes OS/2 to share minimum CPU
time to other threads in the same priority level. If CPU power of
your PC is high, calculation completes in only few seconds, no
checking is ok.
Load - to load setting file.
Save - to save setting (membrane condition, window size, window po-
sition) into previously LOADed file (default: HSOL.HXL)
Save as - to save setting into your favourite file.
At the start of the program, default setting file HSOL.HXL is loaded
unless you appoint another file with drag&dropping it onto squid icon.
* Technical Note Due to a bug in old SP/2, previous version saves data
in binary format. Setting data are now saved in text beause SP/2 1.5
have not this bug.
Copy Traces - to copy result to clipboard or a file.
Exit - to quit the program.
Membrane - to set membrane conditions
InitV - to set the initial membrane potential (0 is resting, depolarisation
negative).
G.Eq.Pot - ionic conductances (max conductances for K and Na), equvalent
potentials. gL and vL are for leakage ions (ions simply according Ohm's
law).
nmhParam - gate manipulation.
magnification factors for dn/dt, dm/dt, and dh/dt can be set to change
rate constants (alpha's and beta's) for n, m, and h. For example, you can
set dh/dt factor to 0.5 (normally 1). This results prolonged action po-
tential. Powers for n, m, h in equations of conductance also are able to
be changed (normally, 4, 3, and 1).
Others - other constants (membrane capacitance, temperature)
Default - set back to default values described in Hodgkin and Huxley's
paper.
Stimulation - to set stimulation time and strength. Multiple stimulation
(upto 3 times) is available. 1: to 3: are stimulation numbers. Every
time setting must not cross each other. If, for example, stimulation 2:
set to after stimulation 1:, stimulation 2: is ignored.
Clear - to dispose all stimulation settings
Voltage - voltage stimulation. This simulation is somewhat non-real.
The membrane potential is changed to set value instantially.
Current - current stimulation. In this simulation, external current
are given to membrane for cirtain period.
VClamp - voltage clamp. In this simulation, membrane potential is
hold to set value for set period.
Screen
MaxT - to set maximum T in msec.
Erase - to erase the window.
5)Cursor
Click the centre of the window, you can see a virtical green line appearing.
This line follows dragging mouse. The numeric display and gate schemes
also follow it.
6)Help
Help is not available in this version. Though you can see HELP buttons
in various DlgBoxes, they do not work. The only reason of this limitation
is lack of my skill and knowledge in PM Help system. In further version,
I will add the Help facility to the program.
[Sources]
This is a 32-bit PM application. Great compiler, called Speed-Pascal/2
from SpeedSoft GbR makes 32bit PM Pascal programming much easier.
Unlike B0rland, it seems only following Micr0s0ft, SpeedSoft gives us
a OS/2 native compiler. Thanks! >> SpeedSoft.
It will be my pleasure that these source codes might help those who want
to begin PM Pascal programming.
HSOL12XS.LZH
HSOL12X.PAS main
CHNLPORT.PAS gate shape module, called by HSOL12X.PAS
HSOLRID.PAS constants declared in resource.
HSOL12X.RC resource
*.ICO a squid icon
*.BMP bitmap for buttons
To make HSOL12X.EXE, you must have Speed-Pascal/2. Edit HSOL12X.RC with
any editor to change directory for *.ICO and *.BMP (you can find them at
the bottom of file) and save it. Load HSOL12X.PAS into Speed-Pascal/2 IDE.
Then open Resource Editor and load HSOL12X.RC. Click Save AS menu of
Resource Editor and make .SRF file. You can close Resource Editor now.
Select Compile-Make menu of IDE. It make .EXE automatically.
[Copyrights]
This program is a freeware, not a PDS. All copyrights belong me.
You can use and distribute this program freely. No commercial distribution
are allowed (except for getting little money resonable to handle it).
Modification of this program is also free. You can distribute modified
source codes and object codes if you mention my original copyrights and
what are changed from the original.
[No Warranty]
I made many effort to find and fix bugs, but there are no warranty. This
program should be use in your risk. I myself believe from my experienses that
OS/2 is too tough to be killed by such a simple program :)
[Default Values]╩
vK=12.0, vNa=-115, vL=-10.6
max gK=36.0, max gNa=120.0, gL=0.3
membrane capacitance: 2.0
K: 5.7
temperature: 6.3
n_factor, m_factor and h_factor: 1.0 respectivly
[Units]
Time : msec
Voltage:mV (According to original article, normal resting potential cor-
responds to 0, Depolarisation, negative).
Current:micro A/square cm
Conductance:mmho/square cm
Capacitance:micro F/square cm
Temperature:Celsius
[Reference]
Hodgkin,A.L. and Huxley,A.F.: A quantitative description of membrane
current and its application to conduction. Journal of Physiology (London)
volume 117, pages 500-544, 1952.
[Abbrevations]
vK, vNa, vL : Equivalent Potentials of K, Na, and leakage (ohmic) ions.
gK, gNa, gL : Conductances of K, Na, and leakage ions.
Ii : Ionic current.
n-factor,
m-factor,
h-factor : multiplying factors for dn/dt, dm/dt, and dh/dt.
[Where am I?]
Please send me your impressions at following addresses
NiftyServe (Japan) GHF03464
toda@med.niigata-u.ac.jp
Haruo Toda. 28, Sep.,1996