diff --git a/doc/tutorial/gap_junction_circuit.svg b/doc/tutorial/gap_junction_circuit.svg new file mode 100644 index 0000000000000000000000000000000000000000..048c4b7ee0448b41020826aa35fa61bcfec87c6c --- /dev/null +++ b/doc/tutorial/gap_junction_circuit.svg @@ -0,0 +1,526 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="svg2" + xml:space="preserve" + width="342.25732" + height="258.55066" + viewBox="0 0 342.25732 258.55066" + sodipodi:docname="gap_junction_circuit.svg" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata + id="metadata8"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs6" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="640" + inkscape:window-height="480" + id="namedview4" + showgrid="false" + inkscape:zoom="0.9127805" + inkscape:cx="171.12866" + inkscape:cy="129.27533" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g10" /><g + id="g10" + inkscape:groupmode="layer" + inkscape:label="gap_junction_circuit" + transform="matrix(1.3333333,0,0,-1.3333333,0,258.55067)"><g + id="g12" + transform="translate(16.621,144.828)"><g + id="g14"><g + id="g16"><path + d="M 0,0 V -0.19925 M 0,0 v -52.72513 m 0,-7.93697 v -52.72514 m 0,0.19927 v -0.19927 h 0.19925 m -0.19925,0 h 14.17339 m 0,0 H 28.3468 m -0.19925,0 h 0.19925 28.34682 v 0.19927 m 0,-0.19927 v 22.39397 m 0,11.9057 v 22.39395 m 0,-0.19925 v 0.19925 0.19927 m 0,-0.19927 v 5.38591 m 0,31.7484 v 5.38591 m 0,-0.19925 V -14.1734 0 h -0.19927 m 0.19927,0 H 42.5202 m 0,0 H 28.3468 m 0.19925,0 H 28.3468 0" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path18" + inkscape:connector-curvature="0" /><g + id="g20" /><g + id="g22" /><g + id="g24"><path + d="M 11.90572,-52.72513 H -11.90572 M 11.90572,-60.6621 H -11.90572" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path26" + inkscape:connector-curvature="0" /><g + id="g28" + transform="rotate(-90,-28.3465,-28.3465)"><g + id="g30" /><g + id="g32" + transform="translate(0,56.693)" /></g></g><g + id="g34" /><g + id="g36" /><g + id="g38" /><g + id="g40"><g + id="g42" + transform="translate(14.705,-58.838)"><g + id="g44"><g + id="g46" + transform="translate(-31.326,-85.99)"><text + transform="matrix(1,0,0,-1,31.326,85.99)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text50"><tspan + x="0" + y="0" + id="tspan48">C</tspan></text> +<text + transform="matrix(1,0,0,-1,38.446,84.496)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text54"><tspan + x="0" + y="0" + id="tspan52">0</tspan></text> +<g + id="g56" + transform="translate(31.326,85.99)" /></g></g><g + id="g58" + transform="translate(-14.705,58.838)" /></g></g><g + id="g60" /><g + id="g62" /><g + id="g64"><g + id="g66" + transform="translate(14.173,-113.386)"><g + id="g68" /><g + id="g70" + transform="translate(-14.173,113.386)" /></g></g><g + id="g72" /><g + id="g74" /><g + id="g76"><g + id="g78" + transform="translate(28.347,-113.386)"><g + id="g80" /><g + id="g82" + transform="translate(-28.347,113.386)" /></g><g + id="g84"><g + id="g86"><path + d="m 29.93394,-113.38724 c 0,0.87657 -0.71058,1.58716 -1.58714,1.58716 -0.87655,0 -1.58714,-0.71059 -1.58714,-1.58716 0,-0.87656 0.71059,-1.58714 1.58714,-1.58714 0.87656,0 1.58714,0.71058 1.58714,1.58714 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path88" + inkscape:connector-curvature="0" /></g></g></g><g + id="g90" /><g + id="g92" /><g + id="g94" /><g + id="g96"><path + d="m 56.69362,-83.07597 v 3.9884 m 0,-7.9173 v -3.9884" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path98" + inkscape:connector-curvature="0" /><path + d="m 50.74075,-83.07597 h 11.90572 m -17.85858,-3.9289 h 23.81144" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path100" + inkscape:connector-curvature="0" /><g + id="g102" + transform="rotate(90,70.8665,-14.1735)"><g + id="g104" /><g + id="g106" + transform="translate(-56.693,85.04)" /></g></g><g + id="g108" /><g + id="g110" /><g + id="g112" /><g + id="g114"><g + id="g116" + transform="translate(30.165,-87.184)"><g + id="g118"><g + id="g120" + transform="translate(-46.786,-57.644)"><text + transform="matrix(1,0,0,-1,46.786,57.644)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text124"><tspan + x="0" + y="0" + id="tspan122">E</tspan></text> +<text + transform="matrix(1,0,0,-1,54.14,56.149)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text128"><tspan + x="0" + y="0" + id="tspan126">0</tspan></text> +<g + id="g130" + transform="translate(46.786,57.644)" /></g></g><g + id="g132" + transform="translate(-30.165,87.184)" /></g></g><g + id="g134" /><g + id="g136" /><g + id="g138"><path + d="m 56.69362,-51.7062 -5.95287,3.0774 11.90572,5.35782 -11.90572,5.35782 11.90572,5.35782 -11.90572,5.3578 11.90572,5.35782 -5.95285,2.67891" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path140" + inkscape:connector-curvature="0" /><g + id="g142" + transform="rotate(90,46.063,10.63)"><g + id="g144" /><g + id="g146" + transform="translate(-56.693,35.433)" /></g></g><g + id="g148" /><g + id="g150" /><g + id="g152" /><g + id="g154"><g + id="g156" + transform="translate(36.503,-37.578)"><g + id="g158"><g + id="g160" + transform="translate(-53.124,-107.25)"><text + transform="matrix(1,0,0,-1,53.124,107.25)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text164"><tspan + x="0" + y="0" + id="tspan162">R</tspan></text> +<text + transform="matrix(1,0,0,-1,60.688,105.756)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text168"><tspan + x="0" + y="0" + id="tspan166">0</tspan></text> +<g + id="g170" + transform="translate(53.124,107.25)" /></g></g><g + id="g172" + transform="translate(-36.503,37.578)" /></g></g><g + id="g174" /><g + id="g176" /><g + id="g178"><g + id="g180" + transform="rotate(180,21.26,0)"><g + id="g182" /><g + id="g184" + transform="translate(-42.52)" /></g></g><g + id="g186" /><g + id="g188" /><g + id="g190"><g + id="g192" + transform="translate(28.347)"><g + id="g194" /><g + id="g196" + transform="translate(-28.347)" /></g><g + id="g198"><g + id="g200"><path + d="m 29.93394,0 c 0,0.87654 -0.71058,1.58713 -1.58714,1.58713 -0.87655,0 -1.58714,-0.71059 -1.58714,-1.58713 0,-0.87657 0.71059,-1.58716 1.58714,-1.58716 0.87656,0 1.58714,0.71059 1.58714,1.58716 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path202" + inkscape:connector-curvature="0" /></g></g></g><g + id="g204" /><path + d="m 28.3468,-113.38724 v -14.17338" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path206" + inkscape:connector-curvature="0" /><g + id="g208"><g + id="g210" + transform="translate(28.347,-127.559)"><g + id="g212" /><g + id="g214" + transform="translate(-28.347,127.559)" /></g><g + id="g216"><g + id="g218"><path + d="m 28.3468,-127.56062 v -11.9056" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path220" + inkscape:connector-curvature="0" /><path + d="m 22.39395,-139.46622 h 11.9057 m -9.92132,-1.98423 h 7.93695 m -6.44881,-1.98438 h 4.96066" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path222" + inkscape:connector-curvature="0" /></g></g></g><path + d="m 170.08086,0 v -0.19925 m 0,0.19925 v -52.72513 m 0,-7.93697 v -52.72514 m 0,0.19927 v -0.19927 h 0.19924 m -0.19924,0 h 14.17338 m 0,0 h 14.17342 m -0.19925,0 h 0.19925 28.34682 v 0.19927 m 0,-0.19927 v 22.39397 m 0,11.9057 v 22.39395 m 0,-0.19925 v 0.19925 0.19927 m 0,-0.19927 v 5.38591 m 0,31.7484 v 5.38591 m 0,-0.19925 V -14.1734 0 h -0.19925 m 0.19925,0 h -14.17342 m 0,0 h -14.1734 m 0.19924,0 h -0.19924 -28.3468" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path224" + inkscape:connector-curvature="0" /><g + id="g226" /><g + id="g228" /><g + id="g230"><path + d="m 181.98657,-52.72513 h -23.81143 m 23.81143,-7.93697 h -23.81143" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path232" + inkscape:connector-curvature="0" /><g + id="g234" + transform="rotate(-90,56.693,-113.386)"><g + id="g236" /><g + id="g238" + transform="translate(-170.079,56.693)" /></g></g><g + id="g240" /><g + id="g242" /><g + id="g244" /><g + id="g246"><g + id="g248" + transform="translate(184.784,-58.838)"><g + id="g250"><g + id="g252" + transform="translate(-201.405,-85.99)"><text + transform="matrix(1,0,0,-1,201.405,85.99)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text256"><tspan + x="0" + y="0" + id="tspan254">C</tspan></text> +<text + transform="matrix(1,0,0,-1,208.525,84.496)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text260"><tspan + x="0" + y="0" + id="tspan258">1</tspan></text> +<g + id="g262" + transform="translate(201.405,85.99)" /></g></g><g + id="g264" + transform="translate(-184.784,58.838)" /></g></g><g + id="g266" /><g + id="g268" /><g + id="g270"><g + id="g272" + transform="translate(184.252,-113.386)"><g + id="g274" /><g + id="g276" + transform="translate(-184.252,113.386)" /></g></g><g + id="g278" /><g + id="g280" /><g + id="g282"><g + id="g284" + transform="translate(198.425,-113.386)"><g + id="g286" /><g + id="g288" + transform="translate(-198.425,113.386)" /></g><g + id="g290"><g + id="g292"><path + d="m 200.01482,-113.38724 c 0,0.87657 -0.71059,1.58716 -1.58716,1.58716 -0.87656,0 -1.58714,-0.71059 -1.58714,-1.58716 0,-0.87656 0.71058,-1.58714 1.58714,-1.58714 0.87657,0 1.58716,0.71058 1.58716,1.58714 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path294" + inkscape:connector-curvature="0" /></g></g></g><g + id="g296" /><g + id="g298" /><g + id="g300" /><g + id="g302"><path + d="m 226.77448,-83.07597 v 3.9884 m 0,-7.9173 v -3.9884" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path304" + inkscape:connector-curvature="0" /><path + d="m 220.82162,-83.07597 h 11.90571 m -17.85857,-3.9289 h 23.81143" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path306" + inkscape:connector-curvature="0" /><g + id="g308" + transform="rotate(90,155.906,70.866)"><g + id="g310" /><g + id="g312" + transform="translate(-226.772,85.04)" /></g></g><g + id="g314" /><g + id="g316" /><g + id="g318" /><g + id="g320"><g + id="g322" + transform="translate(200.243,-87.184)"><g + id="g324"><g + id="g326" + transform="translate(-216.864,-57.644)"><text + transform="matrix(1,0,0,-1,216.864,57.644)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text330"><tspan + x="0" + y="0" + id="tspan328">E</tspan></text> +<text + transform="matrix(1,0,0,-1,224.219,56.149)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text334"><tspan + x="0" + y="0" + id="tspan332">1</tspan></text> +<g + id="g336" + transform="translate(216.864,57.644)" /></g></g><g + id="g338" + transform="translate(-200.243,87.184)" /></g></g><g + id="g340" /><g + id="g342" /><g + id="g344"><path + d="m 226.77448,-51.7062 -5.95286,3.0774 11.90571,5.35782 -11.90571,5.35782 11.90571,5.35782 -11.90571,5.3578 11.90571,5.35782 -5.95285,2.67891" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path346" + inkscape:connector-curvature="0" /><g + id="g348" + transform="rotate(90,131.1025,95.6695)"><g + id="g350" /><g + id="g352" + transform="translate(-226.772,35.433)" /></g></g><g + id="g354" /><g + id="g356" /><g + id="g358" /><g + id="g360"><g + id="g362" + transform="translate(206.581,-37.578)"><g + id="g364"><g + id="g366" + transform="translate(-223.202,-107.25)"><text + transform="matrix(1,0,0,-1,223.202,107.25)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text370"><tspan + x="0" + y="0" + id="tspan368">R</tspan></text> +<text + transform="matrix(1,0,0,-1,230.767,105.756)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text374"><tspan + x="0" + y="0" + id="tspan372">1</tspan></text> +<g + id="g376" + transform="translate(223.202,107.25)" /></g></g><g + id="g378" + transform="translate(-206.581,37.578)" /></g></g><g + id="g380" /><g + id="g382" /><g + id="g384"><g + id="g386" + transform="rotate(180,106.299,0)"><g + id="g388" /><g + id="g390" + transform="translate(-212.598)" /></g></g><g + id="g392" /><g + id="g394" /><g + id="g396"><g + id="g398" + transform="translate(198.425)"><g + id="g400" /><g + id="g402" + transform="translate(-198.425)" /></g><g + id="g404"><g + id="g406"><path + d="m 200.01482,0 c 0,0.87654 -0.71059,1.58713 -1.58716,1.58713 -0.87656,0 -1.58714,-0.71059 -1.58714,-1.58713 0,-0.87657 0.71058,-1.58716 1.58714,-1.58716 0.87657,0 1.58716,0.71059 1.58716,1.58716 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path408" + inkscape:connector-curvature="0" /></g></g></g><g + id="g410" /><path + d="m 198.42766,-113.38724 v -14.17338" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path412" + inkscape:connector-curvature="0" /><g + id="g414"><g + id="g416" + transform="translate(198.425,-127.559)"><g + id="g418" /><g + id="g420" + transform="translate(-198.425,127.559)" /></g><g + id="g422"><g + id="g424"><path + d="m 198.42766,-127.56062 v -11.9056" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path426" + inkscape:connector-curvature="0" /><path + d="m 192.47481,-139.46622 h 11.9057 m -9.92133,-1.98423 h 7.93695 m -6.44879,-1.98438 h 4.96065" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path428" + inkscape:connector-curvature="0" /></g></g></g><path + d="m 28.3468,0 v 28.34679 h 0.19925 m -0.19925,0 h 69.16622 m 31.74839,0 h 69.16625 m -0.19925,0 h 0.19925 V 0" + style="fill:none;stroke:#000000;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path430" + inkscape:connector-curvature="0" /><g + id="g432"><g + id="g434" + transform="translate(23.697,33.36)"><g + id="g436"><g + id="g438" + transform="translate(-40.318,-178.188)"><text + transform="matrix(1,0,0,-1,40.318,178.188)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text442"><tspan + x="0" + y="0" + id="tspan440">v</tspan></text> +<text + transform="matrix(1,0,0,-1,45.147,176.694)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text446"><tspan + x="0" + y="0" + id="tspan444">0</tspan></text> +<g + id="g448" + transform="translate(40.318,178.188)" /></g></g><g + id="g450" + transform="translate(-23.697,-33.36)" /></g></g><g + id="g452" /><g + id="g454" /><g + id="g456" /><g + id="g458"><path + d="m 97.11452,28.34679 3.07741,5.95285 5.35781,-11.9057 5.35782,11.9057 5.35782,-11.9057 5.35782,11.9057 5.3578,-11.9057 2.67891,5.95285" + style="fill:none;stroke:#000000;stroke-width:0.79699999;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path460" + inkscape:connector-curvature="0" /><g + id="g462" + transform="translate(113.386,28.346)"><g + id="g464" /><g + id="g466" + transform="translate(-113.386,-28.346)" /></g></g><g + id="g468" /><g + id="g470" /><g + id="g472" /><g + id="g474" /><g + id="g476"><g + id="g478" + transform="translate(103.183,38.111)"><g + id="g480"><g + id="g482" + transform="translate(-119.804,-182.939)"><text + transform="matrix(1,0,0,-1,119.804,182.939)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text486"><tspan + x="0" + y="0" + id="tspan484">R</tspan></text> +<text + transform="matrix(1,0,0,-1,127.369,181.445)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text490"><tspan + x="0 3.9715791 7.9431581" + y="0" + sodipodi:role="line" + id="tspan488">gap</tspan></text> +<g + id="g492" + transform="translate(119.804,182.939)" /></g></g><g + id="g494" + transform="translate(-103.183,-38.111)" /></g></g><g + id="g496"><g + id="g498" + transform="translate(193.776,33.36)"><g + id="g500"><g + id="g502" + transform="translate(-210.397,-178.188)"><text + transform="matrix(1,0,0,-1,210.397,178.188)" + style="font-variant:normal;font-weight:normal;font-size:9.96259975px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text506"><tspan + x="0" + y="0" + id="tspan504">v</tspan></text> +<text + transform="matrix(1,0,0,-1,215.226,176.694)" + style="font-variant:normal;font-weight:normal;font-size:6.97380018px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="text510"><tspan + x="0" + y="0" + id="tspan508">1</tspan></text> +<g + id="g512" + transform="translate(210.397,178.188)" /></g></g><g + id="g514" + transform="translate(-193.776,-33.36)" /></g></g></g></g></g></g></svg> \ No newline at end of file diff --git a/doc/tutorial/index.rst b/doc/tutorial/index.rst index c0418d9cd3bc3f3d148806fffac52c54db9466fc..b5a897deea6baf00fe4fe0fa58e869bb2f894219 100644 --- a/doc/tutorial/index.rst +++ b/doc/tutorial/index.rst @@ -27,3 +27,4 @@ Tutorials single_cell_cable network_ring network_ring_mpi + two_cells_gap_junctions diff --git a/doc/tutorial/two_cell_gap_junctions_result.svg b/doc/tutorial/two_cell_gap_junctions_result.svg new file mode 100644 index 0000000000000000000000000000000000000000..9d054d82a21f1b288e963677c0f69b8a14566375 --- /dev/null +++ b/doc/tutorial/two_cell_gap_junctions_result.svg @@ -0,0 +1,883 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Created with matplotlib (https://matplotlib.org/) --> +<svg height="345.6pt" version="1.1" viewBox="0 0 460.8 345.6" width="460.8pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs> + <style type="text/css"> +*{stroke-linecap:butt;stroke-linejoin:round;} + </style> + </defs> + <g id="figure_1"> + <g id="patch_1"> + <path d="M 0 345.6 +L 460.8 345.6 +L 460.8 0 +L 0 0 +z +" style="fill:#ffffff;"/> + </g> + <g id="axes_1"> + <g id="patch_2"> + <path d="M 57.6 307.584 +L 414.72 307.584 +L 414.72 41.472 +L 57.6 41.472 +z +" style="fill:#ffffff;"/> + </g> + <g id="matplotlib.axis_1"> + <g id="xtick_1"> + <g id="line2d_1"> + <defs> + <path d="M 0 0 +L 0 3.5 +" id="m54aa6eae39" style="stroke:#000000;stroke-width:0.8;"/> + </defs> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="73.832727" xlink:href="#m54aa6eae39" y="307.584"/> + </g> + </g> + <g id="text_1"> + <!-- 0 --> + <defs> + <path d="M 31.78125 66.40625 +Q 24.171875 66.40625 20.328125 58.90625 +Q 16.5 51.421875 16.5 36.375 +Q 16.5 21.390625 20.328125 13.890625 +Q 24.171875 6.390625 31.78125 6.390625 +Q 39.453125 6.390625 43.28125 13.890625 +Q 47.125 21.390625 47.125 36.375 +Q 47.125 51.421875 43.28125 58.90625 +Q 39.453125 66.40625 31.78125 66.40625 +z +M 31.78125 74.21875 +Q 44.046875 74.21875 50.515625 64.515625 +Q 56.984375 54.828125 56.984375 36.375 +Q 56.984375 17.96875 50.515625 8.265625 +Q 44.046875 -1.421875 31.78125 -1.421875 +Q 19.53125 -1.421875 13.0625 8.265625 +Q 6.59375 17.96875 6.59375 36.375 +Q 6.59375 54.828125 13.0625 64.515625 +Q 19.53125 74.21875 31.78125 74.21875 +z +" id="DejaVuSans-48"/> + </defs> + <g transform="translate(70.651477 322.182437)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-48"/> + </g> + </g> + </g> + <g id="xtick_2"> + <g id="line2d_2"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="138.893758" xlink:href="#m54aa6eae39" y="307.584"/> + </g> + </g> + <g id="text_2"> + <!-- 1 --> + <defs> + <path d="M 12.40625 8.296875 +L 28.515625 8.296875 +L 28.515625 63.921875 +L 10.984375 60.40625 +L 10.984375 69.390625 +L 28.421875 72.90625 +L 38.28125 72.90625 +L 38.28125 8.296875 +L 54.390625 8.296875 +L 54.390625 0 +L 12.40625 0 +z +" id="DejaVuSans-49"/> + </defs> + <g transform="translate(135.712508 322.182437)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-49"/> + </g> + </g> + </g> + <g id="xtick_3"> + <g id="line2d_3"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="203.95479" xlink:href="#m54aa6eae39" y="307.584"/> + </g> + </g> + <g id="text_3"> + <!-- 2 --> + <defs> + <path d="M 19.1875 8.296875 +L 53.609375 8.296875 +L 53.609375 0 +L 7.328125 0 +L 7.328125 8.296875 +Q 12.9375 14.109375 22.625 23.890625 +Q 32.328125 33.6875 34.8125 36.53125 +Q 39.546875 41.84375 41.421875 45.53125 +Q 43.3125 49.21875 43.3125 52.78125 +Q 43.3125 58.59375 39.234375 62.25 +Q 35.15625 65.921875 28.609375 65.921875 +Q 23.96875 65.921875 18.8125 64.3125 +Q 13.671875 62.703125 7.8125 59.421875 +L 7.8125 69.390625 +Q 13.765625 71.78125 18.9375 73 +Q 24.125 74.21875 28.421875 74.21875 +Q 39.75 74.21875 46.484375 68.546875 +Q 53.21875 62.890625 53.21875 53.421875 +Q 53.21875 48.921875 51.53125 44.890625 +Q 49.859375 40.875 45.40625 35.40625 +Q 44.1875 33.984375 37.640625 27.21875 +Q 31.109375 20.453125 19.1875 8.296875 +z +" id="DejaVuSans-50"/> + </defs> + <g transform="translate(200.77354 322.182437)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-50"/> + </g> + </g> + </g> + <g id="xtick_4"> + <g id="line2d_4"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="269.015821" xlink:href="#m54aa6eae39" y="307.584"/> + </g> + </g> + <g id="text_4"> + <!-- 3 --> + <defs> + <path d="M 40.578125 39.3125 +Q 47.65625 37.796875 51.625 33 +Q 55.609375 28.21875 55.609375 21.1875 +Q 55.609375 10.40625 48.1875 4.484375 +Q 40.765625 -1.421875 27.09375 -1.421875 +Q 22.515625 -1.421875 17.65625 -0.515625 +Q 12.796875 0.390625 7.625 2.203125 +L 7.625 11.71875 +Q 11.71875 9.328125 16.59375 8.109375 +Q 21.484375 6.890625 26.8125 6.890625 +Q 36.078125 6.890625 40.9375 10.546875 +Q 45.796875 14.203125 45.796875 21.1875 +Q 45.796875 27.640625 41.28125 31.265625 +Q 36.765625 34.90625 28.71875 34.90625 +L 20.21875 34.90625 +L 20.21875 43.015625 +L 29.109375 43.015625 +Q 36.375 43.015625 40.234375 45.921875 +Q 44.09375 48.828125 44.09375 54.296875 +Q 44.09375 59.90625 40.109375 62.90625 +Q 36.140625 65.921875 28.71875 65.921875 +Q 24.65625 65.921875 20.015625 65.03125 +Q 15.375 64.15625 9.8125 62.3125 +L 9.8125 71.09375 +Q 15.4375 72.65625 20.34375 73.4375 +Q 25.25 74.21875 29.59375 74.21875 +Q 40.828125 74.21875 47.359375 69.109375 +Q 53.90625 64.015625 53.90625 55.328125 +Q 53.90625 49.265625 50.4375 45.09375 +Q 46.96875 40.921875 40.578125 39.3125 +z +" id="DejaVuSans-51"/> + </defs> + <g transform="translate(265.834571 322.182437)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-51"/> + </g> + </g> + </g> + <g id="xtick_5"> + <g id="line2d_5"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="334.076852" xlink:href="#m54aa6eae39" y="307.584"/> + </g> + </g> + <g id="text_5"> + <!-- 4 --> + <defs> + <path d="M 37.796875 64.3125 +L 12.890625 25.390625 +L 37.796875 25.390625 +z +M 35.203125 72.90625 +L 47.609375 72.90625 +L 47.609375 25.390625 +L 58.015625 25.390625 +L 58.015625 17.1875 +L 47.609375 17.1875 +L 47.609375 0 +L 37.796875 0 +L 37.796875 17.1875 +L 4.890625 17.1875 +L 4.890625 26.703125 +z +" id="DejaVuSans-52"/> + </defs> + <g transform="translate(330.895602 322.182437)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-52"/> + </g> + </g> + </g> + <g id="xtick_6"> + <g id="line2d_6"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="399.137883" xlink:href="#m54aa6eae39" y="307.584"/> + </g> + </g> + <g id="text_6"> + <!-- 5 --> + <defs> + <path d="M 10.796875 72.90625 +L 49.515625 72.90625 +L 49.515625 64.59375 +L 19.828125 64.59375 +L 19.828125 46.734375 +Q 21.96875 47.46875 24.109375 47.828125 +Q 26.265625 48.1875 28.421875 48.1875 +Q 40.625 48.1875 47.75 41.5 +Q 54.890625 34.8125 54.890625 23.390625 +Q 54.890625 11.625 47.5625 5.09375 +Q 40.234375 -1.421875 26.90625 -1.421875 +Q 22.3125 -1.421875 17.546875 -0.640625 +Q 12.796875 0.140625 7.71875 1.703125 +L 7.71875 11.625 +Q 12.109375 9.234375 16.796875 8.0625 +Q 21.484375 6.890625 26.703125 6.890625 +Q 35.15625 6.890625 40.078125 11.328125 +Q 45.015625 15.765625 45.015625 23.390625 +Q 45.015625 31 40.078125 35.4375 +Q 35.15625 39.890625 26.703125 39.890625 +Q 22.75 39.890625 18.8125 39.015625 +Q 14.890625 38.140625 10.796875 36.28125 +z +" id="DejaVuSans-53"/> + </defs> + <g transform="translate(395.956633 322.182437)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-53"/> + </g> + </g> + </g> + <g id="text_7"> + <!-- t/ms --> + <defs> + <path d="M 18.3125 70.21875 +L 18.3125 54.6875 +L 36.8125 54.6875 +L 36.8125 47.703125 +L 18.3125 47.703125 +L 18.3125 18.015625 +Q 18.3125 11.328125 20.140625 9.421875 +Q 21.96875 7.515625 27.59375 7.515625 +L 36.8125 7.515625 +L 36.8125 0 +L 27.59375 0 +Q 17.1875 0 13.234375 3.875 +Q 9.28125 7.765625 9.28125 18.015625 +L 9.28125 47.703125 +L 2.6875 47.703125 +L 2.6875 54.6875 +L 9.28125 54.6875 +L 9.28125 70.21875 +z +" id="DejaVuSans-116"/> + <path d="M 25.390625 72.90625 +L 33.6875 72.90625 +L 8.296875 -9.28125 +L 0 -9.28125 +z +" id="DejaVuSans-47"/> + <path d="M 52 44.1875 +Q 55.375 50.25 60.0625 53.125 +Q 64.75 56 71.09375 56 +Q 79.640625 56 84.28125 50.015625 +Q 88.921875 44.046875 88.921875 33.015625 +L 88.921875 0 +L 79.890625 0 +L 79.890625 32.71875 +Q 79.890625 40.578125 77.09375 44.375 +Q 74.3125 48.1875 68.609375 48.1875 +Q 61.625 48.1875 57.5625 43.546875 +Q 53.515625 38.921875 53.515625 30.90625 +L 53.515625 0 +L 44.484375 0 +L 44.484375 32.71875 +Q 44.484375 40.625 41.703125 44.40625 +Q 38.921875 48.1875 33.109375 48.1875 +Q 26.21875 48.1875 22.15625 43.53125 +Q 18.109375 38.875 18.109375 30.90625 +L 18.109375 0 +L 9.078125 0 +L 9.078125 54.6875 +L 18.109375 54.6875 +L 18.109375 46.1875 +Q 21.1875 51.21875 25.484375 53.609375 +Q 29.78125 56 35.6875 56 +Q 41.65625 56 45.828125 52.96875 +Q 50 49.953125 52 44.1875 +z +" id="DejaVuSans-109"/> + <path d="M 44.28125 53.078125 +L 44.28125 44.578125 +Q 40.484375 46.53125 36.375 47.5 +Q 32.28125 48.484375 27.875 48.484375 +Q 21.1875 48.484375 17.84375 46.4375 +Q 14.5 44.390625 14.5 40.28125 +Q 14.5 37.15625 16.890625 35.375 +Q 19.28125 33.59375 26.515625 31.984375 +L 29.59375 31.296875 +Q 39.15625 29.25 43.1875 25.515625 +Q 47.21875 21.78125 47.21875 15.09375 +Q 47.21875 7.46875 41.1875 3.015625 +Q 35.15625 -1.421875 24.609375 -1.421875 +Q 20.21875 -1.421875 15.453125 -0.5625 +Q 10.6875 0.296875 5.421875 2 +L 5.421875 11.28125 +Q 10.40625 8.6875 15.234375 7.390625 +Q 20.0625 6.109375 24.8125 6.109375 +Q 31.15625 6.109375 34.5625 8.28125 +Q 37.984375 10.453125 37.984375 14.40625 +Q 37.984375 18.0625 35.515625 20.015625 +Q 33.0625 21.96875 24.703125 23.78125 +L 21.578125 24.515625 +Q 13.234375 26.265625 9.515625 29.90625 +Q 5.8125 33.546875 5.8125 39.890625 +Q 5.8125 47.609375 11.28125 51.796875 +Q 16.75 56 26.8125 56 +Q 31.78125 56 36.171875 55.265625 +Q 40.578125 54.546875 44.28125 53.078125 +z +" id="DejaVuSans-115"/> + </defs> + <g transform="translate(225.040469 335.860562)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-116"/> + <use x="39.208984" xlink:href="#DejaVuSans-47"/> + <use x="72.900391" xlink:href="#DejaVuSans-109"/> + <use x="170.3125" xlink:href="#DejaVuSans-115"/> + </g> + </g> + </g> + <g id="matplotlib.axis_2"> + <g id="ytick_1"> + <g id="line2d_7"> + <defs> + <path d="M 0 0 +L -3.5 0 +" id="m1e78dbdb59" style="stroke:#000000;stroke-width:0.8;"/> + </defs> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="295.488"/> + </g> + </g> + <g id="text_8"> + <!-- −100 --> + <defs> + <path d="M 10.59375 35.5 +L 73.1875 35.5 +L 73.1875 27.203125 +L 10.59375 27.203125 +z +" id="DejaVuSans-8722"/> + </defs> + <g transform="translate(23.132812 299.287219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-49"/> + <use x="147.412109" xlink:href="#DejaVuSans-48"/> + <use x="211.035156" xlink:href="#DejaVuSans-48"/> + </g> + </g> + </g> + <g id="ytick_2"> + <g id="line2d_8"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="265.248"/> + </g> + </g> + <g id="text_9"> + <!-- −95 --> + <defs> + <path d="M 10.984375 1.515625 +L 10.984375 10.5 +Q 14.703125 8.734375 18.5 7.8125 +Q 22.3125 6.890625 25.984375 6.890625 +Q 35.75 6.890625 40.890625 13.453125 +Q 46.046875 20.015625 46.78125 33.40625 +Q 43.953125 29.203125 39.59375 26.953125 +Q 35.25 24.703125 29.984375 24.703125 +Q 19.046875 24.703125 12.671875 31.3125 +Q 6.296875 37.9375 6.296875 49.421875 +Q 6.296875 60.640625 12.9375 67.421875 +Q 19.578125 74.21875 30.609375 74.21875 +Q 43.265625 74.21875 49.921875 64.515625 +Q 56.59375 54.828125 56.59375 36.375 +Q 56.59375 19.140625 48.40625 8.859375 +Q 40.234375 -1.421875 26.421875 -1.421875 +Q 22.703125 -1.421875 18.890625 -0.6875 +Q 15.09375 0.046875 10.984375 1.515625 +z +M 30.609375 32.421875 +Q 37.25 32.421875 41.125 36.953125 +Q 45.015625 41.5 45.015625 49.421875 +Q 45.015625 57.28125 41.125 61.84375 +Q 37.25 66.40625 30.609375 66.40625 +Q 23.96875 66.40625 20.09375 61.84375 +Q 16.21875 57.28125 16.21875 49.421875 +Q 16.21875 41.5 20.09375 36.953125 +Q 23.96875 32.421875 30.609375 32.421875 +z +" id="DejaVuSans-57"/> + </defs> + <g transform="translate(29.495313 269.047219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-57"/> + <use x="147.412109" xlink:href="#DejaVuSans-53"/> + </g> + </g> + </g> + <g id="ytick_3"> + <g id="line2d_9"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="235.008"/> + </g> + </g> + <g id="text_10"> + <!-- −90 --> + <g transform="translate(29.495313 238.807219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-57"/> + <use x="147.412109" xlink:href="#DejaVuSans-48"/> + </g> + </g> + </g> + <g id="ytick_4"> + <g id="line2d_10"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="204.768"/> + </g> + </g> + <g id="text_11"> + <!-- −85 --> + <defs> + <path d="M 31.78125 34.625 +Q 24.75 34.625 20.71875 30.859375 +Q 16.703125 27.09375 16.703125 20.515625 +Q 16.703125 13.921875 20.71875 10.15625 +Q 24.75 6.390625 31.78125 6.390625 +Q 38.8125 6.390625 42.859375 10.171875 +Q 46.921875 13.96875 46.921875 20.515625 +Q 46.921875 27.09375 42.890625 30.859375 +Q 38.875 34.625 31.78125 34.625 +z +M 21.921875 38.8125 +Q 15.578125 40.375 12.03125 44.71875 +Q 8.5 49.078125 8.5 55.328125 +Q 8.5 64.0625 14.71875 69.140625 +Q 20.953125 74.21875 31.78125 74.21875 +Q 42.671875 74.21875 48.875 69.140625 +Q 55.078125 64.0625 55.078125 55.328125 +Q 55.078125 49.078125 51.53125 44.71875 +Q 48 40.375 41.703125 38.8125 +Q 48.828125 37.15625 52.796875 32.3125 +Q 56.78125 27.484375 56.78125 20.515625 +Q 56.78125 9.90625 50.3125 4.234375 +Q 43.84375 -1.421875 31.78125 -1.421875 +Q 19.734375 -1.421875 13.25 4.234375 +Q 6.78125 9.90625 6.78125 20.515625 +Q 6.78125 27.484375 10.78125 32.3125 +Q 14.796875 37.15625 21.921875 38.8125 +z +M 18.3125 54.390625 +Q 18.3125 48.734375 21.84375 45.5625 +Q 25.390625 42.390625 31.78125 42.390625 +Q 38.140625 42.390625 41.71875 45.5625 +Q 45.3125 48.734375 45.3125 54.390625 +Q 45.3125 60.0625 41.71875 63.234375 +Q 38.140625 66.40625 31.78125 66.40625 +Q 25.390625 66.40625 21.84375 63.234375 +Q 18.3125 60.0625 18.3125 54.390625 +z +" id="DejaVuSans-56"/> + </defs> + <g transform="translate(29.495313 208.567219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-56"/> + <use x="147.412109" xlink:href="#DejaVuSans-53"/> + </g> + </g> + </g> + <g id="ytick_5"> + <g id="line2d_11"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="174.528"/> + </g> + </g> + <g id="text_12"> + <!-- −80 --> + <g transform="translate(29.495313 178.327219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-56"/> + <use x="147.412109" xlink:href="#DejaVuSans-48"/> + </g> + </g> + </g> + <g id="ytick_6"> + <g id="line2d_12"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="144.288"/> + </g> + </g> + <g id="text_13"> + <!-- −75 --> + <defs> + <path d="M 8.203125 72.90625 +L 55.078125 72.90625 +L 55.078125 68.703125 +L 28.609375 0 +L 18.3125 0 +L 43.21875 64.59375 +L 8.203125 64.59375 +z +" id="DejaVuSans-55"/> + </defs> + <g transform="translate(29.495313 148.087219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-55"/> + <use x="147.412109" xlink:href="#DejaVuSans-53"/> + </g> + </g> + </g> + <g id="ytick_7"> + <g id="line2d_13"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="114.048"/> + </g> + </g> + <g id="text_14"> + <!-- −70 --> + <g transform="translate(29.495313 117.847219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-55"/> + <use x="147.412109" xlink:href="#DejaVuSans-48"/> + </g> + </g> + </g> + <g id="ytick_8"> + <g id="line2d_14"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="83.808"/> + </g> + </g> + <g id="text_15"> + <!-- −65 --> + <defs> + <path d="M 33.015625 40.375 +Q 26.375 40.375 22.484375 35.828125 +Q 18.609375 31.296875 18.609375 23.390625 +Q 18.609375 15.53125 22.484375 10.953125 +Q 26.375 6.390625 33.015625 6.390625 +Q 39.65625 6.390625 43.53125 10.953125 +Q 47.40625 15.53125 47.40625 23.390625 +Q 47.40625 31.296875 43.53125 35.828125 +Q 39.65625 40.375 33.015625 40.375 +z +M 52.59375 71.296875 +L 52.59375 62.3125 +Q 48.875 64.0625 45.09375 64.984375 +Q 41.3125 65.921875 37.59375 65.921875 +Q 27.828125 65.921875 22.671875 59.328125 +Q 17.53125 52.734375 16.796875 39.40625 +Q 19.671875 43.65625 24.015625 45.921875 +Q 28.375 48.1875 33.59375 48.1875 +Q 44.578125 48.1875 50.953125 41.515625 +Q 57.328125 34.859375 57.328125 23.390625 +Q 57.328125 12.15625 50.6875 5.359375 +Q 44.046875 -1.421875 33.015625 -1.421875 +Q 20.359375 -1.421875 13.671875 8.265625 +Q 6.984375 17.96875 6.984375 36.375 +Q 6.984375 53.65625 15.1875 63.9375 +Q 23.390625 74.21875 37.203125 74.21875 +Q 40.921875 74.21875 44.703125 73.484375 +Q 48.484375 72.75 52.59375 71.296875 +z +" id="DejaVuSans-54"/> + </defs> + <g transform="translate(29.495313 87.607219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-54"/> + <use x="147.412109" xlink:href="#DejaVuSans-53"/> + </g> + </g> + </g> + <g id="ytick_9"> + <g id="line2d_15"> + <g> + <use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#m1e78dbdb59" y="53.568"/> + </g> + </g> + <g id="text_16"> + <!-- −60 --> + <g transform="translate(29.495313 57.367219)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-8722"/> + <use x="83.789062" xlink:href="#DejaVuSans-54"/> + <use x="147.412109" xlink:href="#DejaVuSans-48"/> + </g> + </g> + </g> + <g id="text_17"> + <!-- U/mV --> + <defs> + <path d="M 8.6875 72.90625 +L 18.609375 72.90625 +L 18.609375 28.609375 +Q 18.609375 16.890625 22.84375 11.734375 +Q 27.09375 6.59375 36.625 6.59375 +Q 46.09375 6.59375 50.34375 11.734375 +Q 54.59375 16.890625 54.59375 28.609375 +L 54.59375 72.90625 +L 64.5 72.90625 +L 64.5 27.390625 +Q 64.5 13.140625 57.4375 5.859375 +Q 50.390625 -1.421875 36.625 -1.421875 +Q 22.796875 -1.421875 15.734375 5.859375 +Q 8.6875 13.140625 8.6875 27.390625 +z +" id="DejaVuSans-85"/> + <path d="M 28.609375 0 +L 0.78125 72.90625 +L 11.078125 72.90625 +L 34.1875 11.53125 +L 57.328125 72.90625 +L 67.578125 72.90625 +L 39.796875 0 +z +" id="DejaVuSans-86"/> + </defs> + <g transform="translate(17.053125 188.162375)rotate(-90)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-85"/> + <use x="73.193359" xlink:href="#DejaVuSans-47"/> + <use x="106.884766" xlink:href="#DejaVuSans-109"/> + <use x="204.296875" xlink:href="#DejaVuSans-86"/> + </g> + </g> + </g> + <g id="line2d_16"> + <path clip-path="url(#p9388f44834)" d="M 73.832727 295.488 +L 75.784558 288.311025 +L 77.085779 283.99204 +L 79.68822 276.343263 +L 81.640051 271.372794 +L 83.591882 266.97519 +L 85.543713 263.084428 +L 87.495544 259.642092 +L 89.447375 256.596498 +L 91.399206 253.901921 +L 93.351037 251.517905 +L 95.302868 249.408656 +L 97.905309 246.969539 +L 100.50775 244.897851 +L 103.110191 243.138244 +L 105.712633 241.643705 +L 108.315074 240.374304 +L 111.568125 239.052985 +L 114.821177 237.975596 +L 118.724839 236.941917 +L 122.628501 236.132778 +L 127.182773 235.408117 +L 132.387655 234.797702 +L 138.893758 234.267948 +L 146.701082 233.860962 +L 157.110847 233.552149 +L 172.074884 233.348084 +L 198.749907 233.241603 +L 287.88352 233.21711 +L 398.487273 233.217018 +L 398.487273 233.217018 +" style="fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;"/> + </g> + <g id="line2d_17"> + <path clip-path="url(#p9388f44834)" d="M 73.832727 53.568 +L 75.784558 60.744975 +L 77.085779 65.06396 +L 79.68822 72.712737 +L 81.640051 77.683206 +L 83.591882 82.08081 +L 85.543713 85.971572 +L 87.495544 89.413908 +L 89.447375 92.459502 +L 91.399206 95.154079 +L 93.351037 97.538095 +L 95.302868 99.647344 +L 97.905309 102.086461 +L 100.50775 104.158149 +L 103.110191 105.917756 +L 105.712633 107.412295 +L 108.315074 108.681696 +L 111.568125 110.003015 +L 114.821177 111.080404 +L 118.724839 112.114083 +L 122.628501 112.923222 +L 127.182773 113.647883 +L 132.387655 114.258298 +L 138.893758 114.788052 +L 146.701082 115.195038 +L 157.110847 115.503851 +L 172.074884 115.707916 +L 198.749907 115.814397 +L 287.88352 115.83889 +L 398.487273 115.838982 +L 398.487273 115.838982 +" style="fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;"/> + </g> + <g id="line2d_18"/> + <g id="line2d_19"/> + <g id="line2d_20"/> + <g id="line2d_21"> + <path clip-path="url(#p9388f44834)" d="M 57.6 115.838982 +L 414.72 115.838982 +" style="fill:none;stroke:#000000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-opacity:0.5;stroke-width:1.5;"/> + </g> + <g id="line2d_22"> + <path clip-path="url(#p9388f44834)" d="M 57.6 233.217018 +L 414.72 233.217018 +" style="fill:none;stroke:#000000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-opacity:0.5;stroke-width:1.5;"/> + </g> + <g id="line2d_23"> + <path clip-path="url(#p9388f44834)" d="M 57.6 295.488 +L 414.72 295.488 +" style="fill:none;stroke:#000000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-opacity:0.5;stroke-width:1.5;"/> + </g> + <g id="line2d_24"> + <path clip-path="url(#p9388f44834)" d="M 57.6 53.568 +L 414.72 53.568 +" style="fill:none;stroke:#000000;stroke-dasharray:5.55,2.4;stroke-dashoffset:0;stroke-opacity:0.5;stroke-width:1.5;"/> + </g> + <g id="patch_3"> + <path d="M 57.6 307.584 +L 57.6 41.472 +" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> + </g> + <g id="patch_4"> + <path d="M 414.72 307.584 +L 414.72 41.472 +" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> + </g> + <g id="patch_5"> + <path d="M 57.6 307.584 +L 414.72 307.584 +" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> + </g> + <g id="patch_6"> + <path d="M 57.6 41.472 +L 414.72 41.472 +" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> + </g> + <g id="legend_1"> + <g id="patch_7"> + <path d="M 357.027813 198.045187 +L 407.72 198.045187 +Q 409.72 198.045187 409.72 196.045187 +L 409.72 153.010812 +Q 409.72 151.010812 407.72 151.010812 +L 357.027813 151.010812 +Q 355.027813 151.010812 355.027813 153.010812 +L 355.027813 196.045187 +Q 355.027813 198.045187 357.027813 198.045187 +z +" style="fill:#ffffff;opacity:0.8;stroke:#cccccc;stroke-linejoin:miter;"/> + </g> + <g id="line2d_25"> + <path d="M 359.027813 159.10925 +L 379.027813 159.10925 +" style="fill:none;"/> + </g> + <g id="line2d_26"/> + <g id="text_18"> + <!-- Cell --> + <defs> + <path d="M 64.40625 67.28125 +L 64.40625 56.890625 +Q 59.421875 61.53125 53.78125 63.8125 +Q 48.140625 66.109375 41.796875 66.109375 +Q 29.296875 66.109375 22.65625 58.46875 +Q 16.015625 50.828125 16.015625 36.375 +Q 16.015625 21.96875 22.65625 14.328125 +Q 29.296875 6.6875 41.796875 6.6875 +Q 48.140625 6.6875 53.78125 8.984375 +Q 59.421875 11.28125 64.40625 15.921875 +L 64.40625 5.609375 +Q 59.234375 2.09375 53.4375 0.328125 +Q 47.65625 -1.421875 41.21875 -1.421875 +Q 24.65625 -1.421875 15.125 8.703125 +Q 5.609375 18.84375 5.609375 36.375 +Q 5.609375 53.953125 15.125 64.078125 +Q 24.65625 74.21875 41.21875 74.21875 +Q 47.75 74.21875 53.53125 72.484375 +Q 59.328125 70.75 64.40625 67.28125 +z +" id="DejaVuSans-67"/> + <path d="M 56.203125 29.59375 +L 56.203125 25.203125 +L 14.890625 25.203125 +Q 15.484375 15.921875 20.484375 11.0625 +Q 25.484375 6.203125 34.421875 6.203125 +Q 39.59375 6.203125 44.453125 7.46875 +Q 49.3125 8.734375 54.109375 11.28125 +L 54.109375 2.78125 +Q 49.265625 0.734375 44.1875 -0.34375 +Q 39.109375 -1.421875 33.890625 -1.421875 +Q 20.796875 -1.421875 13.15625 6.1875 +Q 5.515625 13.8125 5.515625 26.8125 +Q 5.515625 40.234375 12.765625 48.109375 +Q 20.015625 56 32.328125 56 +Q 43.359375 56 49.78125 48.890625 +Q 56.203125 41.796875 56.203125 29.59375 +z +M 47.21875 32.234375 +Q 47.125 39.59375 43.09375 43.984375 +Q 39.0625 48.390625 32.421875 48.390625 +Q 24.90625 48.390625 20.390625 44.140625 +Q 15.875 39.890625 15.1875 32.171875 +z +" id="DejaVuSans-101"/> + <path d="M 9.421875 75.984375 +L 18.40625 75.984375 +L 18.40625 0 +L 9.421875 0 +z +" id="DejaVuSans-108"/> + </defs> + <g transform="translate(387.027813 162.60925)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-67"/> + <use x="69.824219" xlink:href="#DejaVuSans-101"/> + <use x="131.347656" xlink:href="#DejaVuSans-108"/> + <use x="159.130859" xlink:href="#DejaVuSans-108"/> + </g> + </g> + <g id="line2d_27"> + <path d="M 359.027813 173.787375 +L 379.027813 173.787375 +" style="fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;"/> + </g> + <g id="line2d_28"/> + <g id="text_19"> + <!-- 0 --> + <g transform="translate(387.027813 177.287375)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-48"/> + </g> + </g> + <g id="line2d_29"> + <path d="M 359.027813 188.4655 +L 379.027813 188.4655 +" style="fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;"/> + </g> + <g id="line2d_30"/> + <g id="text_20"> + <!-- 1 --> + <g transform="translate(387.027813 191.9655)scale(0.1 -0.1)"> + <use xlink:href="#DejaVuSans-49"/> + </g> + </g> + </g> + </g> + </g> + <defs> + <clipPath id="p9388f44834"> + <rect height="266.112" width="357.12" x="57.6" y="41.472"/> + </clipPath> + </defs> +</svg> diff --git a/doc/tutorial/two_cells_gap_junctions.rst b/doc/tutorial/two_cells_gap_junctions.rst new file mode 100644 index 0000000000000000000000000000000000000000..ea867b5c72f17dd28eb055db5ac84c07224e96f7 --- /dev/null +++ b/doc/tutorial/two_cells_gap_junctions.rst @@ -0,0 +1,65 @@ +.. _tutorialtwocellsgapjunction: + +Two cells connected via a gap junction +====================================== + +In this example, we will set up two cells connected via a gap junction. +The cells have different leak potentials. +We will investigate how the equilibrium potentials of the two cells change because of the gap junction connection. + +.. Note:: + + **Concepts covered in this example:** + + 1. Creating a simulation recipe for two cells. + 2. Placing probes. + 3. Running the simulation and extracting the results. + 4. Adding a gap junction connection. + +The full code +************* + +You can find the full code of the example at ``python/examples/two_cell_gap_junctions.py`` + +Executing the script will run the simulation with default parameters. + + +Walk-through +************ + +We set up a recipe for the simulation of two cells with some parameters. + +.. literalinclude:: ../../python/example/two_cell_gap_junctions.py + :language: python + :lines: -66 + +Implementing the ``cell_description`` member function constructs the morphology and sets the properties of the cells as well as the gap junction mechanisms and the discretization policy. + +.. literalinclude:: ../../python/example/two_cell_gap_junctions.py + :language: python + :lines: 61-101 + +The bidirection gap junction is created in the function ``gap_junctions_on``. + +.. literalinclude:: ../../python/example/two_cell_gap_junctions.py + :language: python + :lines: 103-107 + +We parse the command line arguments, instantiate the recipe, run the simulation, extract results and plot: + +.. literalinclude:: ../../python/example/two_cell_gap_junctions.py + :language: python + :lines: 110- + +The output plot below shows how the potential of the two cells approaches their equilibrium potentials. +The expected values are denoted by dashed lines. + +.. figure:: two_cell_gap_junctions_result.svg + :width: 800 + :align: center + +The equivalent circuit used to calculate the equilibrium potentials is depicted below. + +.. figure:: gap_junction_circuit.svg + :width: 800 + :align: center diff --git a/python/example/two_cell_gap_junctions.py b/python/example/two_cell_gap_junctions.py new file mode 100755 index 0000000000000000000000000000000000000000..852f1af2b24799ee309a58c69c449b9247d825c9 --- /dev/null +++ b/python/example/two_cell_gap_junctions.py @@ -0,0 +1,189 @@ +#!/usr/bin/env python3 + +import arbor +import argparse +import numpy as np + +import pandas +import seaborn # You may have to pip install these. +import matplotlib.pyplot as plt + + +class TwoCellsWithGapJunction(arbor.recipe): + def __init__(self, probes, + Vms, length, radius, cm, rL, g, gj_g, + cv_policy_max_extent): + """ + probes -- list of probes + + Vms -- membrane leak potentials of the two cells + length -- length of cable in μm + radius -- radius of cable in μm + cm -- membrane capacitance in F/m^2 + rL -- axial resistivity in Ω·cm + g -- membrane conductivity in S/cm^2 + gj_g -- gap junction conductivity in μS + + cv_policy_max_extent -- maximum extent of control volume in μm + """ + + # The base C++ class constructor must be called first, to ensure that + # all memory in the C++ class is initialized correctly. + arbor.recipe.__init__(self) + + self.the_probes = probes + + self.Vms = Vms + self.length = length + self.radius = radius + self.cm = cm + self.rL = rL + self.g = g + self.gj_g = gj_g + + self.cv_policy_max_extent = cv_policy_max_extent + + self.the_props = arbor.neuron_cable_properties() + self.the_cat = arbor.default_catalogue() + self.the_props.register(self.the_cat) + + def num_cells(self): + return 2 + + def num_sources(self, gid): + assert gid in [0, 1] + return 0 + + def cell_kind(self, gid): + assert gid in [0, 1] + return arbor.cell_kind.cable + + def probes(self, gid): + assert gid in [0, 1] + return self.the_probes + + def global_properties(self, kind): + return self.the_props + + def cell_description(self, gid): + """A high level description of the cell with global identifier gid. + + For example the morphology, synapses and ion channels required + to build a multi-compartment neuron. + """ + assert gid in [0, 1] + + tree = arbor.segment_tree() + + tree.append(arbor.mnpos, + arbor.mpoint(0, 0, 0, self.radius), + arbor.mpoint(self.length, 0, 0, self.radius), + tag=1) + + labels = arbor.label_dict({'cell' : '(tag 1)', 'gj_site': '(location 0 0.5)'}) + + decor = arbor.decor() + decor.set_property(Vm=self.Vms[gid]) + decor.set_property(cm=self.cm) + decor.set_property(rL=self.rL) + + # add a gap junction mechanism at the "gj_site" location and label that specific mechanism on that location "gj_label" + junction_mech = arbor.junction('gj', {"g" : self.gj_g}) + decor.place('"gj_site"', junction_mech, 'gj_label') + decor.paint('"cell"', arbor.density(f'pas/e={self.Vms[gid]}', {'g': self.g})) + + if self.cv_policy_max_extent is not None: + policy = arbor.cv_policy_max_extent(self.cv_policy_max_extent) + decor.discretization(policy) + else: + decor.discretization(arbor.cv_policy_single()) + + return arbor.cable_cell(tree, labels, decor) + + def gap_junctions_on(self, gid): + assert gid in [0, 1] + + # create a bidirectional gap junction from cell 0 at label "gj_label" to cell 1 at label "gj_label" and back. + return [arbor.gap_junction_connection((1 if gid == 0 else 0, 'gj_label'), 'gj_label', 1)] + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser(description='Two cells connected via a gap junction') + + parser.add_argument( + '--Vms', help="membrane leak potentials in mV", type=float, default=[-100, -60], nargs=2) + parser.add_argument( + '--length', help="cell length in μm", type=float, default=100) + parser.add_argument( + '--radius', help="cell radius in μm", type=float, default=3) + parser.add_argument( + '--cm', help="membrane capacitance in F/m^2", type=float, default=0.005) + parser.add_argument( + '--rL', help="axial resistivity in Ω·cm", type=float, default=90) + parser.add_argument( + '--g', help="membrane conductivity in S/cm^2", type=float, default=0.001) + + parser.add_argument( + '--gj_g', help="gap junction conductivity in μS", type=float, default=0.01) + + parser.add_argument('--cv_policy_max_extent', + help="maximum extent of control volume in μm", type=float) + + # parse the command line arguments + args = parser.parse_args() + + # set up membrane voltage probes at the position of the gap junction + probes = [arbor.cable_probe_membrane_voltage('"gj_site"')] + recipe = TwoCellsWithGapJunction(probes, **vars(args)) + + # create a default execution context and a default domain decomposition + context = arbor.context() + domains = arbor.partition_load_balance(recipe, context) + + # configure the simulation and handles for the probes + sim = arbor.simulation(recipe, domains, context) + + dt = 0.01 + handles = [] + for gid in [0, 1]: + handles += [sim.sample((gid, i), arbor.regular_schedule(dt)) for i in range(len(probes))] + + # run the simulation for 5 ms + sim.run(tfinal=5, dt=dt) + + # retrieve the sampled membrane voltages and convert to a pandas DataFrame + print("Plotting results ...") + df_list = [] + for probe in range(len(handles)): + samples, meta = sim.samples(handles[probe])[0] + df_list.append(pandas.DataFrame({'t/ms': samples[:, 0], 'U/mV': samples[:, 1], 'Cell': f"{probe}"})) + + df = pandas.concat(df_list,ignore_index=True) + + fig, ax = plt.subplots() + + # plot the membrane potentials of the two cells as function of time + seaborn.lineplot(ax=ax,data=df, x="t/ms", y="U/mV",hue="Cell",ci=None) + + # area of cells + area = args.length*1e-6 * 2*np.pi*args.radius*1e-6 + + # total conductance and resistance + cell_g = args.g/1e-4 * area + cell_R = 1/cell_g + + # gap junction conductance and resistance in base units + si_gj_g = args.gj_g*1e-6 + si_gj_R = 1/si_gj_g + + # indicate the expected equilibrium potentials + for (i, j) in [[0,1], [1,0]]: + weighted_potential = args.Vms[i] + ((args.Vms[j] - args.Vms[i])*(si_gj_R + cell_R))/(2*cell_R + si_gj_R) + ax.axhline(weighted_potential, linestyle='dashed', color='black', alpha=0.5) + + # plot the initial/nominal resting potentials + for gid, Vm in enumerate(args.Vms): + ax.axhline(Vm, linestyle='dashed', color='black', alpha=0.5) + + fig.savefig('two_cell_gap_junctions_result.svg') diff --git a/scripts/run_python_examples.sh b/scripts/run_python_examples.sh index bf4bfb31fd69192de1db9dc2febfe6cf880b144c..4659ccd207f32cf0954ba2b3889a1967299d45ee 100755 --- a/scripts/run_python_examples.sh +++ b/scripts/run_python_examples.sh @@ -22,3 +22,4 @@ $PREFIX python python/example/single_cell_detailed.py python/example/single_cell $PREFIX python python/example/single_cell_detailed_recipe.py python/example/single_cell_detailed.swc $PREFIX python python/example/single_cell_extracellular_potentials.py python/example/single_cell_detailed.swc $PREFIX python python/example/single_cell_cable.py +$PREFIX python python/example/two_cell_gap_junctions.py