{ ion_register("k", 1) }
objref ks, ksvec, ksgate, ksstates, kstransitions, tobj
{
  ksvec = new Vector()
  ksstates = new List()
  kstransitions = new List()
  ks = new KSChan(0)
}
// DmKdr Density Mechanism
// k ohmic ion current
//     ik (mA/cm2) = g_DmKdr * (v - ek)
{
  ks.name("DmKdr")
  ks.ion("k")
  ks.iv_type(0)
  ks.gmax(0)
  ks.erev(0)
}
// g = gmax * m^4
// m' = (minf - m)/mtau
{
  ksstates.append(ks.add_hhstate("m"))
  ksgate = ksstates.object(0).gate
  ksgate.power(4)
  kstransitions.append(ks.trans(ksstates.object(0), ksstates.object(0)))
}
{
  tobj = kstransitions.object(0)
  tobj.type(1)
  tobj.set_f(0, 4, ksvec.c.append(1, -0.0502, -12.85))
  }
  tobj.set_f(1, 7, ksvec.c.resize(1501), -100, 50)
  for i=0, 1500 {tobj.parm(1).x[i] = fscan()}
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99
 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.99 3.9899 3.9899
 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899
 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899
 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899 3.9899
 3.9899 3.9899 3.9899 3.9899 3.9898 3.9898 3.9898 3.9898 3.9898 3.9898
 3.9898 3.9898 3.9898 3.9898 3.9898 3.9898 3.9898 3.9898 3.9898 3.9898
 3.9898 3.9897 3.9897 3.9897 3.9897 3.9897 3.9897 3.9897 3.9897 3.9897
 3.9897 3.9897 3.9896 3.9896 3.9896 3.9896 3.9896 3.9896 3.9896 3.9896
 3.9896 3.9895 3.9895 3.9895 3.9895 3.9895 3.9895 3.9894 3.9894 3.9894
 3.9894 3.9894 3.9894 3.9893 3.9893 3.9893 3.9893 3.9893 3.9892 3.9892
 3.9892 3.9892 3.9891 3.9891 3.9891 3.989 3.989 3.989 3.989 3.9889
 3.9889 3.9889 3.9888 3.9888 3.9888 3.9887 3.9887 3.9886 3.9886 3.9885
 3.9885 3.9885 3.9884 3.9884 3.9883 3.9883 3.9882 3.9882 3.9881 3.988
 3.988 3.9879 3.9879 3.9878 3.9877 3.9877 3.9876 3.9875 3.9874 3.9874
 3.9873 3.9872 3.9871 3.987 3.9869 3.9868 3.9867 3.9866 3.9865 3.9864
 3.9863 3.9862 3.9861 3.986 3.9858 3.9857 3.9856 3.9855 3.9853 3.9852
 3.985 3.9849 3.9847 3.9846 3.9844 3.9842 3.984 3.9839 3.9837 3.9835
 3.9833 3.9831 3.9829 3.9826 3.9824 3.9822 3.982 3.9817 3.9815 3.9812
 3.9809 3.9806 3.9804 3.9801 3.9798 3.9795 3.9791 3.9788 3.9785 3.9781
 3.9778 3.9774 3.977 3.9766 3.9762 3.9758 3.9753 3.9749 3.9744 3.974
 3.9735 3.973 3.9725 3.9719 3.9714 3.9708 3.9702 3.9697 3.969 3.9684
 3.9677 3.9671 3.9664 3.9657 3.9649 3.9642 3.9634 3.9626 3.9618 3.9609
 3.96 3.9591 3.9582 3.9573 3.9563 3.9553 3.9542 3.9531 3.952 3.9509
 3.9497 3.9485 3.9473 3.946 3.9447 3.9433 3.942 3.9405 3.939 3.9375
 3.936 3.9344 3.9327 3.931 3.9293 3.9275 3.9256 3.9237 3.9218 3.9198
 3.9177 3.9156 3.9134 3.9111 3.9088 3.9064 3.904 3.9015 3.8989 3.8962
 3.8935 3.8907 3.8878 3.8849 3.8818 3.8787 3.8755 3.8722 3.8689 3.8654
 3.8618 3.8582 3.8544 3.8506 3.8466 3.8426 3.8384 3.8341 3.8298 3.8253
 3.8207 3.8159 3.8111 3.8061 3.8011 3.7959 3.7905 3.7851 3.7795 3.7737
 3.7679 3.7619 3.7557 3.7495 3.743 3.7365 3.7297 3.7229 3.7158 3.7086
 3.7013 3.6938 3.6862 3.6784 3.6704 3.6622 3.6539 3.6455 3.6368 3.628
 3.619 3.6099 3.6006 3.5911 3.5815 3.5716 3.5616 3.5515 3.5411 3.5306
 3.5199 3.5091 3.4981 3.4869 3.4755 3.464 3.4524 3.4405 3.4285 3.4164
 3.4041 3.3917 3.3791 3.3663 3.3534 3.3404 3.3273 3.314 3.3006 3.2871
 3.2735 3.2597 3.2459 3.2319 3.2179 3.2037 3.1895 3.1752 3.1608 3.1464
 3.1319 3.1173 3.1027 3.0881 3.0734 3.0587 3.0439 3.0292 3.0144 2.9997
 2.9849 2.9702 2.9554 2.9407 2.9261 2.9114 2.8969 2.8823 2.8678 2.8534
 2.8391 2.8248 2.8106 2.7965 2.7825 2.7686 2.7548 2.7411 2.7275 2.714
 2.7007 2.6874 2.6743 2.6614 2.6486 2.6359 2.6233 2.611 2.5987 2.5866
 2.5747 2.5629 2.5513 2.5399 2.5286 2.5175 2.5066 2.4958 2.4852 2.4747
 2.4645 2.4544 2.4444 2.4347 2.4251 2.4157 2.4064 2.3973 2.3884 2.3797
 2.3711 2.3627 2.3545 2.3464 2.3385 2.3308 2.3232 2.3157 2.3085 2.3013
 2.2944 2.2876 2.2809 2.2744 2.268 2.2618 2.2557 2.2498 2.2439 2.2383
 2.2327 2.2273 2.222 2.2169 2.2119 2.2069 2.2022 2.1975 2.1929 2.1885
 2.1842 2.1799 2.1758 2.1718 2.1679 2.1641 2.1604 2.1567 2.1532 2.1498
 2.1464 2.1432 2.14 2.1369 2.1339 2.131 2.1282 2.1254 2.1227 2.1201
 2.1175 2.115 2.1126 2.1103 2.108 2.1057 2.1036 2.1015 2.0994 2.0974
 2.0955 2.0936 2.0918 2.09 2.0883 2.0866 2.085 2.0834 2.0819 2.0804
 2.0789 2.0775 2.0761 2.0748 2.0735 2.0722 2.071 2.0698 2.0686 2.0675
 2.0664 2.0654 2.0643 2.0633 2.0624 2.0614 2.0605 2.0596 2.0587 2.0579
 2.0571 2.0563 2.0555 2.0548 2.054 2.0533 2.0527 2.052 2.0513 2.0507
 2.0501 2.0495 2.0489 2.0484 2.0478 2.0473 2.0468 2.0463 2.0458 2.0454
 2.0449 2.0445 2.0441 2.0436 2.0432 2.0428 2.0425 2.0421 2.0417 2.0414
 2.0411 2.0407 2.0404 2.0401 2.0398 2.0395 2.0392 2.039 2.0387 2.0384
 2.0382 2.038 2.0377 2.0375 2.0373 2.0371 2.0368 2.0366 2.0364 2.0363
 2.0361 2.0359 2.0357 2.0355 2.0354 2.0352 2.0351 2.0349 2.0348 2.0346
 2.0345
  {}
{ ksstates.remove_all  kstransitions.remove_all }
{objref ks, ksvec, ksgate, ksstates, kstransitions, tobj}