title: libNeuroML and PyLEMS: using Python to combine procedural and declarative modeling approaches in computational neuroscience.
abstract: NeuroML is an XML-based model description language, which provides a powerful common data format for defining and exchanging models of neurons and neuronal networks. In the latest version of NeuroML, the structure and behavior of ion channel, synapse, cell, and network model descriptions are based on underlying definitions provided in LEMS, a domain-independent language for expressing hierarchical mathematical models of physical entities. While declarative approaches for describing models have led to greater exchange of model elements among software tools in computational neuroscience, a frequent criticism of XML-based languages is that they are difficult to work with directly. Here we describe two Application Programming Interfaces (APIs) written in Python (http://www.python.org), which simplify the process of developing and modifying models expressed in NeuroML and LEMS. The libNeuroML API provides a Python object model with a direct mapping to all NeuroML concepts defined by the NeuroML Schema, which facilitates reading and writing the XML equivalents. In addition, it offers a memory-efficient, array-based internal representation, which is useful for handling large-scale connectomics data. The libNeuroML API also includes support for performing common operations that are required when working with NeuroML documents. Access to the LEMS data model is provided by the PyLEMS API, which provides a Python implementation of the LEMS language, including the ability to simulate most models expressed in LEMS. Together, libNeuroML and PyLEMS provide a comprehensive solution for interacting with NeuroML models in a Python environment.
authors.affiliation: Department of Physiology, Development and Neuroscience, University of Cambridge Cambridge, UK.
authors.forename: Michael
authors.initials: M
authors.lastname: Vella
authors.affiliation: Textensor Limited Edinburgh, UK.
authors.forename: Robert C
authors.initials: RC
authors.lastname: Cannon
authors.affiliation: School of Mathematical and Statistical Sciences and School of Life Sciences, Arizona State University Tempe, AZ, USA.
authors.forename: Sharon
authors.initials: S
authors.lastname: Crook
authors.affiliation: Unité de Neurosciences, Information et Complexité, CNRS Gif sur Yvette, France.
authors.forename: Andrew P
authors.initials: AP
authors.lastname: Davison
authors.affiliation: Textensor Limited Edinburgh, UK.
authors.forename: Gautham
authors.initials: G
authors.lastname: Ganapathy
authors.affiliation: Department of Physiology, Development and Neuroscience, University of Cambridge Cambridge, UK.
authors.forename: Hugh P C
authors.initials: HP
authors.lastname: Robinson
authors.affiliation: Department of Neuroscience, Physiology and Pharmacology, University College London London, UK.
authors.forename: R Angus
authors.initials: RA
authors.lastname: Silver
authors.affiliation: Department of Neuroscience, Physiology and Pharmacology, University College London London, UK.
authors.forename: Padraig
authors.initials: P
authors.lastname: Gleeson
keywords: API; LEMS; NeuroML; Python; SWC; model specification; modeling; standardization