diff --git a/examples/singleCell.ipynb b/examples/singleCell.ipynb deleted file mode 100644 index 427011f..0000000 --- a/examples/singleCell.ipynb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# notebook example of using single cell tools" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "language_info": { - "name": "python" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/examples/single_cell/386049446_fit.json b/examples/single_cell/386049446_fit.json new file mode 100644 index 0000000..326ee5e --- /dev/null +++ b/examples/single_cell/386049446_fit.json @@ -0,0 +1,145 @@ +{ + "passive": [ + { + "ra": 79.9493434509, + "cm": [ + { + "section": "soma", + "cm": 1.0 + }, + { + "section": "axon", + "cm": 1.0 + }, + { + "section": "dend", + "cm": 7.026107672909459 + }, + { + "section": "apic", + "cm": 7.026107672909459 + } + ], + "e_pas": -99.73164367675781 + } + ], + "fitting": [ + { + "junction_potential": -14.0, + "sweeps": [ + 35 + ] + } + ], + "conditions": [ + { + "celsius": 34.0, + "erev": [ + { + "ena": 53.0, + "section": "soma", + "ek": -107.0 + } + ], + "v_init": -99.73164367675781 + } + ], + "genome": [ + { + "section": "soma", + "name": "gbar_Im", + "value": 0.0072542922510378935, + "mechanism": "Im" + }, + { + "section": "soma", + "name": "gbar_Ih", + "value": 2.0724144681988357e-06, + "mechanism": "Ih" + }, + { + "section": "soma", + "name": "gbar_NaTs", + "value": 0.5459445571987388, + "mechanism": "NaTs" + }, + { + "section": "soma", + "name": "gbar_Nap", + "value": 0.0013995213534577413, + "mechanism": "Nap" + }, + { + "section": "soma", + "name": "gbar_K_P", + "value": 0.030706001493332663, + "mechanism": "K_P" + }, + { + "section": "soma", + "name": "gbar_K_T", + "value": 0.00017661133926769827, + "mechanism": "K_T" + }, + { + "section": "soma", + "name": "gbar_SK", + "value": 0.00040882303641811332, + "mechanism": "SK" + }, + { + "section": "soma", + "name": "gbar_Kv3_1", + "value": 0.15353463627045882, + "mechanism": "Kv3_1" + }, + { + "section": "soma", + "name": "gbar_Ca_HVA", + "value": 0.00021022546615679283, + "mechanism": "Ca_HVA" + }, + { + "section": "soma", + "name": "gbar_Ca_LVA", + "value": 5.9716218281113955e-06, + "mechanism": "Ca_LVA" + }, + { + "section": "soma", + "name": "gamma_CaDynamics", + "value": 0.031979282594100863, + "mechanism": "CaDynamics" + }, + { + "section": "soma", + "name": "decay_CaDynamics", + "value": 262.08498432363001, + "mechanism": "CaDynamics" + }, + { + "section": "soma", + "name": "g_pas", + "value": 0.00027723172826344273, + "mechanism": "" + }, + { + "section": "axon", + "name": "g_pas", + "value": 0.00055299448569759825, + "mechanism": "" + }, + { + "section": "dend", + "name": "g_pas", + "value": 3.0586536625559199e-06, + "mechanism": "" + }, + { + "section": "apic", + "name": "g_pas", + "value": 0.00012512712410094184, + "mechanism": "" + } + ] +} \ No newline at end of file diff --git a/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_m.swc b/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_m.swc new file mode 100644 index 0000000..a37d30d --- /dev/null +++ b/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_m.swc @@ -0,0 +1,2057 @@ +# generated by Vaa3D Plugin sort_neuron_swc +# source file(s): C:/Users/alexh/Desktop/New folder/Nr5a1-Cre_Ai14-177334.05.01.01_471120787_p.swc.out.swc_sorted.swc_pruned.swc_sorted.swc_resampled.swc_sorted.swc_pruned.swc_sorted.swc_Z_T10.swc +# id,type,x,y,z,r,pid +1 1 450.8504 404.7472 27.44 4.9615 -1 +2 4 451.2783 400.0717 26.9321 0.1931 1 +3 4 451.2874 398.9288 26.7538 0.2036 2 +4 4 451.2634 397.7848 26.6286 0.2862 3 +5 4 451.0609 396.6591 26.5578 0.2873 4 +6 4 450.9694 395.5186 26.5427 0.351 5 +7 4 451.2394 394.4077 26.584 0.3861 6 +8 4 451.586 393.3175 26.6834 0.4054 7 +9 4 452.2507 392.3874 26.8204 0.43 8 +10 4 453.0103 391.55 27.0408 0.3015 9 +11 4 453.6177 390.6119 27.3482 0.2252 10 +12 4 453.9918 389.5492 27.6912 0.2005 11 +13 4 454.1097 388.4406 28.063 0.2774 12 +14 4 454.414 387.3504 28.4012 0.2838 13 +15 4 454.8189 386.3162 28.728 0.2759 14 +16 4 454.9596 385.1814 28.9369 0.24 15 +17 4 454.9608 384.1106 28.8907 0.2763 16 +18 4 454.9127 382.9689 28.782 0.2999 17 +19 4 454.6164 381.8649 28.6583 0.4438 18 +20 4 454.2149 380.7953 28.532 0.4517 19 +21 4 454.2332 379.6913 28.3475 0.4675 20 +22 4 454.8521 378.7315 28.2386 0.3752 21 +23 4 455.5294 377.8106 28.2422 0.4512 22 +24 4 456.1963 376.8908 28.3564 0.4213 23 +25 4 456.8587 375.8681 28.7538 0.3943 24 +26 4 457.1664 374.9105 29.1592 0.3214 25 +27 4 457.2396 373.7768 29.5187 0.2982 26 +28 4 457.1813 372.658 29.6783 0.2763 27 +29 4 456.8976 371.5518 29.7276 0.3666 28 +30 4 456.7409 370.418 29.71 0.3558 29 +31 4 456.4663 369.3107 29.6341 0.4045 30 +32 4 456.3816 368.2056 29.489 0.2723 31 +33 4 456.5647 367.0787 29.3983 0.1945 32 +34 4 456.9056 365.9885 29.4188 0.1488 33 +35 4 457.3975 365.0321 29.6374 0.1591 34 +36 4 457.989 364.1409 30.0026 0.175 35 +37 4 458.466 363.1022 30.312 0.2209 36 +38 4 458.6845 361.9788 30.5749 0.2256 37 +39 4 459.0277 360.9137 30.8535 0.2816 38 +40 4 460.079 360.3177 33.0865 0.1546 39 +41 4 461.1956 360.4332 33.7697 0.1744 40 +42 4 462.1737 361.0189 34.0264 0.2045 41 +43 4 463.0683 361.6115 34.438 0.2709 42 +44 4 464.067 362.0954 34.9202 0.3422 43 +45 4 465.1218 362.5119 35.3956 0.3877 44 +46 4 465.9867 363.2074 35.8932 0.3225 45 +47 4 466.6891 364.0974 36.3406 0.2415 46 +48 4 467.2382 365.0653 36.7774 0.2296 47 +49 4 468.1156 365.7894 37.1353 0.2212 48 +50 4 469.1269 366.3248 37.4041 0.2585 49 +51 4 470.0902 366.9426 37.6079 0.2992 50 +52 4 470.994 367.6438 37.767 0.2853 51 +53 4 471.9206 368.3131 37.9126 0.2364 52 +54 4 472.79 369.0338 38.1122 0.257 53 +55 4 473.624 369.7888 38.3734 0.2118 54 +56 4 474.5781 370.4192 38.6204 0.1912 55 +57 4 475.5768 370.9752 38.8483 0.1885 56 +58 4 476.4474 371.7165 39.0751 0.2394 57 +59 4 477.3489 372.3857 39.3644 0.2914 58 +60 4 478.2343 373.0904 39.678 0.2515 59 +61 4 479.0878 373.8512 39.9669 0.2664 60 +62 4 480.0327 374.4964 40.2584 0.2057 61 +63 4 480.9193 375.1451 40.6451 0.1795 62 +64 4 481.64 376.0214 41.0351 0.1688 63 +65 4 482.0839 377.0361 41.4635 0.1939 64 +66 4 482.6959 377.9913 41.8662 0.2508 65 +67 4 483.4887 378.7773 42.2761 0.306 66 +68 4 484.3627 379.4968 42.6398 0.3094 67 +69 4 484.4565 379.8984 42.8946 0.284 68 +70 4 484.6579 381.0161 43.0713 0.2154 69 +71 4 484.5126 382.1498 43.1892 0.1636 70 +72 4 484.3284 383.2732 43.2762 0.1465 71 +73 4 484.4543 384.4046 43.3563 0.1543 72 +74 4 484.8444 385.4742 43.4608 0.169 73 +75 4 485.3271 386.5038 43.5851 0.1961 74 +76 4 485.6063 387.6044 43.7027 0.2469 75 +77 4 485.6303 388.7346 43.8477 0.2812 76 +78 4 485.6486 389.8775 43.9415 0.2476 77 +79 4 485.7378 391.0158 43.9799 0.1861 78 +80 4 486.0433 392.1094 43.9866 0.1502 79 +81 4 486.6073 393.1036 43.9776 0.1422 80 +82 4 487.1449 394.1011 43.916 0.1464 81 +83 4 487.4115 395.1994 43.8054 0.1543 82 +84 4 487.4859 396.3399 43.7161 0.1687 83 +85 4 487.5774 397.4759 43.6719 0.1969 84 +86 4 487.781 398.5993 43.6226 0.242 85 +87 4 488.0441 399.7125 43.5932 0.2163 86 +88 4 488.3473 400.8118 43.5635 0.2038 87 +89 4 488.7385 401.878 43.5151 0.1659 88 +90 4 489.155 402.9431 43.5039 0.1522 89 +91 4 489.5302 404.0173 43.5504 0.1466 90 +92 4 489.7155 405.1373 43.6582 0.1545 91 +93 4 489.751 406.2802 43.7822 0.1692 92 +94 4 489.7807 407.4219 43.9239 0.1973 93 +95 4 489.8837 408.5533 44.1062 0.2457 94 +96 4 490.0576 409.6813 44.2904 0.2711 95 +97 4 490.18 410.815 44.4727 0.2325 96 +98 4 490.1868 411.9498 44.679 0.2228 97 +99 4 490.0965 413.0824 44.886 0.2488 98 +100 4 490.0576 414.2115 45.0481 0.2311 99 +101 4 490.2406 415.3315 45.211 0.2309 100 +102 4 490.2566 416.4686 45.393 0.2119 101 +103 4 490.4019 417.6023 45.5678 0.1823 102 +104 4 490.6444 418.696 45.7876 0.1667 103 +105 4 491.1009 419.6878 46.1065 0.1772 104 +106 4 491.5368 420.69 46.468 0.2015 105 +107 4 491.7804 421.7848 46.7872 0.2022 106 +108 4 492.1236 422.8704 46.9988 0.211 107 +109 4 492.3467 423.9893 47.1344 0.2035 108 +110 4 492.5881 425.0875 47.1296 0.2131 109 +111 4 492.8455 426.1617 47.0081 0.2077 110 +112 4 493.1532 427.2623 46.9174 0.2226 111 +113 4 493.3923 428.3754 46.8605 0.2124 112 +114 4 493.4255 429.5159 46.8462 0.1843 113 +115 4 493.4369 430.6531 46.858 0.1758 114 +116 4 493.6577 431.7742 46.8944 0.1799 115 +117 4 493.9506 432.877 46.9692 0.1613 116 +118 4 494.2492 433.9753 47.0926 0.1461 117 +119 4 494.6404 435.038 47.2562 0.1386 118 +120 4 495.0546 436.0859 47.451 0.1397 119 +121 4 495.3291 437.1853 47.6462 0.1418 120 +122 4 495.7124 438.2447 47.7537 0.1464 121 +123 4 496.3175 439.1885 47.838 0.1536 122 +124 4 497.0886 440.0167 47.9167 0.1737 123 +125 4 497.9226 440.7924 47.9539 0.1756 124 +126 4 498.8595 441.3895 48.046 0.157 125 +127 4 499.8616 441.8414 48.2664 0.1423 126 +128 4 500.7986 442.4431 48.5358 0.1373 127 +129 4 501.62 443.2211 48.7374 0.1373 128 +130 4 502.248 444.1534 48.9252 0.1373 129 +131 4 502.8349 445.1293 49.1352 0.1373 130 +132 4 503.6849 445.8408 49.3559 0.1373 131 +133 4 504.3061 446.7091 49.6163 0.1373 132 +134 4 504.8163 447.7158 49.8848 0.1373 133 +135 4 505.052 448.7649 50.1642 0.1373 134 +136 4 504.6928 449.8139 50.5151 0.1373 135 +137 4 504.4685 450.9099 50.8553 0.1373 136 +138 4 504.1848 452.0093 51.1333 0.1373 137 +139 4 503.805 453.0526 51.4248 0.1373 138 +140 4 503.543 454.0879 51.7692 0.1373 139 +141 4 503.8805 455.1576 52.0346 0.1373 140 +142 4 504.266 456.2341 52.2357 0.1373 141 +143 4 504.6344 457.3163 52.397 0.1373 142 +144 4 504.8438 458.4397 52.5311 0.1373 143 +145 4 505.5702 459.2737 52.71 0.1373 144 +146 4 506.3573 460.0756 52.9312 0.1373 145 +147 4 507.2851 460.7105 53.1412 0.1373 146 +148 4 508.174 461.4095 53.307 0.1373 147 +149 4 509.0125 462.1817 53.4332 0.1373 148 +150 4 509.9357 462.8578 53.5268 0.1373 149 +151 4 510.7136 463.6918 53.5976 0.1373 150 +152 4 511.2536 464.6962 53.6654 0.1373 151 +153 4 511.5991 465.7865 53.7474 0.1373 152 +154 4 511.9389 466.879 53.8513 0.1373 153 +155 4 512.345 467.9166 54.0215 0.1373 154 +156 4 512.8609 468.8398 54.334 0.1373 155 +157 4 512.9639 469.9598 54.6168 0.1373 156 +158 4 513.5473 470.9265 54.8738 0.1373 157 +159 4 514.2738 471.7364 55.1522 0.1373 158 +160 4 514.4385 472.7351 55.5164 0.1373 159 +161 4 514.4465 473.8528 55.8183 0.1373 160 +162 4 514.8629 474.8504 56.1666 0.1373 161 +163 4 515.3182 475.8891 56.4295 0.1373 162 +164 4 515.6694 476.9668 56.5891 0.1373 163 +165 4 515.7758 478.1051 56.6577 0.1373 164 +166 4 515.9451 479.1324 56.572 0.1373 165 +167 4 516.357 480.0464 56.3371 0.1373 166 +168 4 516.7871 481.1069 56.1565 0.1373 167 +169 4 517.2218 482.1582 56.0843 0.1373 168 +170 4 517.6611 483.2062 56.1257 0.1373 169 +171 4 518.0993 484.2529 56.259 0.1373 170 +172 4 518.5866 485.2585 56.4617 0.1373 171 +173 4 519.5762 485.8339 56.6614 0.1373 172 +174 4 520.2798 486.5501 56.8375 0.1373 173 +175 4 520.5131 487.6575 56.9962 0.1373 174 +176 4 520.9822 488.6996 57.1508 0.1373 175 +177 4 521.6503 489.5702 57.4129 0.1373 176 +178 4 522.2463 490.4866 57.7478 0.1373 177 +179 4 522.5998 491.5745 58.0664 0.1373 178 +180 4 522.1182 492.4348 58.3755 0.1373 179 +181 4 521.6949 493.4095 58.765 0.1373 180 +182 4 521.3631 494.4379 59.2418 0.1373 181 +183 4 520.8529 495.3875 59.7744 0.1372 182 +184 4 520.2786 496.3484 60.2882 0.1372 183 +185 4 519.7043 497.3094 60.7751 0.1372 184 +186 4 519.6208 498.4374 61.1394 0.1372 185 +187 4 519.5224 499.5756 61.3852 0.1371 186 +188 4 519.4229 500.7128 61.544 0.1369 187 +189 4 519.3806 501.8522 61.6521 0.1367 188 +190 4 519.4618 502.9379 61.7453 0.1361 189 +191 4 519.8805 504.0018 61.8464 0.1357 190 +192 4 520.2912 505.0703 61.9766 0.1347 191 +193 4 520.6744 506.1285 62.1919 0.1333 192 +194 4 521.0348 507.1775 62.5223 0.1317 193 +195 4 520.5726 508.1076 62.8676 0.127 194 +196 4 520.3095 509.1921 63.2744 0.1237 195 +197 4 520.0464 510.2778 63.7104 0.1205 196 +198 4 519.7833 511.3634 64.1458 0.1173 197 +199 4 519.5304 512.4525 64.5478 0.1144 198 +200 4 519.3691 513.5851 65.105 0.1144 199 +201 4 485.1178 379.5334 42.7431 0.3219 68 +202 4 486.2069 379.5197 43.234 0.2898 201 +203 4 487.2742 379.474 43.5075 0.2895 202 +204 4 488.3793 379.6593 43.7802 0.2697 203 +205 4 489.3517 380.0883 44.0787 0.245 204 +206 4 490.2086 380.7621 44.4786 0.2004 205 +207 4 491.2439 381.0332 44.821 0.1605 206 +208 4 492.3684 381.0595 45.1461 0.1415 207 +209 4 493.4678 381.2163 45.5188 0.1373 208 +210 4 494.5867 381.2735 45.9141 0.1373 209 +211 4 495.662 381.5286 46.326 0.1373 210 +212 4 496.7545 381.5011 46.746 0.1373 211 +213 4 497.886 381.5091 47.1262 0.1373 212 +214 4 498.8961 381.9999 47.42 0.1373 213 +215 4 499.8765 382.5891 47.6353 0.1373 214 +216 4 500.8569 383.1748 47.8111 0.1373 215 +217 4 501.8385 383.7594 47.9643 0.1373 216 +218 4 502.82 384.344 48.1085 0.1373 217 +219 4 503.8004 384.9285 48.2569 0.1373 218 +220 4 504.782 385.512 48.4134 0.1373 219 +221 4 505.7635 386.0977 48.5747 0.1373 220 +222 4 506.7451 386.6812 48.7382 0.1373 221 +223 4 507.7266 387.2657 48.9034 0.1373 222 +224 4 508.7071 387.8503 49.0711 0.1373 223 +225 4 509.6886 388.4349 49.2419 0.1373 224 +226 4 510.6702 389.0195 49.4175 0.1373 225 +227 4 511.6506 389.6041 49.6012 0.1373 226 +228 4 512.6321 390.1887 49.7938 0.1373 227 +229 4 513.6137 390.7732 49.9968 0.1373 228 +230 4 514.5952 391.3578 50.2135 0.1373 229 +231 4 515.5848 391.9161 50.4669 0.1374 230 +232 4 516.6052 392.3325 50.808 0.1375 231 +233 4 517.7229 392.3668 51.079 0.1376 232 +234 4 518.7445 392.7832 51.394 0.1379 233 +235 4 519.7558 393.1814 51.7812 0.1385 234 +236 4 520.7705 393.6081 52.1875 0.1395 235 +237 4 521.6823 394.2876 52.4933 0.1414 236 +238 4 522.6398 394.8905 52.6408 0.145 237 +239 4 523.7266 395.2028 52.7769 0.1515 238 +240 4 524.7116 395.7222 52.761 0.1648 239 +241 4 525.6074 396.4292 52.7296 0.1841 240 +242 4 526.7376 396.579 52.7369 0.2503 241 +243 4 527.853 396.8181 52.7856 0.2204 242 +244 4 528.9433 397.0755 52.7708 0.2186 243 +245 4 530.0518 397.3375 52.815 0.1805 244 +246 4 531.0688 397.8569 52.9194 0.1773 245 +247 4 532.0561 398.4094 53.0645 0.1895 246 +248 4 533.1486 398.6462 53.2907 0.2407 247 +249 4 534.2194 398.9929 53.531 0.2103 248 +250 4 535.3325 398.9952 53.7485 0.1935 249 +251 4 536.3278 399.2617 54.0602 0.2042 250 +252 4 537.4306 399.4093 54.2217 0.2578 251 +253 4 538.5472 399.6472 54.3668 0.2408 252 +254 4 539.6637 399.796 54.5443 0.1956 253 +255 4 540.7436 399.9641 54.7702 0.1728 254 +256 4 541.8007 400.3703 54.95 0.1909 255 +257 4 542.9298 400.4904 55.0766 0.2251 256 +258 4 544.0704 400.4549 55.195 0.2336 257 +259 4 545.1869 400.289 55.2751 0.2107 258 +260 4 546.268 399.955 55.3193 0.1687 259 +261 4 547.3548 399.7056 55.3616 0.1457 260 +262 4 548.4004 399.4001 55.5545 0.1384 261 +263 4 549.3557 399.0798 55.9205 0.1394 262 +264 4 550.3544 398.8247 56.3147 0.1412 263 +265 4 551.4137 398.4186 56.5541 0.1447 264 +266 4 552.4879 398.0662 56.6742 0.1515 265 +267 4 553.6159 397.9518 56.6737 0.1631 266 +268 4 554.7519 397.9587 56.5701 0.1903 267 +269 4 555.8742 397.9713 56.3864 0.2122 268 +270 4 556.7894 398.3774 56.1196 0.1919 269 +271 4 557.7618 398.8922 55.9527 0.1553 270 +272 4 558.8177 399.1896 55.998 0.1397 271 +273 4 559.7684 399.7433 56.1988 0.1384 272 +274 4 560.7499 400.2948 56.4771 0.1393 273 +275 4 561.7372 400.8633 56.716 0.1411 274 +276 4 562.6547 401.5371 56.9604 0.1443 275 +277 4 563.5779 402.211 57.1505 0.1502 276 +278 4 564.4633 402.9282 57.3289 0.1625 277 +279 4 565.39 403.5849 57.4468 0.1799 278 +280 4 566.328 404.1958 57.6526 0.2407 279 +281 4 567.1426 404.9451 57.9508 0.2108 280 +282 4 568.0006 405.6418 58.3061 0.1995 281 +283 4 568.759 406.4941 58.6082 0.1402 282 +284 4 569.4832 407.3784 59.08 0.1144 283 +285 4 459.0895 359.2938 31.0111 0.2508 39 +286 4 458.8424 358.2013 31.1478 0.24 285 +287 4 458.4866 357.1339 31.2012 0.2422 286 +288 4 458.2612 356.0288 31.2096 0.2892 287 +289 4 458.2486 354.9066 31.2525 0.2976 288 +290 4 458.5209 353.8175 31.2738 0.2783 289 +291 4 459.0186 352.8085 31.2068 0.2709 290 +292 4 459.5116 351.8017 31.059 0.3195 291 +293 4 459.7793 350.7184 30.8759 0.3662 292 +294 4 459.6935 349.6087 30.6872 0.3434 293 +295 4 459.5608 348.4864 30.5752 0.3055 294 +296 4 459.5448 347.3699 30.6188 0.2451 295 +297 4 459.5448 346.2522 30.7846 0.1836 296 +298 4 459.5448 345.1276 31.0148 0.1497 297 +299 4 459.5448 343.9939 31.234 0.14 298 +300 4 459.5459 342.8499 31.3706 0.1424 299 +301 4 459.5494 341.7128 31.3916 0.1468 300 +302 4 459.5723 340.5791 31.3018 0.1548 301 +303 4 459.6855 339.45 31.1553 0.1702 302 +304 4 459.9566 338.3426 31.0114 0.1963 303 +305 4 460.2838 337.2466 30.8988 0.2567 304 +306 4 460.5904 336.145 30.8218 0.3101 305 +307 4 460.9428 335.0582 30.7765 0.3026 306 +308 4 461.2837 333.9668 30.7507 0.2491 307 +309 4 461.4473 332.8434 30.7171 0.2109 308 +310 4 461.4164 331.7051 30.6706 0.2199 309 +311 4 461.286 330.5737 30.6592 0.291 310 +312 4 461.0881 329.4503 30.6922 0.3711 311 +313 4 460.8581 328.3303 30.7373 0.4253 312 +314 4 460.6041 327.216 30.7829 0.4282 313 +315 4 460.3296 326.1052 30.8294 0.3845 314 +316 4 460.2037 324.9749 30.8753 0.3631 315 +317 4 460.3422 323.847 30.9193 0.3465 316 +318 4 460.6293 322.7407 30.9697 0.3977 317 +319 4 461.0068 321.6619 31.0372 0.4262 318 +320 4 461.5033 320.6335 31.129 0.4459 319 +321 4 462.0948 319.6576 31.2598 0.4086 320 +322 4 462.6611 318.6784 31.4552 0.3773 321 +323 4 463.0363 317.627 31.7131 0.3985 322 +324 4 463.1656 316.5173 32.0057 0.4182 323 +325 4 463.1004 315.3928 32.2952 0.5018 324 +326 4 462.7766 314.3129 32.5251 0.4959 325 +327 4 462.1611 313.361 32.6665 0.4305 326 +328 4 461.429 312.4836 32.716 0.3783 327 +329 4 460.8295 311.5272 32.6654 0.3602 328 +330 4 460.5675 310.4381 32.555 0.4537 329 +331 4 460.6659 309.3147 32.4685 0.5661 330 +332 4 461.0412 308.2439 32.4016 0.6012 331 +333 4 461.4747 307.1949 32.3014 0.6107 332 +334 4 461.6681 306.0864 32.1843 0.529 333 +335 4 461.5262 304.9629 32.0894 0.5208 334 +336 4 461.1899 303.8716 32.0202 0.5565 335 +337 4 460.8192 302.7893 31.9687 0.5409 336 +338 4 460.5687 301.6762 31.9374 0.5263 337 +339 4 460.5206 300.538 31.9295 0.4668 338 +340 4 460.6396 299.402 31.934 0.4363 339 +341 4 460.8215 298.2774 31.927 0.4565 340 +342 4 460.992 297.1551 31.9074 0.4608 341 +343 4 461.1819 296.034 31.9486 0.5131 342 +344 4 461.3489 294.9507 32.1384 0.5558 343 +345 4 461.4988 293.8604 32.4369 0.5329 344 +346 4 461.7756 292.7725 32.7636 0.4515 345 +347 4 462.2035 291.7269 33.0837 0.3512 346 +348 4 462.6862 290.695 33.332 0.3245 347 +349 4 463.0386 289.6208 33.4415 0.4017 348 +350 4 463.169 288.4974 33.4401 0.3937 349 +351 4 463.1255 287.3568 33.4057 0.4298 350 +352 4 462.9802 286.2277 33.4018 0.3834 351 +353 4 462.8555 285.0997 33.4499 0.4143 352 +354 4 462.9013 283.9637 33.4995 0.363 353 +355 4 463.1964 282.8769 33.4998 0.3603 354 +356 4 463.6037 281.8141 33.4771 0.3569 355 +357 4 463.9286 280.7193 33.4709 0.3972 356 +358 4 464.0922 279.5913 33.5087 0.4527 357 +359 4 464.1711 278.4622 33.6213 0.4671 358 +360 4 464.3073 277.3376 33.7994 0.4909 359 +361 4 464.4754 276.2085 33.9931 0.4433 360 +362 4 464.5647 275.0691 34.1684 0.3572 361 +363 4 464.5841 273.9262 34.3213 0.3241 362 +364 4 464.6104 272.7868 34.4756 0.4373 363 +365 4 464.7283 271.6634 34.6556 0.538 364 +366 4 464.9994 270.5629 34.8356 0.516 365 +367 4 465.3517 269.4761 34.9773 0.5188 366 +368 4 465.648 268.3721 35.0697 0.5631 367 +369 4 465.7178 267.235 35.1137 0.5775 368 +370 4 465.4456 266.1322 35.112 0.5719 369 +371 4 464.9342 265.114 35.0711 0.529 370 +372 4 464.3416 264.1393 34.9877 0.3985 371 +373 4 463.8943 263.104 34.8522 0.2673 372 +374 4 463.8199 261.9817 34.6984 0.2089 373 +375 4 464.1105 260.8835 34.5789 0.2265 374 +376 4 464.6093 259.8607 34.5313 0.3146 375 +377 4 465.1184 258.8506 34.5646 0.393 376 +378 4 465.505 257.781 34.6301 0.3756 377 +379 4 465.6412 256.653 34.645 0.3469 378 +380 4 465.5577 255.5261 34.5764 0.3632 379 +381 4 465.4387 254.3924 34.4683 0.3899 380 +382 4 465.2499 253.2656 34.3451 0.3966 381 +383 4 464.9857 252.1685 34.1872 0.4008 382 +384 4 464.7511 251.0657 34.0284 0.3209 383 +385 4 464.6596 249.9285 33.9458 0.2792 384 +386 4 464.7866 248.8063 34.0071 0.3619 385 +387 4 464.9582 247.7343 34.2404 0.3399 386 +388 4 465.0234 246.6315 34.564 0.2764 387 +389 4 465.0154 245.5081 34.9056 0.2736 388 +390 4 464.8919 244.3859 35.2167 0.2437 389 +391 4 464.5441 243.3002 35.418 0.254 390 +392 4 464.0476 242.3816 35.3396 0.2588 391 +393 4 463.6621 241.3108 35.2033 0.2603 392 +394 4 463.3875 240.2 35.0585 0.2912 393 +395 4 463.0706 239.1257 34.8317 0.439 394 +396 4 462.7045 238.0527 34.5965 0.5021 395 +397 4 462.2698 236.9956 34.4274 0.3901 396 +398 4 461.7436 235.9797 34.328 0.3775 397 +399 4 461.1201 235.0211 34.2625 0.3164 398 +400 4 460.6327 233.9858 34.2292 0.2754 399 +401 4 460.4726 232.8715 34.279 0.3041 400 +402 4 460.4589 231.7401 34.3501 0.3067 401 +403 4 460.4497 230.6098 34.2902 0.3303 402 +404 4 460.3925 229.4875 34.109 0.282 403 +405 4 460.0985 228.3836 33.8906 0.297 404 +406 4 459.8766 227.2853 33.5829 0.3882 405 +407 4 459.4281 226.2489 33.2349 0.5929 406 +408 4 458.5507 224.1588 32.8614 0.6494 407 +409 4 458.1743 223.1006 32.5125 0.5607 408 +410 4 457.8414 222.0058 32.2711 0.387 409 +411 4 457.7224 220.8709 32.1051 0.3391 410 +412 4 457.751 219.7681 31.9455 0.4063 411 +413 4 457.9729 218.6459 31.9273 0.3455 412 +414 4 458.2784 217.5888 32.1227 0.3326 413 +415 4 458.5244 216.1096 31.9172 0.9137 414 +416 4 458.2361 215.0034 31.9158 0.5311 415 +417 4 457.6538 214.0184 31.915 0.3457 416 +418 4 457.0658 213.038 31.9138 0.3076 417 +419 4 457.0406 211.894 31.9119 0.4722 418 +420 4 457.5268 210.8586 31.9088 0.5506 419 +421 4 457.9867 209.8107 31.9043 0.5386 420 +422 4 457.8299 208.4826 31.8973 0.1527 421 +423 4 457.2293 207.5376 31.71 0.2157 422 +424 4 456.4674 206.6991 31.6117 0.2188 423 +425 4 456.0808 205.6901 31.4712 0.1877 424 +426 4 456.2993 204.6136 31.3762 0.1698 425 +427 4 456.8164 203.6206 31.3813 0.179 426 +428 4 457.0795 202.5429 31.4146 0.2233 427 +429 4 456.9983 201.4115 31.4115 0.2566 428 +430 4 456.98 200.2869 31.3404 0.3293 429 +431 4 457.1195 199.1658 31.215 0.3686 430 +432 4 457.0658 198.0378 31.0867 0.3347 431 +433 4 456.6688 196.9774 30.9823 0.3283 432 +434 4 456.0773 195.9992 30.9168 0.3571 433 +435 4 455.5923 194.9696 30.8941 0.3177 434 +436 4 455.2594 193.8783 30.8966 0.265 435 +437 4 454.8361 192.8246 30.9047 0.2859 436 +438 4 454.3911 191.7882 30.9966 0.3254 437 +439 4 454.1165 190.7105 31.1968 0.3259 438 +440 4 454.0284 189.5825 31.4244 0.2516 439 +441 4 453.9163 188.4477 31.6565 0.1821 440 +442 4 453.6967 187.3678 31.9514 0.1502 441 +443 4 453.6017 186.2443 32.2039 0.1491 442 +444 4 453.5708 185.1129 32.3243 0.1601 443 +445 4 453.453 183.9815 32.3932 0.1759 444 +446 4 453.0812 182.9245 32.4895 0.2281 445 +447 4 452.4806 181.9624 32.5721 0.2142 446 +448 4 452.0596 180.9087 32.5962 0.1867 447 +449 4 452.0688 179.7876 32.5438 0.1725 448 +450 4 452.0905 178.6619 32.4204 0.2053 449 +451 4 451.9326 177.5351 32.3033 0.21 450 +452 4 451.8251 176.3968 32.2238 0.2473 451 +453 4 451.9097 175.2608 32.156 0.2142 452 +454 4 452.047 174.126 32.121 0.1856 453 +455 4 451.9772 172.9877 32.1292 0.1741 454 +456 4 451.626 171.9054 32.188 0.1982 455 +457 4 451.2542 170.8301 32.2958 0.2544 456 +458 4 450.9488 169.7284 32.3974 0.3356 457 +459 4 450.5907 168.6485 32.4587 0.3004 458 +460 4 450.1205 167.6097 32.548 0.2891 459 +461 4 449.5897 166.6282 32.7284 0.2928 460 +462 4 449.2168 165.5631 32.9493 0.3391 461 +463 4 449.1664 164.4271 33.1226 0.3499 462 +464 4 449.314 163.2934 33.2685 0.3278 463 +465 4 449.3117 162.1609 33.4505 0.237 464 +466 4 449.0246 161.0626 33.6468 0.1825 465 +467 4 448.8381 159.9404 33.7683 0.1707 466 +468 4 449.1127 158.8364 33.852 0.1935 467 +469 4 449.6847 157.88 34.041 0.2674 468 +470 4 450.1262 156.8962 34.3412 0.251 469 +471 4 450.2773 155.7762 34.629 0.2857 470 +472 4 450.1674 154.6368 34.8454 0.2419 471 +473 4 450.0004 153.5054 34.9964 0.2662 472 +474 4 449.9741 152.3625 35.0739 0.2098 473 +475 4 450.0999 151.2299 35.0546 0.1894 474 +476 4 450.1777 150.1065 34.9569 0.1902 475 +477 4 449.7373 149.0563 34.9084 0.2397 476 +478 4 449.2271 148.045 34.8967 0.3313 477 +479 4 449.0417 146.9331 34.8376 0.3847 478 +480 4 449.0108 145.7959 34.785 0.2821 479 +481 4 448.9548 144.6645 34.8228 0.2098 480 +482 4 448.6894 143.5754 34.9322 0.1936 481 +483 4 448.0831 142.6133 35.0406 0.1833 482 +484 4 447.2811 141.7988 35.1316 0.1838 483 +485 4 446.4185 141.0472 35.2069 0.2054 484 +486 4 445.6189 140.2407 35.2573 0.2595 485 +487 4 445.1521 139.2282 35.2705 0.2491 486 +488 4 445.1716 138.098 35.2548 0.2587 487 +489 4 444.9542 137.0935 35.3105 0.2113 488 +490 4 444.047 136.4323 35.327 0.2071 489 +491 4 443.2748 135.6235 35.385 0.273 490 +492 4 442.4546 134.9154 35.5592 0.3163 491 +493 4 441.6915 134.1111 35.7764 0.2764 492 +494 4 441.6092 133.0278 35.8725 0.2628 493 +495 4 441.0109 132.092 35.8571 0.2535 494 +496 4 440.408 131.1676 35.6933 0.3391 495 +497 4 439.9881 130.1071 35.4953 0.3332 496 +498 4 439.4642 129.0947 35.2643 0.2516 497 +499 4 438.9711 128.0628 35.0515 0.1914 498 +500 4 438.0948 127.3512 34.8267 0.1861 499 +501 4 437.2494 126.6408 34.7572 0.2352 500 +502 4 437.0435 125.9533 35.5494 0.2316 501 +503 4 436.6259 124.9088 35.3318 0.2177 502 +504 4 436.3742 123.83 35.2335 0.2114 503 +505 4 436.0333 122.7844 35.098 0.2005 504 +506 4 435.673 121.7124 34.9804 0.1995 505 +507 4 435.4728 120.5936 34.8412 0.2325 506 +508 4 434.7955 119.7368 34.6469 0.2846 507 +509 4 434.386 118.6923 34.561 0.2496 508 +510 4 433.8231 117.7451 34.405 0.247 509 +511 4 433.5188 116.7292 34.417 0.2423 510 +512 4 433.4193 115.6584 34.3689 0.2372 511 +513 4 432.8976 114.6631 34.4011 0.2765 512 +514 4 432.1506 113.8051 34.4596 0.379 513 +515 4 431.4996 112.8988 34.5408 0.459 514 +516 4 431.0031 111.9229 34.7469 0.4634 515 +517 4 430.4746 110.9467 34.9765 0.3894 516 +518 4 429.7184 110.1227 35.1551 0.2894 517 +519 4 428.8101 109.4301 35.2618 0.2836 518 +520 4 427.8594 108.806 35.2974 0.3192 519 +521 4 427.0701 108.0191 35.268 0.315 520 +522 4 426.4123 107.1415 35.3128 0.2648 521 +523 4 425.6538 106.3088 35.3772 0.2736 522 +524 4 425.1699 105.3041 35.4925 0.2694 523 +525 4 424.9068 104.2263 35.5183 0.2366 524 +526 4 424.273 103.3045 35.5645 0.2216 525 +527 4 423.4367 102.5766 35.686 0.2717 526 +528 4 422.6943 101.713 35.7448 0.3517 527 +529 4 422.0788 100.781 35.6734 0.383 528 +530 4 421.3478 99.903 35.5874 0.4554 529 +531 4 420.6351 99.009 35.5065 0.4852 530 +532 4 420.3067 97.9168 35.397 0.4844 531 +533 4 419.9189 96.8643 35.2184 0.403 532 +534 4 419.2714 95.9369 35.0333 0.4067 533 +535 4 419.0472 94.8376 35.0 0.3432 534 +536 4 436.9119 126.0391 34.533 0.2622 501 +537 4 436.0997 125.3607 34.4534 0.2284 536 +538 4 435.4853 124.8996 34.3 0.2424 537 +539 4 434.6102 124.7143 33.9595 0.2552 538 +540 4 433.6149 124.7532 33.8162 0.2162 539 +541 4 432.7409 124.1823 33.7036 0.18 540 +542 4 431.8589 123.4662 33.593 0.183 541 +543 4 430.9826 122.8416 33.6389 0.2132 542 +544 4 430.0147 122.241 33.6977 0.3175 543 +545 4 429.2299 121.4116 33.7338 0.2879 544 +546 4 428.6133 120.6062 33.5359 0.3253 545 +547 4 427.9979 119.6532 33.4197 0.2298 546 +548 4 427.2806 118.7804 33.3735 0.1804 547 +549 4 426.394 118.0631 33.2825 0.1504 548 +550 4 425.5691 117.2932 33.1965 0.162 549 +551 4 424.8233 116.6583 32.9795 0.1844 550 +552 4 424.4732 115.7133 32.9846 0.2261 551 +553 4 424.1391 114.6402 32.9218 0.3086 552 +554 4 423.5969 113.6996 32.7132 0.3845 553 +555 4 422.8956 112.8162 32.4626 0.3908 554 +556 4 422.2161 111.9397 32.1681 0.4539 555 +557 4 421.3867 111.1604 31.9124 0.4358 556 +558 4 420.8353 110.2011 31.6982 0.4048 557 +559 4 420.5516 109.1317 31.5386 0.315 558 +560 4 419.9189 108.2197 31.3499 0.2721 559 +561 4 419.1696 107.3711 31.2234 0.296 560 +562 4 418.5438 106.4507 31.1878 0.353 561 +563 4 418.108 105.3955 31.1626 0.4301 562 +564 4 417.7339 104.316 31.1212 0.4438 563 +565 4 417.6138 103.2455 30.9772 0.3728 564 +566 4 417.1974 102.3777 30.6964 0.2904 565 +567 4 416.4286 101.5811 30.4343 0.2793 566 +568 4 415.8966 100.5971 30.2658 0.2997 567 +569 4 415.4447 99.5575 30.196 0.2627 568 +570 4 414.7149 98.7253 30.221 0.2083 569 +571 4 413.85 97.9938 30.2302 0.1912 570 +572 4 412.9565 97.2929 30.228 0.2264 571 +573 4 412.0448 96.6053 30.177 0.2818 572 +574 4 411.0815 96.0976 29.9645 0.2829 573 +575 4 410.1011 95.5433 29.7024 0.2402 574 +576 4 409.1505 95.2379 29.2723 0.2213 575 +577 4 408.2009 94.7679 28.9654 0.2512 576 +578 4 407.1679 94.3945 28.798 0.3947 577 +579 4 406.1978 94.1563 28.4497 0.4095 578 +580 4 405.2185 93.9679 27.9681 0.3606 579 +581 4 404.0963 93.8487 27.5323 0.3178 580 +582 4 403.0312 94.2656 26.88 0.3432 581 +583 4 459.2165 208.6576 31.8984 0.3281 421 +584 4 459.9818 207.8076 31.89 0.2787 583 +585 4 460.7757 206.9851 31.8774 0.2428 584 +586 4 461.7539 206.4073 31.8604 0.227 585 +587 4 462.8658 206.1785 31.8388 0.2981 586 +588 4 464.0053 206.0802 31.8114 0.2923 587 +589 4 465.1138 205.8342 31.757 0.2358 588 +590 4 466.1136 205.3183 31.673 0.2057 589 +591 4 466.9991 204.6055 31.6084 0.1764 590 +592 4 467.8239 203.815 31.6168 0.1614 591 +593 4 468.619 203.0131 31.752 0.1564 592 +594 4 469.3626 202.2077 32.0415 0.1672 593 +595 4 469.9918 201.2914 32.4212 0.2043 594 +596 4 470.3842 200.2263 32.7964 0.2064 595 +597 4 470.6073 199.1063 33.1276 0.2329 596 +598 4 470.9219 198.0184 33.4418 0.2308 597 +599 4 471.4184 197.0231 33.7599 0.2862 598 +600 4 471.9366 196.037 34.0665 0.2792 599 +601 4 472.2821 194.9536 34.2992 0.3115 600 +602 4 472.5281 193.8485 34.3865 0.401 601 +603 4 472.718 192.7297 34.3582 0.3538 602 +604 4 472.7797 191.5903 34.279 0.353 603 +605 4 472.6699 190.452 34.1807 0.3579 604 +606 4 472.4937 189.332 34.05 0.2832 605 +607 4 472.48 188.204 33.9158 0.2263 606 +608 4 472.869 187.1367 33.8481 0.2195 607 +609 4 473.6114 186.2821 33.9055 0.3049 608 +610 4 474.3779 185.4584 34.0878 0.3554 609 +611 4 474.9076 184.4654 34.3594 0.3435 610 +612 4 475.1661 183.3763 34.7026 0.3626 611 +613 4 475.5459 182.3056 35.0406 0.282 612 +614 4 476.1717 181.3572 35.3475 0.2636 613 +615 4 476.9096 180.5095 35.6432 0.2311 614 +616 4 477.6131 179.6114 35.8767 0.3022 615 +617 4 478.1703 178.615 36.0153 0.2412 616 +618 4 478.6896 177.6209 36.0304 0.1977 617 +619 4 479.4138 176.7446 36.0074 0.1891 618 +620 4 480.3004 176.0227 36.0175 0.1714 619 +621 4 481.163 175.342 36.1623 0.1576 620 +622 4 481.9786 174.6385 36.4414 0.151 621 +623 4 482.9247 174.0013 36.7046 0.1621 622 +624 4 483.9051 173.4567 36.8427 0.1841 623 +625 4 484.8787 172.8653 36.9138 0.2205 624 +626 4 485.7195 172.0919 36.9816 0.309 625 +627 4 486.3876 171.1962 37.1162 0.372 626 +628 4 487.1221 170.3267 37.2691 0.3019 627 +629 4 487.8805 169.471 37.4178 0.2784 628 +630 4 488.4514 168.4792 37.5584 0.2732 629 +631 4 489.1252 167.556 37.6827 0.3105 630 +632 4 490.0576 166.9279 37.8406 0.2678 631 +633 4 491.1753 166.7632 37.9985 0.2787 632 +634 4 492.2918 166.5161 38.0904 0.3131 633 +635 4 493.3431 166.1294 38.0568 0.3107 634 +636 4 494.2435 165.4418 37.9588 0.2851 635 +637 4 494.9939 164.5793 37.8748 0.3399 636 +638 4 495.4401 163.5256 37.8176 0.4015 637 +639 4 495.9835 162.5189 37.8022 0.3677 638 +640 4 496.7054 161.6323 37.8428 0.3376 639 +641 4 497.4226 160.7503 37.9646 0.3512 640 +642 4 497.9866 159.7859 38.176 0.3828 641 +643 4 498.6387 158.8478 38.3639 0.2961 642 +644 4 499.4121 158.0047 38.5118 0.2691 643 +645 4 500.1442 157.125 38.6232 0.2564 644 +646 4 500.6933 156.1217 38.7041 0.2794 645 +647 4 501.2058 155.0989 38.764 0.211 646 +648 4 501.7492 154.0922 38.8195 0.1658 647 +649 4 502.4448 153.1839 38.8906 0.143 648 +650 4 503.2216 152.3442 38.9844 0.1477 649 +651 4 503.9011 151.4244 39.114 0.1572 650 +652 4 504.3496 150.396 39.3428 0.1715 651 +653 4 504.6092 149.2989 39.6334 0.214 652 +654 4 505.1812 148.3082 39.9036 0.2152 653 +655 4 506.0072 147.5234 40.1783 0.2507 654 +656 4 506.3687 147.8414 40.1212 0.1483 655 +657 4 507.4441 148.1732 39.65 0.1397 656 +658 4 508.4451 147.679 39.447 0.1455 657 +659 4 509.2036 146.8381 39.1866 0.1525 658 +660 4 509.9117 145.9584 38.8623 0.1659 659 +661 4 510.6519 145.0912 38.5188 0.1888 660 +662 4 511.3794 144.2104 38.1816 0.2404 661 +663 4 512.1757 143.3958 37.8213 0.2917 662 +664 4 513.0886 142.7723 37.3808 0.2747 663 +665 4 514.0919 142.4417 36.8329 0.219 664 +666 4 515.1707 142.3308 36.2398 0.2109 665 +667 4 516.2895 142.1328 35.7073 0.1887 666 +668 4 517.4278 142.1878 35.2668 0.1886 667 +669 4 518.4139 142.754 34.874 0.2208 668 +670 4 519.3405 143.4038 34.5024 0.2282 669 +671 4 520.4319 143.707 34.1984 0.2794 670 +672 4 521.5473 143.5114 33.9214 0.2631 671 +673 4 522.5815 143.0686 33.5314 0.234 672 +674 4 523.531 142.6088 32.9442 0.1761 673 +675 4 524.381 142.0425 32.1787 0.1491 674 +676 4 525.1601 141.3892 31.2847 0.1389 675 +677 4 526.2068 141.2451 30.3486 0.1405 676 +678 4 527.3039 141.268 29.4924 0.1435 677 +679 4 528.2294 140.7955 28.5989 0.1494 678 +680 4 529.0645 140.3791 27.6157 0.1594 679 +681 4 529.9328 140.5061 26.6145 0.183 680 +682 4 530.784 141.1742 25.6788 0.2046 681 +683 4 531.8227 141.2588 24.8432 0.2068 682 +684 4 532.9118 141.093 24.0563 0.2487 683 +685 4 533.9757 141.0174 23.262 0.2575 684 +686 4 534.8635 140.6845 22.3917 0.204 685 +687 4 535.7489 140.3722 21.4596 0.1624 686 +688 4 536.806 140.1617 20.5873 0.1499 687 +689 4 537.8527 139.751 19.8496 0.1596 688 +690 4 538.8652 139.2374 19.234 0.1845 689 +691 4 539.8673 138.7008 18.731 0.1965 690 +692 4 540.8718 138.1552 18.3229 0.2014 691 +693 4 541.8934 137.661 17.9319 0.1961 692 +694 4 542.8063 137.0466 17.4756 0.1851 693 +695 4 543.5281 136.2984 16.895 0.1916 694 +696 4 544.2637 135.6384 16.1949 0.2459 695 +697 4 545.2716 135.2586 15.5567 0.2645 696 +698 4 546.1948 134.6396 15.0289 0.3033 697 +699 4 547.0539 133.8869 14.6069 0.2567 698 +700 4 548.1144 133.5197 14.2919 0.2064 699 +701 4 548.8649 132.7566 13.9728 0.193 700 +702 4 549.3728 131.7442 13.7157 0.1792 701 +703 4 549.8636 130.7603 13.3808 0.1678 702 +704 4 550.2617 129.7079 13.0234 0.1795 703 +705 4 551.0293 128.8796 12.692 0.157 704 +706 4 551.7912 128.0262 12.4474 0.1272 705 +707 4 552.0944 126.984 11.76 0.1144 706 +708 4 506.2097 146.0385 40.5448 0.2714 655 +709 4 506.3058 144.9139 40.8867 0.3015 708 +710 4 506.5357 143.7985 41.1603 0.2532 709 +711 4 506.8423 142.7014 41.3504 0.2639 710 +712 4 507.3697 141.7176 41.3784 0.2061 711 +713 4 507.8845 140.7234 41.3308 0.1836 712 +714 4 508.4073 139.7625 41.3479 0.1836 713 +715 4 509.0606 138.8759 41.2532 0.1643 714 +716 4 509.3488 137.9813 41.2154 0.1475 715 +717 4 509.4301 137.0569 41.379 0.142 716 +718 4 509.8625 136.0445 41.4644 0.1461 717 +719 4 510.3544 135.0995 41.5187 0.1538 718 +720 4 510.8646 134.1168 41.6461 0.1684 719 +721 4 511.3188 133.0724 41.7794 0.1934 720 +722 4 511.678 131.997 41.8415 0.2526 721 +723 4 511.8634 130.893 41.7852 0.3081 722 +724 4 511.8508 129.7662 41.7239 0.2982 723 +725 4 511.948 128.6417 41.6592 0.2409 724 +726 4 512.0327 127.5114 41.6038 0.1956 725 +727 4 512.0979 126.3788 41.6063 0.2022 726 +728 4 511.948 125.2703 41.6228 0.2136 727 +729 4 511.9949 124.1675 41.6217 0.2455 728 +730 4 512.6012 123.2637 41.5307 0.2303 729 +731 4 513.2934 122.4091 41.4935 0.215 730 +732 4 513.5279 121.3349 41.4226 0.1793 731 +733 4 513.6148 120.1966 41.3288 0.1599 732 +734 4 513.8413 119.079 41.2082 0.1519 733 +735 4 514.4202 118.1272 41.0214 0.161 734 +736 4 514.7405 117.0495 40.8069 0.1822 735 +737 4 515.086 115.9616 40.619 0.218 736 +738 4 515.5951 114.9892 40.3799 0.3043 737 +739 4 516.0687 113.9668 40.2772 0.3694 738 +740 4 516.627 112.9868 40.2976 0.3069 739 +741 4 517.1418 111.9848 40.3063 0.2742 740 +742 4 517.1246 110.8655 40.4146 0.3399 741 +743 4 517.1704 109.7319 40.514 0.4057 742 +744 4 517.5856 108.6726 40.556 0.3811 743 +745 4 518.0032 107.6345 40.5174 0.3141 744 +746 4 518.1222 106.5027 40.4958 0.2684 745 +747 4 518.5283 105.4552 40.516 0.2432 746 +748 4 519.0397 104.5441 40.6672 0.2155 747 +749 4 519.2524 103.4485 40.7688 0.2272 748 +750 4 519.106 102.3944 40.7392 0.2768 749 +751 4 518.9344 101.3575 40.6798 0.2927 750 +752 4 519.281 100.338 40.4163 0.325 751 +753 4 519.5396 99.2796 40.0803 0.3403 752 +754 4 519.7867 98.1871 39.7796 0.3573 753 +755 4 520.2329 97.1761 39.4276 0.3357 754 +756 4 520.7088 96.1924 38.9836 0.3116 755 +757 4 520.8289 95.2866 38.3807 0.2609 756 +758 4 520.6756 94.2945 37.9204 0.2202 757 +759 4 520.7419 93.2074 37.4844 0.248 758 +760 4 520.9444 92.099 37.0418 0.2486 759 +761 4 521.1801 90.986 36.6464 0.2039 760 +762 4 521.4787 89.8836 36.344 0.1603 761 +763 4 522.0335 88.8989 36.1418 0.142 762 +764 4 522.3493 87.8907 35.8254 0.1517 763 +765 4 523.0368 87.1728 34.72 0.1144 764 +766 4 457.8997 216.0696 32.4652 0.3299 414 +767 4 457.2408 215.2024 32.9098 0.3103 766 +768 4 456.3405 214.5458 33.3922 0.2459 767 +769 4 455.4619 213.8228 33.8352 0.2361 768 +770 4 454.7938 212.8984 34.1933 0.2902 769 +771 4 454.3865 211.8322 34.4761 0.3183 770 +772 4 454.4174 210.6973 34.7278 0.3264 771 +773 4 454.7423 209.6414 35.0434 0.4106 772 +774 4 454.8979 208.5741 35.4458 0.5415 773 +775 4 454.7526 207.4541 35.8361 0.6073 774 +776 4 454.5524 206.3284 36.1581 0.5947 775 +777 4 454.335 205.2061 36.4106 0.512 776 +778 4 454.2721 204.0644 36.6052 0.3948 777 +779 4 454.422 202.933 36.7727 0.3173 778 +780 4 454.4952 201.8153 36.983 0.3858 779 +781 4 454.4712 200.6793 37.1935 0.4007 780 +782 4 454.263 199.5559 37.3688 0.4642 781 +783 4 454.0216 198.4462 37.5441 0.4937 782 +784 4 453.6658 197.3709 37.7219 0.4307 783 +785 4 453.2539 196.3298 37.7723 0.3118 784 +786 4 452.9428 195.3483 37.653 0.299 785 +787 4 452.9554 194.2638 37.4956 0.2762 786 +788 4 453.493 193.2868 37.5488 0.2602 787 +789 4 453.9747 192.4917 37.9322 0.2135 788 +790 4 454.049 191.7138 38.6229 0.2135 789 +791 4 454.0479 190.635 39.3649 0.2487 790 +792 4 454.0124 189.4922 39.954 0.3746 791 +793 4 453.787 188.3996 40.3007 0.4278 792 +794 4 453.5846 187.29 40.5846 0.3728 793 +795 4 453.5033 186.1574 40.796 0.3295 794 +796 4 453.199 185.0546 40.9296 0.3079 795 +797 4 453.2253 183.9106 41.0511 0.4401 796 +798 4 453.5285 182.8135 41.2157 0.4206 797 +799 4 453.2654 181.3595 42.5925 0.1196 798 +800 4 452.611 180.4717 43.4322 0.1377 799 +801 4 451.7748 179.7613 43.7562 0.1381 800 +802 4 451.4316 178.8312 44.2408 0.1388 801 +803 4 451.4235 177.7753 44.7857 0.1401 802 +804 4 451.3252 176.653 45.201 0.1426 803 +805 4 451.2416 175.5468 45.4426 0.1471 804 +806 4 451.0975 174.4291 45.6467 0.1559 805 +807 4 450.9156 173.34 45.9432 0.1712 806 +808 4 450.6433 172.2795 46.3154 0.2047 807 +809 4 450.14 171.2728 46.732 0.2441 808 +810 4 449.767 170.2375 47.1957 0.2907 809 +811 4 449.6584 169.1221 47.6958 0.3544 810 +812 4 449.2866 168.1062 48.2138 0.3817 811 +813 4 448.6368 167.1945 48.7105 0.3852 812 +814 4 448.0007 166.2644 49.1798 0.3245 813 +815 4 447.3978 165.3034 49.607 0.2437 814 +816 4 446.7858 164.339 49.9716 0.2299 815 +817 4 446.2366 163.3426 50.2981 0.2198 816 +818 4 445.882 162.2993 50.654 0.1883 817 +819 4 445.604 161.2399 51.0569 0.1672 818 +820 4 445.1075 160.2447 51.438 0.1798 819 +821 4 444.452 159.31 51.7429 0.1842 820 +822 4 443.8972 158.3285 51.9358 0.1744 821 +823 4 443.6123 157.2394 52.0559 0.1741 822 +824 4 443.5608 156.1571 52.2497 0.2039 823 +825 4 443.6729 155.0795 52.5291 0.2308 824 +826 4 443.7484 153.9675 52.838 0.232 825 +827 4 443.5402 152.8613 53.0986 0.1956 826 +828 4 443.0758 151.9026 53.172 0.1605 827 +829 4 442.7726 150.8387 53.1714 0.1447 828 +830 4 442.2395 149.8468 53.2064 0.1462 829 +831 4 441.3438 149.1776 53.2241 0.1539 830 +832 4 440.4983 148.418 53.2736 0.1685 831 +833 4 439.9984 147.425 53.4747 0.1947 832 +834 4 439.8806 146.4068 53.8966 0.2483 833 +835 4 439.8726 145.4047 54.4796 0.3235 834 +836 4 439.8932 144.3236 55.088 0.2766 835 +837 4 440.003 143.1922 55.5696 0.2467 836 +838 4 440.2158 142.1065 55.8261 0.207 837 +839 4 440.265 140.9877 55.9163 0.2129 838 +840 4 440.0373 139.9604 56.1014 0.2601 839 +841 4 439.4253 139.1115 56.3881 0.3238 840 +842 4 438.6485 138.2856 56.6331 0.3635 841 +843 4 437.9884 137.3692 56.7683 0.2788 842 +844 4 437.5914 136.3065 56.9008 0.2139 843 +845 4 437.3809 135.1842 56.9926 0.1979 844 +846 4 437.0 134.1226 56.9629 0.2517 845 +847 4 436.7529 133.0083 56.9114 0.3278 846 +848 4 436.7929 131.8654 56.8882 0.2664 847 +849 4 436.8227 130.7226 56.9195 0.2228 848 +850 4 436.3742 129.7021 57.0612 0.2359 849 +851 4 435.6844 128.8052 57.2606 0.2679 850 +852 4 435.0552 127.85 57.4493 0.2825 851 +853 4 434.4981 126.857 57.5862 0.3014 852 +854 4 433.9123 125.8869 57.6736 0.2513 853 +855 4 433.338 124.9031 57.8049 0.2616 854 +856 4 433.0074 123.8494 58.0639 0.2009 855 +857 4 432.7638 122.7809 58.4343 0.173 856 +858 4 432.2833 121.7925 58.8804 0.1598 857 +859 4 431.6781 120.8853 59.3751 0.1789 858 +860 4 431.2136 119.8477 59.7971 0.2162 859 +861 4 430.811 118.7884 60.0471 0.2801 860 +862 4 430.3099 117.7714 60.1653 0.4212 861 +863 4 429.7459 116.7818 60.2644 0.4383 862 +864 4 429.2288 115.814 60.4481 0.3591 863 +865 4 429.0961 114.702 60.662 0.2821 864 +866 4 429.3695 113.5912 60.8546 0.3113 865 +867 4 429.6178 112.4833 61.0145 0.3198 866 +868 4 429.5102 111.3519 61.14 0.4002 867 +869 4 429.2002 110.2584 61.3015 0.4759 868 +870 4 428.9691 109.1687 61.5426 0.4492 869 +871 4 428.8982 108.0432 61.8327 0.4658 870 +872 4 428.8547 106.9124 62.1228 0.3927 871 +873 4 428.3765 105.8859 62.3938 0.3155 872 +874 4 427.618 105.0463 62.6654 0.2481 873 +875 4 427.1707 104.0379 62.9902 0.2663 874 +876 4 427.0106 102.9552 63.3609 0.2394 875 +877 4 426.585 101.9757 63.7258 0.1848 876 +878 4 426.0553 101.0412 63.9069 0.1517 877 +879 4 425.9101 100.0136 64.1323 0.1523 878 +880 4 425.6183 99.0562 64.2944 0.1663 879 +881 4 425.4113 98.0019 64.2897 0.1893 880 +882 4 425.4799 96.8761 64.2776 0.2486 881 +883 4 425.5051 95.7966 64.4106 0.2775 882 +884 4 425.393 94.7049 64.654 0.2704 883 +885 4 424.9216 93.7001 64.8539 0.2348 884 +886 4 424.5899 92.6222 65.0269 0.2366 885 +887 4 424.5121 91.5082 65.1454 0.2554 886 +888 4 424.1826 90.433 65.2492 0.2625 887 +889 4 423.7227 89.4325 65.4167 0.3275 888 +890 4 423.0295 88.5343 65.5995 0.4303 889 +891 4 422.1509 87.861 65.8031 0.4359 890 +892 4 421.1304 87.3621 65.9529 0.4185 891 +893 4 420.166 86.7629 66.0778 0.3715 892 +894 4 419.173 86.206 66.2144 0.3043 893 +895 4 418.1858 85.6544 66.3813 0.2525 894 +896 4 417.266 84.9981 66.5904 0.2055 895 +897 4 416.4492 84.2478 66.7344 0.1668 896 +898 4 415.7479 83.3851 66.8497 0.1478 897 +899 4 415.1645 82.4689 67.1087 0.1457 898 +900 4 414.7606 81.4925 67.5307 0.1532 899 +901 4 414.7892 80.4774 67.8714 0.169 900 +902 4 414.875 79.4629 68.3091 0.1963 901 +903 4 414.4529 78.4779 68.8688 0.2698 902 +904 4 413.9335 77.5546 69.5349 0.2778 903 +905 4 413.4267 76.5703 70.1988 0.3253 904 +906 4 413.0149 75.5545 70.8672 0.3475 905 +907 4 412.6099 74.5359 71.5361 0.3482 906 +908 4 412.1477 73.563 72.1815 0.2798 907 +909 4 411.2863 72.855 72.7149 0.253 908 +910 4 410.2613 72.3578 73.0985 0.3319 909 +911 4 409.2328 71.8561 73.3432 0.3349 910 +912 4 408.4366 71.0867 73.5683 0.3185 911 +913 4 407.3509 70.7947 73.6299 0.3432 912 +914 4 406.2344 70.6992 73.36 0.2288 913 +915 4 453.4988 181.8228 41.3801 0.5626 798 +916 4 453.358 180.6994 41.5682 0.5097 915 +917 4 453.215 179.5748 41.7682 0.3244 916 +918 4 453.2379 178.4365 41.9434 0.1997 917 +919 4 453.4004 177.3074 42.0986 0.1722 918 +920 4 453.4908 176.1829 42.2618 0.1784 919 +921 4 453.5262 175.0526 42.425 0.1609 920 +922 4 453.8603 173.9921 42.5172 0.148 921 +923 4 454.5581 173.125 42.497 0.1463 922 +924 4 455.4184 172.4077 42.3937 0.1543 923 +925 4 456.2043 171.6057 42.3136 0.1682 924 +926 4 456.4846 170.5601 42.313 0.2044 925 +927 4 456.2672 169.4504 42.3424 0.2258 926 +928 4 456.1391 168.3293 42.4385 0.2475 927 +929 4 456.488 167.2837 42.6115 0.3492 928 +930 4 457.1573 166.3685 42.7927 0.3575 929 +931 4 457.7888 165.4178 42.9318 0.3208 930 +932 4 458.1056 164.331 43.0248 0.2814 931 +933 4 458.1697 163.1927 43.0844 0.2722 932 +934 4 458.18 162.0487 43.1138 0.2697 933 +935 4 458.2178 160.9047 43.1225 0.2683 934 +936 4 458.3299 159.7676 43.1245 0.2491 935 +937 4 458.3596 158.6248 43.1287 0.295 936 +938 4 458.2887 157.4842 43.1357 0.2568 937 +939 4 457.9615 156.3962 43.1329 0.2149 938 +940 4 457.4055 155.409 43.1122 0.1991 939 +941 4 457.0646 154.329 43.1595 0.2479 940 +942 4 457.0337 153.1965 43.29 0.3103 941 +943 4 457.1687 152.0639 43.4694 0.3215 942 +944 4 457.2888 150.9336 43.7088 0.3029 943 +945 4 457.4204 149.8274 44.0345 0.3835 944 +946 4 457.4593 148.7257 44.4237 0.3735 945 +947 4 456.9925 147.7362 44.8221 0.282 946 +948 4 456.1597 146.964 45.134 0.228 947 +949 4 455.5328 146.0179 45.3107 0.192 948 +950 4 455.4744 144.8842 45.402 0.1908 949 +951 4 455.6335 143.7562 45.4174 0.2223 950 +952 4 455.487 142.6248 45.4034 0.2466 951 +953 4 454.9402 141.6272 45.4555 0.239 952 +954 4 454.3854 140.6308 45.575 0.2489 953 +955 4 454.2412 139.4971 45.7372 0.3724 954 +956 4 454.4174 138.3805 45.9684 0.3218 955 +957 4 454.4757 137.2708 46.2717 0.3331 956 +958 4 454.2847 136.2321 46.664 0.2934 957 +959 4 454.033 135.1728 47.0599 0.2876 958 +960 4 453.8854 134.1043 47.178 0.2907 959 +961 4 454.2309 133.1833 47.0865 0.2266 960 +962 4 454.7686 132.1858 46.9294 0.2041 961 +963 4 455.2811 131.171 46.807 0.1647 962 +964 4 455.6335 130.0842 46.7121 0.1493 963 +965 4 456.1174 129.0546 46.6536 0.1409 964 +966 4 456.7466 128.1086 46.6768 0.144 965 +967 4 457.0978 127.0446 46.7396 0.15 966 +968 4 457.0921 125.9041 46.755 0.1607 967 +969 4 457.1504 124.7738 46.7267 0.1826 968 +970 4 457.4478 123.671 46.7124 0.2131 969 +971 4 457.7602 122.5773 46.732 0.2249 970 +972 4 457.9638 121.4573 46.7334 0.2459 971 +973 4 457.9912 120.3225 46.685 0.2092 972 +974 4 457.9421 119.1831 46.627 0.1962 973 +975 4 458.0896 118.0585 46.5777 0.2174 974 +976 4 458.4786 116.9832 46.5354 0.2669 975 +977 4 458.7772 115.8941 46.5024 0.264 976 +978 4 458.7028 114.7615 46.4845 0.3092 977 +979 4 458.4511 113.6468 46.4786 0.3787 978 +980 4 458.3688 112.5166 46.4769 0.3633 979 +981 4 458.5678 111.3925 46.478 0.4092 980 +982 4 458.7943 110.2769 46.4825 0.4791 981 +983 4 458.7726 109.1447 46.4738 0.4923 982 +984 4 458.5495 108.0296 46.4425 0.5088 983 +985 4 458.426 106.9197 46.4635 0.5412 984 +986 4 458.6159 105.8375 46.5979 0.5101 985 +987 4 458.9602 104.774 46.774 0.4331 986 +988 4 459.3629 103.7062 46.9039 0.3721 987 +989 4 459.8548 102.6748 46.9566 0.2567 988 +990 4 460.2964 101.6462 46.8916 0.1999 989 +991 4 460.5584 100.5822 46.6693 0.1989 990 +992 4 460.7586 99.4923 46.3817 0.223 991 +993 4 460.7815 98.3632 46.1723 0.1865 992 +994 4 460.6087 97.244 46.0225 0.1575 993 +995 4 460.5229 96.116 45.8797 0.1449 994 +996 4 460.6499 94.9882 45.8066 0.1515 995 +997 4 460.8295 93.8754 45.7548 0.1629 996 +998 4 460.7906 92.7744 45.6016 0.1882 997 +999 4 460.8261 91.7106 45.355 0.2156 998 +1000 4 461.2391 90.6607 45.1615 0.2342 999 +1001 4 461.731 89.6456 45.0864 0.2505 1000 +1002 4 461.9941 88.5712 45.0618 0.2266 1001 +1003 4 462.0136 87.434 45.047 0.2168 1002 +1004 4 462.319 86.3458 45.0274 0.2009 1003 +1005 4 462.8635 85.3454 44.9677 0.2234 1004 +1006 4 463.4069 84.3471 44.8588 0.2674 1005 +1007 4 463.7433 83.2754 44.716 0.3188 1006 +1008 4 463.7135 82.224 44.4816 0.3296 1007 +1009 4 463.4779 81.2004 44.27 0.294 1008 +1010 4 463.4561 80.1024 44.2565 0.2698 1009 +1011 4 463.8943 79.1013 44.3621 0.2433 1010 +1012 4 464.6997 78.3037 44.5287 0.2494 1011 +1013 4 465.6492 77.6988 44.7782 0.2428 1012 +1014 4 466.6193 77.134 45.1077 0.2575 1013 +1015 4 467.5837 76.5333 45.4367 0.2655 1014 +1016 4 468.5813 76.0437 45.6627 0.2685 1015 +1017 4 469.6143 75.6353 45.8755 0.2682 1016 +1018 4 470.5192 75.0505 46.2339 0.2274 1017 +1019 4 471.1919 74.2105 46.7323 0.1894 1018 +1020 4 471.6712 73.2605 47.3626 0.1804 1019 +1021 4 472.3633 72.5408 48.1228 0.2183 1020 +1022 4 473.4295 72.2775 48.8365 0.2555 1021 +1023 4 474.5255 71.9805 49.4696 0.2842 1022 +1024 4 475.5128 71.4552 50.1519 0.2471 1023 +1025 4 476.1385 70.6596 51.0166 0.2091 1024 +1026 4 476.2724 69.7799 52.1175 0.2318 1025 +1027 4 475.9303 69.2437 53.4853 0.2045 1026 +1028 4 475.6935 69.828 55.0306 0.1697 1027 +1029 4 476.3833 70.4217 56.5919 0.1482 1028 +1030 4 477.2962 70.8138 58.06 0.1576 1029 +1031 4 478.343 70.8773 59.3572 0.1725 1030 +1032 4 479.2708 70.6318 60.5399 0.2151 1031 +1033 4 480.1871 70.199 61.5919 0.2212 1032 +1034 4 481.0474 69.4609 62.3969 0.2443 1033 +1035 4 481.6858 68.5135 62.9432 0.3429 1034 +1036 4 482.2315 67.5389 63.2262 0.3686 1035 +1037 4 482.8504 66.5771 63.4122 0.2671 1036 +1038 4 483.34 65.8944 64.4 0.1144 1037 +1039 4 452.6579 133.2783 47.4706 0.2198 960 +1040 4 451.9166 132.426 47.5345 0.1856 1039 +1041 4 451.4922 131.3747 47.5563 0.1716 1040 +1042 4 451.2554 130.2593 47.6364 0.1836 1041 +1043 4 451.0014 129.1462 47.747 0.2243 1042 +1044 4 450.8275 128.0182 47.8842 0.2952 1043 +1045 4 450.6548 126.8993 48.0752 0.353 1044 +1046 4 450.339 125.8137 48.3056 0.314 1045 +1047 4 449.9546 124.7418 48.4924 0.224 1046 +1048 4 449.7705 123.6538 48.6223 0.1737 1047 +1049 4 450.0679 122.5762 48.8088 0.1752 1048 +1050 4 450.5072 121.582 49.1322 0.1952 1049 +1051 4 450.633 120.5238 49.5676 0.1895 1050 +1052 4 450.4523 119.4256 50.0503 0.1984 1051 +1053 4 450.2532 118.3159 50.531 0.237 1052 +1054 4 450.2818 117.1891 50.9544 0.3165 1053 +1055 4 450.6342 116.1068 51.3167 0.373 1054 +1056 4 451.0689 115.0589 51.6631 0.3606 1055 +1057 4 451.3744 113.9694 52.0318 0.3733 1056 +1058 4 451.7496 112.9087 52.416 0.3818 1057 +1059 4 452.3056 111.9873 52.8842 0.3068 1058 +1060 4 452.6797 111.0924 53.5206 0.2431 1059 +1061 4 452.9474 110.0669 54.1719 0.2396 1060 +1062 4 453.4724 109.0667 54.7179 0.3266 1061 +1063 4 454.2126 108.2115 55.2084 0.4241 1062 +1064 4 454.9917 107.4003 55.6648 0.4203 1063 +1065 4 455.5888 106.4648 56.084 0.4026 1064 +1066 4 455.8989 105.3769 56.4458 0.4287 1065 +1067 4 456.1197 104.2565 56.761 0.4414 1066 +1068 4 456.4366 103.1578 57.0553 0.3648 1067 +1069 4 456.7592 102.0671 57.3602 0.2948 1068 +1070 4 456.9445 101.0153 57.7643 0.2688 1069 +1071 4 457.0463 100.0083 58.3064 0.2445 1070 +1072 4 457.4776 99.0574 58.8616 0.2886 1071 +1073 4 458.18 98.1599 59.309 0.2997 1072 +1074 4 458.593 97.1384 59.6187 0.2268 1073 +1075 4 458.5701 96.0126 59.8587 0.1714 1074 +1076 4 458.8241 94.9504 60.0818 0.1609 1075 +1077 4 459.2737 93.9003 60.2974 0.1895 1076 +1078 4 459.3126 92.8449 60.6435 0.1972 1077 +1079 4 459.1627 91.8187 61.1702 0.1987 1078 +1080 4 459.1879 90.7135 61.7165 0.2308 1079 +1081 4 459.3652 89.5847 62.1992 0.2676 1080 +1082 4 459.5345 88.5053 62.718 0.3071 1081 +1083 4 459.6695 87.4627 63.3035 0.2831 1082 +1084 4 459.8594 86.3805 63.868 0.3008 1083 +1085 4 459.9898 85.2623 64.2743 0.2866 1084 +1086 4 460.0504 84.1387 64.5448 0.3159 1085 +1087 4 460.222 83.0237 64.8388 0.407 1086 +1088 4 460.6144 82.0034 65.228 0.3883 1087 +1089 4 461.1727 81.0458 65.6908 0.3671 1088 +1090 4 461.7001 80.0718 66.2368 0.3002 1089 +1091 4 461.9975 79.0006 66.8458 0.3443 1090 +1092 4 462.025 77.8653 67.433 0.3011 1091 +1093 4 461.9243 76.7494 68.0355 0.3352 1092 +1094 4 461.8728 75.7383 68.7551 0.265 1093 +1095 4 461.9632 74.6569 69.505 0.23 1094 +1096 4 461.938 73.5166 70.1576 0.2564 1095 +1097 4 461.8031 72.4183 70.8369 0.2503 1096 +1098 4 461.5376 71.4104 71.6069 0.2017 1097 +1099 4 461.0228 70.4861 72.4212 0.1652 1098 +1100 4 460.7586 69.3989 73.1923 0.1604 1099 +1101 4 460.6087 68.2683 73.8984 0.1918 1100 +1102 4 460.1271 67.2624 74.6267 0.1788 1101 +1103 4 459.554 66.3956 75.4491 0.169 1102 +1104 4 458.7451 65.6426 76.3076 0.1848 1103 +1105 4 457.8768 65.0358 77.2341 0.1641 1104 +1106 4 457.123 64.257 78.1749 0.1443 1105 +1107 4 456.6722 63.3892 79.1764 0.1273 1106 +1108 4 455.9 62.8307 80.1903 0.1145 1107 +1109 4 454.9688 63.1488 82.32 0.1144 1108 +1110 4 456.7363 375.0753 27.6873 0.184 25 +1111 4 456.6333 374.3157 25.3488 0.1305 1110 +1112 4 456.4857 373.5583 24.303 0.1389 1111 +1113 4 455.9835 372.7404 23.1876 0.1403 1112 +1114 4 455.1347 372.0414 22.1617 0.1429 1113 +1115 4 454.1348 371.6032 21.2269 0.1477 1114 +1116 4 453.0709 371.6192 20.3821 0.1572 1115 +1117 4 452.015 371.9373 19.6703 0.1728 1116 +1118 4 450.903 372.0734 19.08 0.2119 1117 +1119 4 449.7693 371.967 18.6193 0.2354 1118 +1120 4 448.6299 371.9384 18.2364 0.2348 1119 +1121 4 447.5385 372.0105 17.8222 0.196 1120 +1122 4 446.4906 371.7977 17.3615 0.1704 1121 +1123 4 445.4164 371.4522 16.9491 0.1669 1122 +1124 4 444.4188 371.8835 16.6839 0.2034 1123 +1125 4 443.5494 372.6191 16.5075 0.201 1124 +1126 4 442.5633 372.9623 16.2144 0.2116 1125 +1127 4 441.4673 372.7244 15.9363 0.2569 1126 +1128 4 440.3622 372.467 15.7883 0.3329 1127 +1129 4 439.2342 372.5184 15.6095 0.2854 1128 +1130 4 438.1829 372.9669 15.4875 0.1992 1129 +1131 4 437.1293 373.3078 15.5105 0.1399 1130 +1132 4 436.0631 373.7231 15.5453 0.1144 1131 +1133 4 434.9625 373.7105 15.2743 0.1144 1132 +1134 4 456.4617 376.5922 26.6965 0.2391 24 +1135 4 457.2591 376.3806 25.1351 0.164 1134 +1136 4 458.2658 376.3783 24.4426 0.1843 1135 +1137 4 459.3492 376.392 23.729 0.1734 1136 +1138 4 460.4611 376.4881 23.1704 0.1814 1137 +1139 4 461.5148 376.8679 22.7547 0.1743 1138 +1140 4 462.2492 377.6058 22.2993 0.1572 1139 +1141 4 462.8693 378.4649 21.7939 0.1447 1140 +1142 4 463.741 379.1559 21.3518 0.145 1141 +1143 4 464.6631 379.8286 20.9571 0.1517 1142 +1144 4 465.4295 380.6054 20.4929 0.1648 1143 +1145 4 466.2258 381.3821 20.0122 0.185 1144 +1146 4 467.0277 382.191 19.6022 0.2435 1145 +1147 4 467.745 383.0741 19.2272 0.2491 1146 +1148 4 468.2872 384.0614 18.8337 0.2044 1147 +1149 4 468.603 385.1539 18.4722 0.1614 1148 +1150 4 469.1876 386.1217 18.1215 0.1466 1149 +1151 4 470.1005 386.7178 17.6872 0.1523 1150 +1152 4 470.8075 387.5758 17.2122 0.1661 1151 +1153 4 471.4138 388.4223 16.6374 0.1891 1152 +1154 4 472.4148 388.8582 16.059 0.2462 1153 +1155 4 473.3861 389.4554 15.5861 0.2859 1154 +1156 4 474.1102 390.3408 15.228 0.3264 1155 +1157 4 474.6525 391.3475 14.9667 0.321 1156 +1158 4 475.0677 392.4126 14.7688 0.2496 1157 +1159 4 475.5288 393.4491 14.583 0.2189 1158 +1160 4 476.2575 394.259 14.3139 0.2381 1159 +1161 4 476.9508 395.1079 13.9884 0.3558 1160 +1162 4 477.6761 395.9773 13.7374 0.3062 1161 +1163 4 477.9758 397.0218 13.6368 0.2249 1162 +1164 4 478.7377 397.6727 13.7394 0.1751 1163 +1165 4 479.2605 398.6485 13.8002 0.1889 1164 +1166 4 479.5625 399.5923 13.6104 0.1749 1165 +1167 4 479.7925 400.5075 13.2147 0.1686 1166 +1168 4 480.1871 401.5532 12.8582 0.1772 1167 +1169 4 480.7351 402.4981 12.5936 0.2185 1168 +1170 4 481.0314 403.5689 12.3244 0.2604 1169 +1171 4 481.5862 404.5584 12.1849 0.1963 1170 +1172 4 482.3104 404.976 12.32 0.1144 1171 +1173 3 446.4277 405.5171 28.4586 0.2325 1 +1174 3 445.3054 405.6864 28.754 0.1472 1173 +1175 3 444.206 405.9953 28.8708 0.1588 1174 +1176 3 443.1421 406.406 28.9579 0.1885 1175 +1177 3 442.037 406.6977 29.0525 0.177 1176 +1178 3 440.9273 406.6897 29.2351 0.1667 1177 +1179 3 439.8657 406.8762 29.5142 0.1673 1178 +1180 3 439.2251 407.7868 29.6971 0.1904 1179 +1181 3 438.5444 408.6929 29.7724 0.2473 1180 +1182 3 437.6178 409.3598 29.8138 0.2854 1181 +1183 3 436.5653 409.8071 29.8295 0.346 1182 +1184 3 435.5631 410.3093 29.7606 0.2756 1183 +1185 3 434.4386 410.4672 29.7774 0.2366 1184 +1186 3 433.4902 409.8906 29.9401 0.2769 1185 +1187 3 432.6654 409.147 30.2165 0.2673 1186 +1188 3 431.7387 408.4812 30.4427 0.3176 1187 +1189 3 430.8762 407.7811 30.5654 0.3087 1188 +1190 3 429.8729 407.2388 30.7462 0.3311 1189 +1191 3 428.8845 407.0524 31.1114 0.2977 1190 +1192 3 427.7656 407.1359 31.4919 0.2568 1191 +1193 3 426.3963 407.6575 31.8707 0.2474 1192 +1194 3 425.2717 407.7273 32.24 0.2098 1193 +1195 3 424.138 407.6003 32.4996 0.1961 1194 +1196 3 423.0077 407.6884 32.6144 0.2548 1195 +1197 3 421.8866 407.8738 32.7116 0.3006 1196 +1198 3 420.7518 407.9504 32.8163 0.3761 1197 +1199 3 419.61 408.0053 32.8964 0.3263 1198 +1200 3 418.4912 408.2398 32.9552 0.3714 1199 +1201 3 417.393 408.5624 33.0047 0.3181 1200 +1202 3 416.2627 408.7375 33.0422 0.3453 1201 +1203 3 415.1313 408.5819 33.061 0.4358 1202 +1204 3 413.9873 408.5418 33.0728 0.4284 1203 +1205 3 412.9634 409.0441 33.0876 0.3679 1204 +1206 3 411.9899 409.6447 33.1052 0.35 1205 +1207 3 410.9008 409.9936 33.1243 0.3113 1206 +1208 3 409.7808 410.2258 33.1503 0.3847 1207 +1209 3 408.702 410.5301 33.2503 0.3849 1208 +1210 3 407.6118 410.8733 33.3337 0.3685 1209 +1211 3 406.7114 411.53 33.2914 0.2994 1210 +1212 3 405.7024 412.0677 33.227 0.2448 1211 +1213 3 404.6465 412.507 33.1657 0.2426 1212 +1214 3 403.5563 412.8536 33.1094 0.33 1213 +1215 3 402.4192 412.9783 33.0602 0.392 1214 +1216 3 401.2763 413.024 33.031 0.4227 1215 +1217 3 400.1563 413.2563 33.0221 0.4302 1216 +1218 3 399.0249 413.4267 33.0151 0.4549 1217 +1219 3 397.8809 413.445 33.0033 0.4479 1218 +1220 3 396.7369 413.4622 32.9882 0.3484 1219 +1221 3 395.6021 413.6029 32.9708 0.3556 1220 +1222 3 394.4649 413.4702 32.951 0.3507 1221 +1223 3 393.3266 413.3615 32.9179 0.4322 1222 +1224 3 392.3863 412.8147 32.765 0.3725 1223 +1225 3 391.2755 412.849 32.7942 0.2568 1224 +1226 3 390.1406 412.9874 32.8168 0.1797 1225 +1227 3 388.9966 413.0046 32.83 0.1698 1226 +1228 3 387.9361 413.1636 32.8051 0.2399 1227 +1229 3 386.8081 413.3421 32.7606 0.2529 1228 +1230 3 385.671 413.4393 32.7303 0.268 1229 +1231 3 384.5327 413.5377 32.6917 0.2482 1230 +1232 3 383.4036 413.7184 32.655 0.2252 1231 +1233 3 382.2893 413.9301 32.5822 0.2557 1232 +1234 3 381.1808 414.1474 32.4716 0.2653 1233 +1235 3 380.0608 414.3179 32.4173 0.2902 1234 +1236 3 378.9431 414.4872 32.4548 0.2954 1235 +1237 3 377.8701 414.8304 32.4904 0.2777 1236 +1238 3 376.7844 415.169 32.5125 0.3004 1237 +1239 3 375.6839 415.4333 32.6012 0.3427 1238 +1240 3 374.565 415.6404 32.7331 0.2996 1239 +1241 3 373.4336 415.7971 32.877 0.2316 1240 +1242 3 372.3079 415.9904 33.0249 0.2169 1241 +1243 3 371.1742 416.1311 33.1736 0.2214 1242 +1244 3 370.0806 416.4343 33.3259 0.2588 1243 +1245 3 369.0315 416.8484 33.5205 0.2643 1244 +1246 3 367.931 417.0624 33.7434 0.2302 1245 +1247 3 366.7927 417.1207 33.9458 0.2012 1246 +1248 3 365.6579 417.2431 34.1149 0.2161 1247 +1249 3 364.5219 417.3209 34.2762 0.2534 1248 +1250 3 363.3962 417.4856 34.4193 0.2269 1249 +1251 3 362.3048 417.655 34.4386 0.1742 1250 +1252 3 361.234 417.8105 34.533 0.1418 1251 +1253 3 360.106 417.8517 34.6066 0.1373 1252 +1254 3 358.9735 417.981 34.6536 0.1373 1253 +1255 3 357.8775 418.2807 34.743 0.1373 1254 +1256 3 356.8056 418.6068 34.911 0.1373 1255 +1257 3 355.7142 418.8378 35.1431 0.1373 1256 +1258 3 354.6228 419.1593 35.3002 0.1373 1257 +1259 3 353.5681 419.5975 35.3954 0.1373 1258 +1260 3 352.5568 420.126 35.4242 0.1373 1259 +1261 3 351.6473 420.8032 35.3833 0.1373 1260 +1262 3 350.5353 420.9794 35.3427 0.1373 1261 +1263 3 349.4005 421.1293 35.3338 0.1373 1262 +1264 3 348.4818 421.7184 35.3786 0.1373 1263 +1265 3 347.8607 422.6714 35.474 0.1373 1264 +1266 3 347.2852 423.59 35.7011 0.1373 1265 +1267 3 346.6434 424.4755 36.0175 0.1373 1266 +1268 3 345.7111 425.0052 36.3625 0.1373 1267 +1269 3 344.6552 425.2786 36.7584 0.1373 1268 +1270 3 343.5489 425.5726 37.0667 0.1373 1269 +1271 3 342.4267 425.7785 37.296 0.1373 1270 +1272 3 341.3181 426.0428 37.4559 0.1373 1271 +1273 3 340.2245 426.2292 37.5698 0.1373 1272 +1274 3 339.0953 426.3013 37.6608 0.1373 1273 +1275 3 338.0646 426.68 37.8538 0.1373 1274 +1276 3 336.9217 426.6273 38.0209 0.1372 1275 +1277 3 335.9425 426.0645 38.1648 0.1372 1276 +1278 3 334.8911 426.4191 38.2886 0.1371 1277 +1279 3 333.9473 427.0174 38.3947 0.1369 1278 +1280 3 332.8811 427.3904 38.5437 0.1366 1279 +1281 3 331.8206 427.7805 38.7181 0.1362 1280 +1282 3 330.7601 428.2061 38.8632 0.1354 1281 +1283 3 329.6665 428.5401 38.9802 0.1342 1282 +1284 3 328.5648 428.8364 39.102 0.1327 1283 +1285 3 327.4837 429.1785 39.2151 0.1309 1284 +1286 3 326.5262 429.8054 39.2874 0.1273 1285 +1287 3 325.6774 430.5696 39.3327 0.1144 1286 +1288 3 324.7027 431.169 39.363 0.1144 1287 +1289 3 323.7291 431.7696 39.3845 0.1144 1288 +1290 3 388.5104 412.9142 33.2422 0.3183 1227 +1291 3 387.4625 413.1808 32.8521 0.2075 1290 +1292 3 386.6583 413.9335 32.6584 0.1547 1291 +1293 3 385.8048 414.6359 32.5531 0.1375 1292 +1294 3 384.8016 415.1507 32.4996 0.1377 1293 +1295 3 383.8886 415.836 32.4814 0.138 1294 +1296 3 382.906 416.4114 32.4775 0.1386 1295 +1297 3 382.048 417.099 32.482 0.1398 1296 +1298 3 381.4576 418.0737 32.522 0.1419 1297 +1299 3 380.8845 419.0598 32.5472 0.1459 1298 +1300 3 380.2656 420.0162 32.536 0.1534 1299 +1301 3 379.5643 420.9028 32.5052 0.1669 1300 +1302 3 378.6892 421.6155 32.5256 0.197 1301 +1303 3 377.7717 422.2607 32.6376 0.2283 1302 +1304 3 376.956 423.0318 32.7818 0.2347 1303 +1305 3 376.2765 423.9458 32.9347 0.2076 1304 +1306 3 375.6713 424.9022 33.0534 0.1708 1305 +1307 3 375.2503 425.8712 33.0274 0.1567 1306 +1308 3 374.8167 426.8653 32.9552 0.1634 1307 +1309 3 374.2356 427.7324 33.0669 0.1853 1308 +1310 3 373.6979 428.571 33.4085 0.2348 1309 +1311 3 373.3204 429.6017 33.7907 0.2957 1310 +1312 3 372.9394 430.668 34.1799 0.3196 1311 +1313 3 372.3857 431.6598 34.5223 0.2647 1312 +1314 3 371.7989 432.6402 34.7656 0.2253 1313 +1315 3 371.2646 433.6504 34.9244 0.1892 1314 +1316 3 370.3883 434.3173 35.0762 0.1729 1315 +1317 3 369.4788 434.9305 35.3153 0.1844 1316 +1318 3 368.495 435.483 35.5365 0.1746 1317 +1319 3 367.4711 435.9761 35.7538 0.1595 1318 +1320 3 366.5342 436.6202 35.9467 0.1509 1319 +1321 3 365.6213 437.3089 36.0923 0.1553 1320 +1322 3 364.7438 438.0262 36.1407 0.1801 1321 +1323 3 363.8801 438.772 36.1617 0.1713 1322 +1324 3 362.974 439.4665 36.2032 0.1537 1323 +1325 3 361.9868 440.0407 36.2485 0.14 1324 +1326 3 360.9503 440.5064 36.3448 0.1373 1325 +1327 3 359.8463 440.7386 36.5044 0.1373 1326 +1328 3 358.7481 441.0406 36.6629 0.1373 1327 +1329 3 357.6888 441.4662 36.7895 0.1373 1328 +1330 3 356.5917 441.7773 36.9334 0.1373 1329 +1331 3 355.5026 442.1114 37.1168 0.1373 1330 +1332 3 354.3929 442.3756 37.3215 0.1373 1331 +1333 3 353.2683 442.5072 37.5777 0.1373 1332 +1334 3 352.1735 442.752 37.9 0.1373 1333 +1335 3 351.1073 443.1341 38.2424 0.1373 1334 +1336 3 350.0434 443.5311 38.584 0.1373 1335 +1337 3 348.9795 443.9269 38.9158 0.1373 1336 +1338 3 347.9156 444.3239 39.2347 0.1374 1337 +1339 3 346.8265 444.6545 39.5259 0.1374 1338 +1340 3 345.6916 444.778 39.774 0.1376 1339 +1341 3 344.5488 444.7872 39.9862 0.1379 1340 +1342 3 343.4094 444.8833 40.1853 0.1384 1341 +1343 3 342.3088 445.191 40.4205 0.1393 1342 +1344 3 341.1991 445.4198 40.7408 0.1411 1343 +1345 3 340.0609 445.4862 41.102 0.1439 1344 +1346 3 338.9603 445.7779 41.4971 0.152 1345 +1347 3 338.0177 445.8317 42.0955 0.1525 1346 +1348 3 337.2512 445.4736 43.96 0.2288 1347 +1349 3 391.6873 412.5539 31.6478 0.228 1224 +1350 3 390.6634 412.126 30.508 0.1753 1349 +1351 3 389.6247 411.6981 30.0689 0.2209 1350 +1352 3 388.6477 411.3252 29.5098 0.1877 1351 +1353 3 387.6741 411.1181 28.7848 0.1654 1352 +1354 3 386.7292 410.9191 27.9356 0.1674 1353 +1355 3 385.8346 410.4192 27.1193 0.1932 1354 +1356 3 384.8542 409.838 26.4535 0.2439 1355 +1357 3 383.7697 409.6961 25.862 0.3345 1356 +1358 3 382.668 409.6664 25.268 0.313 1357 +1359 3 381.5904 409.4387 24.6535 0.2377 1358 +1360 3 380.539 409.3346 23.9616 0.1976 1359 +1361 3 379.5815 408.8462 23.2669 0.2386 1360 +1362 3 378.5702 408.3348 22.6023 0.2491 1361 +1363 3 377.6367 408.4274 21.8174 0.1995 1362 +1364 3 376.9411 408.7329 20.8621 0.1551 1363 +1365 3 375.812 408.7775 20.0953 0.1451 1364 +1366 3 374.7012 408.726 19.4569 0.1532 1365 +1367 3 373.6773 409.1996 18.9085 0.167 1366 +1368 3 372.7152 409.5097 18.3462 0.1949 1367 +1369 3 371.7451 408.9606 17.8744 0.233 1368 +1370 3 370.9637 408.1792 17.4361 0.2011 1369 +1371 3 370.2739 407.3887 16.8995 0.1834 1370 +1372 3 369.6104 406.5261 16.361 0.2048 1371 +1373 3 368.6689 405.8843 15.8521 0.2176 1372 +1374 3 367.6416 405.4782 15.3501 0.1814 1373 +1375 3 366.5536 405.5617 14.8326 0.1537 1374 +1376 3 365.7345 406.2184 14.3077 0.1495 1375 +1377 3 365.4211 407.2537 13.7865 0.1525 1376 +1378 3 364.8216 407.4928 12.32 0.2288 1377 +1379 3 427.1261 407.1118 32.6474 0.165 1192 +1380 3 426.1926 406.6417 33.9534 0.1354 1379 +1381 3 425.6824 405.683 34.4848 0.149 1380 +1382 3 425.2225 404.6763 35.1316 0.1601 1381 +1383 3 424.6665 403.7187 35.8708 0.176 1382 +1384 3 424.09 402.998 36.7996 0.2279 1383 +1385 3 423.2846 402.6194 37.875 0.2104 1384 +1386 3 422.1978 402.8093 38.8637 0.1835 1385 +1387 3 421.0721 402.7566 39.767 0.174 1386 +1388 3 420.0333 403.0644 40.6566 0.1963 1387 +1389 3 419.3904 403.832 41.5892 0.2856 1388 +1390 3 418.6537 404.6854 41.4882 0.1218 1389 +1391 3 417.9455 405.5411 42.1784 0.1512 1390 +1392 3 417.036 406.0022 42.5513 0.1671 1391 +1393 3 415.9504 406.0159 42.9988 0.1791 1392 +1394 3 414.8968 406.1909 43.4134 0.1598 1393 +1395 3 413.9278 406.7744 43.8452 0.1441 1394 +1396 3 413.0549 407.4036 44.347 0.1377 1395 +1397 3 412.3216 408.2158 44.8904 0.1381 1396 +1398 3 411.546 409.0406 45.4157 0.1388 1397 +1399 3 410.6674 409.7453 45.9021 0.1401 1398 +1400 3 409.7511 410.4214 46.3504 0.1427 1399 +1401 3 409.0383 411.1078 46.9549 0.1476 1400 +1402 3 408.4274 411.9132 47.7084 0.1577 1401 +1403 3 407.8417 412.7518 48.5887 0.173 1402 +1404 3 407.5306 413.7962 49.4091 0.2265 1403 +1405 3 407.4219 414.9219 50.2141 0.202 1404 +1406 3 407.3258 415.6735 51.2364 0.1667 1405 +1407 3 406.8819 416.2604 52.4118 0.1399 1406 +1408 3 406.5376 417.2957 53.4674 0.1378 1407 +1409 3 406.5547 418.4249 54.3995 0.1382 1408 +1410 3 406.5765 419.5334 55.295 0.1391 1409 +1411 3 406.5833 420.6305 56.1582 0.1407 1410 +1412 3 406.2047 421.5308 57.0648 0.144 1411 +1413 3 405.5503 422.4277 57.8617 0.1505 1412 +1414 3 405.0298 423.0764 58.8266 0.1669 1413 +1415 3 404.7266 423.9149 59.8388 0.1796 1414 +1416 3 404.3251 424.9651 60.6774 0.1603 1415 +1417 3 403.5986 425.8117 61.3539 0.1447 1416 +1418 3 402.9042 426.6388 61.9301 0.1373 1417 +1419 3 402.6365 427.6524 62.5139 0.1373 1418 +1420 3 402.3105 428.6488 63.04 0.1373 1419 +1421 3 401.8918 429.7093 63.4516 0.1373 1420 +1422 3 401.6138 430.8155 63.8196 0.1372 1421 +1423 3 401.512 431.9366 64.2225 0.1372 1422 +1424 3 401.5509 433.052 64.7318 0.1372 1423 +1425 3 401.4548 434.1629 65.3282 0.1371 1424 +1426 3 401.0143 434.966 66.1391 0.1369 1425 +1427 3 400.6128 435.8651 67.1208 0.1365 1426 +1428 3 400.3828 436.9657 68.1506 0.1358 1427 +1429 3 400.2719 437.9381 69.3045 0.1346 1428 +1430 3 400.0202 438.7217 70.6051 0.1321 1429 +1431 3 399.3681 438.7389 71.9846 0.1276 1430 +1432 3 399.2457 438.3648 73.4432 0.1148 1431 +1433 3 399.0272 437.3512 76.16 0.1144 1432 +1434 3 419.3103 402.8974 42.6082 0.2247 1389 +1435 3 419.2428 401.8083 43.5176 0.1735 1434 +1436 3 418.7898 400.8096 44.3344 0.1373 1435 +1437 3 418.2052 399.8555 45.017 0.1374 1436 +1438 3 417.7957 398.7927 45.4877 0.1374 1437 +1439 3 417.7041 397.6624 45.7859 0.1375 1438 +1440 3 417.2179 396.6282 46.0023 0.1378 1439 +1441 3 416.8141 395.5643 46.2059 0.1382 1440 +1442 3 416.3451 394.5519 46.3935 0.1391 1441 +1443 3 415.9355 393.5863 46.7429 0.1406 1442 +1444 3 415.3178 392.7066 47.1943 0.1436 1443 +1445 3 414.6886 391.8006 47.6594 0.1493 1444 +1446 3 414.0674 390.8453 48.0256 0.1599 1445 +1447 3 413.3558 389.9587 48.2538 0.1811 1446 +1448 3 412.5939 389.1122 48.3778 0.2097 1447 +1449 3 412.0024 388.1535 48.4358 0.2039 1448 +1450 3 411.5746 387.1033 48.4792 0.1693 1449 +1451 3 411.0484 386.1206 48.6184 0.1454 1450 +1452 3 410.6685 385.0944 48.8351 0.1373 1451 +1453 3 410.2418 384.0683 49.0456 0.1373 1452 +1454 3 409.655 383.1039 49.2859 0.1373 1453 +1455 3 409.2065 382.0571 49.5057 0.1373 1454 +1456 3 408.9606 380.9509 49.6628 0.1373 1455 +1457 3 408.5945 379.8984 49.7546 0.1373 1456 +1458 3 407.9618 378.9511 49.845 0.1373 1457 +1459 3 407.2228 378.1526 50.0265 0.1373 1458 +1460 3 406.6783 377.2374 50.1357 0.1373 1459 +1461 3 406.136 376.2559 50.1558 0.1373 1460 +1462 3 405.5469 375.2789 50.1558 0.1373 1461 +1463 3 405.2426 374.2184 50.2144 0.1373 1462 +1464 3 405.0824 373.2163 50.4101 0.1373 1463 +1465 3 404.8284 372.1501 50.591 0.1373 1464 +1466 3 404.4543 371.093 50.6097 0.1373 1465 +1467 3 404.3113 370.0668 50.3913 0.1373 1466 +1468 3 404.2667 369.0624 49.9621 0.1373 1467 +1469 3 403.7714 368.1472 49.4519 0.1373 1468 +1470 3 403.443 367.0993 48.9857 0.1373 1469 +1471 3 403.2646 365.9748 48.7088 0.1373 1470 +1472 3 403.1948 364.8353 48.6774 0.1373 1471 +1473 3 402.8402 363.7645 48.8905 0.1373 1472 +1474 3 402.1972 363.2555 49.5026 0.1373 1473 +1475 3 401.87 362.4684 50.3227 0.1372 1474 +1476 3 401.4776 361.4697 51.0958 0.1372 1475 +1477 3 401.3038 360.5808 51.9677 0.1371 1476 +1478 3 400.8839 359.7319 52.7366 0.1369 1477 +1479 3 400.3806 358.7515 53.2619 0.1366 1478 +1480 3 400.2959 357.6236 53.5928 0.1359 1479 +1481 3 400.2238 356.5013 53.7552 0.1345 1480 +1482 3 399.8211 355.5026 53.7513 0.1317 1481 +1483 3 399.4219 354.7395 53.9823 0.1273 1482 +1484 3 399.1725 353.6527 54.2648 0.1144 1483 +1485 3 398.9128 352.5808 55.16 0.1144 1484 +1486 3 451.6432 409.2317 26.2549 0.1257 1 +1487 3 451.7473 410.3471 25.4079 0.1554 1486 +1488 3 451.7587 411.451 25.027 0.1705 1487 +1489 3 451.7176 412.5653 24.5811 0.2008 1488 +1490 3 451.546 413.6841 24.1367 0.2462 1489 +1491 3 451.1742 414.7595 23.7108 0.2773 1490 +1492 3 450.7772 415.8097 23.2649 0.2834 1491 +1493 3 450.7955 416.8828 22.8067 0.2426 1492 +1494 3 451.4659 417.7579 22.3606 0.2531 1493 +1495 3 452.3456 418.4008 21.8517 0.2807 1494 +1496 3 452.6831 419.1639 21.1911 0.2407 1495 +1497 3 452.3788 420.1123 20.5052 0.2059 1496 +1498 3 452.2198 421.2208 19.9337 0.1692 1497 +1499 3 452.2175 422.3122 19.3866 0.163 1498 +1500 3 452.1385 423.4253 18.926 0.177 1499 +1501 3 451.6844 424.2604 18.7687 0.2103 1500 +1502 3 451.6409 425.2557 18.7543 0.2869 1501 +1503 3 451.8148 426.3368 18.6451 0.3619 1502 +1504 3 451.5334 427.3755 18.4339 0.3169 1503 +1505 3 451.0986 428.3514 18.3635 0.2962 1504 +1506 3 450.6376 429.389 18.2893 0.2373 1505 +1507 3 450.3882 430.4575 18.0703 0.2374 1506 +1508 3 450.3093 431.4504 17.7032 0.2952 1507 +1509 3 450.2521 432.5441 17.5003 0.3127 1508 +1510 3 449.6755 433.4593 17.4504 0.3852 1509 +1511 3 449.2191 434.442 17.2857 0.3781 1510 +1512 3 448.8736 435.4419 17.1124 0.3292 1511 +1513 3 448.5063 436.5126 17.0073 0.2725 1512 +1514 3 447.9755 437.5171 16.9145 0.2232 1513 +1515 3 447.4367 438.4952 16.7595 0.194 1514 +1516 3 447.2502 439.4905 16.7174 0.2084 1515 +1517 3 447.3246 440.5773 16.7674 0.2338 1516 +1518 3 447.5454 441.6732 16.7193 0.2299 1517 +1519 3 447.3921 442.7543 16.6057 0.2386 1518 +1520 3 446.7835 443.7096 16.4985 0.2539 1519 +1521 3 446.3659 444.7369 16.2912 0.2761 1520 +1522 3 446.0696 445.7871 15.958 0.2157 1521 +1523 3 445.6852 446.8578 15.6447 0.1665 1522 +1524 3 445.254 447.916 15.412 0.1394 1523 +1525 3 444.3925 448.6528 15.2332 0.1375 1524 +1526 3 443.3755 449.1458 15.0444 0.1376 1525 +1527 3 442.8104 450.0427 14.7754 0.1379 1526 +1528 3 442.6067 451.1478 14.6614 0.1385 1527 +1529 3 442.4969 452.2781 14.6308 0.1395 1528 +1530 3 442.2212 453.3352 14.7075 0.1417 1529 +1531 3 441.425 454.1417 14.7143 0.1458 1530 +1532 3 441.0097 455.161 14.6558 0.1544 1531 +1533 3 440.8759 456.2409 14.5865 0.1711 1532 +1534 3 440.5247 457.2351 14.4296 0.2009 1533 +1535 3 440.6093 458.3539 14.2143 0.269 1534 +1536 3 440.2753 459.3995 13.991 0.3277 1535 +1537 3 439.6014 460.2449 13.6943 0.3194 1536 +1538 3 438.9814 461.1281 13.4264 0.2716 1537 +1539 3 438.7835 462.1783 13.2032 0.2224 1538 +1540 3 439.002 463.2685 12.9849 0.1907 1539 +1541 3 438.9665 464.369 12.849 0.1652 1540 +1542 3 438.8373 464.9674 13.0635 0.16 1541 +1543 3 438.8361 465.9764 13.3689 0.1727 1542 +1544 3 438.5135 466.7085 13.3383 0.2192 1543 +1545 3 438.1486 467.7175 13.1745 0.2167 1544 +1546 3 438.3808 468.8112 12.88 0.3432 1545 +1547 3 453.1624 408.5464 20.3322 0.136 1 +1548 3 453.6887 409.2248 18.4805 0.1689 1547 +1549 3 454.2732 409.8128 17.6172 0.2059 1548 +1550 3 455.0134 410.5084 16.768 0.2176 1549 +1551 3 455.9778 411.0838 16.0835 0.1817 1550 +1552 3 456.9822 411.5197 15.4616 0.154 1551 +1553 3 457.8071 412.1706 14.8687 0.1467 1552 +1554 3 458.6628 412.873 14.4047 0.1537 1553 +1555 3 459.6386 413.4496 14.1271 0.174 1554 +1556 3 460.5229 414.144 13.9873 0.1752 1555 +1557 3 461.3729 414.8727 13.8606 0.1567 1556 +1558 3 462.3579 415.1656 13.6832 0.1419 1557 +1559 3 463.4184 414.9791 13.5134 0.1374 1558 +1560 3 464.5018 414.652 13.4539 0.1376 1559 +1561 3 465.4238 414.0273 13.5847 0.1379 1560 +1562 3 466.021 413.1453 13.993 0.1384 1561 +1563 3 466.6365 412.4257 14.724 0.1393 1562 +1564 3 467.3892 412.0219 15.7149 0.141 1563 +1565 3 468.1728 411.7016 16.8468 0.1446 1564 +1566 3 469.0858 411.419 17.9561 0.1488 1565 +1567 3 470.1142 411.3687 18.9276 0.1689 1566 +1568 3 471.2285 411.3652 19.6483 0.1461 1567 +1569 3 471.9 411.1536 19.6 0.1144 1568 +1570 2 450.8344 409.2854 28.3405 0.1578 1 +1571 2 450.784 410.426 28.1442 0.2395 1570 +1572 2 450.6044 411.5471 28.058 0.3332 1571 +1573 2 450.2578 412.6236 27.9048 0.4729 1572 +1574 2 449.8311 413.675 27.7117 0.5871 1573 +1575 2 449.3895 414.7286 27.5251 0.6034 1574 +1576 2 448.9456 415.7822 27.3586 0.489 1575 +1577 2 448.5384 416.8461 27.1913 0.3643 1576 +1578 2 448.1448 417.9066 27.011 0.3252 1577 +1579 2 447.6712 418.9362 26.8435 0.286 1578 +1580 2 447.0992 419.9246 26.7268 0.238 1579 +1581 2 446.5329 420.9176 26.6715 0.2413 1580 +1582 2 446.0845 421.9644 26.6835 0.2587 1581 +1583 2 445.7504 423.0489 26.7789 0.2666 1582 +1584 2 445.4347 424.1369 26.9412 0.2631 1583 +1585 2 445.0698 425.2156 27.1118 0.2499 1584 +1586 2 444.7106 426.3002 27.2543 0.2336 1585 +1587 2 444.3571 427.387 27.3681 0.186 1586 +1588 2 443.991 428.4623 27.4189 0.1607 1587 +1589 2 443.7347 429.5651 27.4102 0.1577 1588 +1590 2 443.5746 430.6943 27.3766 0.1732 1589 +1591 2 443.5917 431.8131 27.3821 0.2173 1590 +1592 2 443.8457 432.8759 27.501 0.2256 1591 +1593 2 444.0356 433.8769 27.7511 0.1987 1592 +1594 2 443.9578 434.9168 27.8963 0.1966 1593 +1595 2 443.9544 435.9715 27.791 0.1957 1594 +1596 2 444.1534 437.056 27.541 0.1952 1595 +1597 2 444.4188 438.1474 27.195 0.2189 1596 +1598 2 444.5206 439.2434 26.7647 0.2601 1597 +1599 2 444.7769 440.3313 26.3609 0.2422 1598 +1600 2 444.8638 441.4479 26.0291 0.2026 1599 +1601 2 444.5916 442.545 25.7786 0.201 1600 +1602 2 444.571 443.6546 25.6574 0.2017 1601 +1603 2 444.9119 444.7334 25.5852 0.2058 1602 +1604 2 445.1476 445.8454 25.5012 0.256 1603 +1605 2 445.1784 446.9848 25.4061 0.2583 1604 +1606 2 445.1476 448.1265 25.2881 0.2854 1605 +1607 2 445.1052 449.2671 25.1365 0.2732 1606 +1608 2 445.0755 450.41 24.9728 0.2493 1607 +1609 2 445.119 451.5528 24.7945 0.1969 1608 +1610 2 445.2963 452.6774 24.5818 0.164 1609 +1611 2 445.5502 453.7905 24.3545 0.1552 1610 +1612 2 445.4278 454.8178 23.9818 0.1671 1611 +1613 2 444.9153 455.765 23.5277 0.1915 1612 +1614 2 444.6591 456.8656 23.1257 0.2456 1613 +1615 2 444.3513 457.9318 22.8943 0.3026 1614 +1616 2 443.8205 458.8447 22.5751 0.313 1615 +1617 2 443.5608 459.8994 22.21 0.233 1616 +1618 2 443.1639 460.8982 22.0728 0.1805 1617 +1619 2 442.7623 461.9575 21.8953 0.1723 1618 +1620 2 442.2155 462.9585 21.6952 0.2011 1619 +1621 2 441.7213 463.9881 21.4924 0.2694 1620 +1622 2 441.4467 465.0623 21.2456 0.2681 1621 +1623 2 441.7945 466.0141 20.8609 0.2378 1622 +1624 2 442.4946 466.895 20.5818 0.2455 1623 +1625 2 443.1101 467.8434 20.3368 0.2602 1624 +1626 2 443.3435 468.9496 20.0616 0.2085 1625 +1627 2 443.2176 470.041 19.7314 0.1715 1626 +1628 2 442.8287 471.0226 19.3055 0.1655 1627 +1629 2 442.855 472.1082 18.8497 0.1833 1628 +1630 2 443.0552 473.2305 18.4445 0.1663 1629 +1631 2 443.1009 474.3688 18.1239 0.1541 1630 +1632 2 443.006 475.5059 17.91 0.1517 1631 +1633 2 442.8596 476.6259 17.7324 0.164 1632 +1634 2 442.6902 477.7252 17.5119 0.19 1633 +1635 2 442.7841 478.8441 17.2861 0.2255 1634 +1636 2 443.0746 479.9412 17.0391 0.2333 1635 +1637 2 442.9625 480.9902 16.8063 0.2086 1636 +1638 2 442.3436 481.9523 16.6156 0.1672 1637 +1639 2 441.8666 482.9625 16.4321 0.1446 1638 +1640 2 441.6504 484.0653 16.2238 0.1374 1639 +1641 2 441.6149 485.2036 16.0289 0.1375 1640 +1642 2 441.7144 486.3338 15.8165 0.1378 1641 +1643 2 441.6755 487.4412 15.5695 0.1382 1642 +1644 2 441.4124 488.5429 15.3321 0.139 1643 +1645 2 441.1287 489.648 15.1411 0.1405 1644 +1646 2 440.8301 490.7485 15.0163 0.1432 1645 +1647 2 440.4823 491.8285 14.9906 0.1485 1646 +1648 2 440.0419 492.8741 15.0234 0.1573 1647 +1649 2 439.4848 493.8637 15.0824 0.1804 1648 +1650 2 438.9688 494.8715 15.1384 0.1902 1649 +1651 2 438.8109 495.972 15.102 0.1836 1650 +1652 2 439.0169 497.0772 14.9878 0.2005 1651 +1653 2 439.4802 498.1148 14.848 0.2081 1652 +1654 2 439.7788 499.2004 14.6896 0.2344 1653 +1655 2 439.717 500.3295 14.5378 0.2142 1654 +1656 2 439.4424 501.4083 14.3399 0.174 1655 +1657 2 439.0089 502.4391 14.1163 0.1459 1656 +1658 2 438.5055 503.4584 13.9595 0.1381 1657 +1659 2 438.0273 504.488 13.9009 0.1389 1658 +1660 2 437.7276 505.5828 13.89 0.1403 1659 +1661 2 437.8546 506.6959 13.899 0.1428 1660 +1662 2 438.1486 507.8022 13.9191 0.1481 1661 +1663 2 438.2687 508.9347 13.9301 0.1554 1662 +1664 2 438.6474 509.9918 13.8741 0.1809 1663 +1665 2 439.0443 511.0465 13.8485 0.1715 1664 +1666 2 438.835 512.1242 13.7746 0.1545 1665 +1667 2 438.4403 513.1641 13.611 0.1421 1666 +1668 2 437.7653 514.061 13.4278 0.1422 1667 +1669 2 437.1018 514.9865 13.2685 0.1463 1668 +1670 2 436.5939 516.0069 13.1619 0.1548 1669 +1671 2 436.5801 517.1029 13.2133 0.1683 1670 +1672 2 436.3605 518.2194 13.3242 0.2057 1671 +1673 2 435.8423 519.2193 13.5136 0.2158 1672 +1674 2 435.1398 520.107 13.624 0.1912 1673 +1675 2 434.9488 521.2064 14.0 0.1144 1674 +1676 3 453.6738 406.2207 34.4789 0.1873 1 +1677 3 454.6542 406.7709 34.8692 0.1591 1676 +1678 3 455.7204 407.1668 35.0409 0.1764 1677 +1679 3 456.8598 407.1748 35.2338 0.2351 1678 +1680 3 457.7144 407.9252 35.4231 0.1969 1679 +1681 3 457.4925 409.1287 35.5928 0.1547 1680 +1682 3 457.6297 410.1881 35.7862 0.1389 1681 +1683 3 457.9981 411.0838 36.0637 0.1406 1682 +1684 3 458.7429 411.5906 36.3952 0.1438 1683 +1685 3 459.8068 411.9979 36.6139 0.1494 1684 +1686 3 460.8043 412.5493 36.7279 0.1607 1685 +1687 3 461.7218 413.0812 36.6248 0.1803 1686 +1688 3 462.6485 413.6944 36.4048 0.2314 1687 +1689 3 463.6415 414.255 36.1654 0.254 1688 +1690 3 464.5715 414.9162 35.9937 0.3267 1689 +1691 3 465.4181 415.6838 35.8789 0.3823 1690 +1692 3 466.4385 416.1746 35.7809 0.3566 1691 +1693 3 467.57 416.2833 35.7806 0.2469 1692 +1694 3 468.7002 416.3702 35.8683 0.1789 1693 +1695 3 469.8076 416.607 35.9047 0.1641 1694 +1696 3 470.8841 416.9869 35.9355 0.1841 1695 +1697 3 472.0144 417.1493 36.0242 0.2356 1696 +1698 3 473.155 417.1619 36.1651 0.265 1697 +1699 3 474.2772 417.0258 36.3782 0.296 1698 +1700 3 474.6765 417.0692 36.5901 0.2391 1699 +1701 3 475.7896 417.3312 36.8122 0.2311 1700 +1702 3 476.0996 417.0807 37.1479 0.2149 1701 +1703 3 477.0068 416.6093 37.5514 0.2134 1702 +1704 3 478.1154 416.3668 37.9053 0.2139 1703 +1705 3 479.2513 416.2524 38.2068 0.232 1704 +1706 3 480.3759 416.2753 38.5182 0.2177 1705 +1707 3 481.3208 416.7112 38.9259 0.1748 1706 +1708 3 482.2097 417.3049 39.4013 0.1457 1707 +1709 3 483.308 417.5245 39.8255 0.1453 1708 +1710 3 484.444 417.6561 40.1716 0.1527 1709 +1711 3 485.5845 417.6641 40.4757 0.1636 1710 +1712 3 486.6988 417.425 40.7282 0.1977 1711 +1713 3 487.805 417.1413 40.9004 0.1936 1712 +1714 3 488.9216 416.94 41.1037 0.1959 1713 +1715 3 490.0187 417.0612 41.4106 0.2321 1714 +1716 3 491.1524 417.1116 41.6612 0.2611 1715 +1717 3 492.2483 417.3667 41.9776 0.2899 1716 +1718 3 493.2139 417.8757 42.3951 0.2305 1717 +1719 3 494.2149 418.3883 42.8266 0.2126 1718 +1720 3 495.2067 418.9191 43.2527 0.168 1719 +1721 3 495.8725 419.8366 43.638 0.1506 1720 +1722 3 496.5349 420.7232 44.0451 0.1379 1721 +1723 3 497.4833 421.3581 44.3271 0.1383 1722 +1724 3 498.2967 422.0708 44.4184 0.1392 1723 +1725 3 499.0883 422.6794 44.6586 0.1411 1724 +1726 3 500.2266 422.7698 44.8479 0.1446 1725 +1727 3 501.358 422.7183 45.0363 0.1508 1726 +1728 3 502.4505 422.6851 45.3023 0.1627 1727 +1729 3 503.5774 422.6325 45.493 0.1829 1728 +1730 3 504.6687 422.8544 45.6142 0.1635 1729 +1731 3 505.7407 423.2079 45.7979 0.1475 1730 +1732 3 506.8332 423.4939 46.0586 0.1376 1731 +1733 3 507.9246 423.7811 46.3761 0.1379 1732 +1734 3 509.0159 424.0671 46.737 0.1385 1733 +1735 3 510.1073 424.3542 47.1388 0.1395 1734 +1736 3 511.1987 424.6402 47.551 0.1413 1735 +1737 3 512.2901 424.9274 47.945 0.1448 1736 +1738 3 513.3814 425.2145 48.3185 0.151 1737 +1739 3 514.4751 425.5016 48.6654 0.1635 1738 +1740 3 515.5699 425.8094 48.9448 0.1826 1739 +1741 3 516.6155 426.2372 49.1053 0.1635 1740 +1742 3 517.5536 426.8722 49.2341 0.1476 1741 +1743 3 518.4219 427.5506 49.4502 0.1386 1742 +1744 3 519.2422 428.2919 49.6882 0.1398 1743 +1745 3 520.0098 429.1087 49.8168 0.142 1744 +1746 3 520.7648 429.9346 49.9206 0.1461 1745 +1747 3 521.6148 430.6863 50.1116 0.1539 1746 +1748 3 522.4785 431.4058 50.3773 0.167 1747 +1749 3 523.3525 432.0613 50.7343 0.1985 1748 +1750 3 524.0355 432.8232 51.2378 0.2214 1749 +1751 3 524.6121 433.6858 51.8064 0.1829 1750 +1752 3 525.2104 434.6502 52.2382 0.1502 1751 +1753 3 525.9872 435.4453 52.4572 0.138 1752 +1754 3 526.8212 436.2083 52.5652 0.1387 1753 +1755 3 527.4309 437.1132 52.7125 0.1401 1754 +1756 3 528.1047 438.0159 52.8489 0.1425 1755 +1757 3 528.6973 438.8979 52.8332 0.147 1756 +1758 3 529.6869 439.1507 52.7458 0.1558 1757 +1759 3 530.7531 439.3715 52.8312 0.1701 1758 +1760 3 531.7678 439.6941 53.1062 0.2066 1759 +1761 3 532.6864 440.2306 53.5102 0.2265 1760 +1762 3 533.4655 441.0406 53.9176 0.2073 1761 +1763 3 533.7652 442.124 54.2562 0.1914 1762 +1764 3 534.4482 442.9522 54.6479 0.2339 1763 +1765 3 534.7651 444.023 54.8752 0.1991 1764 +1766 3 535.36 444.9897 55.0032 0.1654 1765 +1767 3 536.1882 445.7585 55.1754 0.1397 1766 +1768 3 537.1892 446.0959 55.5094 0.1418 1767 +1769 3 538.2703 446.4403 55.8589 0.1456 1768 +1770 3 539.1821 447.0489 56.2526 0.1543 1769 +1771 3 540.0275 447.7959 56.5454 0.1709 1770 +1772 3 540.9987 448.3748 56.8369 0.1959 1771 +1773 3 542.0352 448.7878 57.1483 0.19 1772 +1774 3 543.1106 449.1321 57.4386 0.1957 1773 +1775 3 544.1688 449.552 57.696 0.1816 1774 +1776 3 545.2281 449.9718 57.9214 0.1676 1775 +1777 3 546.2062 450.5633 58.088 0.1604 1776 +1778 3 547.1809 451.1627 58.191 0.1536 1777 +1779 3 548.1613 451.753 58.245 0.1456 1778 +1780 3 549.144 452.3376 58.27 0.1373 1779 +1781 3 550.0878 452.9828 58.2795 0.1373 1780 +1782 3 550.9733 453.7093 58.2826 0.1373 1781 +1783 3 551.8301 454.4666 58.2865 0.1373 1782 +1784 3 552.6824 455.2296 58.2918 0.1373 1783 +1785 3 553.6697 455.7936 58.2994 0.1373 1784 +1786 3 554.6936 456.305 58.31 0.1373 1785 +1787 3 555.7163 456.8164 58.3243 0.1373 1786 +1788 3 556.7253 457.3563 58.345 0.1373 1787 +1789 3 557.8121 457.6732 58.3741 0.1373 1788 +1790 3 558.9367 457.8837 58.4147 0.1373 1789 +1791 3 560.0612 458.0919 58.4685 0.1373 1790 +1792 3 561.1846 458.307 58.541 0.1373 1791 +1793 3 562.2897 458.5724 58.6676 0.1373 1792 +1794 3 563.396 458.8378 58.8322 0.1373 1793 +1795 3 564.5022 459.1032 59.0204 0.1373 1794 +1796 3 565.6096 459.3629 59.2169 0.1373 1795 +1797 3 566.7422 459.5242 59.372 0.1373 1796 +1798 3 567.8782 459.5208 59.4908 0.1373 1797 +1799 3 569.0016 459.3034 59.5804 0.1373 1798 +1800 3 570.1284 459.4155 59.6599 0.1373 1799 +1801 3 571.2587 459.5928 59.747 0.1373 1800 +1802 3 572.3901 459.7576 59.8542 0.1373 1801 +1803 3 573.4929 460.0447 59.9897 0.1373 1802 +1804 3 574.5786 460.4074 60.1513 0.1373 1803 +1805 3 575.5052 460.3788 60.5604 0.1372 1804 +1806 3 576.4673 460.6282 61.0296 0.1372 1805 +1807 3 577.4718 461.175 61.4026 0.1372 1806 +1808 3 578.5036 461.6658 61.6874 0.1371 1807 +1809 3 579.4554 462.3018 61.8946 0.137 1808 +1810 3 580.5205 462.3076 62.0374 0.1369 1809 +1811 3 581.6336 462.0456 62.1278 0.1368 1810 +1812 3 582.6861 461.6269 62.2146 0.1366 1811 +1813 3 583.7066 461.1315 62.347 0.1363 1812 +1814 3 584.7648 460.7403 62.5596 0.136 1813 +1815 3 585.823 460.349 62.8351 0.1356 1814 +1816 3 586.9486 460.2461 63.1042 0.1351 1815 +1817 3 588.0926 460.2175 63.3528 0.1346 1816 +1818 3 589.1829 460.0127 63.5835 0.1331 1817 +1819 3 590.153 459.8388 63.887 0.1303 1818 +1820 3 591.13 460.1271 64.3283 0.128 1819 +1821 3 592.2065 460.269 64.7503 0.1228 1820 +1822 3 593.3493 460.309 65.07 0.1156 1821 +1823 3 594.4796 460.4794 65.2974 0.1144 1822 +1824 3 595.6064 460.6739 65.5068 0.1144 1823 +1825 3 476.3433 417.4101 36.3292 0.2292 1701 +1826 3 477.4507 417.4296 35.8904 0.2538 1825 +1827 3 478.5878 417.3484 35.7221 0.2438 1826 +1828 3 479.7158 417.1619 35.5715 0.209 1827 +1829 3 480.8495 417.0132 35.4483 0.1941 1828 +1830 3 481.9878 417.0704 35.3214 0.2393 1829 +1831 3 483.1078 417.2557 35.2638 0.2109 1830 +1832 3 484.2174 417.528 35.2262 0.1869 1831 +1833 3 485.1132 418.2029 35.0986 0.1786 1832 +1834 3 485.9609 418.9648 34.9496 0.2244 1833 +1835 3 486.9951 419.4362 34.767 0.2438 1834 +1836 3 488.1105 419.6169 34.5551 0.2392 1835 +1837 3 489.1229 419.8663 34.2096 0.2052 1836 +1838 3 490.1056 420.4452 33.9581 0.2019 1837 +1839 3 491.0151 421.1201 33.8094 0.2396 1838 +1840 3 491.9028 421.8317 33.64 0.2703 1839 +1841 3 492.8215 422.4826 33.441 0.287 1840 +1842 3 493.8877 422.8853 33.2472 0.2989 1841 +1843 3 494.9802 423.2068 33.0845 0.2606 1842 +1844 3 496.1173 423.2869 32.9333 0.2082 1843 +1845 3 497.2087 423.439 32.7071 0.1926 1844 +1846 3 498.1376 423.9321 32.4509 0.2175 1845 +1847 3 498.9281 424.5876 32.352 0.235 1846 +1848 3 499.6695 425.4536 32.1894 0.2607 1847 +1849 3 500.4748 426.2338 31.9617 0.2267 1848 +1850 3 501.4781 426.4409 31.6235 0.1733 1849 +1851 3 502.4677 426.0702 31.1209 0.1422 1850 +1852 3 503.4652 426.2693 30.5214 0.1376 1851 +1853 3 504.4479 426.8321 29.9174 0.1379 1852 +1854 3 505.5187 427.0289 29.3157 0.1384 1853 +1855 3 506.514 426.8847 28.6199 0.1393 1854 +1856 3 507.5917 426.8939 27.9435 0.1411 1855 +1857 3 508.7013 427.0495 27.3313 0.1443 1856 +1858 3 509.8019 427.2165 26.7606 0.1507 1857 +1859 3 510.8772 427.5357 26.2517 0.1603 1858 +1860 3 511.9492 427.9155 25.8382 0.1896 1859 +1861 3 513.0634 428.1534 25.5219 0.1887 1860 +1862 3 514.2028 428.2061 25.2799 0.1845 1861 +1863 3 515.213 427.7324 25.1215 0.2067 1862 +1864 3 516.1911 427.2474 24.8872 0.2226 1863 +1865 3 517.3191 427.1902 24.681 0.1964 1864 +1866 3 518.4597 427.2451 24.4822 0.1758 1865 +1867 3 519.5945 427.2165 24.265 0.1936 1866 +1868 3 520.6527 426.8035 24.0569 0.1837 1867 +1869 3 521.7795 426.6273 23.8892 0.1772 1868 +1870 3 522.8824 426.8035 23.6925 0.2003 1869 +1871 3 523.9703 427.157 23.5556 0.1923 1870 +1872 3 525.0502 427.5345 23.4752 0.1982 1871 +1873 3 526.1565 427.8102 23.4395 0.2235 1872 +1874 3 527.2158 427.4384 23.5003 0.3163 1873 +1875 3 528.2958 427.1456 23.6139 0.3649 1874 +1876 3 529.3448 426.7726 23.5991 0.3595 1875 +1877 3 530.2005 426.1389 23.4438 0.3848 1876 +1878 3 530.7165 425.1516 23.385 0.2703 1877 +1879 3 531.2679 424.3016 23.3173 0.207 1878 +1880 3 531.5379 423.3555 23.0975 0.2088 1879 +1881 3 532.1007 422.4128 22.932 0.285 1880 +1882 3 532.8798 421.58 22.8237 0.3456 1881 +1883 3 533.5856 420.6957 22.7819 0.3218 1882 +1884 3 534.3658 419.8835 22.7506 0.2512 1883 +1885 3 535.2513 419.1616 22.6977 0.1973 1884 +1886 3 536.2248 418.5976 22.5785 0.2013 1885 +1887 3 537.2533 418.1274 22.3495 0.2147 1886 +1888 3 537.688 417.3976 21.8805 0.2546 1887 +1889 3 538.5323 416.7889 21.4717 0.2274 1888 +1890 3 539.6557 416.7295 21.0987 0.2122 1889 +1891 3 540.6567 416.2158 20.6985 0.2468 1890 +1892 3 541.5559 415.7742 20.1519 0.2198 1891 +1893 3 542.4631 415.2503 19.5685 0.21 1892 +1894 3 543.5499 415.3349 19.0251 0.2343 1893 +1895 3 544.6161 415.6987 18.6286 0.1992 1894 +1896 3 545.6422 415.4962 18.2965 0.1739 1895 +1897 3 546.3069 414.6439 17.9582 0.1748 1896 +1898 3 546.9418 413.834 17.8153 0.2069 1897 +1899 3 547.7941 413.3592 17.7204 0.282 1898 +1900 3 548.81 413.0892 17.4249 0.3454 1899 +1901 3 549.7664 412.7586 16.9626 0.3197 1900 +1902 3 550.6266 412.2152 16.3927 0.2472 1901 +1903 3 551.6471 412.015 15.9057 0.19 1902 +1904 3 552.5543 411.5689 15.4225 0.2117 1903 +1905 3 553.4615 410.9111 15.0631 0.1675 1904 +1906 3 554.3824 410.696 15.4 0.1144 1905 +1907 3 474.9968 417.4033 35.8406 0.1165 1699 +1908 3 475.5047 418.2956 35.6213 0.1388 1907 +1909 3 476.0195 419.2634 35.6006 0.1403 1908 +1910 3 476.4005 420.3125 35.5474 0.1429 1909 +1911 3 476.7082 421.3844 35.6042 0.1479 1910 +1912 3 476.9725 422.438 35.8142 0.1575 1911 +1913 3 477.3763 423.4756 36.1108 0.1737 1912 +1914 3 477.6223 424.5498 36.4286 0.2132 1913 +1915 3 477.6463 425.6732 36.6136 0.2405 1914 +1916 3 477.7584 426.7795 36.7158 0.2202 1915 +1917 3 478.1497 427.7565 36.9043 0.2339 1916 +1918 3 478.7308 428.6328 37.1006 0.2443 1917 +1919 3 479.1255 429.6532 37.2534 0.2301 1918 +1920 3 479.4573 430.7309 37.4223 0.2536 1919 +1921 3 479.8748 431.7731 37.6239 0.2881 1920 +1922 3 480.3073 432.8095 37.8042 0.2594 1921 +1923 3 480.8129 433.8311 37.8913 0.1964 1922 +1924 3 481.3357 434.847 37.9442 0.1609 1923 +1925 3 481.7544 435.9075 38.0027 0.1583 1924 +1926 3 482.0827 436.9966 38.0324 0.1823 1925 +1927 3 482.4271 438.0708 38.0864 0.1919 1926 +1928 3 482.8492 439.1187 38.2068 0.1882 1927 +1929 3 483.1604 440.2089 38.3452 0.1992 1928 +1930 3 483.5802 441.2614 38.472 0.2564 1929 +1931 3 484.2312 442.1938 38.5664 0.3005 1930 +1932 3 484.9473 443.0849 38.6414 0.2679 1931 +1933 3 485.66 443.9704 38.752 0.2228 1932 +1934 3 486.4116 444.8238 38.8592 0.2185 1933 +1935 3 487.1918 445.6578 38.9889 0.2859 1934 +1936 3 487.9332 446.5226 39.1773 0.3497 1935 +1937 3 488.5727 447.4493 39.4464 0.3703 1936 +1938 3 489.2739 448.3393 39.7522 0.3504 1937 +1939 3 490.0416 449.1641 40.1058 0.2925 1938 +1940 3 490.7943 450.0016 40.5048 0.2164 1939 +1941 3 491.5974 450.8024 40.9181 0.1627 1940 +1942 3 492.4806 451.5242 41.3053 0.1411 1941 +1943 3 493.4129 452.1843 41.6746 0.1373 1942 +1944 3 494.3579 452.7414 42.1235 0.1373 1943 +1945 3 495.2365 453.2906 42.6944 0.1373 1944 +1946 3 496.1276 453.8019 43.3513 0.1373 1945 +1947 3 497.1241 454.2881 43.9522 0.1373 1946 +1948 3 498.1548 454.772 44.4545 0.1373 1947 +1949 3 498.9453 455.5843 44.8288 0.1373 1948 +1950 3 499.8491 456.2386 45.087 0.1373 1949 +1951 3 500.7105 456.9433 45.2609 0.1373 1950 +1952 3 501.3866 457.8631 45.3894 0.1373 1951 +1953 3 501.8625 458.8287 45.6288 0.1373 1952 +1954 3 502.0913 459.9052 45.892 0.1373 1953 +1955 3 502.51 460.9611 46.1174 0.1373 1954 +1956 3 503.3497 461.6955 46.3095 0.1373 1955 +1957 3 503.8256 462.6039 46.4713 0.1373 1956 +1958 3 504.1459 463.6438 46.6679 0.1373 1957 +1959 3 504.6767 464.6059 46.9272 0.1373 1958 +1960 3 504.9582 465.7121 47.1265 0.1373 1959 +1961 3 505.2224 466.8103 47.2805 0.1373 1960 +1962 3 505.267 467.9452 47.3936 0.1373 1961 +1963 3 505.362 469.0846 47.4709 0.1373 1962 +1964 3 505.7029 470.1771 47.5205 0.1373 1963 +1965 3 506.0484 471.2674 47.5614 0.1373 1964 +1966 3 505.9134 472.3668 47.6174 0.1373 1965 +1967 3 506.5975 473.155 47.689 0.1373 1966 +1968 3 507.3423 473.997 47.7761 0.1373 1967 +1969 3 508.0115 474.8607 47.9713 0.1373 1968 +1970 3 508.5949 475.777 48.2275 0.1373 1969 +1971 3 508.9118 476.8741 48.44 0.1373 1970 +1972 3 508.9118 477.9918 48.6125 0.1373 1971 +1973 3 509.04 479.0088 48.7662 0.1373 1972 +1974 3 509.7973 479.8565 48.9227 0.1373 1973 +1975 3 510.5992 480.6699 49.0372 0.1373 1974 +1976 3 511.471 481.4101 49.135 0.1373 1975 +1977 3 512.2466 482.2509 49.2355 0.1373 1976 +1978 3 513.0771 483.0277 49.341 0.1373 1977 +1979 3 514.0026 483.6786 49.4586 0.1373 1978 +1980 3 514.2497 484.7528 49.6955 0.1373 1979 +1981 3 514.7451 485.7058 49.9792 0.1373 1980 +1982 3 515.5688 486.5009 50.2326 0.1373 1981 +1983 3 516.4176 487.2651 50.4619 0.1373 1982 +1984 3 517.2013 488.0727 50.7007 0.1373 1983 +1985 3 517.8224 489.0154 50.9858 0.1373 1984 +1986 3 518.4448 489.958 51.3036 0.1373 1985 +1987 3 519.3428 490.6101 51.6118 0.1373 1986 +1988 3 520.186 491.3137 51.9492 0.1373 1987 +1989 3 520.8598 492.1911 52.3502 0.1373 1988 +1990 3 521.5336 493.0686 52.7817 0.1373 1989 +1991 3 522.2337 493.9254 53.2059 0.1373 1990 +1992 3 523.1295 494.6381 53.5226 0.1373 1991 +1993 3 524.0241 495.3509 53.7533 0.1373 1992 +1994 3 524.9278 496.051 53.9137 0.1373 1993 +1995 3 525.8568 496.7202 54.0263 0.1373 1994 +1996 3 526.5008 497.6308 54.1206 0.1373 1995 +1997 3 527.0328 498.6433 54.2223 0.1373 1996 +1998 3 527.5831 499.6466 54.3516 0.1373 1997 +1999 3 528.1505 500.5869 54.6034 0.1373 1998 +2000 3 528.6699 501.5616 54.9268 0.1373 1999 +2001 3 529.3894 502.4105 55.2661 0.1373 2000 +2002 3 530.2108 503.1861 55.6254 0.1373 2001 +2003 3 531.0528 503.9274 55.9885 0.1373 2002 +2004 3 532.135 504.2992 56.2876 0.1372 2003 +2005 3 533.2058 504.6985 56.5323 0.1372 2004 +2006 3 534.3075 504.9536 56.7459 0.1372 2005 +2007 3 535.4458 505.0646 56.9444 0.1371 2006 +2008 3 535.8279 505.6251 57.4504 0.137 2007 +2009 3 536.0006 506.7085 57.8799 0.1368 2008 +2010 3 536.7476 507.4887 58.2092 0.1363 2009 +2011 3 537.6434 508.2014 58.4455 0.136 2010 +2012 3 538.538 508.913 58.5959 0.1357 2011 +2013 3 539.2301 509.7881 58.6692 0.1352 2012 +2014 3 539.7323 510.8166 58.6748 0.1345 2013 +2015 3 540.0801 511.8954 58.6748 0.1324 2014 +2016 3 540.5183 512.9399 58.6748 0.1297 2015 +2017 3 541.0571 513.9489 58.6748 0.1272 2016 +2018 3 541.5181 514.9739 58.6748 0.1144 2017 +2019 3 541.6131 516.1145 58.6748 0.1144 2018 +2020 3 457.1001 408.511 37.3736 0.1885 1680 +2021 3 456.1574 408.8462 38.6271 0.1547 2020 +2022 3 455.0477 408.9674 39.1286 0.1391 2021 +2023 3 453.9209 409.0795 39.6609 0.1373 2022 +2024 3 452.9313 409.5737 40.2478 0.1373 2023 +2025 3 451.8171 409.7716 40.8122 0.1373 2024 +2026 3 450.7234 409.7934 41.4481 0.1373 2025 +2027 3 449.8769 410.4134 42.1674 0.1373 2026 +2028 3 448.893 410.9774 42.8658 0.1373 2027 +2029 3 448.1334 411.6798 43.6738 0.1373 2028 +2030 3 447.3555 412.4795 44.4763 0.1373 2029 +2031 3 446.4872 413.0401 45.3373 0.1373 2030 +2032 3 445.4599 413.1659 46.1894 0.1373 2031 +2033 3 444.9096 414.0525 47.0747 0.1373 2032 +2034 3 444.3982 415.0226 47.9251 0.1373 2033 +2035 3 443.8011 415.8246 48.8477 0.1373 2034 +2036 3 443.1799 416.6734 49.7605 0.1373 2035 +2037 3 442.8447 417.6618 50.6436 0.1373 2036 +2038 3 442.5793 418.6457 51.5441 0.1373 2037 +2039 3 442.0038 419.5654 52.383 0.1373 2038 +2040 3 441.1333 420.2598 53.1166 0.1373 2039 +2041 3 440.4411 421.087 53.7382 0.1373 2040 +2042 3 440.6459 422.0502 54.3396 0.1373 2041 +2043 3 441.0726 423.0375 55.008 0.1372 2042 +2044 3 441.0086 424.0888 55.7684 0.1372 2043 +2045 3 440.4045 424.8313 56.6826 0.1372 2044 +2046 3 439.8142 425.5943 57.731 0.137 2045 +2047 3 439.4836 426.5415 58.835 0.1368 2046 +2048 3 439.0375 427.5059 59.9082 0.1365 2047 +2049 3 438.0868 428.0162 60.7858 0.1357 2048 +2050 3 437.199 428.2884 61.7162 0.1343 2049 +2051 3 436.2678 428.1546 62.673 0.1315 2050 +2052 3 435.2726 427.7576 63.5373 0.1273 2051 +2053 3 434.1652 427.6078 64.2586 0.1149 2052 +2054 3 433.1184 427.9704 65.52 0.1144 2053 diff --git a/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_marker_m.swc b/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_marker_m.swc new file mode 100644 index 0000000..3f43929 --- /dev/null +++ b/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_marker_m.swc @@ -0,0 +1,13 @@ +##x,y,z,radius,shape,name,comment, color_r,color_g,color_b +438.4952,468.9256,13.16,0.0, 1, 10, , 187,168,39 +472.0144,411.268,19.88,0.0, 1, 10, , 187,168,39 +554.4968,410.8104,15.68,0.0, 1, 10, , 187,168,39 +364.936,407.6072,12.6,0.0, 1, 10, , 187,168,39 +482.4248,405.0904,12.6,0.0, 1, 10, , 187,168,39 +552.2088,127.0984,12.04,0.0, 1, 10, , 187,168,39 +435.0769,373.8249,15.5543,0.0, 1, 10, , 187,168,39 +399.1416,437.4656,76.44,0.0, 1, 10, , 187,168,39 +455.0832,63.2632,82.6,0.0, 1, 10, , 187,168,39 +406.3488,70.8136,73.64,0.0, 1, 10, , 187,168,39 +435.0632,521.3208,14.28,0.0, 1, 20, , 187,168,39 +450.7395,405.1169,9.9252,0.0, 1, 30, , 187,168,39 diff --git a/examples/single_cell/manifest.json b/examples/single_cell/manifest.json new file mode 100644 index 0000000..9e724e0 --- /dev/null +++ b/examples/single_cell/manifest.json @@ -0,0 +1,118 @@ +{ + "biophys": [ + { + "model_file": [ + "manifest.json", + "386049446_fit.json" + ], + "model_type": "Biophysical - perisomatic" + } + ], + "runs": [ + { + "sweeps": [ + 4, + 5, + 6, + 7, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 21, + 22, + 23, + 24, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 46, + 47, + 48, + 49, + 50, + 51, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63 + ] + } + ], + "neuron": [ + { + "hoc": [ + "stdgui.hoc", + "import3d.hoc" + ] + } + ], + "manifest": [ + { + "type": "dir", + "spec": ".", + "key": "BASEDIR" + }, + { + "type": "dir", + "spec": "work", + "key": "WORKDIR", + "parent": "BASEDIR" + }, + { + "type": "file", + "spec": "Nr5a1-Cre_Ai14-177334.05.01.01_491459171_m.swc", + "key": "MORPHOLOGY" + }, + { + "type": "file", + "spec": "Nr5a1-Cre_Ai14-177334.05.01.01_491459171_marker_m.swc", + "key": "MARKER" + }, + { + "type": "dir", + "spec": "modfiles", + "key": "MODFILE_DIR" + }, + { + "type": "file", + "format": "NWB", + "spec": "386049444.nwb", + "key": "stimulus_path" + }, + { + "parent_key": "WORKDIR", + "type": "file", + "format": "NWB", + "spec": "386049444.nwb", + "key": "output_path" + } + ] +} \ No newline at end of file diff --git a/examples/single_cell/modfiles/CaDynamics.mod b/examples/single_cell/modfiles/CaDynamics.mod new file mode 100644 index 0000000..12af065 --- /dev/null +++ b/examples/single_cell/modfiles/CaDynamics.mod @@ -0,0 +1,40 @@ +: Dynamics that track inside calcium concentration +: modified from Destexhe et al. 1994 + +NEURON { + SUFFIX CaDynamics + USEION ca READ ica WRITE cai + RANGE decay, gamma, minCai, depth +} + +UNITS { + (mV) = (millivolt) + (mA) = (milliamp) + FARADAY = (faraday) (coulombs) + (molar) = (1/liter) + (mM) = (millimolar) + (um) = (micron) +} + +PARAMETER { + gamma = 0.05 : percent of free calcium (not buffered) + decay = 80 (ms) : rate of removal of calcium + depth = 0.1 (um) : depth of shell + minCai = 1e-4 (mM) +} + +ASSIGNED {ica (mA/cm2)} + +INITIAL { + cai = minCai +} + +STATE { + cai (mM) +} + +BREAKPOINT { SOLVE states METHOD cnexp } + +DERIVATIVE states { + cai' = -(10000)*(ica*gamma/(2*FARADAY*depth)) - (cai - minCai)/decay +} diff --git a/examples/single_cell/modfiles/Ca_HVA.mod b/examples/single_cell/modfiles/Ca_HVA.mod new file mode 100644 index 0000000..84db2d3 --- /dev/null +++ b/examples/single_cell/modfiles/Ca_HVA.mod @@ -0,0 +1,82 @@ +: Reference: Reuveni, Friedman, Amitai, and Gutnick, J.Neurosci. 1993 + +NEURON { + SUFFIX Ca_HVA + USEION ca READ eca WRITE ica + RANGE gbar, g, ica +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + eca (mV) + ica (mA/cm2) + g (S/cm2) + mInf + mTau + mAlpha + mBeta + hInf + hTau + hAlpha + hBeta +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m*m*h + ica = g*(v-eca) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates(){ + UNITSOFF + : if((v == -27) ){ + : v = v+0.0001 + : } + :mAlpha = (0.055*(-27-v))/(exp((-27-v)/3.8) - 1) + mAlpha = 0.055 * vtrap(-27 - v, 3.8) + mBeta = (0.94*exp((-75-v)/17)) + mInf = mAlpha/(mAlpha + mBeta) + mTau = 1/(mAlpha + mBeta) + hAlpha = (0.000457*exp((-13-v)/50)) + hBeta = (0.0065/(exp((-v-15)/28)+1)) + hInf = hAlpha/(hAlpha + hBeta) + hTau = 1/(hAlpha + hBeta) + UNITSON +} + +FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations + UNITSOFF + if (fabs(x / y) < 1e-6) { + vtrap = y * (1 - x / y / 2) + } else { + vtrap = x / (exp(x / y) - 1) + } + UNITSON +} \ No newline at end of file diff --git a/examples/single_cell/modfiles/Ca_LVA.mod b/examples/single_cell/modfiles/Ca_LVA.mod new file mode 100644 index 0000000..ab151d0 --- /dev/null +++ b/examples/single_cell/modfiles/Ca_LVA.mod @@ -0,0 +1,69 @@ +: Comment: LVA ca channel. Note: mtau is an approximation from the plots +: Reference: Avery and Johnston 1996, tau from Randall 1997 +: Comment: shifted by -10 mv to correct for junction potential +: Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21 + +NEURON { + SUFFIX Ca_LVA + USEION ca READ eca WRITE ica + RANGE gbar, g, ica +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + eca (mV) + ica (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + hInf + hTau +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m*m*h + ica = g*(v-eca) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates(){ + LOCAL qt + qt = 2.3^((celsius-21)/10) + + UNITSOFF + v = v + 10 + mInf = 1.0000/(1+ exp((v - -30.000)/-6)) + mTau = (5.0000 + 20.0000/(1+exp((v - -25.000)/5)))/qt + hInf = 1.0000/(1+ exp((v - -80.000)/6.4)) + hTau = (20.0000 + 50.0000/(1+exp((v - -40.000)/7)))/qt + v = v - 10 + UNITSON +} diff --git a/examples/single_cell/modfiles/Ih.mod b/examples/single_cell/modfiles/Ih.mod new file mode 100644 index 0000000..73b97d8 --- /dev/null +++ b/examples/single_cell/modfiles/Ih.mod @@ -0,0 +1,71 @@ +: Reference: Kole,Hallermann,and Stuart, J. Neurosci. 2006 + +NEURON { + SUFFIX Ih + NONSPECIFIC_CURRENT ihcn + RANGE gbar, g, ihcn +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) + ehcn = -45.0 (mV) +} + +ASSIGNED { + v (mV) + ihcn (mA/cm2) + g (S/cm2) + mInf + mTau + mAlpha + mBeta +} + +STATE { + m +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m + ihcn = g*(v-ehcn) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau +} + +INITIAL{ + rates() + m = mInf +} + +PROCEDURE rates(){ + UNITSOFF + : if(v == -154.9){ + : v = v + 0.0001 + : } + :mAlpha = 0.001*6.43*(v+154.9)/(exp((v+154.9)/11.9)-1) + mAlpha = 0.001 * 6.43 * vtrap(v + 154.9, 11.9) + mBeta = 0.001*193*exp(v/33.1) + mInf = mAlpha/(mAlpha + mBeta) + mTau = 1/(mAlpha + mBeta) + UNITSON +} + +FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations + UNITSOFF + if (fabs(x / y) < 1e-6) { + vtrap = y * (1 - x / y / 2) + } else { + vtrap = x / (exp(x / y) - 1) + } + UNITSON +} diff --git a/examples/single_cell/modfiles/Im.mod b/examples/single_cell/modfiles/Im.mod new file mode 100644 index 0000000..d6112d5 --- /dev/null +++ b/examples/single_cell/modfiles/Im.mod @@ -0,0 +1,62 @@ +: Reference: Adams et al. 1982 - M-currents and other potassium currents in bullfrog sympathetic neurones +: Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21 + +NEURON { + SUFFIX Im + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + mAlpha + mBeta +} + +STATE { + m +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m + ik = g*(v-ek) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau +} + +INITIAL{ + rates() + m = mInf +} + +PROCEDURE rates(){ + LOCAL qt + qt = 2.3^((celsius-21)/10) + + UNITSOFF + mAlpha = 3.3e-3*exp(2.5*0.04*(v - -35)) + mBeta = 3.3e-3*exp(-2.5*0.04*(v - -35)) + mInf = mAlpha/(mAlpha + mBeta) + mTau = (1/(mAlpha + mBeta))/qt + UNITSON +} diff --git a/examples/single_cell/modfiles/Im_v2.mod b/examples/single_cell/modfiles/Im_v2.mod new file mode 100644 index 0000000..fc219f7 --- /dev/null +++ b/examples/single_cell/modfiles/Im_v2.mod @@ -0,0 +1,59 @@ +: Based on Im model of Vervaeke et al. (2006) + +NEURON { + SUFFIX Im_v2 + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + mAlpha + mBeta +} + +STATE { + m +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar * m + ik = g * (v - ek) +} + +DERIVATIVE states { + rates() + m' = (mInf - m) / mTau +} + +INITIAL{ + rates() + m = mInf +} + +PROCEDURE rates() { + LOCAL qt + qt = 2.3^((celsius-30)/10) + mAlpha = 0.007 * exp( (6 * 0.4 * (v - (-48))) / 26.12 ) + mBeta = 0.007 * exp( (-6 * (1 - 0.4) * (v - (-48))) / 26.12 ) + + mInf = mAlpha / (mAlpha + mBeta) + mTau = (15 + 1 / (mAlpha + mBeta)) / qt +} diff --git a/examples/single_cell/modfiles/K_P.mod b/examples/single_cell/modfiles/K_P.mod new file mode 100644 index 0000000..0a1238f --- /dev/null +++ b/examples/single_cell/modfiles/K_P.mod @@ -0,0 +1,71 @@ +: Comment: The persistent component of the K current +: Reference: Voltage-gated K+ channels in layer 5 neocortical pyramidal neurones from young rats:subtypes and gradients,Korngreen and Sakmann, J. Physiology, 2000 + + +NEURON { + SUFFIX K_P + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) + vshift = 0 (mV) + tauF = 1 +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + hInf + hTau +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m*m*h + ik = g*(v-ek) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates() { + LOCAL qt + qt = 2.3^((celsius-21)/10) + UNITSOFF + mInf = 1 / (1 + exp(-(v - (-14.3 + vshift)) / 14.6)) + if (v < -50 + vshift){ + mTau = tauF * (1.25+175.03*exp(-(v - vshift) * -0.026))/qt + } else { + mTau = tauF * (1.25+13*exp(-(v - vshift) * 0.026))/qt + } + hInf = 1/(1 + exp(-(v - (-54 + vshift))/-11)) + hTau = (360+(1010+24*(v - (-55 + vshift)))*exp(-((v - (-75 + vshift))/48)^2))/qt + UNITSON +} diff --git a/examples/single_cell/modfiles/K_T.mod b/examples/single_cell/modfiles/K_T.mod new file mode 100644 index 0000000..c31beaf --- /dev/null +++ b/examples/single_cell/modfiles/K_T.mod @@ -0,0 +1,68 @@ +: Comment: The transient component of the K current +: Reference: Voltage-gated K+ channels in layer 5 neocortical pyramidal neurones from young rats:subtypes and gradients,Korngreen and Sakmann, J. Physiology, 2000 + +NEURON { + SUFFIX K_T + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) + vshift = 0 (mV) + mTauF = 1.0 + hTauF = 1.0 +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + hInf + hTau +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m*m*m*m*h + ik = g*(v-ek) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates(){ + LOCAL qt + qt = 2.3^((celsius-21)/10) + + UNITSOFF + mInf = 1/(1 + exp(-(v - (-47 + vshift)) / 29)) + mTau = (0.34 + mTauF * 0.92*exp(-((v+71-vshift)/59)^2))/qt + hInf = 1/(1 + exp(-(v+66-vshift)/-10)) + hTau = (8 + hTauF * 49*exp(-((v+73-vshift)/23)^2))/qt + UNITSON +} diff --git a/examples/single_cell/modfiles/Kd.mod b/examples/single_cell/modfiles/Kd.mod new file mode 100644 index 0000000..82cbe59 --- /dev/null +++ b/examples/single_cell/modfiles/Kd.mod @@ -0,0 +1,62 @@ +: Based on Kd model of Foust et al. (2011) + + +NEURON { + SUFFIX Kd + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + hInf + hTau +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar * m * h + ik = g * (v - ek) +} + +DERIVATIVE states { + rates() + m' = (mInf - m) / mTau + h' = (hInf - h) / hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates() { + LOCAL qt + qt = 2.3^((celsius-23)/10) + mInf = 1 - 1 / (1 + exp((v - (-43)) / 8)) + mTau = 1 + hInf = 1 / (1 + exp((v - (-67)) / 7.3)) + hTau = 1500 +} diff --git a/examples/single_cell/modfiles/Kv2like.mod b/examples/single_cell/modfiles/Kv2like.mod new file mode 100644 index 0000000..6b45acd --- /dev/null +++ b/examples/single_cell/modfiles/Kv2like.mod @@ -0,0 +1,89 @@ +: Kv2-like channel +: Adapted from model implemented in Keren et al. 2005 +: Adjusted parameters to be similar to guangxitoxin-sensitive current in mouse CA1 pyramids from Liu and Bean 2014 + + +NEURON { + SUFFIX Kv2like + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mAlpha + mBeta + mTau + hInf + h1Tau + h2Tau +} + +STATE { + m + h1 + h2 +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar * m * m * (0.5 * h1 + 0.5 * h2) + ik = g * (v - ek) +} + +DERIVATIVE states { + rates() + m' = (mInf - m) / mTau + h1' = (hInf - h1) / h1Tau + h2' = (hInf - h2) / h2Tau +} + +INITIAL{ + rates() + m = mInf + h1 = hInf + h2 = hInf +} + +PROCEDURE rates() { + LOCAL qt + qt = 2.3^((celsius-21)/10) + UNITSOFF + mAlpha = 0.12 * vtrap( -(v - 43), 11.0) + mBeta = 0.02 * exp(-(v + 1.27) / 120) + mInf = mAlpha / (mAlpha + mBeta) + mTau = 2.5 * (1 / (qt * (mAlpha + mBeta))) + + hInf = 1/(1 + exp((v + 58) / 11)) + h1Tau = (360 + (1010 + 23.7 * (v + 54)) * exp(-((v + 75) / 48)^2)) / qt + h2Tau = (2350 + 1380 * exp(-0.011 * v) - 210 * exp(-0.03 * v)) / qt + if (h2Tau < 0) { + h2Tau = 1e-3 + } + UNITSON +} + +FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations + UNITSOFF + if (fabs(x / y) < 1e-6) { + vtrap = y * (1 - x / y / 2) + } else { + vtrap = x / (exp(x / y) - 1) + } + UNITSON +} \ No newline at end of file diff --git a/examples/single_cell/modfiles/Kv3_1.mod b/examples/single_cell/modfiles/Kv3_1.mod new file mode 100644 index 0000000..e244657 --- /dev/null +++ b/examples/single_cell/modfiles/Kv3_1.mod @@ -0,0 +1,54 @@ +: Comment: Kv3-like potassium current + +NEURON { + SUFFIX Kv3_1 + USEION k READ ek WRITE ik + RANGE gbar, g, ik +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) + vshift = 0 (mV) +} + +ASSIGNED { + v (mV) + ek (mV) + ik (mA/cm2) + g (S/cm2) + mInf + mTau +} + +STATE { + m +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m + ik = g*(v-ek) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau +} + +INITIAL{ + rates() + m = mInf +} + +PROCEDURE rates(){ + UNITSOFF + mInf = 1/(1+exp(((v -(18.700 + vshift))/(-9.700)))) + mTau = 0.2*20.000/(1+exp(((v -(-46.560 + vshift))/(-44.140)))) + UNITSON +} diff --git a/examples/single_cell/modfiles/NaTa.mod b/examples/single_cell/modfiles/NaTa.mod new file mode 100644 index 0000000..fcf7bd3 --- /dev/null +++ b/examples/single_cell/modfiles/NaTa.mod @@ -0,0 +1,95 @@ +: Reference: Colbert and Pan 2002 + +NEURON { + SUFFIX NaTa + USEION na READ ena WRITE ina + RANGE gbar, g, ina +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) + + malphaF = 0.182 + mbetaF = 0.124 + mvhalf = -48 (mV) + mk = 6 (mV) + + halphaF = 0.015 + hbetaF = 0.015 + hvhalf = -69 (mV) + hk = 6 (mV) +} + +ASSIGNED { + v (mV) + ena (mV) + ina (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + mAlpha + mBeta + hInf + hTau + hAlpha + hBeta +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m*m*m*h + ina = g*(v-ena) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates(){ + LOCAL qt + qt = 2.3^((celsius-23)/10) + + UNITSOFF + mAlpha = malphaF * vtrap(-(v - mvhalf), mk) + mBeta = mbetaF * vtrap((v - mvhalf), mk) + + mInf = mAlpha/(mAlpha + mBeta) + mTau = (1/(mAlpha + mBeta))/qt + + hAlpha = halphaF * vtrap(v - hvhalf, hk) : ng - adjusted this to match actual Colbert & Pan values for soma model + hBeta = hbetaF * vtrap(-(v - hvhalf), hk) : ng - adjusted this to match actual Colbert & Pan values for soma model + + hInf = hAlpha/(hAlpha + hBeta) + hTau = (1/(hAlpha + hBeta))/qt + UNITSON +} + +FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations + UNITSOFF + if (fabs(x / y) < 1e-6) { + vtrap = y * (1 - x / y / 2) + } else { + vtrap = x / (exp(x / y) - 1) + } + UNITSON +} \ No newline at end of file diff --git a/examples/single_cell/modfiles/NaTs.mod b/examples/single_cell/modfiles/NaTs.mod new file mode 100644 index 0000000..f753e71 --- /dev/null +++ b/examples/single_cell/modfiles/NaTs.mod @@ -0,0 +1,95 @@ +: Reference: Colbert and Pan 2002 + +NEURON { + SUFFIX NaTs + USEION na READ ena WRITE ina + RANGE gbar, g, ina +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) + + malphaF = 0.182 + mbetaF = 0.124 + mvhalf = -40 (mV) + mk = 6 (mV) + + halphaF = 0.015 + hbetaF = 0.015 + hvhalf = -66 (mV) + hk = 6 (mV) +} + +ASSIGNED { + v (mV) + ena (mV) + ina (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + mTau + mAlpha + mBeta + hInf + hTau + hAlpha + hBeta +} + +STATE { + m + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar*m*m*m*h + ina = g*(v-ena) +} + +DERIVATIVE states { + rates() + m' = (mInf-m)/mTau + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + m = mInf + h = hInf +} + +PROCEDURE rates(){ + LOCAL qt + qt = 2.3^((celsius-23)/10) + + UNITSOFF + mAlpha = malphaF * vtrap(-(v - mvhalf), mk) + mBeta = mbetaF * vtrap((v - mvhalf), mk) + + mInf = mAlpha/(mAlpha + mBeta) + mTau = (1/(mAlpha + mBeta))/qt + + hAlpha = halphaF * vtrap(v - hvhalf, hk) + hBeta = hbetaF * vtrap(-(v - hvhalf), hk) + + hInf = hAlpha/(hAlpha + hBeta) + hTau = (1/(hAlpha + hBeta))/qt + UNITSON +} + +FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations + UNITSOFF + if (fabs(x / y) < 1e-6) { + vtrap = y * (1 - x / y / 2) + } else { + vtrap = x / (exp(x / y) - 1) + } + UNITSON +} \ No newline at end of file diff --git a/examples/single_cell/modfiles/NaV.mod b/examples/single_cell/modfiles/NaV.mod new file mode 100644 index 0000000..a702395 --- /dev/null +++ b/examples/single_cell/modfiles/NaV.mod @@ -0,0 +1,186 @@ +TITLE Mouse sodium current +: Kinetics of Carter et al. (2012) +: Based on 37 degC recordings from mouse hippocampal CA1 pyramids + +NEURON { + SUFFIX NaV + USEION na READ ena WRITE ina + RANGE g, gbar +} + +UNITS { + (mV) = (millivolt) + (S) = (siemens) +} + +PARAMETER { + gbar = .015 (S/cm2) + + : kinetic parameters + Con = 0.01 (/ms) : closed -> inactivated transitions + Coff = 40 (/ms) : inactivated -> closed transitions + Oon = 8 (/ms) : open -> Ineg transition + Ooff = 0.05 (/ms) : Ineg -> open transition + alpha = 400 (/ms) + beta = 12 (/ms) + gamma = 250 (/ms) : opening + delta = 60 (/ms) : closing + + alfac = 2.51 + btfac = 5.32 + + : Vdep + x1 = 24 (mV) : Vdep of activation (alpha) + x2 = -24 (mV) : Vdep of deactivation (beta) +} + +ASSIGNED { + + : rates + f01 (/ms) + f02 (/ms) + f03 (/ms) + f04 (/ms) + f0O (/ms) + f11 (/ms) + f12 (/ms) + f13 (/ms) + f14 (/ms) + f1n (/ms) + fi1 (/ms) + fi2 (/ms) + fi3 (/ms) + fi4 (/ms) + fi5 (/ms) + fin (/ms) + + b01 (/ms) + b02 (/ms) + b03 (/ms) + b04 (/ms) + b0O (/ms) + b11 (/ms) + b12 (/ms) + b13 (/ms) + b14 (/ms) + b1n (/ms) + bi1 (/ms) + bi2 (/ms) + bi3 (/ms) + bi4 (/ms) + bi5 (/ms) + bin (/ms) + + v (mV) + ena (mV) + ina (milliamp/cm2) + g (S/cm2) + celsius (degC) +} + +STATE { + C1 FROM 0 TO 1 + C2 FROM 0 TO 1 + C3 FROM 0 TO 1 + C4 FROM 0 TO 1 + C5 FROM 0 TO 1 + I1 FROM 0 TO 1 + I2 FROM 0 TO 1 + I3 FROM 0 TO 1 + I4 FROM 0 TO 1 + I5 FROM 0 TO 1 + O FROM 0 TO 1 + I6 FROM 0 TO 1 +} + +BREAKPOINT { + SOLVE activation METHOD sparse + g = gbar * O + ina = g * (v - ena) +} + +INITIAL { + rates(v) + SOLVE seqinitial +} + +KINETIC activation +{ + rates(v) + ~ C1 <-> C2 (f01,b01) + ~ C2 <-> C3 (f02,b02) + ~ C3 <-> C4 (f03,b03) + ~ C4 <-> C5 (f04,b04) + ~ C5 <-> O (f0O,b0O) + ~ O <-> I6 (fin,bin) + ~ I1 <-> I2 (f11,b11) + ~ I2 <-> I3 (f12,b12) + ~ I3 <-> I4 (f13,b13) + ~ I4 <-> I5 (f14,b14) + ~ I5 <-> I6 (f1n,b1n) + ~ C1 <-> I1 (fi1,bi1) + ~ C2 <-> I2 (fi2,bi2) + ~ C3 <-> I3 (fi3,bi3) + ~ C4 <-> I4 (fi4,bi4) + ~ C5 <-> I5 (fi5,bi5) + + CONSERVE C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1 +} + +LINEAR seqinitial { : sets initial equilibrium + ~ I1*bi1 + C2*b01 - C1*( fi1+f01) = 0 + ~ C1*f01 + I2*bi2 + C3*b02 - C2*(b01+fi2+f02) = 0 + ~ C2*f02 + I3*bi3 + C4*b03 - C3*(b02+fi3+f03) = 0 + ~ C3*f03 + I4*bi4 + C5*b04 - C4*(b03+fi4+f04) = 0 + ~ C4*f04 + I5*bi5 + O*b0O - C5*(b04+fi5+f0O) = 0 + ~ C5*f0O + I6*bin - O*(b0O+fin) = 0 + + ~ C1*fi1 + I2*b11 - I1*( bi1+f11) = 0 + ~ I1*f11 + C2*fi2 + I3*b12 - I2*(b11+bi2+f12) = 0 + ~ I2*f12 + C3*fi3 + I4*bi3 - I3*(b12+bi3+f13) = 0 + ~ I3*f13 + C4*fi4 + I5*b14 - I4*(b13+bi4+f14) = 0 + ~ I4*f14 + C5*fi5 + I6*b1n - I5*(b14+bi5+f1n) = 0 + + ~ C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1 +} + +PROCEDURE rates(v(mV) ) +{ + LOCAL qt + qt = 2.3^((celsius-37)/10) + + f01 = qt * 4 * alpha * exp(v/x1) + f02 = qt * 3 * alpha * exp(v/x1) + f03 = qt * 2 * alpha * exp(v/x1) + f04 = qt * 1 * alpha * exp(v/x1) + f0O = qt * gamma + f11 = qt * 4 * alpha * alfac * exp(v/x1) + f12 = qt * 3 * alpha * alfac * exp(v/x1) + f13 = qt * 2 * alpha * alfac * exp(v/x1) + f14 = qt * 1 * alpha * alfac * exp(v/x1) + f1n = qt * gamma + fi1 = qt * Con + fi2 = qt * Con * alfac + fi3 = qt * Con * alfac^2 + fi4 = qt * Con * alfac^3 + fi5 = qt * Con * alfac^4 + fin = qt * Oon + + b01 = qt * 1 * beta * exp(v/x2) + b02 = qt * 2 * beta * exp(v/x2) + b03 = qt * 3 * beta * exp(v/x2) + b04 = qt * 4 * beta * exp(v/x2) + b0O = qt * delta + b11 = qt * 1 * beta * exp(v/x2) / btfac + b12 = qt * 2 * beta * exp(v/x2) / btfac + b13 = qt * 3 * beta * exp(v/x2) / btfac + b14 = qt * 4 * beta * exp(v/x2) / btfac + b1n = qt * delta + bi1 = qt * Coff + bi2 = qt * Coff / (btfac) + bi3 = qt * Coff / (btfac^2) + bi4 = qt * Coff / (btfac^3) + bi5 = qt * Coff / (btfac^4) + bin = qt * Ooff +} + diff --git a/examples/single_cell/modfiles/Nap.mod b/examples/single_cell/modfiles/Nap.mod new file mode 100644 index 0000000..ef8021e --- /dev/null +++ b/examples/single_cell/modfiles/Nap.mod @@ -0,0 +1,77 @@ +:Reference : Modeled according to kinetics derived from Magistretti & Alonso 1999 +:Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21 + +NEURON { + SUFFIX Nap + USEION na READ ena WRITE ina + RANGE gbar, g, ina +} + +UNITS { + (S) = (siemens) + (mV) = (millivolt) + (mA) = (milliamp) +} + +PARAMETER { + gbar = 0.00001 (S/cm2) +} + +ASSIGNED { + v (mV) + ena (mV) + ina (mA/cm2) + g (S/cm2) + celsius (degC) + mInf + hInf + hTau + hAlpha + hBeta +} + +STATE { + h +} + +BREAKPOINT { + SOLVE states METHOD cnexp + rates() + g = gbar*mInf*h + ina = g*(v-ena) +} + +DERIVATIVE states { + rates() + h' = (hInf-h)/hTau +} + +INITIAL{ + rates() + h = hInf +} + +PROCEDURE rates(){ + LOCAL qt + qt = 2.3^((celsius-21)/10) + + UNITSOFF + mInf = 1.0/(1+exp((v- -52.6)/-4.6)) : assuming instantaneous activation as modeled by Magistretti and Alonso + + hInf = 1.0/(1+exp((v- -48.8)/10)) + hAlpha = 2.88e-6 * vtrap(v + 17, 4.63) + hBeta = 6.94e-6 * vtrap(-(v + 64.4), 2.63) + + hTau = (1/(hAlpha + hBeta))/qt + UNITSON +} + +FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations + UNITSOFF + if (fabs(x / y) < 1e-6) { + vtrap = y * (1 - x / y / 2) + } else { + vtrap = x / (exp(x / y) - 1) + } + UNITSON +} \ No newline at end of file diff --git a/examples/single_cell/modfiles/SK.mod b/examples/single_cell/modfiles/SK.mod new file mode 100644 index 0000000..8bfa3b7 --- /dev/null +++ b/examples/single_cell/modfiles/SK.mod @@ -0,0 +1,56 @@ +: SK-type calcium-activated potassium current +: Reference : Kohler et al. 1996 + +NEURON { + SUFFIX SK + USEION k READ ek WRITE ik + USEION ca READ cai + RANGE gbar, g, ik +} + +UNITS { + (mV) = (millivolt) + (mA) = (milliamp) + (mM) = (milli/liter) +} + +PARAMETER { + v (mV) + gbar = .000001 (mho/cm2) + zTau = 1 (ms) + ek (mV) + cai (mM) +} + +ASSIGNED { + zInf + ik (mA/cm2) + g (S/cm2) +} + +STATE { + z FROM 0 TO 1 +} + +BREAKPOINT { + SOLVE states METHOD cnexp + g = gbar * z + ik = g * (v - ek) +} + +DERIVATIVE states { + rates(cai) + z' = (zInf - z) / zTau +} + +PROCEDURE rates(ca(mM)) { + if(ca < 1e-7){ + ca = ca + 1e-07 + } + zInf = 1/(1 + (0.00043 / ca)^4.8) +} + +INITIAL { + rates(cai) + z = zInf +} diff --git a/examples/single_cell/singleCellTutorial1.ipynb b/examples/single_cell/singleCellTutorial1.ipynb new file mode 100644 index 0000000..2ec8273 --- /dev/null +++ b/examples/single_cell/singleCellTutorial1.ipynb @@ -0,0 +1,142 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/386049446_fit.json\n", + "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/Nr5a1-Cre_Ai14-177334.05.01.01_491459171_m.swc\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell\n", + "Mod files: \"modfiles/modfiles/CaDynamics.mod\" \"modfiles/modfiles/Ca_HVA.mod\" \"modfiles/modfiles/Ca_LVA.mod\" \"modfiles/modfiles/Ih.mod\" \"modfiles/modfiles/Im.mod\" \"modfiles/modfiles/Im_v2.mod\" \"modfiles/modfiles/Kd.mod\" \"modfiles/modfiles/K_P.mod\" \"modfiles/modfiles/K_T.mod\" \"modfiles/modfiles/Kv2like.mod\" \"modfiles/modfiles/Kv3_1.mod\" \"modfiles/modfiles/Nap.mod\" \"modfiles/modfiles/NaTa.mod\" \"modfiles/modfiles/NaTs.mod\" \"modfiles/modfiles/NaV.mod\" \"modfiles/modfiles/SK.mod\"\n", + "\n", + " -> \u001b[32mCompiling\u001b[0m mod_func.cpp\n", + " => \u001b[32mLINKING\u001b[0m shared library ./libnrnmech.so\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/gjgpb9/miniconda3/envs/bmtk/bin/nrnivmodl:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html\n", + " from pkg_resources import working_set\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Successfully created x86_64/special\n" + ] + } + ], + "source": [ + "import os\n", + "import glob\n", + "\n", + "download_from_allen = False\n", + "if download_from_allen:\n", + " from allensdk.api.queries.biophysical_api import BiophysicalApi\n", + "\n", + " bp = BiophysicalApi()\n", + " bp.cache_stimulus = False\n", + " neuronal_model_id = 472451419 \n", + " bp.cache_data(neuronal_model_id)\n", + " \n", + "working_dir = os.getcwd()\n", + "json_files = glob.glob(os.path.join(working_dir, \"*fit.json\"))\n", + "swc_files = glob.glob(os.path.join(working_dir, \"m.swc\"))\n", + "dynamic_params = json_files[0]\n", + "morphology = swc_files[0]\n", + "print(dynamic_params)\n", + "print(morphology)\n", + "\n", + "_ = os.system('nrnivmodl modfiles')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Warning: no DISPLAY environment variable.\n", + "--No graphics will be displayed.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "NEURON mechanisms not found in modfiles.\n", + "Injection location: Biophys1[0].soma[0](0.5)\n", + "Recording: Biophys1[0].soma[0](0.5)._ref_v\n", + "Current clamp simulation running...\n", + "\n", + "Number of spikes: 12\n", + "\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkcAAAHHCAYAAAC1G/yyAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuNSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/xnp5ZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACvS0lEQVR4nO2dd3hUVfrHv9PTCyUJSC8iIEhVA4oNQRfbys8uigXLYu+sXde2a1nXhrrWXdeua1dYQBTBRpPeIQgk1PRk6v39MXPv3JlMuTOZe84beD/PkyfJzGTmzbnnnvP2Y1EURQHDMAzDMAwDALDKFoBhGIZhGIYSrBwxDMMwDMPoYOWIYRiGYRhGBytHDMMwDMMwOlg5YhiGYRiG0cHKEcMwDMMwjA5WjhiGYRiGYXSwcsQwDMMwDKODlSOGYRiGYRgdrBwxDMNkiNdffx0WiwWbN28W/tk9evTA5MmThX8uw+yPsHLEMAwAYMOGDbjyyivRq1cvZGVloaCgAKNHj8bTTz+NpqYm2eKlzZdffon77rvP8OuPPfZYHHrooeYJ1Armz5+P++67D9XV1bJFYZj9GgufrcYwzBdffIGzzjoLLpcLF110EQ499FB4PB7MmzcPH374ISZPnoyXXnpJtphpcc011+C5556D0aXu2GOPxe7du7F8+fKUP8vv98Pr9cLlcsFisaT898l4/PHHceutt2LTpk3o0aNHxHNutxtWqxUOhyPjn8swBxp22QIwDCOXTZs24dxzz0X37t0xe/ZsdOrUSXtu6tSpWL9+Pb744ouMfFZDQwNyc3NbPK4oCpqbm5GdnZ2Rz5GFzWaDzWaT8tkul0vK5zLM/giH1RjmAOevf/0r6uvr8corr0QoRip9+vTB9ddfDwDYvHkzLBYLXn/99Ravs1gsEeGr++67DxaLBStXrsT555+P4uJiHHXUUQCC+TGnnHIKvvnmG4wYMQLZ2dl48cUXAQDV1dW44YYb0LVrV7hcLvTp0wePPfYYAoGA9t6qHI8//jheeukl9O7dGy6XCyNHjsQvv/yivW7y5Ml47rnnNPnUr1SxWCy45ppr8N///heHHnooXC4XBg4ciK+//jridfFyjr766iscffTRyM3NRX5+PiZMmIAVK1a0+JzVq1fj7LPPRseOHZGdnY1+/frhzjvv1Mbz1ltvBQD07NlT+1/Uz4qVc7Rx40acddZZaNeuHXJycnDkkUe2UHS//fZbWCwWvPfee3jooYfQpUsXZGVl4YQTTsD69etTHiuG2R9gzxHDHOB89tln6NWrF0aNGmXK+5911lno27cvHn744YjQ1po1a3DeeefhyiuvxJQpU9CvXz80NjbimGOOwbZt23DllVeiW7dumD9/PqZNm4YdO3bg73//e8R7/+c//0FdXR2uvPJKWCwW/PWvf8WZZ56JjRs3wuFw4Morr8T27dsxc+ZM/Otf/2rV/zFv3jx89NFH+NOf/oT8/Hz84x//wMSJE1FRUYH27dvH/bt//etfuPjiizF+/Hg89thjaGxsxAsvvICjjjoKixcv1sJjv/32G44++mg4HA5cccUV6NGjBzZs2IDPPvsMDz30EM4880ysXbsWb7/9Np566il06NABANCxY8eYn1tVVYVRo0ahsbER1113Hdq3b4833ngDp512Gj744AP88Y9/jHj9o48+CqvViltuuQU1NTX461//igsuuAA//fRTq8aNYdokCsMwByw1NTUKAOX000839PpNmzYpAJTXXnutxXMAlHvvvVf7/d5771UAKOedd16L13bv3l0BoHz99dcRjz/44INKbm6usnbt2ojH77jjDsVmsykVFRURcrRv317Zu3ev9rpPPvlEAaB89tln2mNTp05VUlnqjjnmGGXgwIEt/jen06msX79ee2zp0qUKAOWZZ57RHnvttdcUAMqmTZsURVGUuro6paioSJkyZUrE+1VWViqFhYURj48ZM0bJz89XtmzZEvHaQCCg/fy3v/0t4v31dO/eXbn44ou132+44QYFgPL9999rj9XV1Sk9e/ZUevToofj9fkVRFGXOnDkKAKV///6K2+3WXvv0008rAJRly5bFGyqG2W/hsBrDHMDU1tYCAPLz8037jKuuuirm4z179sT48eMjHnv//fdx9NFHo7i4GLt379a+xo4dC7/fj++++y7i9eeccw6Ki4u1348++mgAwXBSphk7dix69+6t/T548GAUFBQk/KyZM2eiuroa5513XsT/Y7PZcMQRR2DOnDkAgF27duG7777DpZdeim7dukW8R7qJ3V9++SUOP/xwLZQJAHl5ebjiiiuwefNmrFy5MuL1l1xyCZxOp/a7mWPJMNThsBrDHMAUFBQAAOrq6kz7jJ49exp+fN26dfjtt9/ihop27twZ8Xu0IqEqSvv27UtH1IREf5b6eYk+a926dQCA448/Pubz6virCkgmWwhs2bIFRxxxRIvH+/fvrz2v/zyRY8kw1GHliGEOYAoKCtC5c2fDZevxvBh+vz/u38SrQIv1eCAQwIknnojbbrst5t8cfPDBEb/HqwxTTOhQks5nqUnk//rXv1BWVtbiebudzhIsciwZhjp07kyGYaRwyimn4KWXXsKCBQtQXl6e8LWqNyG6CeGWLVsyIkvv3r1RX1+PsWPHZuT9gPTDUplADcOVlJQk/J969eoFAEmV1FT+l+7du2PNmjUtHl+9erX2PMMwseGcI4Y5wLntttuQm5uLyy+/HFVVVS2e37BhA55++mkAQU9Thw4dWuT+PP/88xmR5eyzz8aCBQvwzTfftHiuuroaPp8v5fdU+yrJ6Co9fvx4FBQU4OGHH4bX623x/K5duwAEK87GjBmDV199FRUVFRGv0XtuUvlf/vCHP+Dnn3/GggULtMcaGhrw0ksvoUePHhgwYEA6/xLDHBCw54hhDnB69+6N//znPzjnnHPQv3//iA7Z8+fPx/vvvx/RP+fyyy/Ho48+issvvxwjRozAd999h7Vr12ZElltvvRWffvopTjnlFEyePBnDhw9HQ0MDli1bhg8++ACbN2/WStiNMnz4cADAddddh/Hjx8Nms+Hcc8/NiLzJKCgowAsvvIBJkyZh2LBhOPfcc9GxY0dUVFTgiy++wOjRo/Hss88CAP7xj3/gqKOOwrBhw3DFFVegZ8+e2Lx5M7744gssWbIk4n+58847ce6558LhcODUU0+N2VjzjjvuwNtvv42TTz4Z1113Hdq1a4c33ngDmzZtwocffgirlW1jhokHK0cMw+C0007Db7/9hr/97W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] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from bmtool.singlecell import CurrentClamp,run_and_plot,Profiler,load_allen_database_cells\n", + "import matplotlib.pyplot as plt\n", + "\n", + "cell_creater = load_allen_database_cells(morphology=morphology,\n", + " dynamic_params=dynamic_params)\n", + "\n", + "profiler = Profiler(template_dir='.', mechanism_dir = 'modfiles', dt=0.1)\n", + "\n", + "sim = CurrentClamp(cell_creater, inj_amp=350., inj_delay=1500., inj_dur=1000., tstop=3000., threshold=-15.)\n", + "\n", + "X, Y = run_and_plot(sim, title='Current Injection', xlabel='Time (ms)',\n", + " ylabel='Membrane Potential (mV)', plot_injection_only=True)\n", + "plt.show()\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "bmtk", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.18" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/examples/single_cell/x86_64/CaDynamics.c b/examples/single_cell/x86_64/CaDynamics.c new file mode 100644 index 0000000..dcf332d --- /dev/null +++ b/examples/single_cell/x86_64/CaDynamics.c @@ -0,0 +1,491 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__CaDynamics +#define _nrn_initial _nrn_initial__CaDynamics +#define nrn_cur _nrn_cur__CaDynamics +#define _nrn_current _nrn_current__CaDynamics +#define nrn_jacob _nrn_jacob__CaDynamics +#define nrn_state _nrn_state__CaDynamics +#define _net_receive _net_receive__CaDynamics +#define states states__CaDynamics + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gamma _p[0] +#define gamma_columnindex 0 +#define decay _p[1] +#define decay_columnindex 1 +#define depth _p[2] +#define depth_columnindex 2 +#define minCai _p[3] +#define minCai_columnindex 3 +#define ica _p[4] +#define ica_columnindex 4 +#define cai _p[5] +#define cai_columnindex 5 +#define Dcai _p[6] +#define Dcai_columnindex 6 +#define v _p[7] +#define v_columnindex 7 +#define _g _p[8] +#define _g_columnindex 8 +#define _ion_ica *_ppvar[0]._pval +#define _ion_cai *_ppvar[1]._pval +#define _style_ca *((int*)_ppvar[2]._pvoid) + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + /* declaration of user functions */ + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_CaDynamics", _hoc_setdata, + 0, 0 +}; + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "decay_CaDynamics", "ms", + "depth_CaDynamics", "um", + "minCai_CaDynamics", "mM", + 0,0 +}; + static double cai0 = 0; + static double delta_t = 0.01; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"CaDynamics", + "gamma_CaDynamics", + "decay_CaDynamics", + "depth_CaDynamics", + "minCai_CaDynamics", + 0, + 0, + 0, + 0}; + static Symbol* _ca_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 9, _prop); + /*initialize range parameters*/ + gamma = 0.05; + decay = 80; + depth = 0.1; + minCai = 0.0001; + _prop->param = _p; + _prop->param_size = 9; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_ca_sym); + nrn_check_conc_write(_prop, prop_ion, 1); + nrn_promote(prop_ion, 3, 0); + _ppvar[0]._pval = &prop_ion->param[3]; /* ica */ + _ppvar[1]._pval = &prop_ion->param[1]; /* cai */ + _ppvar[2]._pvoid = (void*)(&(prop_ion->dparam[0]._i)); /* iontype for ca */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _CaDynamics_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("ca", -10000.); + _ca_sym = hoc_lookup("ca_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 9, 4); + hoc_register_dparam_semantics(_mechtype, 0, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "#ca_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + nrn_writes_conc(_mechtype, 0); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 CaDynamics /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/CaDynamics.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } + +#define FARADAY _nrnunit_FARADAY[_nrnunit_use_legacy_] +static double _nrnunit_FARADAY[2] = {0x1.78e555060882cp+16, 96485.3}; /* 96485.3321233100141 */ +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + Dcai = - ( 10000.0 ) * ( ica * gamma / ( 2.0 * FARADAY * depth ) ) - ( cai - minCai ) / decay ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + Dcai = Dcai / (1. - dt*( ( - ( ( 1.0 ) ) / decay ) )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + cai = cai + (1. - exp(dt*(( - ( ( 1.0 ) ) / decay ))))*(- ( ( - ( 10000.0 ) )*( ( ( ( ica )*( gamma ) ) / ( 2.0 * FARADAY * depth ) ) ) - ( ( ( - minCai ) ) ) / decay ) / ( ( - ( ( 1.0 ) ) / decay ) ) - cai) ; + } + return 0; +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ica = _ion_ica; + cai = _ion_cai; + _ode_spec1 (_p, _ppvar, _thread, _nt); + _ion_cai = cai; + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + _pv[0] = &(_ion_cai); + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ica = _ion_ica; + cai = _ion_cai; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_ca_sym, _ppvar, 0, 3); + nrn_update_ion_pointer(_ca_sym, _ppvar, 1, 1); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + { + cai = minCai ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ica = _ion_ica; + cai = _ion_cai; + initmodel(_p, _ppvar, _thread, _nt); + _ion_cai = cai; + nrn_wrote_conc(_ca_sym, (&(_ion_cai)) - 1, _style_ca); +} +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ica = _ion_ica; + cai = _ion_cai; + { states(_p, _ppvar, _thread, _nt); + } { + } + _ion_cai = cai; +}} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = cai_columnindex; _dlist1[0] = Dcai_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/CaDynamics.mod"; +static const char* nmodl_file_text = + ": Dynamics that track inside calcium concentration\n" + ": modified from Destexhe et al. 1994\n" + "\n" + "NEURON {\n" + " SUFFIX CaDynamics\n" + " USEION ca READ ica WRITE cai\n" + " RANGE decay, gamma, minCai, depth\n" + "}\n" + "\n" + "UNITS {\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + " FARADAY = (faraday) (coulombs)\n" + " (molar) = (1/liter)\n" + " (mM) = (millimolar)\n" + " (um) = (micron)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gamma = 0.05 : percent of free calcium (not buffered)\n" + " decay = 80 (ms) : rate of removal of calcium\n" + " depth = 0.1 (um) : depth of shell\n" + " minCai = 1e-4 (mM)\n" + "}\n" + "\n" + "ASSIGNED {ica (mA/cm2)}\n" + "\n" + "INITIAL {\n" + " cai = minCai\n" + "}\n" + "\n" + "STATE {\n" + " cai (mM)\n" + "}\n" + "\n" + "BREAKPOINT { SOLVE states METHOD cnexp }\n" + "\n" + "DERIVATIVE states {\n" + " cai' = -(10000)*(ica*gamma/(2*FARADAY*depth)) - (cai - minCai)/decay\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/CaDynamics.o b/examples/single_cell/x86_64/CaDynamics.o new file mode 100644 index 0000000..d4da96e Binary files /dev/null and b/examples/single_cell/x86_64/CaDynamics.o differ diff --git a/examples/single_cell/x86_64/Ca_HVA.c b/examples/single_cell/x86_64/Ca_HVA.c new file mode 100644 index 0000000..3af8d3d --- /dev/null +++ b/examples/single_cell/x86_64/Ca_HVA.c @@ -0,0 +1,620 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Ca_HVA +#define _nrn_initial _nrn_initial__Ca_HVA +#define nrn_cur _nrn_cur__Ca_HVA +#define _nrn_current _nrn_current__Ca_HVA +#define nrn_jacob _nrn_jacob__Ca_HVA +#define nrn_state _nrn_state__Ca_HVA +#define _net_receive _net_receive__Ca_HVA +#define rates rates__Ca_HVA +#define states states__Ca_HVA + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ica _p[1] +#define ica_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define eca _p[5] +#define eca_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define mAlpha _p[8] +#define mAlpha_columnindex 8 +#define mBeta _p[9] +#define mBeta_columnindex 9 +#define hInf _p[10] +#define hInf_columnindex 10 +#define hTau _p[11] +#define hTau_columnindex 11 +#define hAlpha _p[12] +#define hAlpha_columnindex 12 +#define hBeta _p[13] +#define hBeta_columnindex 13 +#define Dm _p[14] +#define Dm_columnindex 14 +#define Dh _p[15] +#define Dh_columnindex 15 +#define v _p[16] +#define v_columnindex 16 +#define _g _p[17] +#define _g_columnindex 17 +#define _ion_eca *_ppvar[0]._pval +#define _ion_ica *_ppvar[1]._pval +#define _ion_dicadv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + /* declaration of user functions */ + static void _hoc_rates(void); + static void _hoc_vtrap(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Ca_HVA", _hoc_setdata, + "rates_Ca_HVA", _hoc_rates, + "vtrap_Ca_HVA", _hoc_vtrap, + 0, 0 +}; +#define vtrap vtrap_Ca_HVA + extern double vtrap( _threadargsprotocomma_ double , double ); + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Ca_HVA", "S/cm2", + "ica_Ca_HVA", "mA/cm2", + "g_Ca_HVA", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Ca_HVA", + "gbar_Ca_HVA", + 0, + "ica_Ca_HVA", + "g_Ca_HVA", + 0, + "m_Ca_HVA", + "h_Ca_HVA", + 0, + 0}; + static Symbol* _ca_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 18, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 18; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_ca_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* eca */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ica */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dicadv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Ca_HVA_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("ca", -10000.); + _ca_sym = hoc_lookup("ca_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 18, 4); + hoc_register_dparam_semantics(_mechtype, 0, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Ca_HVA /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Ca_HVA.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + mAlpha = 0.055 * vtrap ( _threadargscomma_ - 27.0 - v , 3.8 ) ; + mBeta = ( 0.94 * exp ( ( - 75.0 - v ) / 17.0 ) ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = 1.0 / ( mAlpha + mBeta ) ; + hAlpha = ( 0.000457 * exp ( ( - 13.0 - v ) / 50.0 ) ) ; + hBeta = ( 0.0065 / ( exp ( ( - v - 15.0 ) / 28.0 ) + 1.0 ) ) ; + hInf = hAlpha / ( hAlpha + hBeta ) ; + hTau = 1.0 / ( hAlpha + hBeta ) ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { + double _lvtrap; + if ( fabs ( _lx / _ly ) < 1e-6 ) { + _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; + } + else { + _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; + } + +return _lvtrap; + } + +static void _hoc_vtrap(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + eca = _ion_eca; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + eca = _ion_eca; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_ca_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_ca_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_ca_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + eca = _ion_eca; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * h ; + ica = g * ( v - eca ) ; + } + _current += ica; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + eca = _ion_eca; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dica; + _dica = ica; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dicadv += (_dica - ica)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ica += ica ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + eca = _ion_eca; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Ca_HVA.mod"; +static const char* nmodl_file_text = + ": Reference: Reuveni, Friedman, Amitai, and Gutnick, J.Neurosci. 1993\n" + "\n" + "NEURON {\n" + " SUFFIX Ca_HVA\n" + " USEION ca READ eca WRITE ica\n" + " RANGE gbar, g, ica \n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2) \n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " eca (mV)\n" + " ica (mA/cm2)\n" + " g (S/cm2)\n" + " mInf\n" + " mTau\n" + " mAlpha\n" + " mBeta\n" + " hInf\n" + " hTau\n" + " hAlpha\n" + " hBeta\n" + "}\n" + "\n" + "STATE { \n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m*m*h\n" + " ica = g*(v-eca)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " UNITSOFF\n" + " : if((v == -27) ){ \n" + " : v = v+0.0001\n" + " : }\n" + " :mAlpha = (0.055*(-27-v))/(exp((-27-v)/3.8) - 1)\n" + " mAlpha = 0.055 * vtrap(-27 - v, 3.8) \n" + " mBeta = (0.94*exp((-75-v)/17))\n" + " mInf = mAlpha/(mAlpha + mBeta)\n" + " mTau = 1/(mAlpha + mBeta)\n" + " hAlpha = (0.000457*exp((-13-v)/50))\n" + " hBeta = (0.0065/(exp((-v-15)/28)+1))\n" + " hInf = hAlpha/(hAlpha + hBeta)\n" + " hTau = 1/(hAlpha + hBeta)\n" + " UNITSON\n" + "}\n" + "\n" + "FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations\n" + " UNITSOFF\n" + " if (fabs(x / y) < 1e-6) {\n" + " vtrap = y * (1 - x / y / 2)\n" + " } else {\n" + " vtrap = x / (exp(x / y) - 1)\n" + " }\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Ca_HVA.o b/examples/single_cell/x86_64/Ca_HVA.o new file mode 100644 index 0000000..491baa7 Binary files /dev/null and b/examples/single_cell/x86_64/Ca_HVA.o differ diff --git a/examples/single_cell/x86_64/Ca_LVA.c b/examples/single_cell/x86_64/Ca_LVA.c new file mode 100644 index 0000000..653184c --- /dev/null +++ b/examples/single_cell/x86_64/Ca_LVA.c @@ -0,0 +1,574 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Ca_LVA +#define _nrn_initial _nrn_initial__Ca_LVA +#define nrn_cur _nrn_cur__Ca_LVA +#define _nrn_current _nrn_current__Ca_LVA +#define nrn_jacob _nrn_jacob__Ca_LVA +#define nrn_state _nrn_state__Ca_LVA +#define _net_receive _net_receive__Ca_LVA +#define rates rates__Ca_LVA +#define states states__Ca_LVA + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ica _p[1] +#define ica_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define eca _p[5] +#define eca_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define hInf _p[8] +#define hInf_columnindex 8 +#define hTau _p[9] +#define hTau_columnindex 9 +#define Dm _p[10] +#define Dm_columnindex 10 +#define Dh _p[11] +#define Dh_columnindex 11 +#define v _p[12] +#define v_columnindex 12 +#define _g _p[13] +#define _g_columnindex 13 +#define _ion_eca *_ppvar[0]._pval +#define _ion_ica *_ppvar[1]._pval +#define _ion_dicadv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Ca_LVA", _hoc_setdata, + "rates_Ca_LVA", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Ca_LVA", "S/cm2", + "ica_Ca_LVA", "mA/cm2", + "g_Ca_LVA", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Ca_LVA", + "gbar_Ca_LVA", + 0, + "ica_Ca_LVA", + "g_Ca_LVA", + 0, + "m_Ca_LVA", + "h_Ca_LVA", + 0, + 0}; + static Symbol* _ca_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 14, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 14; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_ca_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* eca */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ica */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dicadv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Ca_LVA_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("ca", -10000.); + _ca_sym = hoc_lookup("ca_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 14, 4); + hoc_register_dparam_semantics(_mechtype, 0, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Ca_LVA /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Ca_LVA.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 21.0 ) / 10.0 ) ) ; + v = v + 10.0 ; + mInf = 1.0000 / ( 1.0 + exp ( ( v - - 30.000 ) / - 6.0 ) ) ; + mTau = ( 5.0000 + 20.0000 / ( 1.0 + exp ( ( v - - 25.000 ) / 5.0 ) ) ) / _lqt ; + hInf = 1.0000 / ( 1.0 + exp ( ( v - - 80.000 ) / 6.4 ) ) ; + hTau = ( 20.0000 + 50.0000 / ( 1.0 + exp ( ( v - - 40.000 ) / 7.0 ) ) ) / _lqt ; + v = v - 10.0 ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + eca = _ion_eca; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + eca = _ion_eca; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_ca_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_ca_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_ca_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + eca = _ion_eca; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * h ; + ica = g * ( v - eca ) ; + } + _current += ica; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + eca = _ion_eca; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dica; + _dica = ica; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dicadv += (_dica - ica)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ica += ica ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + eca = _ion_eca; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Ca_LVA.mod"; +static const char* nmodl_file_text = + ": Comment: LVA ca channel. Note: mtau is an approximation from the plots\n" + ": Reference: Avery and Johnston 1996, tau from Randall 1997\n" + ": Comment: shifted by -10 mv to correct for junction potential\n" + ": Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21\n" + "\n" + "NEURON {\n" + " SUFFIX Ca_LVA\n" + " USEION ca READ eca WRITE ica\n" + " RANGE gbar, g, ica\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " eca (mV)\n" + " ica (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " hInf\n" + " hTau\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m*m*h\n" + " ica = g*(v-eca)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-21)/10)\n" + "\n" + " UNITSOFF\n" + " v = v + 10\n" + " mInf = 1.0000/(1+ exp((v - -30.000)/-6))\n" + " mTau = (5.0000 + 20.0000/(1+exp((v - -25.000)/5)))/qt\n" + " hInf = 1.0000/(1+ exp((v - -80.000)/6.4))\n" + " hTau = (20.0000 + 50.0000/(1+exp((v - -40.000)/7)))/qt\n" + " v = v - 10\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Ca_LVA.o b/examples/single_cell/x86_64/Ca_LVA.o new file mode 100644 index 0000000..64ab8af Binary files /dev/null and b/examples/single_cell/x86_64/Ca_LVA.o differ diff --git a/examples/single_cell/x86_64/Ih.c b/examples/single_cell/x86_64/Ih.c new file mode 100644 index 0000000..169040d --- /dev/null +++ b/examples/single_cell/x86_64/Ih.c @@ -0,0 +1,556 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Ih +#define _nrn_initial _nrn_initial__Ih +#define nrn_cur _nrn_cur__Ih +#define _nrn_current _nrn_current__Ih +#define nrn_jacob _nrn_jacob__Ih +#define nrn_state _nrn_state__Ih +#define _net_receive _net_receive__Ih +#define rates rates__Ih +#define states states__Ih + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ihcn _p[1] +#define ihcn_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define mInf _p[4] +#define mInf_columnindex 4 +#define mTau _p[5] +#define mTau_columnindex 5 +#define mAlpha _p[6] +#define mAlpha_columnindex 6 +#define mBeta _p[7] +#define mBeta_columnindex 7 +#define Dm _p[8] +#define Dm_columnindex 8 +#define v _p[9] +#define v_columnindex 9 +#define _g _p[10] +#define _g_columnindex 10 + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + /* declaration of user functions */ + static void _hoc_rates(void); + static void _hoc_vtrap(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Ih", _hoc_setdata, + "rates_Ih", _hoc_rates, + "vtrap_Ih", _hoc_vtrap, + 0, 0 +}; +#define vtrap vtrap_Ih + extern double vtrap( _threadargsprotocomma_ double , double ); + /* declare global and static user variables */ +#define ehcn ehcn_Ih + double ehcn = -45; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "ehcn_Ih", "mV", + "gbar_Ih", "S/cm2", + "ihcn_Ih", "mA/cm2", + "g_Ih", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "ehcn_Ih", &ehcn_Ih, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[0]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Ih", + "gbar_Ih", + 0, + "ihcn_Ih", + "g_Ih", + 0, + "m_Ih", + 0, + 0}; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 11, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 11; + _ppvar = nrn_prop_datum_alloc(_mechtype, 1, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Ih_reg() { + int _vectorized = 1; + _initlists(); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 11, 1); + hoc_register_dparam_semantics(_mechtype, 0, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Ih /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Ih.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + mAlpha = 0.001 * 6.43 * vtrap ( _threadargscomma_ v + 154.9 , 11.9 ) ; + mBeta = 0.001 * 193.0 * exp ( v / 33.1 ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = 1.0 / ( mAlpha + mBeta ) ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { + double _lvtrap; + if ( fabs ( _lx / _ly ) < 1e-6 ) { + _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; + } + else { + _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; + } + +return _lvtrap; + } + +static void _hoc_vtrap(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + _ode_matsol_instance1(_threadargs_); + }} + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + initmodel(_p, _ppvar, _thread, _nt); +} +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m ; + ihcn = g * ( v - ehcn ) ; + } + _current += ihcn; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + } + _g = (_g - _rhs)/.001; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + { states(_p, _ppvar, _thread, _nt); + }}} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Ih.mod"; +static const char* nmodl_file_text = + ": Reference: Kole,Hallermann,and Stuart, J. Neurosci. 2006\n" + "\n" + "NEURON {\n" + " SUFFIX Ih\n" + " NONSPECIFIC_CURRENT ihcn\n" + " RANGE gbar, g, ihcn \n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2) \n" + " ehcn = -45.0 (mV)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ihcn (mA/cm2)\n" + " g (S/cm2)\n" + " mInf\n" + " mTau\n" + " mAlpha\n" + " mBeta\n" + "}\n" + "\n" + "STATE { \n" + " m\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m\n" + " ihcn = g*(v-ehcn)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " UNITSOFF\n" + " : if(v == -154.9){\n" + " : v = v + 0.0001\n" + " : }\n" + " :mAlpha = 0.001*6.43*(v+154.9)/(exp((v+154.9)/11.9)-1)\n" + " mAlpha = 0.001 * 6.43 * vtrap(v + 154.9, 11.9)\n" + " mBeta = 0.001*193*exp(v/33.1)\n" + " mInf = mAlpha/(mAlpha + mBeta)\n" + " mTau = 1/(mAlpha + mBeta)\n" + " UNITSON\n" + "}\n" + "\n" + "FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations\n" + " UNITSOFF\n" + " if (fabs(x / y) < 1e-6) {\n" + " vtrap = y * (1 - x / y / 2)\n" + " } else {\n" + " vtrap = x / (exp(x / y) - 1)\n" + " }\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Ih.o b/examples/single_cell/x86_64/Ih.o new file mode 100644 index 0000000..f2cccb5 Binary files /dev/null and b/examples/single_cell/x86_64/Ih.o differ diff --git a/examples/single_cell/x86_64/Im.c b/examples/single_cell/x86_64/Im.c new file mode 100644 index 0000000..696c1fc --- /dev/null +++ b/examples/single_cell/x86_64/Im.c @@ -0,0 +1,553 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Im +#define _nrn_initial _nrn_initial__Im +#define nrn_cur _nrn_cur__Im +#define _nrn_current _nrn_current__Im +#define nrn_jacob _nrn_jacob__Im +#define nrn_state _nrn_state__Im +#define _net_receive _net_receive__Im +#define rates rates__Im +#define states states__Im + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define ek _p[4] +#define ek_columnindex 4 +#define mInf _p[5] +#define mInf_columnindex 5 +#define mTau _p[6] +#define mTau_columnindex 6 +#define mAlpha _p[7] +#define mAlpha_columnindex 7 +#define mBeta _p[8] +#define mBeta_columnindex 8 +#define Dm _p[9] +#define Dm_columnindex 9 +#define v _p[10] +#define v_columnindex 10 +#define _g _p[11] +#define _g_columnindex 11 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Im", _hoc_setdata, + "rates_Im", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Im", "S/cm2", + "ik_Im", "mA/cm2", + "g_Im", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Im", + "gbar_Im", + 0, + "ik_Im", + "g_Im", + 0, + "m_Im", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 12, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 12; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Im_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 12, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Im /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Im.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 21.0 ) / 10.0 ) ) ; + mAlpha = 3.3e-3 * exp ( 2.5 * 0.04 * ( v - - 35.0 ) ) ; + mBeta = 3.3e-3 * exp ( - 2.5 * 0.04 * ( v - - 35.0 ) ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = ( 1.0 / ( mAlpha + mBeta ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Im.mod"; +static const char* nmodl_file_text = + ": Reference: Adams et al. 1982 - M-currents and other potassium currents in bullfrog sympathetic neurones\n" + ": Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21\n" + "\n" + "NEURON {\n" + " SUFFIX Im\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2) \n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " mAlpha\n" + " mBeta\n" + "}\n" + "\n" + "STATE { \n" + " m\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m\n" + " ik = g*(v-ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-21)/10)\n" + "\n" + " UNITSOFF\n" + " mAlpha = 3.3e-3*exp(2.5*0.04*(v - -35))\n" + " mBeta = 3.3e-3*exp(-2.5*0.04*(v - -35))\n" + " mInf = mAlpha/(mAlpha + mBeta)\n" + " mTau = (1/(mAlpha + mBeta))/qt\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Im.o b/examples/single_cell/x86_64/Im.o new file mode 100644 index 0000000..81f752b Binary files /dev/null and b/examples/single_cell/x86_64/Im.o differ diff --git a/examples/single_cell/x86_64/Im_v2.c b/examples/single_cell/x86_64/Im_v2.c new file mode 100644 index 0000000..e611ebb --- /dev/null +++ b/examples/single_cell/x86_64/Im_v2.c @@ -0,0 +1,550 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Im_v2 +#define _nrn_initial _nrn_initial__Im_v2 +#define nrn_cur _nrn_cur__Im_v2 +#define _nrn_current _nrn_current__Im_v2 +#define nrn_jacob _nrn_jacob__Im_v2 +#define nrn_state _nrn_state__Im_v2 +#define _net_receive _net_receive__Im_v2 +#define rates rates__Im_v2 +#define states states__Im_v2 + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define ek _p[4] +#define ek_columnindex 4 +#define mInf _p[5] +#define mInf_columnindex 5 +#define mTau _p[6] +#define mTau_columnindex 6 +#define mAlpha _p[7] +#define mAlpha_columnindex 7 +#define mBeta _p[8] +#define mBeta_columnindex 8 +#define Dm _p[9] +#define Dm_columnindex 9 +#define v _p[10] +#define v_columnindex 10 +#define _g _p[11] +#define _g_columnindex 11 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Im_v2", _hoc_setdata, + "rates_Im_v2", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Im_v2", "S/cm2", + "ik_Im_v2", "mA/cm2", + "g_Im_v2", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Im_v2", + "gbar_Im_v2", + 0, + "ik_Im_v2", + "g_Im_v2", + 0, + "m_Im_v2", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 12, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 12; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Im_v2_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 12, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Im_v2 /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Im_v2.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 30.0 ) / 10.0 ) ) ; + mAlpha = 0.007 * exp ( ( 6.0 * 0.4 * ( v - ( - 48.0 ) ) ) / 26.12 ) ; + mBeta = 0.007 * exp ( ( - 6.0 * ( 1.0 - 0.4 ) * ( v - ( - 48.0 ) ) ) / 26.12 ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = ( 15.0 + 1.0 / ( mAlpha + mBeta ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Im_v2.mod"; +static const char* nmodl_file_text = + ": Based on Im model of Vervaeke et al. (2006)\n" + "\n" + "NEURON {\n" + " SUFFIX Im_v2\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " mAlpha\n" + " mBeta\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar * m\n" + " ik = g * (v - ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf - m) / mTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + "}\n" + "\n" + "PROCEDURE rates() {\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-30)/10)\n" + " mAlpha = 0.007 * exp( (6 * 0.4 * (v - (-48))) / 26.12 )\n" + " mBeta = 0.007 * exp( (-6 * (1 - 0.4) * (v - (-48))) / 26.12 )\n" + "\n" + " mInf = mAlpha / (mAlpha + mBeta)\n" + " mTau = (15 + 1 / (mAlpha + mBeta)) / qt\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Im_v2.o b/examples/single_cell/x86_64/Im_v2.o new file mode 100644 index 0000000..9ded07e Binary files /dev/null and b/examples/single_cell/x86_64/Im_v2.o differ diff --git a/examples/single_cell/x86_64/K_P.c b/examples/single_cell/x86_64/K_P.c new file mode 100644 index 0000000..0cc4cc9 --- /dev/null +++ b/examples/single_cell/x86_64/K_P.c @@ -0,0 +1,586 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__K_P +#define _nrn_initial _nrn_initial__K_P +#define nrn_cur _nrn_cur__K_P +#define _nrn_current _nrn_current__K_P +#define nrn_jacob _nrn_jacob__K_P +#define nrn_state _nrn_state__K_P +#define _net_receive _net_receive__K_P +#define rates rates__K_P +#define states states__K_P + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define ek _p[5] +#define ek_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define hInf _p[8] +#define hInf_columnindex 8 +#define hTau _p[9] +#define hTau_columnindex 9 +#define Dm _p[10] +#define Dm_columnindex 10 +#define Dh _p[11] +#define Dh_columnindex 11 +#define v _p[12] +#define v_columnindex 12 +#define _g _p[13] +#define _g_columnindex 13 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_K_P", _hoc_setdata, + "rates_K_P", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ +#define tauF tauF_K_P + double tauF = 1; +#define vshift vshift_K_P + double vshift = 0; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "vshift_K_P", "mV", + "gbar_K_P", "S/cm2", + "ik_K_P", "mA/cm2", + "g_K_P", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "vshift_K_P", &vshift_K_P, + "tauF_K_P", &tauF_K_P, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"K_P", + "gbar_K_P", + 0, + "ik_K_P", + "g_K_P", + 0, + "m_K_P", + "h_K_P", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 14, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 14; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _K_P_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 14, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 K_P /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/K_P.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 21.0 ) / 10.0 ) ) ; + mInf = 1.0 / ( 1.0 + exp ( - ( v - ( - 14.3 + vshift ) ) / 14.6 ) ) ; + if ( v < - 50.0 + vshift ) { + mTau = tauF * ( 1.25 + 175.03 * exp ( - ( v - vshift ) * - 0.026 ) ) / _lqt ; + } + else { + mTau = tauF * ( 1.25 + 13.0 * exp ( - ( v - vshift ) * 0.026 ) ) / _lqt ; + } + hInf = 1.0 / ( 1.0 + exp ( - ( v - ( - 54.0 + vshift ) ) / - 11.0 ) ) ; + hTau = ( 360.0 + ( 1010.0 + 24.0 * ( v - ( - 55.0 + vshift ) ) ) * exp ( - pow( ( ( v - ( - 75.0 + vshift ) ) / 48.0 ) , 2.0 ) ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * h ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/K_P.mod"; +static const char* nmodl_file_text = + ": Comment: The persistent component of the K current\n" + ": Reference: Voltage-gated K+ channels in layer 5 neocortical pyramidal neurones from young rats:subtypes and gradients,Korngreen and Sakmann, J. Physiology, 2000\n" + "\n" + "\n" + "NEURON {\n" + " SUFFIX K_P\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + " vshift = 0 (mV)\n" + " tauF = 1\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " hInf\n" + " hTau\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m*m*h\n" + " ik = g*(v-ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates() {\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-21)/10)\n" + " UNITSOFF\n" + " mInf = 1 / (1 + exp(-(v - (-14.3 + vshift)) / 14.6))\n" + " if (v < -50 + vshift){\n" + " mTau = tauF * (1.25+175.03*exp(-(v - vshift) * -0.026))/qt\n" + " } else {\n" + " mTau = tauF * (1.25+13*exp(-(v - vshift) * 0.026))/qt\n" + " }\n" + " hInf = 1/(1 + exp(-(v - (-54 + vshift))/-11))\n" + " hTau = (360+(1010+24*(v - (-55 + vshift)))*exp(-((v - (-75 + vshift))/48)^2))/qt\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/K_P.o b/examples/single_cell/x86_64/K_P.o new file mode 100644 index 0000000..0fa124a Binary files /dev/null and b/examples/single_cell/x86_64/K_P.o differ diff --git a/examples/single_cell/x86_64/K_T.c b/examples/single_cell/x86_64/K_T.c new file mode 100644 index 0000000..d91f55b --- /dev/null +++ b/examples/single_cell/x86_64/K_T.c @@ -0,0 +1,581 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__K_T +#define _nrn_initial _nrn_initial__K_T +#define nrn_cur _nrn_cur__K_T +#define _nrn_current _nrn_current__K_T +#define nrn_jacob _nrn_jacob__K_T +#define nrn_state _nrn_state__K_T +#define _net_receive _net_receive__K_T +#define rates rates__K_T +#define states states__K_T + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define ek _p[5] +#define ek_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define hInf _p[8] +#define hInf_columnindex 8 +#define hTau _p[9] +#define hTau_columnindex 9 +#define Dm _p[10] +#define Dm_columnindex 10 +#define Dh _p[11] +#define Dh_columnindex 11 +#define v _p[12] +#define v_columnindex 12 +#define _g _p[13] +#define _g_columnindex 13 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_K_T", _hoc_setdata, + "rates_K_T", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ +#define hTauF hTauF_K_T + double hTauF = 1; +#define mTauF mTauF_K_T + double mTauF = 1; +#define vshift vshift_K_T + double vshift = 0; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "vshift_K_T", "mV", + "gbar_K_T", "S/cm2", + "ik_K_T", "mA/cm2", + "g_K_T", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "vshift_K_T", &vshift_K_T, + "mTauF_K_T", &mTauF_K_T, + "hTauF_K_T", &hTauF_K_T, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"K_T", + "gbar_K_T", + 0, + "ik_K_T", + "g_K_T", + 0, + "m_K_T", + "h_K_T", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 14, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 14; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _K_T_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 14, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 K_T /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/K_T.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 21.0 ) / 10.0 ) ) ; + mInf = 1.0 / ( 1.0 + exp ( - ( v - ( - 47.0 + vshift ) ) / 29.0 ) ) ; + mTau = ( 0.34 + mTauF * 0.92 * exp ( - pow( ( ( v + 71.0 - vshift ) / 59.0 ) , 2.0 ) ) ) / _lqt ; + hInf = 1.0 / ( 1.0 + exp ( - ( v + 66.0 - vshift ) / - 10.0 ) ) ; + hTau = ( 8.0 + hTauF * 49.0 * exp ( - pow( ( ( v + 73.0 - vshift ) / 23.0 ) , 2.0 ) ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * m * m * h ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/K_T.mod"; +static const char* nmodl_file_text = + ": Comment: The transient component of the K current\n" + ": Reference: Voltage-gated K+ channels in layer 5 neocortical pyramidal neurones from young rats:subtypes and gradients,Korngreen and Sakmann, J. Physiology, 2000\n" + "\n" + "NEURON {\n" + " SUFFIX K_T\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + " vshift = 0 (mV)\n" + " mTauF = 1.0\n" + " hTauF = 1.0\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " hInf\n" + " hTau\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m*m*m*m*h\n" + " ik = g*(v-ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-21)/10)\n" + "\n" + " UNITSOFF\n" + " mInf = 1/(1 + exp(-(v - (-47 + vshift)) / 29))\n" + " mTau = (0.34 + mTauF * 0.92*exp(-((v+71-vshift)/59)^2))/qt\n" + " hInf = 1/(1 + exp(-(v+66-vshift)/-10))\n" + " hTau = (8 + hTauF * 49*exp(-((v+73-vshift)/23)^2))/qt\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/K_T.o b/examples/single_cell/x86_64/K_T.o new file mode 100644 index 0000000..581b10e Binary files /dev/null and b/examples/single_cell/x86_64/K_T.o differ diff --git a/examples/single_cell/x86_64/Kd.c b/examples/single_cell/x86_64/Kd.c new file mode 100644 index 0000000..23689c8 --- /dev/null +++ b/examples/single_cell/x86_64/Kd.c @@ -0,0 +1,565 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Kd +#define _nrn_initial _nrn_initial__Kd +#define nrn_cur _nrn_cur__Kd +#define _nrn_current _nrn_current__Kd +#define nrn_jacob _nrn_jacob__Kd +#define nrn_state _nrn_state__Kd +#define _net_receive _net_receive__Kd +#define rates rates__Kd +#define states states__Kd + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define ek _p[5] +#define ek_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define hInf _p[8] +#define hInf_columnindex 8 +#define hTau _p[9] +#define hTau_columnindex 9 +#define Dm _p[10] +#define Dm_columnindex 10 +#define Dh _p[11] +#define Dh_columnindex 11 +#define v _p[12] +#define v_columnindex 12 +#define _g _p[13] +#define _g_columnindex 13 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Kd", _hoc_setdata, + "rates_Kd", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Kd", "S/cm2", + "ik_Kd", "mA/cm2", + "g_Kd", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Kd", + "gbar_Kd", + 0, + "ik_Kd", + "g_Kd", + 0, + "m_Kd", + "h_Kd", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 14, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 14; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Kd_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 14, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Kd /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Kd.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 23.0 ) / 10.0 ) ) ; + mInf = 1.0 - 1.0 / ( 1.0 + exp ( ( v - ( - 43.0 ) ) / 8.0 ) ) ; + mTau = 1.0 ; + hInf = 1.0 / ( 1.0 + exp ( ( v - ( - 67.0 ) ) / 7.3 ) ) ; + hTau = 1500.0 ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * h ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Kd.mod"; +static const char* nmodl_file_text = + ": Based on Kd model of Foust et al. (2011)\n" + "\n" + "\n" + "NEURON {\n" + " SUFFIX Kd\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " hInf\n" + " hTau\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar * m * h\n" + " ik = g * (v - ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf - m) / mTau\n" + " h' = (hInf - h) / hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates() {\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-23)/10)\n" + " mInf = 1 - 1 / (1 + exp((v - (-43)) / 8))\n" + " mTau = 1\n" + " hInf = 1 / (1 + exp((v - (-67)) / 7.3))\n" + " hTau = 1500\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Kd.o b/examples/single_cell/x86_64/Kd.o new file mode 100644 index 0000000..ea26d83 Binary files /dev/null and b/examples/single_cell/x86_64/Kd.o differ diff --git a/examples/single_cell/x86_64/Kv2like.c b/examples/single_cell/x86_64/Kv2like.c new file mode 100644 index 0000000..782c4ff --- /dev/null +++ b/examples/single_cell/x86_64/Kv2like.c @@ -0,0 +1,642 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Kv2like +#define _nrn_initial _nrn_initial__Kv2like +#define nrn_cur _nrn_cur__Kv2like +#define _nrn_current _nrn_current__Kv2like +#define nrn_jacob _nrn_jacob__Kv2like +#define nrn_state _nrn_state__Kv2like +#define _net_receive _net_receive__Kv2like +#define rates rates__Kv2like +#define states states__Kv2like + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h1 _p[4] +#define h1_columnindex 4 +#define h2 _p[5] +#define h2_columnindex 5 +#define ek _p[6] +#define ek_columnindex 6 +#define mInf _p[7] +#define mInf_columnindex 7 +#define mAlpha _p[8] +#define mAlpha_columnindex 8 +#define mBeta _p[9] +#define mBeta_columnindex 9 +#define mTau _p[10] +#define mTau_columnindex 10 +#define hInf _p[11] +#define hInf_columnindex 11 +#define h1Tau _p[12] +#define h1Tau_columnindex 12 +#define h2Tau _p[13] +#define h2Tau_columnindex 13 +#define Dm _p[14] +#define Dm_columnindex 14 +#define Dh1 _p[15] +#define Dh1_columnindex 15 +#define Dh2 _p[16] +#define Dh2_columnindex 16 +#define v _p[17] +#define v_columnindex 17 +#define _g _p[18] +#define _g_columnindex 18 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static void _hoc_vtrap(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Kv2like", _hoc_setdata, + "rates_Kv2like", _hoc_rates, + "vtrap_Kv2like", _hoc_vtrap, + 0, 0 +}; +#define vtrap vtrap_Kv2like + extern double vtrap( _threadargsprotocomma_ double , double ); + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Kv2like", "S/cm2", + "ik_Kv2like", "mA/cm2", + "g_Kv2like", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h20 = 0; + static double h10 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Kv2like", + "gbar_Kv2like", + 0, + "ik_Kv2like", + "g_Kv2like", + 0, + "m_Kv2like", + "h1_Kv2like", + "h2_Kv2like", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 19, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 19; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Kv2like_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 19, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Kv2like /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Kv2like.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[3], _dlist1[3]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh1 = ( hInf - h1 ) / h1Tau ; + Dh2 = ( hInf - h2 ) / h2Tau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh1 = Dh1 / (1. - dt*( ( ( ( - 1.0 ) ) ) / h1Tau )) ; + Dh2 = Dh2 / (1. - dt*( ( ( ( - 1.0 ) ) ) / h2Tau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h1 = h1 + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / h1Tau)))*(- ( ( ( hInf ) ) / h1Tau ) / ( ( ( ( - 1.0 ) ) ) / h1Tau ) - h1) ; + h2 = h2 + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / h2Tau)))*(- ( ( ( hInf ) ) / h2Tau ) / ( ( ( ( - 1.0 ) ) ) / h2Tau ) - h2) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 21.0 ) / 10.0 ) ) ; + mAlpha = 0.12 * vtrap ( _threadargscomma_ - ( v - 43.0 ) , 11.0 ) ; + mBeta = 0.02 * exp ( - ( v + 1.27 ) / 120.0 ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = 2.5 * ( 1.0 / ( _lqt * ( mAlpha + mBeta ) ) ) ; + hInf = 1.0 / ( 1.0 + exp ( ( v + 58.0 ) / 11.0 ) ) ; + h1Tau = ( 360.0 + ( 1010.0 + 23.7 * ( v + 54.0 ) ) * exp ( - pow( ( ( v + 75.0 ) / 48.0 ) , 2.0 ) ) ) / _lqt ; + h2Tau = ( 2350.0 + 1380.0 * exp ( - 0.011 * v ) - 210.0 * exp ( - 0.03 * v ) ) / _lqt ; + if ( h2Tau < 0.0 ) { + h2Tau = 1e-3 ; + } + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { + double _lvtrap; + if ( fabs ( _lx / _ly ) < 1e-6 ) { + _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; + } + else { + _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; + } + +return _lvtrap; + } + +static void _hoc_vtrap(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 3;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 3; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h2 = h20; + h1 = h10; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h1 = hInf ; + h2 = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * ( 0.5 * h1 + 0.5 * h2 ) ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h1_columnindex; _dlist1[1] = Dh1_columnindex; + _slist1[2] = h2_columnindex; _dlist1[2] = Dh2_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Kv2like.mod"; +static const char* nmodl_file_text = + ": Kv2-like channel\n" + ": Adapted from model implemented in Keren et al. 2005\n" + ": Adjusted parameters to be similar to guangxitoxin-sensitive current in mouse CA1 pyramids from Liu and Bean 2014\n" + "\n" + "\n" + "NEURON {\n" + " SUFFIX Kv2like\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mAlpha\n" + " mBeta\n" + " mTau\n" + " hInf\n" + " h1Tau\n" + " h2Tau\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h1\n" + " h2\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar * m * m * (0.5 * h1 + 0.5 * h2)\n" + " ik = g * (v - ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf - m) / mTau\n" + " h1' = (hInf - h1) / h1Tau\n" + " h2' = (hInf - h2) / h2Tau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h1 = hInf\n" + " h2 = hInf\n" + "}\n" + "\n" + "PROCEDURE rates() {\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-21)/10)\n" + " UNITSOFF\n" + " mAlpha = 0.12 * vtrap( -(v - 43), 11.0)\n" + " mBeta = 0.02 * exp(-(v + 1.27) / 120)\n" + " mInf = mAlpha / (mAlpha + mBeta)\n" + " mTau = 2.5 * (1 / (qt * (mAlpha + mBeta)))\n" + "\n" + " hInf = 1/(1 + exp((v + 58) / 11))\n" + " h1Tau = (360 + (1010 + 23.7 * (v + 54)) * exp(-((v + 75) / 48)^2)) / qt\n" + " h2Tau = (2350 + 1380 * exp(-0.011 * v) - 210 * exp(-0.03 * v)) / qt\n" + " if (h2Tau < 0) {\n" + " h2Tau = 1e-3\n" + " }\n" + " UNITSON\n" + "}\n" + "\n" + "FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations\n" + " UNITSOFF\n" + " if (fabs(x / y) < 1e-6) {\n" + " vtrap = y * (1 - x / y / 2)\n" + " } else {\n" + " vtrap = x / (exp(x / y) - 1)\n" + " }\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Kv2like.o b/examples/single_cell/x86_64/Kv2like.o new file mode 100644 index 0000000..ae19f03 Binary files /dev/null and b/examples/single_cell/x86_64/Kv2like.o differ diff --git a/examples/single_cell/x86_64/Kv3_1.c b/examples/single_cell/x86_64/Kv3_1.c new file mode 100644 index 0000000..32f0a2c --- /dev/null +++ b/examples/single_cell/x86_64/Kv3_1.c @@ -0,0 +1,540 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Kv3_1 +#define _nrn_initial _nrn_initial__Kv3_1 +#define nrn_cur _nrn_cur__Kv3_1 +#define _nrn_current _nrn_current__Kv3_1 +#define nrn_jacob _nrn_jacob__Kv3_1 +#define nrn_state _nrn_state__Kv3_1 +#define _net_receive _net_receive__Kv3_1 +#define rates rates__Kv3_1 +#define states states__Kv3_1 + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define ek _p[4] +#define ek_columnindex 4 +#define mInf _p[5] +#define mInf_columnindex 5 +#define mTau _p[6] +#define mTau_columnindex 6 +#define Dm _p[7] +#define Dm_columnindex 7 +#define v _p[8] +#define v_columnindex 8 +#define _g _p[9] +#define _g_columnindex 9 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Kv3_1", _hoc_setdata, + "rates_Kv3_1", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ +#define vshift vshift_Kv3_1 + double vshift = 0; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "vshift_Kv3_1", "mV", + "gbar_Kv3_1", "S/cm2", + "ik_Kv3_1", "mA/cm2", + "g_Kv3_1", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "vshift_Kv3_1", &vshift_Kv3_1, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Kv3_1", + "gbar_Kv3_1", + 0, + "ik_Kv3_1", + "g_Kv3_1", + 0, + "m_Kv3_1", + 0, + 0}; + static Symbol* _k_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 10, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 10; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Kv3_1_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + _k_sym = hoc_lookup("k_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 10, 4); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Kv3_1 /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Kv3_1.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + mInf = 1.0 / ( 1.0 + exp ( ( ( v - ( 18.700 + vshift ) ) / ( - 9.700 ) ) ) ) ; + mTau = 0.2 * 20.000 / ( 1.0 + exp ( ( ( v - ( - 46.560 + vshift ) ) / ( - 44.140 ) ) ) ) ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Kv3_1.mod"; +static const char* nmodl_file_text = + ": Comment: Kv3-like potassium current\n" + "\n" + "NEURON {\n" + " SUFFIX Kv3_1\n" + " USEION k READ ek WRITE ik\n" + " RANGE gbar, g, ik \n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + " vshift = 0 (mV)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ek (mV)\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + " mInf\n" + " mTau\n" + "}\n" + "\n" + "STATE { \n" + " m\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m\n" + " ik = g*(v-ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " UNITSOFF\n" + " mInf = 1/(1+exp(((v -(18.700 + vshift))/(-9.700))))\n" + " mTau = 0.2*20.000/(1+exp(((v -(-46.560 + vshift))/(-44.140))))\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Kv3_1.o b/examples/single_cell/x86_64/Kv3_1.o new file mode 100644 index 0000000..2ba3b16 Binary files /dev/null and b/examples/single_cell/x86_64/Kv3_1.o differ diff --git a/examples/single_cell/x86_64/NaTa.c b/examples/single_cell/x86_64/NaTa.c new file mode 100644 index 0000000..2044fa0 --- /dev/null +++ b/examples/single_cell/x86_64/NaTa.c @@ -0,0 +1,664 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__NaTa +#define _nrn_initial _nrn_initial__NaTa +#define nrn_cur _nrn_cur__NaTa +#define _nrn_current _nrn_current__NaTa +#define nrn_jacob _nrn_jacob__NaTa +#define nrn_state _nrn_state__NaTa +#define _net_receive _net_receive__NaTa +#define rates rates__NaTa +#define states states__NaTa + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ina _p[1] +#define ina_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define ena _p[5] +#define ena_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define mAlpha _p[8] +#define mAlpha_columnindex 8 +#define mBeta _p[9] +#define mBeta_columnindex 9 +#define hInf _p[10] +#define hInf_columnindex 10 +#define hTau _p[11] +#define hTau_columnindex 11 +#define hAlpha _p[12] +#define hAlpha_columnindex 12 +#define hBeta _p[13] +#define hBeta_columnindex 13 +#define Dm _p[14] +#define Dm_columnindex 14 +#define Dh _p[15] +#define Dh_columnindex 15 +#define v _p[16] +#define v_columnindex 16 +#define _g _p[17] +#define _g_columnindex 17 +#define _ion_ena *_ppvar[0]._pval +#define _ion_ina *_ppvar[1]._pval +#define _ion_dinadv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static void _hoc_vtrap(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_NaTa", _hoc_setdata, + "rates_NaTa", _hoc_rates, + "vtrap_NaTa", _hoc_vtrap, + 0, 0 +}; +#define vtrap vtrap_NaTa + extern double vtrap( _threadargsprotocomma_ double , double ); + /* declare global and static user variables */ +#define hk hk_NaTa + double hk = 6; +#define hvhalf hvhalf_NaTa + double hvhalf = -69; +#define hbetaF hbetaF_NaTa + double hbetaF = 0.015; +#define halphaF halphaF_NaTa + double halphaF = 0.015; +#define mk mk_NaTa + double mk = 6; +#define mvhalf mvhalf_NaTa + double mvhalf = -48; +#define mbetaF mbetaF_NaTa + double mbetaF = 0.124; +#define malphaF malphaF_NaTa + double malphaF = 0.182; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "mvhalf_NaTa", "mV", + "mk_NaTa", "mV", + "hvhalf_NaTa", "mV", + "hk_NaTa", "mV", + "gbar_NaTa", "S/cm2", + "ina_NaTa", "mA/cm2", + "g_NaTa", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "malphaF_NaTa", &malphaF_NaTa, + "mbetaF_NaTa", &mbetaF_NaTa, + "mvhalf_NaTa", &mvhalf_NaTa, + "mk_NaTa", &mk_NaTa, + "halphaF_NaTa", &halphaF_NaTa, + "hbetaF_NaTa", &hbetaF_NaTa, + "hvhalf_NaTa", &hvhalf_NaTa, + "hk_NaTa", &hk_NaTa, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"NaTa", + "gbar_NaTa", + 0, + "ina_NaTa", + "g_NaTa", + 0, + "m_NaTa", + "h_NaTa", + 0, + 0}; + static Symbol* _na_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 18, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 18; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_na_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ena */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ina */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dinadv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _NaTa_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("na", -10000.); + _na_sym = hoc_lookup("na_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 18, 4); + hoc_register_dparam_semantics(_mechtype, 0, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 NaTa /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/NaTa.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 23.0 ) / 10.0 ) ) ; + mAlpha = malphaF * vtrap ( _threadargscomma_ - ( v - mvhalf ) , mk ) ; + mBeta = mbetaF * vtrap ( _threadargscomma_ ( v - mvhalf ) , mk ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = ( 1.0 / ( mAlpha + mBeta ) ) / _lqt ; + hAlpha = halphaF * vtrap ( _threadargscomma_ v - hvhalf , hk ) ; + hBeta = hbetaF * vtrap ( _threadargscomma_ - ( v - hvhalf ) , hk ) ; + hInf = hAlpha / ( hAlpha + hBeta ) ; + hTau = ( 1.0 / ( hAlpha + hBeta ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { + double _lvtrap; + if ( fabs ( _lx / _ly ) < 1e-6 ) { + _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; + } + else { + _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; + } + +return _lvtrap; + } + +static void _hoc_vtrap(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_na_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_na_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_na_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ena = _ion_ena; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * m * h ; + ina = g * ( v - ena ) ; + } + _current += ina; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ena = _ion_ena; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dina; + _dina = ina; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dinadv += (_dina - ina)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ina += ina ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ena = _ion_ena; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/NaTa.mod"; +static const char* nmodl_file_text = + ": Reference: Colbert and Pan 2002\n" + "\n" + "NEURON {\n" + " SUFFIX NaTa\n" + " USEION na READ ena WRITE ina\n" + " RANGE gbar, g, ina\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "\n" + " malphaF = 0.182\n" + " mbetaF = 0.124\n" + " mvhalf = -48 (mV)\n" + " mk = 6 (mV)\n" + "\n" + " halphaF = 0.015\n" + " hbetaF = 0.015\n" + " hvhalf = -69 (mV)\n" + " hk = 6 (mV)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ena (mV)\n" + " ina (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " mAlpha\n" + " mBeta\n" + " hInf\n" + " hTau\n" + " hAlpha\n" + " hBeta\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m*m*m*h\n" + " ina = g*(v-ena)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-23)/10)\n" + "\n" + " UNITSOFF\n" + " mAlpha = malphaF * vtrap(-(v - mvhalf), mk)\n" + " mBeta = mbetaF * vtrap((v - mvhalf), mk)\n" + "\n" + " mInf = mAlpha/(mAlpha + mBeta)\n" + " mTau = (1/(mAlpha + mBeta))/qt\n" + "\n" + " hAlpha = halphaF * vtrap(v - hvhalf, hk) : ng - adjusted this to match actual Colbert & Pan values for soma model\n" + " hBeta = hbetaF * vtrap(-(v - hvhalf), hk) : ng - adjusted this to match actual Colbert & Pan values for soma model\n" + "\n" + " hInf = hAlpha/(hAlpha + hBeta)\n" + " hTau = (1/(hAlpha + hBeta))/qt\n" + " UNITSON\n" + "}\n" + "\n" + "FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations\n" + " UNITSOFF\n" + " if (fabs(x / y) < 1e-6) {\n" + " vtrap = y * (1 - x / y / 2)\n" + " } else {\n" + " vtrap = x / (exp(x / y) - 1)\n" + " }\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/NaTa.o b/examples/single_cell/x86_64/NaTa.o new file mode 100644 index 0000000..dd84f8e Binary files /dev/null and b/examples/single_cell/x86_64/NaTa.o differ diff --git a/examples/single_cell/x86_64/NaTs.c b/examples/single_cell/x86_64/NaTs.c new file mode 100644 index 0000000..a838eeb --- /dev/null +++ b/examples/single_cell/x86_64/NaTs.c @@ -0,0 +1,664 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__NaTs +#define _nrn_initial _nrn_initial__NaTs +#define nrn_cur _nrn_cur__NaTs +#define _nrn_current _nrn_current__NaTs +#define nrn_jacob _nrn_jacob__NaTs +#define nrn_state _nrn_state__NaTs +#define _net_receive _net_receive__NaTs +#define rates rates__NaTs +#define states states__NaTs + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ina _p[1] +#define ina_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define m _p[3] +#define m_columnindex 3 +#define h _p[4] +#define h_columnindex 4 +#define ena _p[5] +#define ena_columnindex 5 +#define mInf _p[6] +#define mInf_columnindex 6 +#define mTau _p[7] +#define mTau_columnindex 7 +#define mAlpha _p[8] +#define mAlpha_columnindex 8 +#define mBeta _p[9] +#define mBeta_columnindex 9 +#define hInf _p[10] +#define hInf_columnindex 10 +#define hTau _p[11] +#define hTau_columnindex 11 +#define hAlpha _p[12] +#define hAlpha_columnindex 12 +#define hBeta _p[13] +#define hBeta_columnindex 13 +#define Dm _p[14] +#define Dm_columnindex 14 +#define Dh _p[15] +#define Dh_columnindex 15 +#define v _p[16] +#define v_columnindex 16 +#define _g _p[17] +#define _g_columnindex 17 +#define _ion_ena *_ppvar[0]._pval +#define _ion_ina *_ppvar[1]._pval +#define _ion_dinadv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static void _hoc_vtrap(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_NaTs", _hoc_setdata, + "rates_NaTs", _hoc_rates, + "vtrap_NaTs", _hoc_vtrap, + 0, 0 +}; +#define vtrap vtrap_NaTs + extern double vtrap( _threadargsprotocomma_ double , double ); + /* declare global and static user variables */ +#define hk hk_NaTs + double hk = 6; +#define hvhalf hvhalf_NaTs + double hvhalf = -66; +#define hbetaF hbetaF_NaTs + double hbetaF = 0.015; +#define halphaF halphaF_NaTs + double halphaF = 0.015; +#define mk mk_NaTs + double mk = 6; +#define mvhalf mvhalf_NaTs + double mvhalf = -40; +#define mbetaF mbetaF_NaTs + double mbetaF = 0.124; +#define malphaF malphaF_NaTs + double malphaF = 0.182; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "mvhalf_NaTs", "mV", + "mk_NaTs", "mV", + "hvhalf_NaTs", "mV", + "hk_NaTs", "mV", + "gbar_NaTs", "S/cm2", + "ina_NaTs", "mA/cm2", + "g_NaTs", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + static double m0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "malphaF_NaTs", &malphaF_NaTs, + "mbetaF_NaTs", &mbetaF_NaTs, + "mvhalf_NaTs", &mvhalf_NaTs, + "mk_NaTs", &mk_NaTs, + "halphaF_NaTs", &halphaF_NaTs, + "hbetaF_NaTs", &hbetaF_NaTs, + "hvhalf_NaTs", &hvhalf_NaTs, + "hk_NaTs", &hk_NaTs, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"NaTs", + "gbar_NaTs", + 0, + "ina_NaTs", + "g_NaTs", + 0, + "m_NaTs", + "h_NaTs", + 0, + 0}; + static Symbol* _na_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 18, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 18; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_na_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ena */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ina */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dinadv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _NaTs_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("na", -10000.); + _na_sym = hoc_lookup("na_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 18, 4); + hoc_register_dparam_semantics(_mechtype, 0, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 NaTs /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/NaTs.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[2], _dlist1[2]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dm = ( mInf - m ) / mTau ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dm = Dm / (1. - dt*( ( ( ( - 1.0 ) ) ) / mTau )) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + m = m + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / mTau)))*(- ( ( ( mInf ) ) / mTau ) / ( ( ( ( - 1.0 ) ) ) / mTau ) - m) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 23.0 ) / 10.0 ) ) ; + mAlpha = malphaF * vtrap ( _threadargscomma_ - ( v - mvhalf ) , mk ) ; + mBeta = mbetaF * vtrap ( _threadargscomma_ ( v - mvhalf ) , mk ) ; + mInf = mAlpha / ( mAlpha + mBeta ) ; + mTau = ( 1.0 / ( mAlpha + mBeta ) ) / _lqt ; + hAlpha = halphaF * vtrap ( _threadargscomma_ v - hvhalf , hk ) ; + hBeta = hbetaF * vtrap ( _threadargscomma_ - ( v - hvhalf ) , hk ) ; + hInf = hAlpha / ( hAlpha + hBeta ) ; + hTau = ( 1.0 / ( hAlpha + hBeta ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { + double _lvtrap; + if ( fabs ( _lx / _ly ) < 1e-6 ) { + _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; + } + else { + _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; + } + +return _lvtrap; + } + +static void _hoc_vtrap(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 2;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 2; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_na_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_na_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_na_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + m = m0; + { + rates ( _threadargs_ ) ; + m = mInf ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ena = _ion_ena; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * m * m * m * h ; + ina = g * ( v - ena ) ; + } + _current += ina; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ena = _ion_ena; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dina; + _dina = ina; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dinadv += (_dina - ina)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ina += ina ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ena = _ion_ena; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = m_columnindex; _dlist1[0] = Dm_columnindex; + _slist1[1] = h_columnindex; _dlist1[1] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/NaTs.mod"; +static const char* nmodl_file_text = + ": Reference: Colbert and Pan 2002\n" + "\n" + "NEURON {\n" + " SUFFIX NaTs\n" + " USEION na READ ena WRITE ina\n" + " RANGE gbar, g, ina\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "\n" + " malphaF = 0.182\n" + " mbetaF = 0.124\n" + " mvhalf = -40 (mV)\n" + " mk = 6 (mV)\n" + "\n" + " halphaF = 0.015\n" + " hbetaF = 0.015\n" + " hvhalf = -66 (mV)\n" + " hk = 6 (mV)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ena (mV)\n" + " ina (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " mTau\n" + " mAlpha\n" + " mBeta\n" + " hInf\n" + " hTau\n" + " hAlpha\n" + " hBeta\n" + "}\n" + "\n" + "STATE {\n" + " m\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar*m*m*m*h\n" + " ina = g*(v-ena)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " m' = (mInf-m)/mTau\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " m = mInf\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-23)/10)\n" + "\n" + " UNITSOFF\n" + " mAlpha = malphaF * vtrap(-(v - mvhalf), mk)\n" + " mBeta = mbetaF * vtrap((v - mvhalf), mk)\n" + "\n" + " mInf = mAlpha/(mAlpha + mBeta)\n" + " mTau = (1/(mAlpha + mBeta))/qt\n" + "\n" + " hAlpha = halphaF * vtrap(v - hvhalf, hk)\n" + " hBeta = hbetaF * vtrap(-(v - hvhalf), hk)\n" + "\n" + " hInf = hAlpha/(hAlpha + hBeta)\n" + " hTau = (1/(hAlpha + hBeta))/qt\n" + " UNITSON\n" + "}\n" + "\n" + "FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations\n" + " UNITSOFF\n" + " if (fabs(x / y) < 1e-6) {\n" + " vtrap = y * (1 - x / y / 2)\n" + " } else {\n" + " vtrap = x / (exp(x / y) - 1)\n" + " }\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/NaTs.o b/examples/single_cell/x86_64/NaTs.o new file mode 100644 index 0000000..fab894c Binary files /dev/null and b/examples/single_cell/x86_64/NaTs.o differ diff --git a/examples/single_cell/x86_64/NaV.c b/examples/single_cell/x86_64/NaV.c new file mode 100644 index 0000000..91a64e0 --- /dev/null +++ b/examples/single_cell/x86_64/NaV.c @@ -0,0 +1,1497 @@ +/* Created by Language version: 7.7.0 */ +/* NOT VECTORIZED */ +#define NRN_VECTORIZED 0 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__NaV +#define _nrn_initial _nrn_initial__NaV +#define nrn_cur _nrn_cur__NaV +#define _nrn_current _nrn_current__NaV +#define nrn_jacob _nrn_jacob__NaV +#define nrn_state _nrn_state__NaV +#define _net_receive _net_receive__NaV +#define activation activation__NaV +#define rates rates__NaV + +#define _threadargscomma_ /**/ +#define _threadargsprotocomma_ /**/ +#define _threadargs_ /**/ +#define _threadargsproto_ /**/ + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + static double *_p; static Datum *_ppvar; + +#define t nrn_threads->_t +#define dt nrn_threads->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define g _p[1] +#define g_columnindex 1 +#define C1 _p[2] +#define C1_columnindex 2 +#define C2 _p[3] +#define C2_columnindex 3 +#define C3 _p[4] +#define C3_columnindex 4 +#define C4 _p[5] +#define C4_columnindex 5 +#define C5 _p[6] +#define C5_columnindex 6 +#define I1 _p[7] +#define I1_columnindex 7 +#define I2 _p[8] +#define I2_columnindex 8 +#define I3 _p[9] +#define I3_columnindex 9 +#define I4 _p[10] +#define I4_columnindex 10 +#define I5 _p[11] +#define I5_columnindex 11 +#define O _p[12] +#define O_columnindex 12 +#define I6 _p[13] +#define I6_columnindex 13 +#define f01 _p[14] +#define f01_columnindex 14 +#define f02 _p[15] +#define f02_columnindex 15 +#define f03 _p[16] +#define f03_columnindex 16 +#define f04 _p[17] +#define f04_columnindex 17 +#define f0O _p[18] +#define f0O_columnindex 18 +#define f11 _p[19] +#define f11_columnindex 19 +#define f12 _p[20] +#define f12_columnindex 20 +#define f13 _p[21] +#define f13_columnindex 21 +#define f14 _p[22] +#define f14_columnindex 22 +#define f1n _p[23] +#define f1n_columnindex 23 +#define fi1 _p[24] +#define fi1_columnindex 24 +#define fi2 _p[25] +#define fi2_columnindex 25 +#define fi3 _p[26] +#define fi3_columnindex 26 +#define fi4 _p[27] +#define fi4_columnindex 27 +#define fi5 _p[28] +#define fi5_columnindex 28 +#define fin _p[29] +#define fin_columnindex 29 +#define b01 _p[30] +#define b01_columnindex 30 +#define b02 _p[31] +#define b02_columnindex 31 +#define b03 _p[32] +#define b03_columnindex 32 +#define b04 _p[33] +#define b04_columnindex 33 +#define b0O _p[34] +#define b0O_columnindex 34 +#define b11 _p[35] +#define b11_columnindex 35 +#define b12 _p[36] +#define b12_columnindex 36 +#define b13 _p[37] +#define b13_columnindex 37 +#define b14 _p[38] +#define b14_columnindex 38 +#define b1n _p[39] +#define b1n_columnindex 39 +#define bi1 _p[40] +#define bi1_columnindex 40 +#define bi2 _p[41] +#define bi2_columnindex 41 +#define bi3 _p[42] +#define bi3_columnindex 42 +#define bi4 _p[43] +#define bi4_columnindex 43 +#define bi5 _p[44] +#define bi5_columnindex 44 +#define bin _p[45] +#define bin_columnindex 45 +#define ena _p[46] +#define ena_columnindex 46 +#define ina _p[47] +#define ina_columnindex 47 +#define DC1 _p[48] +#define DC1_columnindex 48 +#define DC2 _p[49] +#define DC2_columnindex 49 +#define DC3 _p[50] +#define DC3_columnindex 50 +#define DC4 _p[51] +#define DC4_columnindex 51 +#define DC5 _p[52] +#define DC5_columnindex 52 +#define DI1 _p[53] +#define DI1_columnindex 53 +#define DI2 _p[54] +#define DI2_columnindex 54 +#define DI3 _p[55] +#define DI3_columnindex 55 +#define DI4 _p[56] +#define DI4_columnindex 56 +#define DI5 _p[57] +#define DI5_columnindex 57 +#define DO _p[58] +#define DO_columnindex 58 +#define DI6 _p[59] +#define DI6_columnindex 59 +#define _g _p[60] +#define _g_columnindex 60 +#define _ion_ena *_ppvar[0]._pval +#define _ion_ina *_ppvar[1]._pval +#define _ion_dinadv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _p = _prop->param; _ppvar = _prop->dparam; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_NaV", _hoc_setdata, + "rates_NaV", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ +#define Coff Coff_NaV + double Coff = 40; +#define Con Con_NaV + double Con = 0.01; +#define Ooff Ooff_NaV + double Ooff = 0.05; +#define Oon Oon_NaV + double Oon = 8; +#define alfac alfac_NaV + double alfac = 2.51; +#define alpha alpha_NaV + double alpha = 400; +#define btfac btfac_NaV + double btfac = 5.32; +#define beta beta_NaV + double beta = 12; +#define delta delta_NaV + double delta = 60; +#define gamma gamma_NaV + double gamma = 250; +#define x2 x2_NaV + double x2 = -24; +#define x1 x1_NaV + double x1 = 24; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "Con_NaV", "/ms", + "Coff_NaV", "/ms", + "Oon_NaV", "/ms", + "Ooff_NaV", "/ms", + "alpha_NaV", "/ms", + "beta_NaV", "/ms", + "gamma_NaV", "/ms", + "delta_NaV", "/ms", + "x1_NaV", "mV", + "x2_NaV", "mV", + "gbar_NaV", "S/cm2", + "g_NaV", "S/cm2", + 0,0 +}; + static double C50 = 0; + static double C40 = 0; + static double C30 = 0; + static double C20 = 0; + static double C10 = 0; + static double I60 = 0; + static double I50 = 0; + static double I40 = 0; + static double I30 = 0; + static double I20 = 0; + static double I10 = 0; + static double O0 = 0; + static double delta_t = 0.01; + static double v = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "Con_NaV", &Con_NaV, + "Coff_NaV", &Coff_NaV, + "Oon_NaV", &Oon_NaV, + "Ooff_NaV", &Ooff_NaV, + "alpha_NaV", &alpha_NaV, + "beta_NaV", &beta_NaV, + "gamma_NaV", &gamma_NaV, + "delta_NaV", &delta_NaV, + "alfac_NaV", &alfac_NaV, + "btfac_NaV", &btfac_NaV, + "x1_NaV", &x1_NaV, + "x2_NaV", &x2_NaV, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"NaV", + "gbar_NaV", + 0, + "g_NaV", + 0, + "C1_NaV", + "C2_NaV", + "C3_NaV", + "C4_NaV", + "C5_NaV", + "I1_NaV", + "I2_NaV", + "I3_NaV", + "I4_NaV", + "I5_NaV", + "O_NaV", + "I6_NaV", + 0, + 0}; + static Symbol* _na_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 61, _prop); + /*initialize range parameters*/ + gbar = 0.015; + _prop->param = _p; + _prop->param_size = 61; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_na_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ena */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ina */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dinadv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _NaV_reg() { + int _vectorized = 0; + _initlists(); + ion_reg("na", -10000.); + _na_sym = hoc_lookup("na_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 0); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 61, 4); + hoc_register_dparam_semantics(_mechtype, 0, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 NaV /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/NaV.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = "Mouse sodium current"; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(double); + extern double *_getelm(); + +#define _MATELM1(_row,_col) *(_getelm(_row + 1, _col + 1)) + +#define _RHS1(_arg) _coef1[_arg + 1] + static double *_coef1; + +#define _linmat1 1 + static void* _sparseobj1; + static void* _cvsparseobj1; + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + +#define _RHS2(arg) _coef2[arg][12] + static int _slist2[12];static double **_coef2; + static void seqinitial(); + static int _slist1[12], _dlist1[12]; static double *_temp1; + static int activation(); + +static int activation () + {_reset=0; + { + double b_flux, f_flux, _term; int _i; + {int _i; double _dt1 = 1.0/dt; +for(_i=1;_i<12;_i++){ + _RHS1(_i) = -_dt1*(_p[_slist1[_i]] - _p[_dlist1[_i]]); + _MATELM1(_i, _i) = _dt1; + +} } + rates ( _threadargscomma_ v ) ; + /* ~ C1 <-> C2 ( f01 , b01 )*/ + f_flux = f01 * C1 ; + b_flux = b01 * C2 ; + _RHS1( 5) -= (f_flux - b_flux); + _RHS1( 4) += (f_flux - b_flux); + + _term = f01 ; + _MATELM1( 5 ,5) += _term; + _MATELM1( 4 ,5) -= _term; + _term = b01 ; + _MATELM1( 5 ,4) -= _term; + _MATELM1( 4 ,4) += _term; + /*REACTION*/ + /* ~ C2 <-> C3 ( f02 , b02 )*/ + f_flux = f02 * C2 ; + b_flux = b02 * C3 ; + _RHS1( 4) -= (f_flux - b_flux); + _RHS1( 3) += (f_flux - b_flux); + + _term = f02 ; + _MATELM1( 4 ,4) += _term; + _MATELM1( 3 ,4) -= _term; + _term = b02 ; + _MATELM1( 4 ,3) -= _term; + _MATELM1( 3 ,3) += _term; + /*REACTION*/ + /* ~ C3 <-> C4 ( f03 , b03 )*/ + f_flux = f03 * C3 ; + b_flux = b03 * C4 ; + _RHS1( 3) -= (f_flux - b_flux); + _RHS1( 2) += (f_flux - b_flux); + + _term = f03 ; + _MATELM1( 3 ,3) += _term; + _MATELM1( 2 ,3) -= _term; + _term = b03 ; + _MATELM1( 3 ,2) -= _term; + _MATELM1( 2 ,2) += _term; + /*REACTION*/ + /* ~ C4 <-> C5 ( f04 , b04 )*/ + f_flux = f04 * C4 ; + b_flux = b04 * C5 ; + _RHS1( 2) -= (f_flux - b_flux); + _RHS1( 1) += (f_flux - b_flux); + + _term = f04 ; + _MATELM1( 2 ,2) += _term; + _MATELM1( 1 ,2) -= _term; + _term = b04 ; + _MATELM1( 2 ,1) -= _term; + _MATELM1( 1 ,1) += _term; + /*REACTION*/ + /* ~ C5 <-> O ( f0O , b0O )*/ + f_flux = f0O * C5 ; + b_flux = b0O * O ; + _RHS1( 1) -= (f_flux - b_flux); + _RHS1( 11) += (f_flux - b_flux); + + _term = f0O ; + _MATELM1( 1 ,1) += _term; + _MATELM1( 11 ,1) -= _term; + _term = b0O ; + _MATELM1( 1 ,11) -= _term; + _MATELM1( 11 ,11) += _term; + /*REACTION*/ + /* ~ O <-> I6 ( fin , bin )*/ + f_flux = fin * O ; + b_flux = bin * I6 ; + _RHS1( 11) -= (f_flux - b_flux); + + _term = fin ; + _MATELM1( 11 ,11) += _term; + _term = bin ; + _MATELM1( 11 ,0) -= _term; + /*REACTION*/ + /* ~ I1 <-> I2 ( f11 , b11 )*/ + f_flux = f11 * I1 ; + b_flux = b11 * I2 ; + _RHS1( 10) -= (f_flux - b_flux); + _RHS1( 9) += (f_flux - b_flux); + + _term = f11 ; + _MATELM1( 10 ,10) += _term; + _MATELM1( 9 ,10) -= _term; + _term = b11 ; + _MATELM1( 10 ,9) -= _term; + _MATELM1( 9 ,9) += _term; + /*REACTION*/ + /* ~ I2 <-> I3 ( f12 , b12 )*/ + f_flux = f12 * I2 ; + b_flux = b12 * I3 ; + _RHS1( 9) -= (f_flux - b_flux); + _RHS1( 8) += (f_flux - b_flux); + + _term = f12 ; + _MATELM1( 9 ,9) += _term; + _MATELM1( 8 ,9) -= _term; + _term = b12 ; + _MATELM1( 9 ,8) -= _term; + _MATELM1( 8 ,8) += _term; + /*REACTION*/ + /* ~ I3 <-> I4 ( f13 , b13 )*/ + f_flux = f13 * I3 ; + b_flux = b13 * I4 ; + _RHS1( 8) -= (f_flux - b_flux); + _RHS1( 7) += (f_flux - b_flux); + + _term = f13 ; + _MATELM1( 8 ,8) += _term; + _MATELM1( 7 ,8) -= _term; + _term = b13 ; + _MATELM1( 8 ,7) -= _term; + _MATELM1( 7 ,7) += _term; + /*REACTION*/ + /* ~ I4 <-> I5 ( f14 , b14 )*/ + f_flux = f14 * I4 ; + b_flux = b14 * I5 ; + _RHS1( 7) -= (f_flux - b_flux); + _RHS1( 6) += (f_flux - b_flux); + + _term = f14 ; + _MATELM1( 7 ,7) += _term; + _MATELM1( 6 ,7) -= _term; + _term = b14 ; + _MATELM1( 7 ,6) -= _term; + _MATELM1( 6 ,6) += _term; + /*REACTION*/ + /* ~ I5 <-> I6 ( f1n , b1n )*/ + f_flux = f1n * I5 ; + b_flux = b1n * I6 ; + _RHS1( 6) -= (f_flux - b_flux); + + _term = f1n ; + _MATELM1( 6 ,6) += _term; + _term = b1n ; + _MATELM1( 6 ,0) -= _term; + /*REACTION*/ + /* ~ C1 <-> I1 ( fi1 , bi1 )*/ + f_flux = fi1 * C1 ; + b_flux = bi1 * I1 ; + _RHS1( 5) -= (f_flux - b_flux); + _RHS1( 10) += (f_flux - b_flux); + + _term = fi1 ; + _MATELM1( 5 ,5) += _term; + _MATELM1( 10 ,5) -= _term; + _term = bi1 ; + _MATELM1( 5 ,10) -= _term; + _MATELM1( 10 ,10) += _term; + /*REACTION*/ + /* ~ C2 <-> I2 ( fi2 , bi2 )*/ + f_flux = fi2 * C2 ; + b_flux = bi2 * I2 ; + _RHS1( 4) -= (f_flux - b_flux); + _RHS1( 9) += (f_flux - b_flux); + + _term = fi2 ; + _MATELM1( 4 ,4) += _term; + _MATELM1( 9 ,4) -= _term; + _term = bi2 ; + _MATELM1( 4 ,9) -= _term; + _MATELM1( 9 ,9) += _term; + /*REACTION*/ + /* ~ C3 <-> I3 ( fi3 , bi3 )*/ + f_flux = fi3 * C3 ; + b_flux = bi3 * I3 ; + _RHS1( 3) -= (f_flux - b_flux); + _RHS1( 8) += (f_flux - b_flux); + + _term = fi3 ; + _MATELM1( 3 ,3) += _term; + _MATELM1( 8 ,3) -= _term; + _term = bi3 ; + _MATELM1( 3 ,8) -= _term; + _MATELM1( 8 ,8) += _term; + /*REACTION*/ + /* ~ C4 <-> I4 ( fi4 , bi4 )*/ + f_flux = fi4 * C4 ; + b_flux = bi4 * I4 ; + _RHS1( 2) -= (f_flux - b_flux); + _RHS1( 7) += (f_flux - b_flux); + + _term = fi4 ; + _MATELM1( 2 ,2) += _term; + _MATELM1( 7 ,2) -= _term; + _term = bi4 ; + _MATELM1( 2 ,7) -= _term; + _MATELM1( 7 ,7) += _term; + /*REACTION*/ + /* ~ C5 <-> I5 ( fi5 , bi5 )*/ + f_flux = fi5 * C5 ; + b_flux = bi5 * I5 ; + _RHS1( 1) -= (f_flux - b_flux); + _RHS1( 6) += (f_flux - b_flux); + + _term = fi5 ; + _MATELM1( 1 ,1) += _term; + _MATELM1( 6 ,1) -= _term; + _term = bi5 ; + _MATELM1( 1 ,6) -= _term; + _MATELM1( 6 ,6) += _term; + /*REACTION*/ + /* C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1.0 */ + _RHS1(0) = 1.0; + _MATELM1(0, 0) = 1; + _RHS1(0) -= I6 ; + _MATELM1(0, 6) = 1; + _RHS1(0) -= I5 ; + _MATELM1(0, 7) = 1; + _RHS1(0) -= I4 ; + _MATELM1(0, 8) = 1; + _RHS1(0) -= I3 ; + _MATELM1(0, 9) = 1; + _RHS1(0) -= I2 ; + _MATELM1(0, 10) = 1; + _RHS1(0) -= I1 ; + _MATELM1(0, 11) = 1; + _RHS1(0) -= O ; + _MATELM1(0, 1) = 1; + _RHS1(0) -= C5 ; + _MATELM1(0, 2) = 1; + _RHS1(0) -= C4 ; + _MATELM1(0, 3) = 1; + _RHS1(0) -= C3 ; + _MATELM1(0, 4) = 1; + _RHS1(0) -= C2 ; + _MATELM1(0, 5) = 1; + _RHS1(0) -= C1 ; + /*CONSERVATION*/ + } return _reset; + } + +static void seqinitial () + { + zero_matrix(_coef2, 12, 13); +{ + int _counte = -1; + ++_counte; + _coef2[_counte][0] -= 1.0 * bi1 ; + _coef2[_counte][1] -= 1.0 * b01 ; + _coef2[_counte][2] += 1.0 * ( fi1 + f01 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][2] -= 1.0 * f01 ; + _coef2[_counte][3] -= 1.0 * bi2 ; + _coef2[_counte][4] -= 1.0 * b02 ; + _coef2[_counte][1] += 1.0 * ( b01 + fi2 + f02 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][1] -= 1.0 * f02 ; + _coef2[_counte][5] -= 1.0 * bi3 ; + _coef2[_counte][6] -= 1.0 * b03 ; + _coef2[_counte][4] += 1.0 * ( b02 + fi3 + f03 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][4] -= 1.0 * f03 ; + _coef2[_counte][7] -= 1.0 * bi4 ; + _coef2[_counte][8] -= 1.0 * b04 ; + _coef2[_counte][6] += 1.0 * ( b03 + fi4 + f04 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][6] -= 1.0 * f04 ; + _coef2[_counte][9] -= 1.0 * bi5 ; + _coef2[_counte][10] -= 1.0 * b0O ; + _coef2[_counte][8] += 1.0 * ( b04 + fi5 + f0O ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][8] -= 1.0 * f0O ; + _coef2[_counte][11] -= 1.0 * bin ; + _coef2[_counte][10] += 1.0 * ( b0O + fin ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][2] -= 1.0 * fi1 ; + _coef2[_counte][3] -= 1.0 * b11 ; + _coef2[_counte][0] += 1.0 * ( bi1 + f11 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][0] -= 1.0 * f11 ; + _coef2[_counte][1] -= 1.0 * fi2 ; + _coef2[_counte][5] -= 1.0 * b12 ; + _coef2[_counte][3] += 1.0 * ( b11 + bi2 + f12 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][3] -= 1.0 * f12 ; + _coef2[_counte][4] -= 1.0 * fi3 ; + _coef2[_counte][7] -= 1.0 * bi3 ; + _coef2[_counte][5] += 1.0 * ( b12 + bi3 + f13 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][5] -= 1.0 * f13 ; + _coef2[_counte][6] -= 1.0 * fi4 ; + _coef2[_counte][9] -= 1.0 * b14 ; + _coef2[_counte][7] += 1.0 * ( b13 + bi4 + f14 ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][7] -= 1.0 * f14 ; + _coef2[_counte][8] -= 1.0 * fi5 ; + _coef2[_counte][11] -= 1.0 * b1n ; + _coef2[_counte][9] += 1.0 * ( b14 + bi5 + f1n ) ; + _RHS2(_counte) -= 0.0 ; + ; + ++_counte; + _coef2[_counte][2] -= 1.0 ; + _coef2[_counte][1] -= 1.0 ; + _coef2[_counte][4] -= 1.0 ; + _coef2[_counte][6] -= 1.0 ; + _coef2[_counte][8] -= 1.0 ; + _coef2[_counte][10] -= 1.0 ; + _coef2[_counte][0] -= 1.0 ; + _coef2[_counte][3] -= 1.0 ; + _coef2[_counte][5] -= 1.0 ; + _coef2[_counte][7] -= 1.0 ; + _coef2[_counte][9] -= 1.0 ; + _coef2[_counte][11] -= 1.0 ; + _RHS2(_counte) -= 1.0 ; + ; + +} + } + +static int rates ( double _lv ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 37.0 ) / 10.0 ) ) ; + f01 = _lqt * 4.0 * alpha * exp ( _lv / x1 ) ; + f02 = _lqt * 3.0 * alpha * exp ( _lv / x1 ) ; + f03 = _lqt * 2.0 * alpha * exp ( _lv / x1 ) ; + f04 = _lqt * 1.0 * alpha * exp ( _lv / x1 ) ; + f0O = _lqt * gamma ; + f11 = _lqt * 4.0 * alpha * alfac * exp ( _lv / x1 ) ; + f12 = _lqt * 3.0 * alpha * alfac * exp ( _lv / x1 ) ; + f13 = _lqt * 2.0 * alpha * alfac * exp ( _lv / x1 ) ; + f14 = _lqt * 1.0 * alpha * alfac * exp ( _lv / x1 ) ; + f1n = _lqt * gamma ; + fi1 = _lqt * Con ; + fi2 = _lqt * Con * alfac ; + fi3 = _lqt * Con * pow( alfac , 2.0 ) ; + fi4 = _lqt * Con * pow( alfac , 3.0 ) ; + fi5 = _lqt * Con * pow( alfac , 4.0 ) ; + fin = _lqt * Oon ; + b01 = _lqt * 1.0 * beta * exp ( _lv / x2 ) ; + b02 = _lqt * 2.0 * beta * exp ( _lv / x2 ) ; + b03 = _lqt * 3.0 * beta * exp ( _lv / x2 ) ; + b04 = _lqt * 4.0 * beta * exp ( _lv / x2 ) ; + b0O = _lqt * delta ; + b11 = _lqt * 1.0 * beta * exp ( _lv / x2 ) / btfac ; + b12 = _lqt * 2.0 * beta * exp ( _lv / x2 ) / btfac ; + b13 = _lqt * 3.0 * beta * exp ( _lv / x2 ) / btfac ; + b14 = _lqt * 4.0 * beta * exp ( _lv / x2 ) / btfac ; + b1n = _lqt * delta ; + bi1 = _lqt * Coff ; + bi2 = _lqt * Coff / ( btfac ) ; + bi3 = _lqt * Coff / ( pow( btfac , 2.0 ) ) ; + bi4 = _lqt * Coff / ( pow( btfac , 3.0 ) ) ; + bi5 = _lqt * Coff / ( pow( btfac , 4.0 ) ) ; + bin = _lqt * Ooff ; + return 0; } + +static void _hoc_rates(void) { + double _r; + _r = 1.; + rates ( *getarg(1) ); + hoc_retpushx(_r); +} + +/*CVODE ode begin*/ + static int _ode_spec1() {_reset=0;{ + double b_flux, f_flux, _term; int _i; + {int _i; for(_i=0;_i<12;_i++) _p[_dlist1[_i]] = 0.0;} + rates ( _threadargscomma_ v ) ; + /* ~ C1 <-> C2 ( f01 , b01 )*/ + f_flux = f01 * C1 ; + b_flux = b01 * C2 ; + DC1 -= (f_flux - b_flux); + DC2 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C2 <-> C3 ( f02 , b02 )*/ + f_flux = f02 * C2 ; + b_flux = b02 * C3 ; + DC2 -= (f_flux - b_flux); + DC3 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C3 <-> C4 ( f03 , b03 )*/ + f_flux = f03 * C3 ; + b_flux = b03 * C4 ; + DC3 -= (f_flux - b_flux); + DC4 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C4 <-> C5 ( f04 , b04 )*/ + f_flux = f04 * C4 ; + b_flux = b04 * C5 ; + DC4 -= (f_flux - b_flux); + DC5 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C5 <-> O ( f0O , b0O )*/ + f_flux = f0O * C5 ; + b_flux = b0O * O ; + DC5 -= (f_flux - b_flux); + DO += (f_flux - b_flux); + + /*REACTION*/ + /* ~ O <-> I6 ( fin , bin )*/ + f_flux = fin * O ; + b_flux = bin * I6 ; + DO -= (f_flux - b_flux); + DI6 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ I1 <-> I2 ( f11 , b11 )*/ + f_flux = f11 * I1 ; + b_flux = b11 * I2 ; + DI1 -= (f_flux - b_flux); + DI2 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ I2 <-> I3 ( f12 , b12 )*/ + f_flux = f12 * I2 ; + b_flux = b12 * I3 ; + DI2 -= (f_flux - b_flux); + DI3 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ I3 <-> I4 ( f13 , b13 )*/ + f_flux = f13 * I3 ; + b_flux = b13 * I4 ; + DI3 -= (f_flux - b_flux); + DI4 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ I4 <-> I5 ( f14 , b14 )*/ + f_flux = f14 * I4 ; + b_flux = b14 * I5 ; + DI4 -= (f_flux - b_flux); + DI5 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ I5 <-> I6 ( f1n , b1n )*/ + f_flux = f1n * I5 ; + b_flux = b1n * I6 ; + DI5 -= (f_flux - b_flux); + DI6 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C1 <-> I1 ( fi1 , bi1 )*/ + f_flux = fi1 * C1 ; + b_flux = bi1 * I1 ; + DC1 -= (f_flux - b_flux); + DI1 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C2 <-> I2 ( fi2 , bi2 )*/ + f_flux = fi2 * C2 ; + b_flux = bi2 * I2 ; + DC2 -= (f_flux - b_flux); + DI2 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C3 <-> I3 ( fi3 , bi3 )*/ + f_flux = fi3 * C3 ; + b_flux = bi3 * I3 ; + DC3 -= (f_flux - b_flux); + DI3 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C4 <-> I4 ( fi4 , bi4 )*/ + f_flux = fi4 * C4 ; + b_flux = bi4 * I4 ; + DC4 -= (f_flux - b_flux); + DI4 += (f_flux - b_flux); + + /*REACTION*/ + /* ~ C5 <-> I5 ( fi5 , bi5 )*/ + f_flux = fi5 * C5 ; + b_flux = bi5 * I5 ; + DC5 -= (f_flux - b_flux); + DI5 += (f_flux - b_flux); + + /*REACTION*/ + /* C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1.0 */ + /*CONSERVATION*/ + } return _reset; + } + +/*CVODE matsol*/ + static int _ode_matsol1() {_reset=0;{ + double b_flux, f_flux, _term; int _i; + b_flux = f_flux = 0.; + {int _i; double _dt1 = 1.0/dt; +for(_i=0;_i<12;_i++){ + _RHS1(_i) = _dt1*(_p[_dlist1[_i]]); + _MATELM1(_i, _i) = _dt1; + +} } + rates ( _threadargscomma_ v ) ; + /* ~ C1 <-> C2 ( f01 , b01 )*/ + _term = f01 ; + _MATELM1( 5 ,5) += _term; + _MATELM1( 4 ,5) -= _term; + _term = b01 ; + _MATELM1( 5 ,4) -= _term; + _MATELM1( 4 ,4) += _term; + /*REACTION*/ + /* ~ C2 <-> C3 ( f02 , b02 )*/ + _term = f02 ; + _MATELM1( 4 ,4) += _term; + _MATELM1( 3 ,4) -= _term; + _term = b02 ; + _MATELM1( 4 ,3) -= _term; + _MATELM1( 3 ,3) += _term; + /*REACTION*/ + /* ~ C3 <-> C4 ( f03 , b03 )*/ + _term = f03 ; + _MATELM1( 3 ,3) += _term; + _MATELM1( 2 ,3) -= _term; + _term = b03 ; + _MATELM1( 3 ,2) -= _term; + _MATELM1( 2 ,2) += _term; + /*REACTION*/ + /* ~ C4 <-> C5 ( f04 , b04 )*/ + _term = f04 ; + _MATELM1( 2 ,2) += _term; + _MATELM1( 1 ,2) -= _term; + _term = b04 ; + _MATELM1( 2 ,1) -= _term; + _MATELM1( 1 ,1) += _term; + /*REACTION*/ + /* ~ C5 <-> O ( f0O , b0O )*/ + _term = f0O ; + _MATELM1( 1 ,1) += _term; + _MATELM1( 11 ,1) -= _term; + _term = b0O ; + _MATELM1( 1 ,11) -= _term; + _MATELM1( 11 ,11) += _term; + /*REACTION*/ + /* ~ O <-> I6 ( fin , bin )*/ + _term = fin ; + _MATELM1( 11 ,11) += _term; + _MATELM1( 0 ,11) -= _term; + _term = bin ; + _MATELM1( 11 ,0) -= _term; + _MATELM1( 0 ,0) += _term; + /*REACTION*/ + /* ~ I1 <-> I2 ( f11 , b11 )*/ + _term = f11 ; + _MATELM1( 10 ,10) += _term; + _MATELM1( 9 ,10) -= _term; + _term = b11 ; + _MATELM1( 10 ,9) -= _term; + _MATELM1( 9 ,9) += _term; + /*REACTION*/ + /* ~ I2 <-> I3 ( f12 , b12 )*/ + _term = f12 ; + _MATELM1( 9 ,9) += _term; + _MATELM1( 8 ,9) -= _term; + _term = b12 ; + _MATELM1( 9 ,8) -= _term; + _MATELM1( 8 ,8) += _term; + /*REACTION*/ + /* ~ I3 <-> I4 ( f13 , b13 )*/ + _term = f13 ; + _MATELM1( 8 ,8) += _term; + _MATELM1( 7 ,8) -= _term; + _term = b13 ; + _MATELM1( 8 ,7) -= _term; + _MATELM1( 7 ,7) += _term; + /*REACTION*/ + /* ~ I4 <-> I5 ( f14 , b14 )*/ + _term = f14 ; + _MATELM1( 7 ,7) += _term; + _MATELM1( 6 ,7) -= _term; + _term = b14 ; + _MATELM1( 7 ,6) -= _term; + _MATELM1( 6 ,6) += _term; + /*REACTION*/ + /* ~ I5 <-> I6 ( f1n , b1n )*/ + _term = f1n ; + _MATELM1( 6 ,6) += _term; + _MATELM1( 0 ,6) -= _term; + _term = b1n ; + _MATELM1( 6 ,0) -= _term; + _MATELM1( 0 ,0) += _term; + /*REACTION*/ + /* ~ C1 <-> I1 ( fi1 , bi1 )*/ + _term = fi1 ; + _MATELM1( 5 ,5) += _term; + _MATELM1( 10 ,5) -= _term; + _term = bi1 ; + _MATELM1( 5 ,10) -= _term; + _MATELM1( 10 ,10) += _term; + /*REACTION*/ + /* ~ C2 <-> I2 ( fi2 , bi2 )*/ + _term = fi2 ; + _MATELM1( 4 ,4) += _term; + _MATELM1( 9 ,4) -= _term; + _term = bi2 ; + _MATELM1( 4 ,9) -= _term; + _MATELM1( 9 ,9) += _term; + /*REACTION*/ + /* ~ C3 <-> I3 ( fi3 , bi3 )*/ + _term = fi3 ; + _MATELM1( 3 ,3) += _term; + _MATELM1( 8 ,3) -= _term; + _term = bi3 ; + _MATELM1( 3 ,8) -= _term; + _MATELM1( 8 ,8) += _term; + /*REACTION*/ + /* ~ C4 <-> I4 ( fi4 , bi4 )*/ + _term = fi4 ; + _MATELM1( 2 ,2) += _term; + _MATELM1( 7 ,2) -= _term; + _term = bi4 ; + _MATELM1( 2 ,7) -= _term; + _MATELM1( 7 ,7) += _term; + /*REACTION*/ + /* ~ C5 <-> I5 ( fi5 , bi5 )*/ + _term = fi5 ; + _MATELM1( 1 ,1) += _term; + _MATELM1( 6 ,1) -= _term; + _term = bi5 ; + _MATELM1( 1 ,6) -= _term; + _MATELM1( 6 ,6) += _term; + /*REACTION*/ + /* C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1.0 */ + /*CONSERVATION*/ + } return _reset; + } + +/*CVODE end*/ + +static int _ode_count(int _type){ return 12;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_spec1 (); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 12; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _cvode_sparse(&_cvsparseobj1, 12, _dlist1, _p, _ode_matsol1, &_coef1); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_na_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_na_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_na_sym, _ppvar, 2, 4); + } + +static void initmodel() { + int _i; double _save;_ninits++; + _save = t; + t = 0.0; +{ + C5 = C50; + C4 = C40; + C3 = C30; + C2 = C20; + C1 = C10; + I6 = I60; + I5 = I50; + I4 = I40; + I3 = I30; + I2 = I20; + I1 = I10; + O = O0; + { + rates ( _threadargscomma_ v ) ; + error = 0; seqinitial(); + error = simeq(12, _coef2, _p, _slist2); + if(error){fprintf(stderr,"at line 104 in file NaV.mod:\n SOLVE seqinitial\n"); nrn_complain(_p); abort_run(error);} + } + _sav_indep = t; t = _save; + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ena = _ion_ena; + initmodel(); + }} + +static double _nrn_current(double _v){double _current=0.;v=_v;{ { + g = gbar * O ; + ina = g * ( v - ena ) ; + } + _current += ina; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type){ +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ena = _ion_ena; + _g = _nrn_current(_v + .001); + { double _dina; + _dina = ina; + _rhs = _nrn_current(_v); + _ion_dinadv += (_dina - ina)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ina += ina ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +}} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type){ +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +}} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type){ +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +double _dtsav = dt; +if (secondorder) { dt *= 0.5; } +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ena = _ion_ena; + { error = sparse(&_sparseobj1, 12, _slist1, _dlist1, _p, &t, dt, activation,&_coef1, _linmat1); + if(error){fprintf(stderr,"at line 97 in file NaV.mod:\n SOLVE activation METHOD sparse\n"); nrn_complain(_p); abort_run(error);} + if (secondorder) { + int _i; + for (_i = 0; _i < 12; ++_i) { + _p[_slist1[_i]] += dt*_p[_dlist1[_i]]; + }} + } }} + dt = _dtsav; +} + +static void terminal(){} + +static void _initlists() { + int _i; static int _first = 1; + if (!_first) return; + _slist2[0] = I1_columnindex; + _slist2[1] = C2_columnindex; + _slist2[2] = C1_columnindex; + _slist2[3] = I2_columnindex; + _slist2[4] = C3_columnindex; + _slist2[5] = I3_columnindex; + _slist2[6] = C4_columnindex; + _slist2[7] = I4_columnindex; + _slist2[8] = C5_columnindex; + _slist2[9] = I5_columnindex; + _slist2[10] = O_columnindex; + _slist2[11] = I6_columnindex; + if (_first) _coef2 = makematrix(12, 13); + _slist1[0] = I6_columnindex; _dlist1[0] = DI6_columnindex; + _slist1[1] = C5_columnindex; _dlist1[1] = DC5_columnindex; + _slist1[2] = C4_columnindex; _dlist1[2] = DC4_columnindex; + _slist1[3] = C3_columnindex; _dlist1[3] = DC3_columnindex; + _slist1[4] = C2_columnindex; _dlist1[4] = DC2_columnindex; + _slist1[5] = C1_columnindex; _dlist1[5] = DC1_columnindex; + _slist1[6] = I5_columnindex; _dlist1[6] = DI5_columnindex; + _slist1[7] = I4_columnindex; _dlist1[7] = DI4_columnindex; + _slist1[8] = I3_columnindex; _dlist1[8] = DI3_columnindex; + _slist1[9] = I2_columnindex; _dlist1[9] = DI2_columnindex; + _slist1[10] = I1_columnindex; _dlist1[10] = DI1_columnindex; + _slist1[11] = O_columnindex; _dlist1[11] = DO_columnindex; +_first = 0; +} + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/NaV.mod"; +static const char* nmodl_file_text = + "TITLE Mouse sodium current\n" + ": Kinetics of Carter et al. (2012)\n" + ": Based on 37 degC recordings from mouse hippocampal CA1 pyramids\n" + "\n" + "NEURON {\n" + " SUFFIX NaV\n" + " USEION na READ ena WRITE ina\n" + " RANGE g, gbar\n" + "}\n" + "\n" + "UNITS { \n" + " (mV) = (millivolt)\n" + " (S) = (siemens)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = .015 (S/cm2)\n" + "\n" + " : kinetic parameters\n" + " Con = 0.01 (/ms) : closed -> inactivated transitions\n" + " Coff = 40 (/ms) : inactivated -> closed transitions\n" + " Oon = 8 (/ms) : open -> Ineg transition\n" + " Ooff = 0.05 (/ms) : Ineg -> open transition\n" + " alpha = 400 (/ms)\n" + " beta = 12 (/ms)\n" + " gamma = 250 (/ms) : opening\n" + " delta = 60 (/ms) : closing\n" + "\n" + " alfac = 2.51\n" + " btfac = 5.32\n" + "\n" + " : Vdep\n" + " x1 = 24 (mV) : Vdep of activation (alpha)\n" + " x2 = -24 (mV) : Vdep of deactivation (beta)\n" + "}\n" + "\n" + "ASSIGNED {\n" + "\n" + " : rates\n" + " f01 (/ms)\n" + " f02 (/ms)\n" + " f03 (/ms)\n" + " f04 (/ms)\n" + " f0O (/ms)\n" + " f11 (/ms)\n" + " f12 (/ms)\n" + " f13 (/ms)\n" + " f14 (/ms)\n" + " f1n (/ms)\n" + " fi1 (/ms)\n" + " fi2 (/ms)\n" + " fi3 (/ms)\n" + " fi4 (/ms)\n" + " fi5 (/ms)\n" + " fin (/ms)\n" + "\n" + " b01 (/ms)\n" + " b02 (/ms)\n" + " b03 (/ms)\n" + " b04 (/ms)\n" + " b0O (/ms)\n" + " b11 (/ms)\n" + " b12 (/ms)\n" + " b13 (/ms)\n" + " b14 (/ms)\n" + " b1n (/ms)\n" + " bi1 (/ms)\n" + " bi2 (/ms)\n" + " bi3 (/ms)\n" + " bi4 (/ms)\n" + " bi5 (/ms)\n" + " bin (/ms)\n" + " \n" + " v (mV)\n" + " ena (mV)\n" + " ina (milliamp/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + "}\n" + "\n" + "STATE {\n" + " C1 FROM 0 TO 1\n" + " C2 FROM 0 TO 1\n" + " C3 FROM 0 TO 1\n" + " C4 FROM 0 TO 1\n" + " C5 FROM 0 TO 1\n" + " I1 FROM 0 TO 1\n" + " I2 FROM 0 TO 1\n" + " I3 FROM 0 TO 1\n" + " I4 FROM 0 TO 1\n" + " I5 FROM 0 TO 1\n" + " O FROM 0 TO 1\n" + " I6 FROM 0 TO 1\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE activation METHOD sparse\n" + " g = gbar * O\n" + " ina = g * (v - ena)\n" + "}\n" + "\n" + "INITIAL {\n" + " rates(v)\n" + " SOLVE seqinitial\n" + "}\n" + "\n" + "KINETIC activation\n" + "{\n" + " rates(v)\n" + " ~ C1 <-> C2 (f01,b01)\n" + " ~ C2 <-> C3 (f02,b02)\n" + " ~ C3 <-> C4 (f03,b03)\n" + " ~ C4 <-> C5 (f04,b04)\n" + " ~ C5 <-> O (f0O,b0O)\n" + " ~ O <-> I6 (fin,bin)\n" + " ~ I1 <-> I2 (f11,b11)\n" + " ~ I2 <-> I3 (f12,b12)\n" + " ~ I3 <-> I4 (f13,b13)\n" + " ~ I4 <-> I5 (f14,b14)\n" + " ~ I5 <-> I6 (f1n,b1n)\n" + " ~ C1 <-> I1 (fi1,bi1)\n" + " ~ C2 <-> I2 (fi2,bi2)\n" + " ~ C3 <-> I3 (fi3,bi3)\n" + " ~ C4 <-> I4 (fi4,bi4)\n" + " ~ C5 <-> I5 (fi5,bi5)\n" + "\n" + " CONSERVE C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1\n" + "}\n" + "\n" + "LINEAR seqinitial { : sets initial equilibrium\n" + " ~ I1*bi1 + C2*b01 - C1*( fi1+f01) = 0\n" + " ~ C1*f01 + I2*bi2 + C3*b02 - C2*(b01+fi2+f02) = 0\n" + " ~ C2*f02 + I3*bi3 + C4*b03 - C3*(b02+fi3+f03) = 0\n" + " ~ C3*f03 + I4*bi4 + C5*b04 - C4*(b03+fi4+f04) = 0\n" + " ~ C4*f04 + I5*bi5 + O*b0O - C5*(b04+fi5+f0O) = 0\n" + " ~ C5*f0O + I6*bin - O*(b0O+fin) = 0\n" + "\n" + " ~ C1*fi1 + I2*b11 - I1*( bi1+f11) = 0\n" + " ~ I1*f11 + C2*fi2 + I3*b12 - I2*(b11+bi2+f12) = 0\n" + " ~ I2*f12 + C3*fi3 + I4*bi3 - I3*(b12+bi3+f13) = 0\n" + " ~ I3*f13 + C4*fi4 + I5*b14 - I4*(b13+bi4+f14) = 0\n" + " ~ I4*f14 + C5*fi5 + I6*b1n - I5*(b14+bi5+f1n) = 0\n" + " \n" + " ~ C1 + C2 + C3 + C4 + C5 + O + I1 + I2 + I3 + I4 + I5 + I6 = 1\n" + "}\n" + "\n" + "PROCEDURE rates(v(mV) )\n" + "{\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-37)/10)\n" + "\n" + " f01 = qt * 4 * alpha * exp(v/x1)\n" + " f02 = qt * 3 * alpha * exp(v/x1)\n" + " f03 = qt * 2 * alpha * exp(v/x1)\n" + " f04 = qt * 1 * alpha * exp(v/x1)\n" + " f0O = qt * gamma\n" + " f11 = qt * 4 * alpha * alfac * exp(v/x1)\n" + " f12 = qt * 3 * alpha * alfac * exp(v/x1)\n" + " f13 = qt * 2 * alpha * alfac * exp(v/x1)\n" + " f14 = qt * 1 * alpha * alfac * exp(v/x1)\n" + " f1n = qt * gamma\n" + " fi1 = qt * Con\n" + " fi2 = qt * Con * alfac\n" + " fi3 = qt * Con * alfac^2\n" + " fi4 = qt * Con * alfac^3\n" + " fi5 = qt * Con * alfac^4\n" + " fin = qt * Oon\n" + "\n" + " b01 = qt * 1 * beta * exp(v/x2)\n" + " b02 = qt * 2 * beta * exp(v/x2)\n" + " b03 = qt * 3 * beta * exp(v/x2)\n" + " b04 = qt * 4 * beta * exp(v/x2)\n" + " b0O = qt * delta\n" + " b11 = qt * 1 * beta * exp(v/x2) / btfac\n" + " b12 = qt * 2 * beta * exp(v/x2) / btfac\n" + " b13 = qt * 3 * beta * exp(v/x2) / btfac\n" + " b14 = qt * 4 * beta * exp(v/x2) / btfac\n" + " b1n = qt * delta\n" + " bi1 = qt * Coff\n" + " bi2 = qt * Coff / (btfac)\n" + " bi3 = qt * Coff / (btfac^2)\n" + " bi4 = qt * Coff / (btfac^3)\n" + " bi5 = qt * Coff / (btfac^4)\n" + " bin = qt * Ooff\n" + "}\n" + "\n" + ; +#endif diff --git a/examples/single_cell/x86_64/NaV.o b/examples/single_cell/x86_64/NaV.o new file mode 100644 index 0000000..261e4f8 Binary files /dev/null and b/examples/single_cell/x86_64/NaV.o differ diff --git a/examples/single_cell/x86_64/Nap.c b/examples/single_cell/x86_64/Nap.c new file mode 100644 index 0000000..4146160 --- /dev/null +++ b/examples/single_cell/x86_64/Nap.c @@ -0,0 +1,598 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__Nap +#define _nrn_initial _nrn_initial__Nap +#define nrn_cur _nrn_cur__Nap +#define _nrn_current _nrn_current__Nap +#define nrn_jacob _nrn_jacob__Nap +#define nrn_state _nrn_state__Nap +#define _net_receive _net_receive__Nap +#define rates rates__Nap +#define states states__Nap + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ina _p[1] +#define ina_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define h _p[3] +#define h_columnindex 3 +#define ena _p[4] +#define ena_columnindex 4 +#define mInf _p[5] +#define mInf_columnindex 5 +#define hInf _p[6] +#define hInf_columnindex 6 +#define hTau _p[7] +#define hTau_columnindex 7 +#define hAlpha _p[8] +#define hAlpha_columnindex 8 +#define hBeta _p[9] +#define hBeta_columnindex 9 +#define Dh _p[10] +#define Dh_columnindex 10 +#define v _p[11] +#define v_columnindex 11 +#define _g _p[12] +#define _g_columnindex 12 +#define _ion_ena *_ppvar[0]._pval +#define _ion_ina *_ppvar[1]._pval +#define _ion_dinadv *_ppvar[2]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + extern double celsius; + /* declaration of user functions */ + static void _hoc_rates(void); + static void _hoc_vtrap(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_Nap", _hoc_setdata, + "rates_Nap", _hoc_rates, + "vtrap_Nap", _hoc_vtrap, + 0, 0 +}; +#define vtrap vtrap_Nap + extern double vtrap( _threadargsprotocomma_ double , double ); + /* declare global and static user variables */ + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "gbar_Nap", "S/cm2", + "ina_Nap", "mA/cm2", + "g_Nap", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double h0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[3]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"Nap", + "gbar_Nap", + 0, + "ina_Nap", + "g_Nap", + 0, + "h_Nap", + 0, + 0}; + static Symbol* _na_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 13, _prop); + /*initialize range parameters*/ + gbar = 1e-05; + _prop->param = _p; + _prop->param_size = 13; + _ppvar = nrn_prop_datum_alloc(_mechtype, 4, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_na_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ena */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ina */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dinadv */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _Nap_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("na", -10000.); + _na_sym = hoc_lookup("na_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 13, 4); + hoc_register_dparam_semantics(_mechtype, 0, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "na_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 Nap /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Nap.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsproto_); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargs_ ) ; + Dh = ( hInf - h ) / hTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargs_ ) ; + Dh = Dh / (1. - dt*( ( ( ( - 1.0 ) ) ) / hTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargs_ ) ; + h = h + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / hTau)))*(- ( ( ( hInf ) ) / hTau ) / ( ( ( ( - 1.0 ) ) ) / hTau ) - h) ; + } + return 0; +} + +static int rates ( _threadargsproto_ ) { + double _lqt ; + _lqt = pow( 2.3 , ( ( celsius - 21.0 ) / 10.0 ) ) ; + mInf = 1.0 / ( 1.0 + exp ( ( v - - 52.6 ) / - 4.6 ) ) ; + hInf = 1.0 / ( 1.0 + exp ( ( v - - 48.8 ) / 10.0 ) ) ; + hAlpha = 2.88e-6 * vtrap ( _threadargscomma_ v + 17.0 , 4.63 ) ; + hBeta = 6.94e-6 * vtrap ( _threadargscomma_ - ( v + 64.4 ) , 2.63 ) ; + hTau = ( 1.0 / ( hAlpha + hBeta ) ) / _lqt ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt ); + hoc_retpushx(_r); +} + +double vtrap ( _threadargsprotocomma_ double _lx , double _ly ) { + double _lvtrap; + if ( fabs ( _lx / _ly ) < 1e-6 ) { + _lvtrap = _ly * ( 1.0 - _lx / _ly / 2.0 ) ; + } + else { + _lvtrap = _lx / ( exp ( _lx / _ly ) - 1.0 ) ; + } + +return _lvtrap; + } + +static void _hoc_vtrap(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = vtrap ( _p, _ppvar, _thread, _nt, *getarg(1) , *getarg(2) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ena = _ion_ena; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_na_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_na_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_na_sym, _ppvar, 2, 4); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + h = h0; + { + rates ( _threadargs_ ) ; + h = hInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ena = _ion_ena; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + rates ( _threadargs_ ) ; + g = gbar * mInf * h ; + ina = g * ( v - ena ) ; + } + _current += ina; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ena = _ion_ena; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dina; + _dina = ina; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dinadv += (_dina - ina)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ina += ina ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ena = _ion_ena; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = h_columnindex; _dlist1[0] = Dh_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/Nap.mod"; +static const char* nmodl_file_text = + ":Reference : Modeled according to kinetics derived from Magistretti & Alonso 1999\n" + ":Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21\n" + "\n" + "NEURON {\n" + " SUFFIX Nap\n" + " USEION na READ ena WRITE ina\n" + " RANGE gbar, g, ina\n" + "}\n" + "\n" + "UNITS {\n" + " (S) = (siemens)\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + "}\n" + "\n" + "PARAMETER {\n" + " gbar = 0.00001 (S/cm2)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " v (mV)\n" + " ena (mV)\n" + " ina (mA/cm2)\n" + " g (S/cm2)\n" + " celsius (degC)\n" + " mInf\n" + " hInf\n" + " hTau\n" + " hAlpha\n" + " hBeta\n" + "}\n" + "\n" + "STATE {\n" + " h\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " rates()\n" + " g = gbar*mInf*h\n" + " ina = g*(v-ena)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates()\n" + " h' = (hInf-h)/hTau\n" + "}\n" + "\n" + "INITIAL{\n" + " rates()\n" + " h = hInf\n" + "}\n" + "\n" + "PROCEDURE rates(){\n" + " LOCAL qt\n" + " qt = 2.3^((celsius-21)/10)\n" + "\n" + " UNITSOFF\n" + " mInf = 1.0/(1+exp((v- -52.6)/-4.6)) : assuming instantaneous activation as modeled by Magistretti and Alonso\n" + "\n" + " hInf = 1.0/(1+exp((v- -48.8)/10))\n" + " hAlpha = 2.88e-6 * vtrap(v + 17, 4.63)\n" + " hBeta = 6.94e-6 * vtrap(-(v + 64.4), 2.63)\n" + "\n" + " hTau = (1/(hAlpha + hBeta))/qt\n" + " UNITSON\n" + "}\n" + "\n" + "FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations\n" + " UNITSOFF\n" + " if (fabs(x / y) < 1e-6) {\n" + " vtrap = y * (1 - x / y / 2)\n" + " } else {\n" + " vtrap = x / (exp(x / y) - 1)\n" + " }\n" + " UNITSON\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/Nap.o b/examples/single_cell/x86_64/Nap.o new file mode 100644 index 0000000..e12abbd Binary files /dev/null and b/examples/single_cell/x86_64/Nap.o differ diff --git a/examples/single_cell/x86_64/SK.c b/examples/single_cell/x86_64/SK.c new file mode 100644 index 0000000..a428449 --- /dev/null +++ b/examples/single_cell/x86_64/SK.c @@ -0,0 +1,558 @@ +/* Created by Language version: 7.7.0 */ +/* VECTORIZED */ +#define NRN_VECTORIZED 1 +#include +#include +#include +#include "mech_api.h" +#undef PI +#define nil 0 +#include "md1redef.h" +#include "section.h" +#include "nrniv_mf.h" +#include "md2redef.h" + +#if METHOD3 +extern int _method3; +#endif + +#if !NRNGPU +#undef exp +#define exp hoc_Exp +extern double hoc_Exp(double); +#endif + +#define nrn_init _nrn_init__SK +#define _nrn_initial _nrn_initial__SK +#define nrn_cur _nrn_cur__SK +#define _nrn_current _nrn_current__SK +#define nrn_jacob _nrn_jacob__SK +#define nrn_state _nrn_state__SK +#define _net_receive _net_receive__SK +#define rates rates__SK +#define states states__SK + +#define _threadargscomma_ _p, _ppvar, _thread, _nt, +#define _threadargsprotocomma_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, +#define _threadargs_ _p, _ppvar, _thread, _nt +#define _threadargsproto_ double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt + /*SUPPRESS 761*/ + /*SUPPRESS 762*/ + /*SUPPRESS 763*/ + /*SUPPRESS 765*/ + extern double *getarg(); + /* Thread safe. No static _p or _ppvar. */ + +#define t _nt->_t +#define dt _nt->_dt +#define gbar _p[0] +#define gbar_columnindex 0 +#define ik _p[1] +#define ik_columnindex 1 +#define g _p[2] +#define g_columnindex 2 +#define z _p[3] +#define z_columnindex 3 +#define ek _p[4] +#define ek_columnindex 4 +#define cai _p[5] +#define cai_columnindex 5 +#define zInf _p[6] +#define zInf_columnindex 6 +#define Dz _p[7] +#define Dz_columnindex 7 +#define v _p[8] +#define v_columnindex 8 +#define _g _p[9] +#define _g_columnindex 9 +#define _ion_ek *_ppvar[0]._pval +#define _ion_ik *_ppvar[1]._pval +#define _ion_dikdv *_ppvar[2]._pval +#define _ion_cai *_ppvar[3]._pval + +#if MAC +#if !defined(v) +#define v _mlhv +#endif +#if !defined(h) +#define h _mlhh +#endif +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + static int hoc_nrnpointerindex = -1; + static Datum* _extcall_thread; + static Prop* _extcall_prop; + /* external NEURON variables */ + /* declaration of user functions */ + static void _hoc_rates(void); + static int _mechtype; +extern void _nrn_cacheloop_reg(int, int); +extern void hoc_register_prop_size(int, int, int); +extern void hoc_register_limits(int, HocParmLimits*); +extern void hoc_register_units(int, HocParmUnits*); +extern void nrn_promote(Prop*, int, int); +extern Memb_func* memb_func; + +#define NMODL_TEXT 1 +#if NMODL_TEXT +static const char* nmodl_file_text; +static const char* nmodl_filename; +extern void hoc_reg_nmodl_text(int, const char*); +extern void hoc_reg_nmodl_filename(int, const char*); +#endif + + extern void _nrn_setdata_reg(int, void(*)(Prop*)); + static void _setdata(Prop* _prop) { + _extcall_prop = _prop; + } + static void _hoc_setdata() { + Prop *_prop, *hoc_getdata_range(int); + _prop = hoc_getdata_range(_mechtype); + _setdata(_prop); + hoc_retpushx(1.); +} + /* connect user functions to hoc names */ + static VoidFunc hoc_intfunc[] = { + "setdata_SK", _hoc_setdata, + "rates_SK", _hoc_rates, + 0, 0 +}; + /* declare global and static user variables */ +#define zTau zTau_SK + double zTau = 1; + /* some parameters have upper and lower limits */ + static HocParmLimits _hoc_parm_limits[] = { + 0,0,0 +}; + static HocParmUnits _hoc_parm_units[] = { + "zTau_SK", "ms", + "gbar_SK", "mho/cm2", + "ik_SK", "mA/cm2", + "g_SK", "S/cm2", + 0,0 +}; + static double delta_t = 0.01; + static double z0 = 0; + /* connect global user variables to hoc */ + static DoubScal hoc_scdoub[] = { + "zTau_SK", &zTau_SK, + 0,0 +}; + static DoubVec hoc_vdoub[] = { + 0,0,0 +}; + static double _sav_indep; + static void nrn_alloc(Prop*); +static void nrn_init(NrnThread*, _Memb_list*, int); +static void nrn_state(NrnThread*, _Memb_list*, int); + static void nrn_cur(NrnThread*, _Memb_list*, int); +static void nrn_jacob(NrnThread*, _Memb_list*, int); + +static int _ode_count(int); +static void _ode_map(int, double**, double**, double*, Datum*, double*, int); +static void _ode_spec(NrnThread*, _Memb_list*, int); +static void _ode_matsol(NrnThread*, _Memb_list*, int); + +#define _cvode_ieq _ppvar[4]._i + static void _ode_matsol_instance1(_threadargsproto_); + /* connect range variables in _p that hoc is supposed to know about */ + static const char *_mechanism[] = { + "7.7.0", +"SK", + "gbar_SK", + 0, + "ik_SK", + "g_SK", + 0, + "z_SK", + 0, + 0}; + static Symbol* _k_sym; + static Symbol* _ca_sym; + +extern Prop* need_memb(Symbol*); + +static void nrn_alloc(Prop* _prop) { + Prop *prop_ion; + double *_p; Datum *_ppvar; + _p = nrn_prop_data_alloc(_mechtype, 10, _prop); + /*initialize range parameters*/ + gbar = 1e-06; + _prop->param = _p; + _prop->param_size = 10; + _ppvar = nrn_prop_datum_alloc(_mechtype, 5, _prop); + _prop->dparam = _ppvar; + /*connect ionic variables to this model*/ + prop_ion = need_memb(_k_sym); + nrn_promote(prop_ion, 0, 1); + _ppvar[0]._pval = &prop_ion->param[0]; /* ek */ + _ppvar[1]._pval = &prop_ion->param[3]; /* ik */ + _ppvar[2]._pval = &prop_ion->param[4]; /* _ion_dikdv */ + prop_ion = need_memb(_ca_sym); + nrn_promote(prop_ion, 1, 0); + _ppvar[3]._pval = &prop_ion->param[1]; /* cai */ + +} + static void _initlists(); + /* some states have an absolute tolerance */ + static Symbol** _atollist; + static HocStateTolerance _hoc_state_tol[] = { + 0,0 +}; + static void _update_ion_pointer(Datum*); + extern Symbol* hoc_lookup(const char*); +extern void _nrn_thread_reg(int, int, void(*)(Datum*)); +extern void _nrn_thread_table_reg(int, void(*)(double*, Datum*, Datum*, NrnThread*, int)); +extern void hoc_register_tolerance(int, HocStateTolerance*, Symbol***); +extern void _cvode_abstol( Symbol**, double*, int); + + void _SK_reg() { + int _vectorized = 1; + _initlists(); + ion_reg("k", -10000.); + ion_reg("ca", -10000.); + _k_sym = hoc_lookup("k_ion"); + _ca_sym = hoc_lookup("ca_ion"); + register_mech(_mechanism, nrn_alloc,nrn_cur, nrn_jacob, nrn_state, nrn_init, hoc_nrnpointerindex, 1); + _mechtype = nrn_get_mechtype(_mechanism[1]); + _nrn_setdata_reg(_mechtype, _setdata); + _nrn_thread_reg(_mechtype, 2, _update_ion_pointer); + #if NMODL_TEXT + hoc_reg_nmodl_text(_mechtype, nmodl_file_text); + hoc_reg_nmodl_filename(_mechtype, nmodl_filename); +#endif + hoc_register_prop_size(_mechtype, 10, 5); + hoc_register_dparam_semantics(_mechtype, 0, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 1, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 2, "k_ion"); + hoc_register_dparam_semantics(_mechtype, 3, "ca_ion"); + hoc_register_dparam_semantics(_mechtype, 4, "cvodeieq"); + hoc_register_cvode(_mechtype, _ode_count, _ode_map, _ode_spec, _ode_matsol); + hoc_register_tolerance(_mechtype, _hoc_state_tol, &_atollist); + hoc_register_var(hoc_scdoub, hoc_vdoub, hoc_intfunc); + ivoc_help("help ?1 SK /home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/SK.mod\n"); + hoc_register_limits(_mechtype, _hoc_parm_limits); + hoc_register_units(_mechtype, _hoc_parm_units); + } +static int _reset; +static char *modelname = ""; + +static int error; +static int _ninits = 0; +static int _match_recurse=1; +static void _modl_cleanup(){ _match_recurse=1;} +static int rates(_threadargsprotocomma_ double); + +static int _ode_spec1(_threadargsproto_); +/*static int _ode_matsol1(_threadargsproto_);*/ + static int _slist1[1], _dlist1[1]; + static int states(_threadargsproto_); + +/*CVODE*/ + static int _ode_spec1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) {int _reset = 0; { + rates ( _threadargscomma_ cai ) ; + Dz = ( zInf - z ) / zTau ; + } + return _reset; +} + static int _ode_matsol1 (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + rates ( _threadargscomma_ cai ) ; + Dz = Dz / (1. - dt*( ( ( ( - 1.0 ) ) ) / zTau )) ; + return 0; +} + /*END CVODE*/ + static int states (double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { { + rates ( _threadargscomma_ cai ) ; + z = z + (1. - exp(dt*(( ( ( - 1.0 ) ) ) / zTau)))*(- ( ( ( zInf ) ) / zTau ) / ( ( ( ( - 1.0 ) ) ) / zTau ) - z) ; + } + return 0; +} + +static int rates ( _threadargsprotocomma_ double _lca ) { + if ( _lca < 1e-7 ) { + _lca = _lca + 1e-07 ; + } + zInf = 1.0 / ( 1.0 + pow( ( 0.00043 / _lca ) , 4.8 ) ) ; + return 0; } + +static void _hoc_rates(void) { + double _r; + double* _p; Datum* _ppvar; Datum* _thread; NrnThread* _nt; + if (_extcall_prop) {_p = _extcall_prop->param; _ppvar = _extcall_prop->dparam;}else{ _p = (double*)0; _ppvar = (Datum*)0; } + _thread = _extcall_thread; + _nt = nrn_threads; + _r = 1.; + rates ( _p, _ppvar, _thread, _nt, *getarg(1) ); + hoc_retpushx(_r); +} + +static int _ode_count(int _type){ return 1;} + +static void _ode_spec(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + cai = _ion_cai; + _ode_spec1 (_p, _ppvar, _thread, _nt); + }} + +static void _ode_map(int _ieq, double** _pv, double** _pvdot, double* _pp, Datum* _ppd, double* _atol, int _type) { + double* _p; Datum* _ppvar; + int _i; _p = _pp; _ppvar = _ppd; + _cvode_ieq = _ieq; + for (_i=0; _i < 1; ++_i) { + _pv[_i] = _pp + _slist1[_i]; _pvdot[_i] = _pp + _dlist1[_i]; + _cvode_abstol(_atollist, _atol, _i); + } + } + +static void _ode_matsol_instance1(_threadargsproto_) { + _ode_matsol1 (_p, _ppvar, _thread, _nt); + } + +static void _ode_matsol(NrnThread* _nt, _Memb_list* _ml, int _type) { + double* _p; Datum* _ppvar; Datum* _thread; + Node* _nd; double _v; int _iml, _cntml; + _cntml = _ml->_nodecount; + _thread = _ml->_thread; + for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; + v = NODEV(_nd); + ek = _ion_ek; + cai = _ion_cai; + _ode_matsol_instance1(_threadargs_); + }} + extern void nrn_update_ion_pointer(Symbol*, Datum*, int, int); + static void _update_ion_pointer(Datum* _ppvar) { + nrn_update_ion_pointer(_k_sym, _ppvar, 0, 0); + nrn_update_ion_pointer(_k_sym, _ppvar, 1, 3); + nrn_update_ion_pointer(_k_sym, _ppvar, 2, 4); + nrn_update_ion_pointer(_ca_sym, _ppvar, 3, 1); + } + +static void initmodel(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt) { + int _i; double _save;{ + z = z0; + { + rates ( _threadargscomma_ cai ) ; + z = zInf ; + } + +} +} + +static void nrn_init(NrnThread* _nt, _Memb_list* _ml, int _type){ +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v = _v; + ek = _ion_ek; + cai = _ion_cai; + initmodel(_p, _ppvar, _thread, _nt); + } +} + +static double _nrn_current(double* _p, Datum* _ppvar, Datum* _thread, NrnThread* _nt, double _v){double _current=0.;v=_v;{ { + g = gbar * z ; + ik = g * ( v - ek ) ; + } + _current += ik; + +} return _current; +} + +static void nrn_cur(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; double _rhs, _v; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + ek = _ion_ek; + cai = _ion_cai; + _g = _nrn_current(_p, _ppvar, _thread, _nt, _v + .001); + { double _dik; + _dik = ik; + _rhs = _nrn_current(_p, _ppvar, _thread, _nt, _v); + _ion_dikdv += (_dik - ik)/.001 ; + } + _g = (_g - _rhs)/.001; + _ion_ik += ik ; +#if CACHEVEC + if (use_cachevec) { + VEC_RHS(_ni[_iml]) -= _rhs; + }else +#endif + { + NODERHS(_nd) -= _rhs; + } + +} + +} + +static void nrn_jacob(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; +#if CACHEVEC + if (use_cachevec) { + VEC_D(_ni[_iml]) += _g; + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + NODED(_nd) += _g; + } + +} + +} + +static void nrn_state(NrnThread* _nt, _Memb_list* _ml, int _type) { +double* _p; Datum* _ppvar; Datum* _thread; +Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; +#if CACHEVEC + _ni = _ml->_nodeindices; +#endif +_cntml = _ml->_nodecount; +_thread = _ml->_thread; +for (_iml = 0; _iml < _cntml; ++_iml) { + _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; + _nd = _ml->_nodelist[_iml]; +#if CACHEVEC + if (use_cachevec) { + _v = VEC_V(_ni[_iml]); + }else +#endif + { + _nd = _ml->_nodelist[_iml]; + _v = NODEV(_nd); + } + v=_v; +{ + ek = _ion_ek; + cai = _ion_cai; + { states(_p, _ppvar, _thread, _nt); + } }} + +} + +static void terminal(){} + +static void _initlists(){ + double _x; double* _p = &_x; + int _i; static int _first = 1; + if (!_first) return; + _slist1[0] = z_columnindex; _dlist1[0] = Dz_columnindex; +_first = 0; +} + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#if NMODL_TEXT +static const char* nmodl_filename = "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/modfiles/SK.mod"; +static const char* nmodl_file_text = + ": SK-type calcium-activated potassium current\n" + ": Reference : Kohler et al. 1996\n" + "\n" + "NEURON {\n" + " SUFFIX SK\n" + " USEION k READ ek WRITE ik\n" + " USEION ca READ cai\n" + " RANGE gbar, g, ik\n" + "}\n" + "\n" + "UNITS {\n" + " (mV) = (millivolt)\n" + " (mA) = (milliamp)\n" + " (mM) = (milli/liter)\n" + "}\n" + "\n" + "PARAMETER {\n" + " v (mV)\n" + " gbar = .000001 (mho/cm2)\n" + " zTau = 1 (ms)\n" + " ek (mV)\n" + " cai (mM)\n" + "}\n" + "\n" + "ASSIGNED {\n" + " zInf\n" + " ik (mA/cm2)\n" + " g (S/cm2)\n" + "}\n" + "\n" + "STATE {\n" + " z FROM 0 TO 1\n" + "}\n" + "\n" + "BREAKPOINT {\n" + " SOLVE states METHOD cnexp\n" + " g = gbar * z\n" + " ik = g * (v - ek)\n" + "}\n" + "\n" + "DERIVATIVE states {\n" + " rates(cai)\n" + " z' = (zInf - z) / zTau\n" + "}\n" + "\n" + "PROCEDURE rates(ca(mM)) {\n" + " if(ca < 1e-7){\n" + " ca = ca + 1e-07\n" + " }\n" + " zInf = 1/(1 + (0.00043 / ca)^4.8)\n" + "}\n" + "\n" + "INITIAL {\n" + " rates(cai)\n" + " z = zInf\n" + "}\n" + ; +#endif diff --git a/examples/single_cell/x86_64/SK.o b/examples/single_cell/x86_64/SK.o new file mode 100644 index 0000000..22e7732 Binary files /dev/null and b/examples/single_cell/x86_64/SK.o differ diff --git a/examples/single_cell/x86_64/makemod2c_inc b/examples/single_cell/x86_64/makemod2c_inc new file mode 100644 index 0000000..6052dc5 --- /dev/null +++ b/examples/single_cell/x86_64/makemod2c_inc @@ -0,0 +1,128 @@ +./CaDynamics.c: ../modfiles/CaDynamics.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "CaDynamics.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./CaDynamics.o: ./CaDynamics.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Ca_HVA.c: ../modfiles/Ca_HVA.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Ca_HVA.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Ca_HVA.o: ./Ca_HVA.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Ca_LVA.c: ../modfiles/Ca_LVA.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Ca_LVA.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Ca_LVA.o: ./Ca_LVA.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Ih.c: ../modfiles/Ih.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Ih.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Ih.o: ./Ih.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Im.c: ../modfiles/Im.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Im.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Im.o: ./Im.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Im_v2.c: ../modfiles/Im_v2.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Im_v2.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Im_v2.o: ./Im_v2.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Kd.c: ../modfiles/Kd.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Kd.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Kd.o: ./Kd.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./K_P.c: ../modfiles/K_P.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "K_P.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./K_P.o: ./K_P.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./K_T.c: ../modfiles/K_T.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "K_T.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./K_T.o: ./K_T.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Kv2like.c: ../modfiles/Kv2like.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Kv2like.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Kv2like.o: ./Kv2like.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Kv3_1.c: ../modfiles/Kv3_1.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Kv3_1.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Kv3_1.o: ./Kv3_1.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./Nap.c: ../modfiles/Nap.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "Nap.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./Nap.o: ./Nap.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./NaTa.c: ../modfiles/NaTa.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "NaTa.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./NaTa.o: ./NaTa.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./NaTs.c: ../modfiles/NaTs.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "NaTs.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./NaTs.o: ./NaTs.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./NaV.c: ../modfiles/NaV.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "NaV.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./NaV.o: ./NaV.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + +./SK.c: ../modfiles/SK.mod + @printf " -> $(C_GREEN)NMODL$(C_RESET) $<\\n" + (cd "../modfiles"; MODLUNIT=$(NRNUNITS) $(NOCMODL) "SK.mod" -o "/home/gjgpb9/cortex_modeling/bmtool/examples/single_cell/x86_64") + +./SK.o: ./SK.c + @printf " -> $(C_GREEN)Compiling$(C_RESET) $<\\n" + $(COMPILE) -I"../modfiles" $(INCLUDES) -fPIC -c $< -o $@ + diff --git a/examples/single_cell/x86_64/mod_func.cpp b/examples/single_cell/x86_64/mod_func.cpp new file mode 100644 index 0000000..34d0075 --- /dev/null +++ b/examples/single_cell/x86_64/mod_func.cpp @@ -0,0 +1,67 @@ +#include +#include "hocdec.h" +extern int nrnmpi_myid; +extern int nrn_nobanner_; +#if defined(__cplusplus) +extern "C" { +#endif + +extern void _CaDynamics_reg(void); +extern void _Ca_HVA_reg(void); +extern void _Ca_LVA_reg(void); +extern void _Ih_reg(void); +extern void _Im_reg(void); +extern void _Im_v2_reg(void); +extern void _Kd_reg(void); +extern void _K_P_reg(void); +extern void _K_T_reg(void); +extern void _Kv2like_reg(void); +extern void _Kv3_1_reg(void); +extern void _Nap_reg(void); +extern void _NaTa_reg(void); +extern void _NaTs_reg(void); +extern void _NaV_reg(void); +extern void _SK_reg(void); + +void modl_reg() { + if (!nrn_nobanner_) if (nrnmpi_myid < 1) { + fprintf(stderr, "Additional mechanisms from files\n"); + fprintf(stderr, " \"modfiles/CaDynamics.mod\""); + fprintf(stderr, " \"modfiles/Ca_HVA.mod\""); + fprintf(stderr, " \"modfiles/Ca_LVA.mod\""); + fprintf(stderr, " \"modfiles/Ih.mod\""); + fprintf(stderr, " \"modfiles/Im.mod\""); + fprintf(stderr, " \"modfiles/Im_v2.mod\""); + fprintf(stderr, " \"modfiles/Kd.mod\""); + fprintf(stderr, " \"modfiles/K_P.mod\""); + fprintf(stderr, " \"modfiles/K_T.mod\""); + fprintf(stderr, " \"modfiles/Kv2like.mod\""); + fprintf(stderr, " \"modfiles/Kv3_1.mod\""); + fprintf(stderr, " \"modfiles/Nap.mod\""); + fprintf(stderr, " \"modfiles/NaTa.mod\""); + fprintf(stderr, " \"modfiles/NaTs.mod\""); + fprintf(stderr, " \"modfiles/NaV.mod\""); + fprintf(stderr, " \"modfiles/SK.mod\""); + fprintf(stderr, "\n"); + } + _CaDynamics_reg(); + _Ca_HVA_reg(); + _Ca_LVA_reg(); + _Ih_reg(); + _Im_reg(); + _Im_v2_reg(); + _Kd_reg(); + _K_P_reg(); + _K_T_reg(); + _Kv2like_reg(); + _Kv3_1_reg(); + _Nap_reg(); + _NaTa_reg(); + _NaTs_reg(); + _NaV_reg(); + _SK_reg(); +} + +#if defined(__cplusplus) +} +#endif diff --git a/examples/single_cell/x86_64/mod_func.o b/examples/single_cell/x86_64/mod_func.o new file mode 100644 index 0000000..5f6b6d0 Binary files /dev/null and b/examples/single_cell/x86_64/mod_func.o differ diff --git a/examples/single_cell/x86_64/special b/examples/single_cell/x86_64/special new file mode 100755 index 0000000..93027e4 --- /dev/null +++ b/examples/single_cell/x86_64/special @@ -0,0 +1,103 @@ +#!/home/gjgpb9/miniconda3/envs/bmtk/bin/python +""" +A generic wrapper to access nrn binaries from a python installation +Please create a softlink with the binary name to be called. +""" +import os +import shutil +import subprocess +import sys +from pkg_resources import working_set +from distutils.ccompiler import new_compiler +from sysconfig import get_config_vars, get_config_var + + +# This replaces the now depricated distutils.sysutils.customize_compiler +def _customize_compiler(compiler): + """Do platform-sepcific customizations of compilers on unix platforms.""" + if compiler.compiler_type == "unix": + (cc, cxx, cflags) = get_config_vars("CC", "CXX", "CFLAGS") + if "CC" in os.environ: + cc = os.environ["CC"] + if "CXX" in os.environ: + cxx = os.environ["CXX"] + if "CFLAGS" in os.environ: + cflags = cflags + " " + os.environ["CFLAGS"] + cc_cmd = cc + " " + cflags + # We update executables in compiler to take advantage of distutils arg splitting + compiler.set_executables(compiler=cc_cmd, compiler_cxx=cxx) + + +def _set_default_compiler(): + """Set (dont overwrite) CC/CXX so that apps dont use the build-time ones""" + ccompiler = new_compiler() + _customize_compiler(ccompiler) + # xcrun wrapper must bring all args + if ccompiler.compiler[0] == "xcrun": + ccompiler.compiler[0] = get_config_var("CC") + ccompiler.compiler_cxx[0] = get_config_var("CXX") + os.environ.setdefault("CC", ccompiler.compiler[0]) + os.environ.setdefault("CXX", ccompiler.compiler_cxx[0]) + + +def _config_exe(exe_name): + """Sets the environment to run the real executable (returned)""" + + package_name = "neuron" + + # determine package to find the install location + if "neuron-gpu-nightly" in working_set.by_key: + print("INFO : Using neuron-gpu-nightly Package (Alpha Developer Version)") + package_name = "neuron-gpu-nightly" + elif "neuron-gpu" in working_set.by_key: + print("INFO : Using neuron-gpu Package (Alpha Version)") + package_name = "neuron-gpu" + elif "neuron-nightly" in working_set.by_key: + print("INFO : Using neuron-nightly Package (Developer Version)") + package_name = "neuron-nightly" + elif "neuron" in working_set.by_key: + package_name = "neuron" + else: + raise RuntimeError("NEURON package not found! Verify PYTHONPATH") + + NRN_PREFIX = os.path.join( + working_set.by_key[package_name].location, "neuron", ".data" + ) + os.environ["NEURONHOME"] = os.path.join(NRN_PREFIX, "share/nrn") + os.environ["NRNHOME"] = NRN_PREFIX + os.environ["CORENRNHOME"] = NRN_PREFIX + os.environ["NRN_PYTHONEXE"] = sys.executable + os.environ["CORENRN_PYTHONEXE"] = sys.executable + os.environ["CORENRN_PERLEXE"] = shutil.which("perl") + os.environ["NRNBIN"] = os.path.dirname(__file__) + + _set_default_compiler() + return os.path.join(NRN_PREFIX, "bin", exe_name) + + +def _wrap_executable(output_name): + """Create a wrapper for an executable in same dir. Requires renaming the original file. + Executables are typically found under arch_name + """ + release_dir = os.path.join(os.environ["NEURONHOME"], "demo/release") + arch_name = next(os.walk(release_dir))[1][0] # first dir + file_path = os.path.join(arch_name, output_name) + shutil.move(file_path, file_path + ".nrn") + shutil.copy(__file__, file_path) + + +if __name__ == "__main__": + exe = _config_exe(os.path.basename(sys.argv[0])) + + if exe.endswith("nrnivmodl"): + # To create a wrapper for special (so it also gets ENV vars) we intercept nrnivmodl + subprocess.check_call([exe, *sys.argv[1:]]) + _wrap_executable("special") + sys.exit(0) + + if exe.endswith("special"): + exe = os.path.join( + sys.argv[0] + ".nrn" + ) # original special is renamed special.nrn + + os.execv(exe, sys.argv) diff --git a/examples/single_cell/x86_64/special.nrn b/examples/single_cell/x86_64/special.nrn new file mode 100755 index 0000000..93027e4 --- /dev/null +++ b/examples/single_cell/x86_64/special.nrn @@ -0,0 +1,103 @@ +#!/home/gjgpb9/miniconda3/envs/bmtk/bin/python +""" +A generic wrapper to access nrn binaries from a python installation +Please create a softlink with the binary name to be called. +""" +import os +import shutil +import subprocess +import sys +from pkg_resources import working_set +from distutils.ccompiler import new_compiler +from sysconfig import get_config_vars, get_config_var + + +# This replaces the now depricated distutils.sysutils.customize_compiler +def _customize_compiler(compiler): + """Do platform-sepcific customizations of compilers on unix platforms.""" + if compiler.compiler_type == "unix": + (cc, cxx, cflags) = get_config_vars("CC", "CXX", "CFLAGS") + if "CC" in os.environ: + cc = os.environ["CC"] + if "CXX" in os.environ: + cxx = os.environ["CXX"] + if "CFLAGS" in os.environ: + cflags = cflags + " " + os.environ["CFLAGS"] + cc_cmd = cc + " " + cflags + # We update executables in compiler to take advantage of distutils arg splitting + compiler.set_executables(compiler=cc_cmd, compiler_cxx=cxx) + + +def _set_default_compiler(): + """Set (dont overwrite) CC/CXX so that apps dont use the build-time ones""" + ccompiler = new_compiler() + _customize_compiler(ccompiler) + # xcrun wrapper must bring all args + if ccompiler.compiler[0] == "xcrun": + ccompiler.compiler[0] = get_config_var("CC") + ccompiler.compiler_cxx[0] = get_config_var("CXX") + os.environ.setdefault("CC", ccompiler.compiler[0]) + os.environ.setdefault("CXX", ccompiler.compiler_cxx[0]) + + +def _config_exe(exe_name): + """Sets the environment to run the real executable (returned)""" + + package_name = "neuron" + + # determine package to find the install location + if "neuron-gpu-nightly" in working_set.by_key: + print("INFO : Using neuron-gpu-nightly Package (Alpha Developer Version)") + package_name = "neuron-gpu-nightly" + elif "neuron-gpu" in working_set.by_key: + print("INFO : Using neuron-gpu Package (Alpha Version)") + package_name = "neuron-gpu" + elif "neuron-nightly" in working_set.by_key: + print("INFO : Using neuron-nightly Package (Developer Version)") + package_name = "neuron-nightly" + elif "neuron" in working_set.by_key: + package_name = "neuron" + else: + raise RuntimeError("NEURON package not found! Verify PYTHONPATH") + + NRN_PREFIX = os.path.join( + working_set.by_key[package_name].location, "neuron", ".data" + ) + os.environ["NEURONHOME"] = os.path.join(NRN_PREFIX, "share/nrn") + os.environ["NRNHOME"] = NRN_PREFIX + os.environ["CORENRNHOME"] = NRN_PREFIX + os.environ["NRN_PYTHONEXE"] = sys.executable + os.environ["CORENRN_PYTHONEXE"] = sys.executable + os.environ["CORENRN_PERLEXE"] = shutil.which("perl") + os.environ["NRNBIN"] = os.path.dirname(__file__) + + _set_default_compiler() + return os.path.join(NRN_PREFIX, "bin", exe_name) + + +def _wrap_executable(output_name): + """Create a wrapper for an executable in same dir. Requires renaming the original file. + Executables are typically found under arch_name + """ + release_dir = os.path.join(os.environ["NEURONHOME"], "demo/release") + arch_name = next(os.walk(release_dir))[1][0] # first dir + file_path = os.path.join(arch_name, output_name) + shutil.move(file_path, file_path + ".nrn") + shutil.copy(__file__, file_path) + + +if __name__ == "__main__": + exe = _config_exe(os.path.basename(sys.argv[0])) + + if exe.endswith("nrnivmodl"): + # To create a wrapper for special (so it also gets ENV vars) we intercept nrnivmodl + subprocess.check_call([exe, *sys.argv[1:]]) + _wrap_executable("special") + sys.exit(0) + + if exe.endswith("special"): + exe = os.path.join( + sys.argv[0] + ".nrn" + ) # original special is renamed special.nrn + + os.execv(exe, sys.argv) diff --git a/setup.py b/setup.py index a0ef129..8a7945c 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="bmtool", - version='0.5.9.5', + version='0.5.9.6', author="Neural Engineering Laboratory at the University of Missouri", author_email="gregglickert@mail.missouri.edu", description="BMTool",