home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / hodhux12.zip / hsol12.eng < prev    next >
Text File  |  1996-09-28  |  10KB  |  224 lines

  1. Educational Membrane Potential Simulator for OS/2 Ver. 1.2
  2.  
  3. [What is this?]
  4.   This program simulates Hodgkin and Huxley's classical excitatory mem-
  5. brane model.  The membrane coditions and stimulations are configurable
  6. by user.
  7.   The aim of this program is to help students understanding how the model
  8. works and realising importence of numerical modeling in physiology. Please
  9. refer the article by Hodgkin and Huxley to know the theoretical base of the
  10. model and algorithm to solve it.
  11.  
  12. [PM application with sources]
  13.   This is a 32-bit multithreaded PM application.  All source codes for Speed-
  14. Pascal/2 1.5 (SpeedSoft GbR) are included.  You can freely modify the codes.
  15.  
  16. [Requirments]
  17.   OS/2 2.x or Warp 3.0 or later are needed.  I have tested this program only
  18. under Warp 3.0J (Japanese version).
  19.  
  20. [Usage]
  21.  
  22.   Here, HSOL12X stands for HSOL12, HSOL120, HSOL121, ...
  23.  
  24. 0) Files
  25.  HSOL12X.ZIP  Archived file by LHA.EXE
  26.    HSOL12X.EXE  Executable file
  27.    HSOL12X.JPN  Japanese document  MS-Kanji encoded
  28.    HSOL12X.ENG  English document (that you read now)
  29.    HSOL.TBL  Optional numerical table
  30.    HSOL12XS.ZIP  Archived source files
  31.  
  32.    Only requiered file to run is HSOL12X.EXE. HSOL.TBL is used optionally
  33. (see Preference setting).
  34.  
  35. 1)Start the program
  36.   Click the 'Squid' icon (Why squid?, you may imagin the reason easily :) ).
  37. You can olso start it with drag&drop a setting file (*.hxl) onto the icon.
  38. Drag&drop is useful if you want run the program in two or more windows
  39. at the same time to compare the results between different settings.
  40.   Of course you can start this program under OS/2 command line;
  41.  
  42.   HSOL12X [setting file name]
  43.  
  44. 2)Window size and position
  45.   Size of the window and position are fully adjustable.  You can fit
  46. the size of the window to your monitor and save the position and the size
  47. settings into the setting file.
  48.  
  49. 3)Screen Infomation
  50.   At the centre of screen, time course of membrane potential etc. are
  51. displayed.  Horizontal axis represents time in msec.  Vertical axis
  52. stands for:
  53.   Yellow  Membrane potential, 0 for normal resting potential, upward
  54.                defrection indicates depolarisation.
  55.   Green   gK,  upward : increase
  56.   Red     gNa, upward : increase
  57.   Skyblue ionic current, upward : influx
  58. The following values are displayed upside down.
  59.   Blue     n
  60.   Magenta  m
  61.   White    h
  62.  
  63.   Near the bottom of window, very simplified schemes of Na and K gates
  64. are displayed.  Numerical outputs were showen at the bottom of the
  65. window.
  66.  
  67. 4)Menus
  68. File
  69.   Start Calc  - to start calculation / restart paused calculation
  70.   Pause Calc  - to pause calculation
  71.   Abort Calc  - to abort calculation
  72.   Preference  - to setup the running conditions.
  73.     Load Alpha/Beta tables
  74.       set whether the program use HSOL.TBL or not.  File HSOL.TBL
  75.       contains reaction rate constants (alpha's and beta's) previously
  76.       calculated for various membrane potentials.  Usage of this file saves
  77.       the number of floating point operations, but requires more memory 
  78.       (about hundreds KB, tiny size in OS/2 :) ) and results some loss in the
  79.       accuracy of caluclation.
  80.     Port Animation
  81.     Consider Multitask
  82.       Checking this makes smooth multitasking in OS/2.  I strongly recommend
  83.       you to check this if your PC has slow CPU without FPU (like 80486SX/33).
  84.  
  85.       * Technical Note  The thread calculating membrane potential uses
  86.         floating point operations heavily.  Checking this checkbox, 
  87.         DosSleep(1) is occationaly called while the thread running.  This is
  88.         normal OS/2 programming.  No checking makes OS/2 to share minimum CPU
  89.         time to other threads in the same priority level.  If CPU power of
  90.         your PC is high, calculation completes in only few seconds, no
  91.         checking is ok.
  92.  
  93.   Load  - to load setting file.
  94.   Save  - to save setting (membrane condition, window size, window po-
  95.       sition) into previously LOADed file (default: HSOL.HXL)
  96.   Save as  - to save setting into your favourite file.
  97.       At the start of the program, default setting file HSOL.HXL is loaded
  98.       unless you appoint another file with drag&dropping it onto squid icon.
  99.  
  100.       * Technical Note  Due to a bug in old SP/2, previous version saves data
  101.       in binary format.  Setting data are now saved in text beause SP/2 1.5
  102.       have not this bug.
  103.  
  104.   Copy Traces  - to copy result to clipboard or a file.
  105.   Exit  - to quit the program.
  106.  
  107. Membrane  - to set membrane conditions
  108.   InitV  - to set the initial membrane potential (0 is resting, depolarisation
  109.      negative).
  110.   G.Eq.Pot  - ionic conductances (max conductances for K and Na), equvalent
  111.      potentials. gL and vL are for leakage ions (ions simply according Ohm's
  112.      law).
  113.   nmhParam  - gate manipulation.
  114.      magnification factors for dn/dt, dm/dt, and dh/dt can be set to change
  115.      rate constants (alpha's and beta's) for n, m, and h.  For example, you can
  116.      set dh/dt factor to 0.5 (normally 1).  This results prolonged action po-
  117.      tential.  Powers for n, m, h in equations of conductance also are able to
  118.      be changed (normally, 4, 3, and 1).
  119.   Others - other constants (membrane capacitance, temperature)
  120.   Default  - set back to default values described in Hodgkin and Huxley's
  121.      paper.
  122.  
  123. Stimulation  - to set stimulation time and strength.  Multiple stimulation
  124.      (upto 3 times) is available.  1: to 3: are stimulation numbers.  Every
  125.      time setting must not cross each other. If, for example, stimulation 2:
  126.      set to after stimulation 1:, stimulation 2: is ignored.
  127.   Clear  - to dispose all stimulation settings
  128.   Voltage  - voltage stimulation.  This simulation is somewhat non-real.
  129.      The membrane potential is changed to set value instantially.
  130.   Current  - current stimulation.  In this simulation, external current
  131.      are given to membrane for cirtain period.
  132.   VClamp  - voltage clamp.  In this simulation, membrane potential is
  133.      hold to set value for set period.
  134.  
  135. Screen
  136.    MaxT  - to set maximum T in msec.
  137.    Erase  - to erase the window.
  138.  
  139. 5)Cursor
  140.   Click the centre of the window, you can see a virtical green line appearing.
  141. This line follows dragging mouse.  The numeric display and gate schemes
  142. also follow it.
  143.  
  144. 6)Help
  145.   Help is not available in this version.  Though you can see HELP buttons
  146. in various DlgBoxes, they do not work.  The only reason of this limitation
  147. is lack of my skill and knowledge in PM Help system.  In further version,
  148. I will add the Help facility to the program.
  149.  
  150. [Sources]
  151.   This is a 32-bit PM application.  Great compiler, called Speed-Pascal/2
  152. from SpeedSoft GbR makes 32bit PM Pascal programming much easier.
  153. Unlike B0rland, it seems only following Micr0s0ft, SpeedSoft gives us
  154. a OS/2 native compiler.  Thanks! >> SpeedSoft.
  155.   It will be my pleasure that these source codes might help those who want
  156. to begin PM Pascal programming.
  157.  
  158. HSOL12XS.LZH
  159.   HSOL12X.PAS   main
  160.   CHNLPORT.PAS  gate shape module, called by HSOL12X.PAS
  161.   HSOLRID.PAS   constants declared in resource. 
  162.   HSOL12X.RC    resource
  163.   *.ICO         a squid icon
  164.   *.BMP         bitmap for buttons
  165.  
  166.   To make HSOL12X.EXE, you must have Speed-Pascal/2.  Edit HSOL12X.RC with
  167. any editor to change directory for *.ICO and *.BMP (you can find them at
  168. the bottom of file) and save it.  Load HSOL12X.PAS into Speed-Pascal/2 IDE. 
  169. Then open Resource Editor and load HSOL12X.RC.  Click Save AS menu of
  170. Resource Editor and make .SRF file.  You can close Resource Editor now.
  171. Select Compile-Make menu of IDE.  It make .EXE automatically.
  172.  
  173. [Copyrights]
  174.   This program is a freeware, not a PDS.  All copyrights belong me.
  175. You can use and distribute this program freely.  No commercial distribution
  176. are allowed (except for getting little money resonable to handle it).  
  177.   Modification of this program is also free.  You can distribute modified
  178. source codes and object codes if you mention my original copyrights and
  179. what are changed from the original.
  180.  
  181. [No Warranty]
  182.   I made many effort to find and fix bugs, but there are no warranty.  This
  183. program should be use in your risk.  I myself believe from my experienses that
  184. OS/2 is too tough to be killed by such a simple program :)
  185.  
  186. [Default Values]╩
  187.        vK=12.0, vNa=-115, vL=-10.6
  188.         max gK=36.0, max gNa=120.0, gL=0.3
  189.         membrane capacitance: 2.0
  190.         K: 5.7
  191.         temperature: 6.3
  192.         n_factor, m_factor and h_factor:  1.0 respectivly
  193.  
  194. [Units]
  195.   Time : msec
  196.   Voltage:mV  (According to original article, normal resting potential cor-
  197.                        responds to 0, Depolarisation, negative).
  198.   Current:micro A/square cm
  199.   Conductance:mmho/square cm
  200.   Capacitance:micro F/square cm
  201.   Temperature:Celsius                       
  202.  
  203.  
  204. [Reference]
  205.   Hodgkin,A.L. and Huxley,A.F.:  A quantitative description of membrane 
  206. current and its application to conduction. Journal of Physiology (London)
  207. volume 117, pages 500-544, 1952.
  208.  
  209. [Abbrevations]
  210.   vK, vNa, vL : Equivalent Potentials of K, Na, and leakage (ohmic) ions.
  211.   gK, gNa, gL : Conductances of K, Na, and leakage ions.
  212.   Ii : Ionic current.
  213.   n-factor,
  214.   m-factor,
  215.   h-factor : multiplying factors for dn/dt, dm/dt, and dh/dt.
  216.  
  217. [Where am I?]
  218.   Please send me your impressions at following addresses
  219.      NiftyServe (Japan) GHF03464
  220.      toda@med.niigata-u.ac.jp
  221.  
  222.                                                                     Haruo Toda.  28, Sep.,1996
  223.  
  224.