{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,12]],"date-time":"2026-04-12T19:44:37Z","timestamp":1776023077931,"version":"3.50.1"},"reference-count":44,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2023,7,31]],"date-time":"2023-07-31T00:00:00Z","timestamp":1690761600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100000002","name":"National Institutes of Health","doi-asserted-by":"publisher","id":[{"id":"10.13039\/100000002","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Comput. Neurosci."],"abstract":"<jats:p>The dynamical properties of the brain and the dynamics of the body strongly influence one another. Their interaction generates complex adaptive behavior. While a wide variety of simulation tools exist for neural dynamics or biomechanics separately, there are few options for integrated brain-body modeling. Here, we provide a tutorial to demonstrate how the widely-used NEURON simulation platform can support integrated neuromechanical modeling. As a first step toward incorporating biomechanics into a NEURON simulation, we provide a framework for integrating inputs from a \u201cperiphery\u201d and outputs to that periphery. In other words, \u201cbody\u201d dynamics are driven in part by \u201cbrain\u201d variables, such as voltages or firing rates, and \u201cbrain\u201d dynamics are influenced by \u201cbody\u201d variables through sensory feedback. To couple the \u201cbrain\u201d and \u201cbody\u201d components, we use NEURON's<jats:italic>pointer<\/jats:italic>construct to share information between \u201cbrain\u201d and \u201cbody\u201d modules. This approach allows separate specification of brain and body dynamics and code reuse. Though simple in concept, the use of pointers can be challenging due to a complicated syntax and several different programming options. In this paper, we present five different computational models, with increasing levels of complexity, to demonstrate the concepts of code modularity using pointers and the integration of neural and biomechanical modeling within NEURON. The models include: (1) a neuromuscular model of calcium dynamics and muscle force, (2) a neuromechanical, closed-loop model of a half-center oscillator coupled to a rudimentary motor system, (3) a closed-loop model of neural control for respiration, (4) a pedagogical model of a non-smooth \u201cbrain\/body\u201d system, and (5) a closed-loop model of feeding behavior in the sea hare<jats:italic>Aplysia californica<\/jats:italic>that incorporates biologically-motivated non-smooth dynamics. This tutorial illustrates how NEURON can be integrated with a broad range of neuromechanical models.<\/jats:p><jats:sec><jats:title>Code available at<\/jats:title><jats:p><jats:ext-link>https:\/\/github.com\/fietkiewicz\/PointerBuilder<\/jats:ext-link>.<\/jats:p><\/jats:sec>","DOI":"10.3389\/fncom.2023.1143323","type":"journal-article","created":{"date-parts":[[2023,7,31]],"date-time":"2023-07-31T16:12:05Z","timestamp":1690819925000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":2,"title":["Tutorial: using NEURON for neuromechanical simulations"],"prefix":"10.3389","volume":"17","author":[{"given":"Chris","family":"Fietkiewicz","sequence":"first","affiliation":[]},{"given":"Robert A.","family":"McDougal","sequence":"additional","affiliation":[]},{"given":"David","family":"Corrales Marco","sequence":"additional","affiliation":[]},{"given":"Hillel J.","family":"Chiel","sequence":"additional","affiliation":[]},{"given":"Peter J.","family":"Thomas","sequence":"additional","affiliation":[]}],"member":"1965","published-online":{"date-parts":[[2023,7,31]]},"reference":[{"key":"B1","unstructured":"2023"},{"key":"B2","doi-asserted-by":"publisher","first-page":"884046","DOI":"10.3389\/fninf.2022.884046","article-title":"Modernizing the NEURON simulator for sustainability, portability, and performance","volume":"16","author":"Awile","year":"2022","journal-title":"Front. Neuroinform."},{"key":"B3","doi-asserted-by":"publisher","first-page":"97","DOI":"10.3389\/fncom.2016.00097","article-title":"Efficient integration of coupled electrical-chemical systems in multiscale neuronal simulations","volume":"10","author":"Brocke","year":"2016","journal-title":"Front. Comput. Neurosci."},{"key":"B4","doi-asserted-by":"crossref","first-page":"382","DOI":"10.1152\/jn.1999.82.1.382","article-title":"Models of respiratory rhythm generation in the pre-B\u00f6tzinger complex. I. Bursting pacemaker neurons","volume":"82","author":"Butera","year":"1999","journal-title":"J. Neurophysiol."},{"key":"B5","doi-asserted-by":"crossref","DOI":"10.1017\/CBO9780511541612","volume-title":"The NEURON Book","author":"Carnevale","year":"2006"},{"key":"B6","doi-asserted-by":"crossref","first-page":"553","DOI":"10.1016\/S0166-2236(97)01149-1","article-title":"The brain has a body: adaptive behavior emerges from interactions of nervous system, body and environment","volume":"20","author":"Chiel","year":"1997","journal-title":"Trends Neurosci."},{"key":"B7","doi-asserted-by":"publisher","first-page":"280","DOI":"10.1016\/j.jneumeth.2010.01.005","article-title":"AnimatLab: a 3D graphics environment for neuromechanical simulations","volume":"187","author":"Cofer","year":"2010","journal-title":"J. Neurosci. Methods"},{"key":"B8","doi-asserted-by":"publisher","first-page":"2194","DOI":"10.1152\/jn.00170.2017","article-title":"Eupnea, tachypnea, and autoresuscitation in a closed-loop respiratory control model","volume":"118","author":"Diekman","year":"2017","journal-title":"J. Neurophysiol."},{"key":"B9","doi-asserted-by":"publisher","first-page":"43","DOI":"10.1007\/s12021-010-9064-z","article-title":"Run-time interoperability between neuronal network simulators based on the music framework","volume":"8","author":"Djurfeldt","year":"2010","journal-title":"Neuroinformatics"},{"key":"B10","doi-asserted-by":"publisher","first-page":"28","DOI":"10.3389\/fnins.2016.00028","article-title":"Restoring behavior via inverse neurocontroller in a lesioned cortical spiking model driving a virtual arm","volume":"10","author":"Dura-Bernal","year":"2016","journal-title":"Front. Neurosci."},{"key":"B11","doi-asserted-by":"publisher","first-page":"13","DOI":"10.3389\/fnbot.2015.00013","article-title":"Cortical spiking network interfaced with virtual musculoskeletal arm and robotic arm","volume":"9","author":"Dura-Bernal","year":"2015","journal-title":"Front. Neurorobot."},{"key":"B12","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1007\/978-0-387-87708-2_1","article-title":"\u201cThe Hodgkin\u2013Huxley equations,\u201d","volume-title":"Mathematical Foundations of Neuroscience","author":"Ermentrout","year":"2010"},{"key":"B13","doi-asserted-by":"publisher","first-page":"2","DOI":"10.3389\/fnbot.2017.00002","article-title":"Connecting artificial brains to robots in a comprehensive simulation framework: the neurorobotics platform","volume":"11","author":"Falotico","year":"2017","journal-title":"Front. Neurorobot."},{"key":"B14","doi-asserted-by":"publisher","first-page":"884180","DOI":"10.3389\/fninf.2022.884180","article-title":"Deploying and optimizing embodied simulations of large-scale spiking neural networks on HPC infrastructure","volume":"16","author":"Feldotto","year":"2022","journal-title":"Front. Neuroinform."},{"key":"B15","doi-asserted-by":"crossref","DOI":"10.1007\/978-94-015-7793-9","volume-title":"Differential Equations with Discontinuous Righthand Sides","author":"Filippov","year":"1988"},{"key":"B16","doi-asserted-by":"publisher","first-page":"e0201630","DOI":"10.1371\/journal.pone.0201630","article-title":"BioNet: a Python interface to NEURON for modeling large-scale networks","volume":"13","author":"Gratiy","year":"2018","journal-title":"PLoS ONE"},{"key":"B17","doi-asserted-by":"crossref","first-page":"1179","DOI":"10.1162\/neco.1997.9.6.1179","article-title":"The NEURON simulation environment","volume":"9","author":"Hines","year":"1997","journal-title":"Neural Comput."},{"key":"B18","doi-asserted-by":"publisher","first-page":"1","DOI":"10.3389\/neuro.11.001.2009","article-title":"NEURON and Python","volume":"3","author":"Hines","year":"2009","journal-title":"Front. Neuroinform."},{"key":"B19","doi-asserted-by":"publisher","first-page":"1117","DOI":"10.1016\/j.neucom.2004.01.175","article-title":"Discrete event simulation in the NEURON environment","volume":"58","author":"Hines","year":"2004","journal-title":"Neurocomputing"},{"key":"B20","doi-asserted-by":"crossref","DOI":"10.1093\/oso\/9780195138467.001.0001","volume-title":"Physiology of Respiration","author":"Hlastala","year":"2001"},{"key":"B21","doi-asserted-by":"publisher","first-page":"56","DOI":"10.3389\/fninf.2019.00056","article-title":"Curated model development using neuroid: a web-based neuromotor integration and design platform","volume":"13","author":"Iyengar","year":"2019","journal-title":"Front. Neuroinform."},{"key":"B22","doi-asserted-by":"crossref","DOI":"10.1007\/978-3-030-35987-4","volume-title":"Modeling with Nonsmooth Dynamics","author":"Jeffrey","year":"2020"},{"key":"B23","doi-asserted-by":"publisher","first-page":"106804","DOI":"10.1016\/j.cmpb.2022.106804","article-title":"In-silico neuro musculoskeletal model reproduces the movement types obtained by spinal micro stimulation","volume":"220","author":"Kapardi","year":"2022","journal-title":"Comput. Methods Prog. Biomed."},{"key":"B24","doi-asserted-by":"crossref","DOI":"10.1007\/978-0-387-75847-3","volume-title":"Mathematical Physiology: II: Systems Physiology","author":"Keener","year":"2009"},{"key":"B25","doi-asserted-by":"publisher","first-page":"88","DOI":"10.1152\/japplphysiol.00491.2016","article-title":"Muscle length-dependent contribution of motoneuron Cav1. 3 channels to force production in model slow motor unit","volume":"123","author":"Kim","year":"2017","journal-title":"J. Appl. Physiol."},{"key":"B26","doi-asserted-by":"publisher","DOI":"10.1523\/ENEURO.0014-20.2020","article-title":"Linking motoneuron pic location to motor function in closed-loop motor unit system including afferent feedback: a computational investigation","volume":"7","author":"Kim","year":"2020","journal-title":"eNeuro"},{"key":"B27","doi-asserted-by":"publisher","first-page":"e1011178","DOI":"10.1371\/journal.pcbi.1011178","article-title":"A dynamic calcium-force relationship model for sag behavior in fast skeletal muscle","volume":"19","author":"Kim","year":"2023","journal-title":"PLoS Comput. Biol."},{"key":"B28","doi-asserted-by":"publisher","first-page":"25","DOI":"10.1007\/s00422-016-0704-8","article-title":"Robustness, flexibility, and sensitivity in a multifunctional motor control model","volume":"111","author":"Lyttle","year":"2017","journal-title":"Biol. Cybernet."},{"key":"B29","doi-asserted-by":"publisher","first-page":"2063","DOI":"10.1162\/NECO_a_00876","article-title":"Simulation neurotechnologies for advancing brain research: parallelizing large networks in NEURON","volume":"28","author":"Lytton","year":"2016","journal-title":"Neural Comput."},{"key":"B30","doi-asserted-by":"publisher","first-page":"847108","DOI":"10.3389\/fninf.2022.847108","article-title":"Efficient simulation of 3D reaction-diffusion in models of neurons and networks","volume":"16","author":"McDougal","year":"2022","journal-title":"Front. Neuroinform."},{"key":"B31","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s10827-016-0623-7","article-title":"Twenty years of ModelDB and beyond: building essential modeling tools for the future of neuroscience","volume":"42","author":"McDougal","year":"2017","journal-title":"J. Comput. Neurosci."},{"key":"B32","doi-asserted-by":"publisher","first-page":"814","DOI":"10.1016\/j.neuron.2016.01.009","article-title":"Mechanisms underlying the neuromodulation of spinal circuits for correcting gait and balance deficits after spinal cord injury","volume":"89","author":"Moraud","year":"2016","journal-title":"Neuron"},{"key":"B33","unstructured":"2023"},{"key":"B34","unstructured":"2023"},{"key":"B35","doi-asserted-by":"publisher","first-page":"212","DOI":"10.1016\/j.piutam.2011.04.021","article-title":"Opensim: a musculoskeletal modeling and simulation framework for in silico investigations and exchange","volume":"2","author":"Seth","year":"2011","journal-title":"Proc. Iutam"},{"key":"B36","doi-asserted-by":"publisher","first-page":"25","DOI":"10.1007\/s10827-014-0519-3","article-title":"The significance of dynamical architecture for adaptive responses to mechanical loads during rhythmic behavior","volume":"38","author":"Shaw","year":"2015","journal-title":"J. Comput. Neurosci."},{"key":"B37","doi-asserted-by":"publisher","first-page":"065003","DOI":"10.1088\/1741-2560\/8\/6\/065003","article-title":"A dynamical systems analysis of afferent control in a neuromechanical model of locomotion: I. Rhythm generation","volume":"8","author":"Spardy","year":"","journal-title":"J. Neural Eng."},{"key":"B38","doi-asserted-by":"publisher","first-page":"065004","DOI":"10.1088\/1741-2560\/8\/6\/065004","article-title":"A dynamical systems analysis of afferent control in a neuromechanical model of locomotion: II. Phase asymmetry","volume":"8","author":"Spardy","year":"","journal-title":"J. Neural Eng."},{"key":"B39","doi-asserted-by":"publisher","first-page":"49","DOI":"10.3389\/fninf.2018.00049","article-title":"Uncertainpy: a python toolbox for uncertainty quantification and sensitivity analysis in computational neuroscience","volume":"12","author":"Tenn\u00f8e","year":"2018","journal-title":"Front. Neuroinform."},{"key":"B40","doi-asserted-by":"publisher","first-page":"22983","DOI":"10.1038\/s41598-021-02298-9","article-title":"Integration of neural architecture within a finite element framework for improved neuromusculoskeletal modeling","volume":"11","author":"Volk","year":"2021","journal-title":"Sci. Rep."},{"key":"B41","doi-asserted-by":"publisher","first-page":"687","DOI":"10.1007\/s00422-022-00951-8","article-title":"Variational and phase response analysis for limit cycles with hard boundaries, with applications to neuromechanical control problems","volume":"116","author":"Wang","year":"2022","journal-title":"Biol. Cybernet."},{"key":"B42","doi-asserted-by":"publisher","first-page":"31","DOI":"10.3389\/fninf.2016.00031","article-title":"Closed loop interactions between spiking neural network and robotic simulators based on MUSIC and ROS","volume":"10","author":"Weidel","year":"2016","journal-title":"Front. Neuroinform."},{"key":"B43","volume-title":"Pulmonary Pathophysiology: The Essentials","author":"West","year":"2008"},{"key":"B44","doi-asserted-by":"publisher","first-page":"135","DOI":"10.1007\/s00422-021-00864-y","article-title":"Dynamical consequences of sensory feedback in a half-center oscillator coupled to a simple motor system","volume":"115","author":"Yu","year":"2021","journal-title":"Biol. Cybernet."}],"container-title":["Frontiers in Computational Neuroscience"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fncom.2023.1143323\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2023,12,18]],"date-time":"2023-12-18T05:26:01Z","timestamp":1702877161000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fncom.2023.1143323\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,7,31]]},"references-count":44,"alternative-id":["10.3389\/fncom.2023.1143323"],"URL":"https:\/\/doi.org\/10.3389\/fncom.2023.1143323","relation":{},"ISSN":["1662-5188"],"issn-type":[{"value":"1662-5188","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,7,31]]},"article-number":"1143323"}}