;; ;; A model of the projections between Golgi and granule cells in ;; cerebellar granular layer. ;; ;; Copyright 2012-2014 Ivan Raikov and the Okinawa Institute of Science and Technology ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation, either version 3 of the ;; License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; A full copy of the GPL license can be found at ;; . ;; (picnic-model GL ( (config PFlength) (config PCLdepth) (config numAxonGolgi) ;; GoC axonal dimensions (config GoC_Axon_Xmin) (config GoC_Axon_Xmax) (config GoC_Axon_Ymin) (config GoC_Axon_Ymax) (config GoC_Axon_Zmin) (config GoC_Axon_Zmax) (config GoC_nDendML) ;; GoC # of apical dendrites (config GoC_nDendGL) ;; GoC # of basolateral dendrites (config GoC_Ad_nseg) ;; GoC apical dendrites number of segments (config GoC_Ad_nsegpts) ;; GoC apical dendrites number of points per segment (config GoC_Bd_nseg) (config GoC_Bd_nsegpts) (config GoC_PhysApicalDendH) (config GoC_PhysApicalDendR) (config GoC_Atheta_min ) (config GoC_Atheta_max ) (config GoC_Atheta_stdev) (config GoC_PhysBasolateralDendH) (config GoC_PhysBasolateralDendR) (config GoC_Btheta_min ) (config GoC_Btheta_max ) (config GoC_Btheta_stdev) (config AAtoGoCzone) (config PFtoGoCzone) (config GoCtoGoCzone) (config GoCtoGoCgapzone) (config GoCxrange) (config GoCyrange) (const xExtent = GoCxrange) (const yExtent = GoCyrange) (component (type local-cell-forest) (name GC) (component (type layout) (name GranuleTcoordinates) (s = (PointsFromFile ("GCTcoordinates.dat"))) (output s) ) (component (type section) (name AscendingAxons) (defun f (gid origin) (let ((dX 0) (dY 0) (dZ (neg (PCLdepth)))) LineSegment (origin dX dY dZ) )) (const n = 1) (p (u) = (generator f) (npts 4)) (output u n) ) (component (type section) (name ParallelFibers) (defun f (gid origin) (let ((dX (PFlength / 2)) (dY 0) (dZ 0)) LineSegment (origin dX dY dZ))) (defun g (gid origin) (let ((dX (PFlength / 2)) (dY 0) (dZ 0)) LineSegment (origin ~ (neg (dX)) ~ dY ~ dZ))) (const n = 1) ;; process u grows in the positive X direction ;; process v grows in the negative X direction (p (u) = (generator f) (npts 200)) (p (v) = (generator g) (npts 200)) (output u n v n) ) ) (component (type cell-forest) (name GoC) (component (type layout) (name GolgiCoordinates) (s = (PointsFromFile ("GoCcoordinates.dat"))) (output s) ) (component (type section) (name BasolateralDendrites) (defun f (gid origin init) (let ( (thetaDeg (randomNormal (GoC_Btheta_min GoC_Btheta_stdev init))) (theta ((PI / 180.) * thetaDeg)) (dX (GoC_PhysBasolateralDendR * cos (theta))) (dY (GoC_PhysBasolateralDendR * sin (theta))) (dZ GoC_PhysBasolateralDendH) ) LineSegment (origin dX dY dZ))) (defun g (gid origin init) (let ( (thetaDeg (randomNormal (GoC_Btheta_max GoC_Btheta_stdev init))) (theta ((PI / 180.) * thetaDeg)) (dX (GoC_PhysBasolateralDendR * cos (theta))) (dY (GoC_PhysBasolateralDendR * sin (theta))) (dZ GoC_PhysBasolateralDendH) ) LineSegment (origin dX dY dZ))) (const n = 1) (segp (u) = (generator f) (initial (randomInit (13))) (nsegs GoC_Bd_nseg) (nsegpts GoC_Bd_nsegpts)) (segp (v) = (generator g) (initial (randomInit (13))) (nsegs GoC_Bd_nseg) (nsegpts GoC_Bd_nsegpts)) (output u n v n) ) (component (type section) (name ApicalDendrites) (defun f (gid origin init) (let ( (thetaDeg (randomNormal (GoC_Atheta_min GoC_Atheta_stdev init))) (theta ((PI / 180.) * thetaDeg)) (dX (GoC_PhysApicalDendR * cos (theta))) (dY (GoC_PhysApicalDendR * sin (theta))) (dZ GoC_PhysApicalDendH) ) LineSegment (origin dX dY dZ))) (defun g (gid origin init) (let ( (thetaDeg (randomNormal (GoC_Atheta_max GoC_Atheta_stdev init))) (theta ((PI / 180.) * thetaDeg)) (dX (GoC_PhysApicalDendR * cos (theta))) (dY (GoC_PhysApicalDendR * sin (theta))) (dZ GoC_PhysApicalDendH) ) LineSegment (origin dX dY dZ))) (const n = 1) (segp (u) = (generator f) (initial (randomInit (17))) (nsegs GoC_Ad_nseg) (nsegpts GoC_Ad_nsegpts)) (segp (v) = (generator g) (initial (randomInit (17))) (nsegs GoC_Ad_nseg) (nsegpts GoC_Ad_nsegpts)) (output u n v n) ) (component (type section) (name Axons) (const n = numAxonGolgi) (defun f (gid origin init) (let ((dX (randomUniform (GoC_Axon_Xmin GoC_Axon_Xmax init))) (dY (randomUniform (GoC_Axon_Ymin GoC_Axon_Ymax init))) (dZ (randomUniform (GoC_Axon_Zmin GoC_Axon_Zmax init)))) LineSegment (origin dX dY dZ))) (p (u) = (generator f) (initial (randomInit (23)))) (output u n) ) ) (component (type projection) (input (GC from cell-forests) (GoC from cell-forests)) (r = PFtoGoCzone) (set source = (section GC ParallelFibers)) (set target = (section GoC ApicalDendrites)) (PFtoGoC = (SegmentProjection (r source target))) (output PFtoGoC) ) (component (type projection) (input (GC from cell-forests) (GoC from cell-forests)) (r = AAtoGoCzone) (set source = (section GC AscendingAxons)) (set target = (union (section GoC ApicalDendrites) (section GoC BasolateralDendrites) )) (AAtoGoC = (SegmentProjection (r source target))) (output AAtoGoC) ) (component (type projection) (input (GoC from cell-forests)) (r = GoCtoGoCzone) (set source = (section GoC Axons)) (set target = (population GoC)) (GoCtoGoC = (Projection (r source target))) (output GoCtoGoC) ) (component (type projection) (input (GoC from cell-forests)) (r = GoCtoGoCgapzone) (set source = (population GoC)) (set target = (population GoC)) (GoCtoGoCgap = (Projection (r source target))) (output GoCtoGoCgap) ) ))