Changeset 12171 in project
- Timestamp:
- 10/16/08 01:57:48 (12 years ago)
- Location:
- release/3/nemo/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release/3/nemo/trunk/examples/AKP06/PotIhCa.scm
r12167 r12171 14 14 (* 1e-6 (* 2 F) (- ci (* co (exp (neg zeta)))) (+ 1.0 (/ zeta 2))) 15 15 (/ (* 1e-6 (* 2 zeta F) (- ci (* co (exp (neg zeta))))) (- 1.0 (exp (neg zeta)))))))) 16 16 17 (decaying-pool (ca (depth 0.1) (beta 1))) 17 18 18 19 (component (type ion-channel) (name Kv1) -
release/3/nemo/trunk/nemo-nmodl.scm
r12167 r12171 701 701 (bkt-loop (cdr old-bkts) (cons (car old-bkts) new-bkts))))))))) 702 702 703 (define (collect-epools sys) 704 (match-let ((($ nemo:quantity 'DISPATCH dis) (environment-ref sys (nemo-intern 'dispatch)))) 705 (let recur ((comp-name (nemo-intern 'toplevel)) (ax (list))) 706 (let* ((comp-symbols ((dis 'component-symbols) sys comp-name)) 707 (subcomps ((dis 'component-subcomps) sys comp-name))) 708 (fold recur 709 (fold (lambda (sym ax) 710 (let ((en (environment-ref sys sym))) 711 (match en 712 ((or (('decaying 'pool) ('name (? symbol? ion)) . alst) 713 (('decaying-pool) ('name (? symbol? ion)) . alst)) 714 (cons (list ion alst) ax)) 715 (else ax)))) ax comp-symbols) 716 (map third subcomps)))))) 717 703 718 704 719 (define (nemo:nmodl-translator sys . rest) … … 720 735 (defuns ((dis 'defuns) sys)) 721 736 (components ((dis 'components) sys)) 722 (ionchs (filter-map (match-lambda ((name 'ion-channel id) (list name id)) (else #f)) components))) 737 (ionchs (filter-map (match-lambda ((name 'ion-channel id) (list name id)) (else #f)) components)) 738 (epools (collect-epools sys))) 739 723 740 (match-let (((state-list asgn-list g) deps*)) 724 741 (let* ((poset (vector->list ((dis 'depgraph->bfs-dist-poset) g))) … … 752 769 (list) ionchs) 753 770 (lambda (x y) (eq? (car x) (car y))))) 771 (pool-ions (delete-duplicates 772 (map (lambda (ep) 773 (let ((ion (car ep))) 774 `(,(nmodl-name ion) ,(nmodl-name (s+ 'i ion)) ,(nmodl-name (s+ ion 'i))))) 775 epools))) 754 776 ) 777 778 (print "pool-ions = " pool-ions) 779 (print "acc-ions = " acc-ions) 780 (print "perm-ions = " perm-ions) 781 782 (for-each 783 (lambda (a p) 784 (let ((acc-ion (car a)) 785 (pool-ion (car p))) 786 (if (alist-ref acc-ion perm-ions) 787 (nemo:error 'nemo:nmodl-translator 788 ": ion species " ion " cannot be declared as both accumulating and permeating")) 789 (if (alist-ref pool-ion perm-ions) 790 (nemo:error 'nemo:nmodl-translator 791 ": ion species " ion " cannot be declared as both pool and permeating")))) 792 acc-ions) 755 793 756 794 (pp indent ,nl (TITLE ,sysname)) … … 771 809 (USEION ,(first x) READ ,(third x) ", " ,(fourth x) WRITE ,(second x)))) 772 810 acc-ions) 811 (for-each (lambda (x) 812 (pp indent+ (RANGE ,(first x)) 813 (USEION ,(first x) READ ,(second x) WRITE ,(third x)))) 814 pool-ions) 773 815 (let* ((const-names (map first consts)) 774 816 (is-const? (lambda (x) (member x const-names))) … … 851 893 (let* ((i-eqs (filter-map 852 894 (lambda (ionch) 853 (let* ((n (second ionch))854 (subcomps ((dis 'component-subcomps) sys n))855 (acc (lookup-def 'accumulating-substance subcomps))856 (perm (lookup-def 'permeating-substance subcomps))857 (pore (lookup-def 'pore subcomps))858 (gate (lookup-def 'gate subcomps))859 (sts (and gate ((dis 'component-exports) sys (cid gate)))))895 (let* ((n (second ionch)) 896 (subcomps ((dis 'component-subcomps) sys n)) 897 (acc (lookup-def 'accumulating-substance subcomps)) 898 (perm (lookup-def 'permeating-substance subcomps)) 899 (pore (lookup-def 'pore subcomps)) 900 (gate (lookup-def 'gate subcomps)) 901 (sts (and gate ((dis 'component-exports) sys (cid gate))))) 860 902 (cond ((and perm pore gate) 861 903 (case (cn perm) -
release/3/nemo/trunk/nemo.setup
r12076 r12171 49 49 50 50 ; Assoc list with properties for your extension: 51 `((version 1. 0)51 `((version 1.1) 52 52 ,@(if has-exports? `((exports "nemo-nmodl.exports")) (list)) )) 53 53 … … 68 68 69 69 ; Assoc list with properties for your extension: 70 `((version 1. 0)70 `((version 1.1) 71 71 ,@(if has-exports? `((exports "nemo-hh.exports")) (list)) )) 72 72 … … 82 82 83 83 ; Assoc list with properties for the program: 84 '((version 1. 0)84 '((version 1.1) 85 85 (documentation "nemo.html")))
Note: See TracChangeset
for help on using the changeset viewer.