<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article
  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="3.0" xml:lang="en">
  <front>
    <journal-meta><journal-id journal-id-type="publisher-id">plos</journal-id><journal-id journal-id-type="nlm-ta">PLoS Comput Biol</journal-id><journal-id journal-id-type="pmc">ploscomp</journal-id><issn pub-type="ppub">1553-734X</issn><issn pub-type="epub">1553-7358</issn><publisher>
        <publisher-name>Public Library of Science</publisher-name>
        <publisher-loc>San Francisco, USA</publisher-loc>
      </publisher></journal-meta>
    <article-meta><article-id pub-id-type="publisher-id">PCOMPBIOL-D-12-00024</article-id><article-id pub-id-type="doi">10.1371/journal.pcbi.1002628</article-id><article-categories>
        <subj-group subj-group-type="heading">
          <subject>Research Article</subject>
        </subj-group>
        <subj-group subj-group-type="Discipline-v2">
          <subject>Biology</subject>
          <subj-group>
            <subject>Anatomy and physiology</subject>
            <subj-group>
              <subject>Cell physiology</subject>
              <subject>Neurological system</subject>
            </subj-group>
          </subj-group>
          <subj-group>
            <subject>Biophysics</subject>
            <subj-group>
              <subject>Biomechanics</subject>
              <subject>Biophysics simulations</subject>
            </subj-group>
          </subj-group>
        </subj-group>
        <subj-group subj-group-type="Discipline-v2">
          <subject>Computer science</subject>
          <subj-group>
            <subject>Algorithms</subject>
          </subj-group>
          <subj-group>
            <subject>Computerized simulations</subject>
          </subj-group>
          <subj-group>
            <subject>Computing methods</subject>
            <subj-group>
              <subject>Mathematical computing</subject>
            </subj-group>
          </subj-group>
          <subj-group>
            <subject>Numerical analysis</subject>
          </subj-group>
          <subj-group>
            <subject>Software engineering</subject>
            <subj-group>
              <subject>Software tools</subject>
            </subj-group>
          </subj-group>
        </subj-group>
        <subj-group subj-group-type="Discipline-v2">
          <subject>Mathematics</subject>
          <subj-group>
            <subject>Applied mathematics</subject>
            <subj-group>
              <subject>Algorithms</subject>
            </subj-group>
          </subj-group>
          <subj-group>
            <subject>Mathematical computing</subject>
          </subj-group>
          <subj-group>
            <subject>Nonlinear dynamics</subject>
          </subj-group>
        </subj-group>
        <subj-group subj-group-type="Discipline">
          <subject>Physiology</subject>
          <subject>Biophysics</subject>
          <subject>Computer Science</subject>
          <subject>Mathematics</subject>
        </subj-group>
      </article-categories><title-group><article-title>Hybrid Models and Biological Model Reduction with PyDSTool</article-title><alt-title alt-title-type="running-head">Hybrid Reduced Models with PyDSTool</alt-title></title-group><contrib-group>
        <contrib contrib-type="author" xlink:type="simple">
          <name name-style="western">
            <surname>Clewley</surname>
            <given-names>Robert</given-names>
          </name>
          <xref ref-type="aff" rid="aff1"/>
          <xref ref-type="corresp" rid="cor1">
            <sup>*</sup>
          </xref>
        </contrib>
      </contrib-group><aff id="aff1">
        <addr-line>Neuroscience Institute, Georgia State University, Atlanta, Georgia, United States of America</addr-line>
      </aff><contrib-group>
        <contrib contrib-type="editor" xlink:type="simple">
          <name name-style="western">
            <surname>Prlic</surname>
            <given-names>Andreas</given-names>
          </name>
          <role>Editor</role>
          <xref ref-type="aff" rid="edit1"/>
        </contrib>
      </contrib-group><aff id="edit1">
        <addr-line>University of California, San Diego, United States of America</addr-line>
      </aff><author-notes>
        <corresp id="cor1">* E-mail: <email xlink:type="simple">rclewley@gsu.edu</email></corresp>
        <fn fn-type="conflict">
          <p>The author has declared that no competing interests exist.</p>
        </fn>
        <fn fn-type="con">
          <p>Conceived and designed the experiments: RC. Performed the experiments: RC. Analyzed the data: RC. Contributed reagents/materials/analysis tools: RC. Wrote the paper: RC. Designed and wrote the software used in analysis: RC.</p>
        </fn>
      </author-notes><pub-date pub-type="collection">
        <month>8</month>
        <year>2012</year>
      </pub-date><pub-date pub-type="epub">
        <day>9</day>
        <month>8</month>
        <year>2012</year>
      </pub-date><volume>8</volume><issue>8</issue><elocation-id>e1002628</elocation-id><history>
        <date date-type="received">
          <day>22</day>
          <month>12</month>
          <year>2011</year>
        </date>
        <date date-type="accepted">
          <day>8</day>
          <month>6</month>
          <year>2012</year>
        </date>
      </history><permissions>
        
        <copyright-holder>Robert Clewley</copyright-holder>
        <license xlink:type="simple">
          <license-p>This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p>
        </license>
      </permissions><abstract>
        <p>The PyDSTool software environment is designed to develop, simulate, and analyze dynamical systems models, particularly for biological applications. Unlike the engineering application focus and graphical specification environments of most general purpose simulation tools, PyDSTool provides a programmatic environment well suited to exploratory data- and hypothesis-driven biological modeling problems. In this work, we show how the environment facilitates the application of hybrid dynamical modeling to the reverse engineering of complex biophysical dynamics; in this case, of an excitable membrane. The example demonstrates how the software provides novel tools that support the inference and validation of mechanistic hypotheses and the inclusion of data constraints in both quantitative and qualitative ways. The biophysical application is broadly relevant to models in the biosciences. The open source and platform-independent PyDSTool package is freely available under the BSD license from <ext-link ext-link-type="uri" xlink:href="http://sourceforge.net/projects/pydstool/" xlink:type="simple">http://sourceforge.net/projects/pydstool/</ext-link>. The hosting service provides links to documentation and online forums for user support.</p>
      </abstract><funding-group>
        <funding-statement>This research was supported, in part, by NSF award EMT-0829742 (<ext-link ext-link-type="uri" xlink:href="http://www.nsf.gov/awardsearch/showAward.do?AwardNumber=0829742" xlink:type="simple">http://www.nsf.gov/awardsearch/showAward.do?AwardNumber=0829742</ext-link>). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.</funding-statement>
      </funding-group><counts>
        <page-count count="8"/>
      </counts></article-meta>
  </front>
  <body>
    <sec id="s1">
      <title/>
      <disp-quote>
        <p>This is a <italic>PLoS Computational Biology</italic> Software Article.</p>
      </disp-quote>
    </sec>
    <sec id="s2">
      <title>Introduction</title>
      <p>There are now many simulation and visualization software packages available for individual application domains across the biosciences, and several general purpose packages for analyzing dynamical systems. However, less attention has been paid to the tools needed to develop models for complex phenomena through inference and reverse engineering of natural systems <xref ref-type="bibr" rid="pcbi.1002628-Beard1">[1]</xref>–<xref ref-type="bibr" rid="pcbi.1002628-Guckenheimer1">[3]</xref>. The unique scientific focus of the PyDSTool software package <xref ref-type="bibr" rid="pcbi.1002628-Clewley1">[4]</xref> (current version provided in Supplemental <xref ref-type="supplementary-material" rid="pcbi.1002628.s004">Text S4</xref>) is providing integrated simulation, informatic, and diagnostic tools to support a forward-looking modeling methodology for the biosciences. This fills a niche in the biosciences where mathematical tools such as dimension reduction, qualitative dynamical systems theory and bifurcation analysis can be better integrated into modeling workflows. To enhance this support, PyDSTool is open source, and is extensible and inter-operable with existing application-specific tools rather than competing with them. As such, PyDSTool fills a niche that is between large-scale simulation tools, capable of efficiently handling thousands of variables (e.g., Neuron <xref ref-type="bibr" rid="pcbi.1002628-Carnevale1">[5]</xref>, NEST <xref ref-type="bibr" rid="pcbi.1002628-Neural1">[6]</xref>, VCell <xref ref-type="bibr" rid="pcbi.1002628-Schaff1">[7]</xref> or Bio-SPICE <xref ref-type="bibr" rid="pcbi.1002628-BioSPICE1">[8]</xref>), graphically interactive environments that are better suited for relatively small numbers of variables (e.g., XPPAUT <xref ref-type="bibr" rid="pcbi.1002628-Ermentrout1">[9]</xref>, DsTool <xref ref-type="bibr" rid="pcbi.1002628-Back1">[10]</xref> and CONTENT <xref ref-type="bibr" rid="pcbi.1002628-Kuznetsov1">[11]</xref>), and lightweight scripting in Matlab <xref ref-type="bibr" rid="pcbi.1002628-The1">[12]</xref> or SciPy <xref ref-type="bibr" rid="pcbi.1002628-Jones1">[13]</xref>. This niche is detailed below by considering some unmet challenges to model development.</p>
      <p>Model development in the biosciences requires tools such as simulation, visualization, data analysis, diagnostics and validation, sensitivity analysis, and parameter optimization <xref ref-type="bibr" rid="pcbi.1002628-Commission1">[14]</xref>. There is no rigorous methodology for combining these tools effectively, making development an esoteric and often <italic>ad hoc</italic> process that blends intuition and exploration <xref ref-type="bibr" rid="pcbi.1002628-National1">[15]</xref>. In addressing this shortcoming, systematic and computer-assisted approaches to model development have received attention in the software engineering and business management literature <xref ref-type="bibr" rid="pcbi.1002628-Muhanna1">[16]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-The2">[17]</xref>, but they typically focus on graphically-designed workflows for integrating large quantities of data analysis with large scale simulation, and on management of sharing, collaboration, and provenance <xref ref-type="bibr" rid="pcbi.1002628-Davidson1">[18]</xref>–<xref ref-type="bibr" rid="pcbi.1002628-The3">[20]</xref>. Previous work has suggested that a computer-assisted approach to identifying models using qualitative representations can bridge the scale from microscopic to macroscopic models and can guide users to develop heterogeneous and multi-level representations that assist in comprehending complex mechanisms <xref ref-type="bibr" rid="pcbi.1002628-Abelson1">[21]</xref>–<xref ref-type="bibr" rid="pcbi.1002628-Yip1">[31]</xref>. However, an integrated and general-purpose software environment has not yet emerged in response to this need. In response, PyDSTool has been developed as a platform for prototyping model development principles gleaned from other fields.</p>
      <p>At a more technical level, PyDSTool provides a range of general purpose simulation and analysis tools with similar functionality to existing packages. A detailed feature comparison is provided on the website <xref ref-type="bibr" rid="pcbi.1002628-Clewley2">[32]</xref> and is summarized here. A major difference from other packages is the programmatic and interactive aspects of the PyDSTool library within the Python environment. For instance, PyDSTool provides high-level compositional model-building tools involving symbolic expressions and modular component templates. This helps users construct large models efficiently and in a mathematically natural fashion compared to graphical approaches or <italic>de novo</italic> coding directly in C, Fortran, Java, Python, etc. The rich representation of model structure also facilitates the sophisticated manipulation of models both interactively and algorithmically. The symbolic tools provided allow Jacobian functions to be defined automatically for smooth dynamical systems, making their analysis more efficient. While computer algebra systems such as Maple <xref ref-type="bibr" rid="pcbi.1002628-Cornhill1">[33]</xref> and Mathematica <xref ref-type="bibr" rid="pcbi.1002628-Wolfram1">[34]</xref> provide more advanced symbolic tools, they do not provide fast numerical integration and bifurcation tools, and they are not intended for intensive numerical exploration of high-dimensional, nonlinear dynamical systems.</p>
      <p>PyDSTool exhibits superior performance in numerical integration over other high-level environments because it automatically generates low-level C code from user model descriptions. The low-level code is linked dynamically with C or Fortran solvers and reloaded as a dynamic linked library for transparent user access within Python. Comparable high-level programmatic environments such as Matlab or Python-based packages such as SciPy, Brian <xref ref-type="bibr" rid="pcbi.1002628-Goodman1">[35]</xref>, or PySCeS <xref ref-type="bibr" rid="pcbi.1002628-Olivier1">[36]</xref>, rely on the less efficient high-level implementation of model codes, the results of which are accessed via an expensive ‘call-back’ interface from low-level integrators. In addition, Matlab is neither free nor open source, and does not provide convenient model description and analysis tools for working with dynamical systems models.</p>
      <p>This article describes an example of how the PyDSTool environment supports flexible and extensible workflows to be built over a class hierarchy designed for development and analysis of dynamical models in scientific applications, as well as for inter-operability between packages and algorithms. Example workflows suited to this environment include: (1) model creation specified by code that later adaptively modifies the model structure or parameters (e.g., when interfaced with optimization algorithms); (2) adaptive batches of simulations and analyses that post-process simulation results to determine which simulations to perform next; and (3) exploration of model properties and live prototyping of model development code. Further examples are discussed throughout the text.</p>
      <sec id="s2a">
        <title>Using hybrid systems for reduction</title>
        <p>To illustrate some of the unique benefits of PyDSTool to the modeler, we will discuss an example that combines elements of the workflows (1) and (3) above using reduction techniques and hybrid dynamical systems (see <xref ref-type="bibr" rid="pcbi.1002628-Carloni1">[37]</xref> and references therein). Hybrid dynamical systems are defined later, but loosely speaking they are made up of smooth vector fields (such as those defined by differential equations) that are punctuated by discrete changes. This makes them especially useful for modeling systems that display modularity in functional state or inherent structure. We will discuss a measurement of modularity in <xref ref-type="sec" rid="s4">Results</xref>.</p>
        <p>In contrast to dimension reduction methods that aim to increase simulation efficiency (e.g., see <xref ref-type="bibr" rid="pcbi.1002628-Rathinam1">[38]</xref>), reduction to hybrid system models has been demonstrated as a tool for <italic>inferring</italic> the key causal mechanisms underlying a high-dimensional or otherwise complex phenomenon, and for <italic>validating</italic> the resulting hypotheses with a dynamical system of lower dimension or greater simplicity (e.g., <xref ref-type="bibr" rid="pcbi.1002628-Bose1">[39]</xref>–<xref ref-type="bibr" rid="pcbi.1002628-Spardy1">[42]</xref>). In lieu of a more developed qualitative theory of nonlinear dynamics for hybrid systems, explicitly simulated representations of the reduced dynamics are needed to ensure that the hypotheses are both logically self-consistent and consistent with experimental data. (E.g., see <xref ref-type="bibr" rid="pcbi.1002628-Edwards1">[43]</xref> for an example of exploring this issue in biomechanical modeling.) In addition, algorithms have recently been developed that assist with the inference of mechanistic relationships in ordinary differential equation (ODE) models, and also with the systematic and semi-automated construction of the resulting reduced descriptions in terms of hybrid systems <xref ref-type="bibr" rid="pcbi.1002628-Clewley4">[44]</xref>–<xref ref-type="bibr" rid="pcbi.1002628-Clewley6">[46]</xref>.</p>
        <p>A simple example of reducing an ODE in this way is the replacement of a smooth sigmoidal function having a steep slope with a piecewise-constant or piecewise-linear step function in contexts that are not sensitive to the details of the smooth slope (see <xref ref-type="bibr" rid="pcbi.1002628-Lincoln1">[47]</xref>). This reduction can be understood in terms of functional modularity because, in this situation, the strong nonlinearity of the function ensures effective decoupling between the input and output when the input is sub-threshold. The validation of the reduction in an explicit context tests the hypothesis that the details of the function's transition were not mechanistically relevant. The integrate-and-fire neuron described in Supplementary <xref ref-type="supplementary-material" rid="pcbi.1002628.s001">Text S1</xref> uses a similar replacement of smooth spiking dynamics with a discrete, instantaneous reset.</p>
        <p>Multiple time scale systems such as the Van der Pol oscillator or chemical reaction systems with explicit small parameters are classic examples of systems that can be reduced to hybrid systems <xref ref-type="bibr" rid="pcbi.1002628-Deuhard1">[48]</xref>–<xref ref-type="bibr" rid="pcbi.1002628-Maas1">[50]</xref>. The models are studied as singularly perturbed systems, from which a quasi-steady state approximation and similar techniques obtain a ‘fast-slow’ reduction. This reduction is generally in the form of a set of differential-algebraic equations (DAEs) with domain consistency conditions, and can be seen as a piecewise-local dimension reduction of the model. Thus, it can be simulated and numerically analyzed using a hybrid model formalism <xref ref-type="bibr" rid="pcbi.1002628-Clewley4">[44]</xref>.</p>
        <p>We demonstrate hybrid model reduction in a scenario involving the space-clamped Hodgkin-Huxley (HH) formalism for neural action potentials (AP) <xref ref-type="bibr" rid="pcbi.1002628-Hodgkin1">[51]</xref>. This is a common biophysical model based on the first-order kinetics of ion transport across a cell membrane, and reflects an equation structure inherently similar to many models in systems biology (two recent examples that use PyDSTool can be found in <xref ref-type="bibr" rid="pcbi.1002628-Hong1">[52]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Kidd1">[53]</xref>). Although the HH model has been analyzed extensively by mathematical and numerical means, PyDSTool provides a novel opportunity to algorithmically derive, specify, analyze, and validate a reduced and explicit description of an AP, from which we claim that superior insight into its biophysical mechanism is possible.</p>
      </sec>
    </sec>
    <sec id="s3">
      <title>Design and Implementation</title>
      <p>The PyDSTool package is a library-based environment written primarily in Python, utilizing the numpy <xref ref-type="bibr" rid="pcbi.1002628-Oliphant1">[54]</xref>, SciPy <xref ref-type="bibr" rid="pcbi.1002628-Jones1">[13]</xref>, and matplotlib <xref ref-type="bibr" rid="pcbi.1002628-Hunter1">[55]</xref> packages. A few optional dependencies are a C and Fortran compiler and the SWIG interfacing software (<ext-link ext-link-type="uri" xlink:href="http://swig.org" xlink:type="simple">http://swig.org</ext-link>), which are only necessary to run simulations at their fastest or to run the bundled AUTO continuation software <xref ref-type="bibr" rid="pcbi.1002628-Doedel1">[56]</xref>. The avoidance of non-Python external dependencies simplifies the installation process on any operating system, which is described in full via the ‘Getting Started’ link from <ext-link ext-link-type="uri" xlink:href="http://pydstool.sourceforge.net" xlink:type="simple">http://pydstool.sourceforge.net</ext-link>.</p>
      <sec id="s3a">
        <title>Core classes</title>
        <p>PyDSTool is unique in providing a variety of high-level data types (‘classes’) and library functions that closely mimic mathematical counterparts in dynamical systems theory and provide intuitive functionality. For example, domains and numeric intervals are represented by the Interval class, for which membership, intersection, endpoint testing, etc., are simple operations. Similarly, numerical arrays are extended to become Pointsets, incorporating several features: named fields instead of indices for accessing variables, an associated independent variable that may parameterize the data, and metadata labels that can be indexed and cross-referenced. Pointsets are further abstracted to Trajectories (parameterized, smooth curves), which further add a transparent layer of domain checking and interpolation that allows numerically computed data to be treated as continuous, when appropriate. Among others, such classes provide intuitive abstractions that allow users to more efficiently express their mathematical ideas in new algorithms, or to naturally specify complex meta-model constraints.</p>
        <p>At the lowest level, PyDSTool supports simulations of ordinary differential equations (ODEs), differential-algebraic equations (DAEs), and discrete mappings <xref ref-type="bibr" rid="pcbi.1002628-Guckenheimer2">[57]</xref>. Few comparable dynamical systems packages support DAEs, which are useful in hybrid modeling, and rarely support hybrid dynamics beyond simple case-based ‘switch’ or ‘if’ statements or Heaviside functions. PyDSTool users can specify dynamics using evolution equations or explicit functions of time or state. The range of possible formalisms for specifying dynamics is supported by the Generator abstract class, which creates Trajectory objects on demand. There are several ODE solver implementations supported: the adaptive time step solvers Dopri and Radau (an implicit solver that is well-suited to stiff systems and also supports DAEs) <xref ref-type="bibr" rid="pcbi.1002628-Hairer1">[58]</xref>, a 4th-order Runge-Kutta fixed time-step method, and a wrapping of VODE (via SciPy) <xref ref-type="bibr" rid="pcbi.1002628-Hindmarsh1">[59]</xref>. All solvers support <italic>arbitrary-precision</italic> event detection with a simple Event class, which is crucial for defining hybrid systems and is missing from many application-specific simulators. PyDSTool is modular and can be extended to support other solvers.</p>
        <p>Bundled toolboxes provide special functionality such as phase plane analysis, model reduction, optimization, data analysis, and templates and interfaces for application-specific modeling and third-party software. For instance, users who install the PySCeS <xref ref-type="bibr" rid="pcbi.1002628-Olivier1">[36]</xref> or SloppyCell <xref ref-type="bibr" rid="pcbi.1002628-Myers1">[60]</xref> systems biology packages have the option to create models by exporting from those packages (e.g., based on SBML definitions <xref ref-type="bibr" rid="pcbi.1002628-Hucka1">[61]</xref>). Equally, with the NineML Python API installed <xref ref-type="bibr" rid="pcbi.1002628-INCF1">[62]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-INCF2">[63]</xref>, many forms of neural models can be imported directly. Alternatively, models can be prepared directly in PyDSTool using modular constructors and symbolic expressions, or by writing raw text definitions. An export option to the ADOL-C periodic solver in Matlab is also provided <xref ref-type="bibr" rid="pcbi.1002628-Guckenheimer3">[64]</xref>.</p>
      </sec>
      <sec id="s3b">
        <title>Hybrid model implementation</title>
        <p>We take a practical approach to implementing hybrid systems (sometimes known as composite models in other fields) in PyDSTool that is most applicable to biophysical models, where smooth dynamics are primary and are punctuated by finite numbers of discrete events. This differs from the majority of existing simulation platforms, which typically focus on physical models for engineering applications with many parallel discrete event processes mixed with smooth dynamics. Hybrid models in PyDSTool can be built from sub-models that mix discrete mappings, ODEs, DAEs, preset trajectories, or any other embedded code that can produce a Trajectory object.</p>
        <p>There are many formalisms for hybrid systems, but the 6-tuple of Simić et al. is adequate for our purposes <xref ref-type="bibr" rid="pcbi.1002628-Simic1">[65]</xref>: <inline-formula id="pcbi.1002628.e001"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e001" xlink:type="simple"/></inline-formula>. We do not take a formal approach here, and it is sufficient to describe these elements informally and direct the reader to the reference for details. <inline-formula id="pcbi.1002628.e002"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e002" xlink:type="simple"/></inline-formula> is a finite set of discrete states of the system, which we will refer to as regimes. The regime transition graph is given by nodes from <inline-formula id="pcbi.1002628.e003"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e003" xlink:type="simple"/></inline-formula> and edges from <inline-formula id="pcbi.1002628.e004"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e004" xlink:type="simple"/></inline-formula>. In each regime, a sub-model is defined from a corresponding <inline-formula id="pcbi.1002628.e005"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e005" xlink:type="simple"/></inline-formula>-dimensional vector field from the set <inline-formula id="pcbi.1002628.e006"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e006" xlink:type="simple"/></inline-formula> over a domain from the set <inline-formula id="pcbi.1002628.e007"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e007" xlink:type="simple"/></inline-formula>. Transition events for the edges in <inline-formula id="pcbi.1002628.e008"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e008" xlink:type="simple"/></inline-formula> are indicated by ‘guards’ from the set <inline-formula id="pcbi.1002628.e009"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e009" xlink:type="simple"/></inline-formula>, which are <inline-formula id="pcbi.1002628.e010"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e010" xlink:type="simple"/></inline-formula> dimensional sub-manifolds in each domain. We will define these guards by zero-crossing functions on those domains. Finally, there is an optional resetting map associated with each edge, taken from the set <inline-formula id="pcbi.1002628.e011"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e011" xlink:type="simple"/></inline-formula>, which discretely changes the state variables on a regime transition. Consistent with some formalisms, we allow a subset (often just one) of the <inline-formula id="pcbi.1002628.e012"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e012" xlink:type="simple"/></inline-formula> state variables (known as ‘indicator’ variables) to be discrete and therefore constant during each regime.</p>
        <p>PyDSTool uses three essential code elements to define a hybrid model: (1) a hierarchy of component sub-models, (2) a mixture of zero-crossing events and global self-consistency conditions, and (3) transition rules between the sub-models that are applied on occurrence of an associated event or condition failure. During simulation of a sub-model, a terminal event may occur that stops the trajectory generation (see the Tutorial in Supplemental <xref ref-type="supplementary-material" rid="pcbi.1002628.s001">Text S1</xref>). In such a scenario, the transition rules for the stopped sub-model are applied to the final state to choose the next sub-model. The final state may also be mapped to a new value before becoming the initial condition for the next sub-model.</p>
        <p>A user may define a hybrid model with only one sub-model, such that a terminal event or maximum elapsed time defined for that sub-model's regime will be associated with a transition back to the same sub-model, typically after a discrete change to the state is applied. An example of this is using a simple threshold-crossing event to signal an action potential (AP) in an integrate-and-fire neuron model <xref ref-type="bibr" rid="pcbi.1002628-Lapique1">[66]</xref>, after which a discrete change is applied to reset the membrane potential. (This model's implementation is described further in Supplemental <xref ref-type="supplementary-material" rid="pcbi.1002628.s001">Texts S1</xref> and <xref ref-type="supplementary-material" rid="pcbi.1002628.s002">S2</xref>.)</p>
        <p><xref ref-type="fig" rid="pcbi-1002628-g001">Figure 1</xref> summarizes the implementation structure of hybrid models as a hierarchy of HybridModel objects: other HybridModels may reside at nodes while NonHybridModels (that are non-hierarchical and can only wrap Generators) reside at the leaves of the tree. In between sub-models and their parent are ModelInterface (MI) objects. MIs are generic wrappers that filter, transform or otherwise post-process the output of a sub-model (<xref ref-type="fig" rid="pcbi-1002628-g002">Figure 2</xref>). For the simplest hybrid models (see <xref ref-type="supplementary-material" rid="pcbi.1002628.s001">Text S1</xref> for an example), MIs are neutral and no external conditions are necessary, but their high level of generality allows validation of hybrid model self-consistency conditions (see <xref ref-type="sec" rid="s4">Results</xref>) and facilitates qualitative model optimization algorithms (see Future Directions). MIs do these tasks by encoding data- and hypothesis-driven constraints. Additionally, they can make optimization more robust using internal failure recovery. For example, recovery code can safeguard attempts by a standard optimization routine to test parameter values in the model that may be inconsistent with its definition. For instance, such code can catch a problem and return special values of the objective function rather than an error condition.</p>
        <fig id="pcbi-1002628-g001" orientation="portrait" position="float">
          <object-id pub-id-type="doi">10.1371/journal.pcbi.1002628.g001</object-id>
          <label>Figure 1</label>
          <caption>
            <title>Class containment diagram for a hybrid model in PyDSTool.</title>
            <p><inline-formula id="pcbi.1002628.e013"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e013" xlink:type="simple"/></inline-formula> represent ‘internal’ model interface objects that wrap <inline-formula id="pcbi.1002628.e014"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e014" xlink:type="simple"/></inline-formula> sub-models (<inline-formula id="pcbi.1002628.e015"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e015" xlink:type="simple"/></inline-formula>). If global consistency conditions are applied to these sub-models, then <inline-formula id="pcbi.1002628.e016"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e016" xlink:type="simple"/></inline-formula> ‘external’ model interface objects, <inline-formula id="pcbi.1002628.e017"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e017" xlink:type="simple"/></inline-formula>, may also be provided. Each iMI may either contain a non-hybrid or another hybrid model object (an example is shown). Non-hybrid models combine with a GeneratorInterface to make a thin wrapper for Generator objects, ensuring API-compatibility with hybrid model objects and other MIs and thus promoting interchangeability. Conditions in each eMI specify a target combination of truth or falsity of one or more constituent features. The features measure properties of the corresponding iMI and compare them to those in some external data such as a user-imposed logical template or experimental data.</p>
          </caption>
          <graphic mimetype="image" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.g001" xlink:type="simple"/>
        </fig>
        <fig id="pcbi-1002628-g002" orientation="portrait" position="float">
          <object-id pub-id-type="doi">10.1371/journal.pcbi.1002628.g002</object-id>
          <label>Figure 2</label>
          <caption>
            <title>Structure of a ModelInterface (MI) class.</title>
            <p>An MI wraps a hybrid or non-hybrid model, providing users an option to add pre- and post-simulation code to validate input and output, or otherwise filter or transform the data flow. The control structure also permits failure recovery in the model to be added.</p>
          </caption>
          <graphic mimetype="image" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.g002" xlink:type="simple"/>
        </fig>
      </sec>
    </sec>
    <sec id="s4">
      <title>Results</title>
      <sec id="s4a">
        <title>Scaffolding concepts and implementation in PyDSTool</title>
        <p>In this sub-section, we introduce a broad conceptual framework for the established analytical approach of piecewise-reduced models, and focus on the validation of the analysis by implementing the result as a hybrid systems reduction within PyDSTool.</p>
        <p>Modularity of systems (more accurately, ‘near decomposability’) can be described as the occurrence of clusters of state variables that are highly inter-coupled but sparsely or weakly coupled to external variables <xref ref-type="bibr" rid="pcbi.1002628-Csete1">[2]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Levin1">[67]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Dill1">[68]</xref>. <xref ref-type="fig" rid="pcbi-1002628-g003">Figure 3</xref> schematically describes a spatial or <italic>structural</italic> form of the conceptual reduction framework used here, in which each inferred module can be analyzed, reduced and tested separately, and then further tuned in the context of the whole system. Following similar steps, <xref ref-type="fig" rid="pcbi-1002628-g004">Figure 4</xref> summarizes the approach for a model that exhibits modular <italic>functional</italic> patterns that change over time. The modules form the basis of each sub-model of a hybrid model reduction. Reduction approaches are complicated when the effective decoupling between groups of variables is time- or state-dependent, as in the singularly perturbed systems mentioned earlier, and in the main example described below.</p>
        <fig id="pcbi-1002628-g003" orientation="portrait" position="float">
          <object-id pub-id-type="doi">10.1371/journal.pcbi.1002628.g003</object-id>
          <label>Figure 3</label>
          <caption>
            <title>Schematic of model reduction methodology with hybrid systems using spatial decomposition.</title>
            <p><bold>A</bold>) The complex model involves many inter-dependent state variables (black boxes), depicted in a connectivity graph. Analysis of a particular model behavior indicates that some inter-dependencies are effectively weak (dashed lines), suggesting a functional decomposition into sub-model components. One such sub-model is highlighted by the yellow oval. <bold>B</bold>) The internal dynamics of the sub-model is analyzed in the context of known input and output conditions, and a reduced model of the dynamics is derived that closely mimics the original sub-model. The puzzle piece indicates that the reduced model is derived under certain explicit constraints and assumptions that relate to the broader context of the original model. <bold>C</bold>) Further testing of the reduced component involves embedding it back into the full system as a surrogate for the original sub-model, possibly fine-tuning reduced model parameters to maximize the overall model output similarity under various conditions. If successful, the reduced component represents an abstracted description of the mechanism of that part of the model under these conditions. <bold>D</bold>) This process can be repeated for other sub-models, building a global hypothesis of the whole mechanism.</p>
          </caption>
          <graphic mimetype="image" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.g003" xlink:type="simple"/>
        </fig>
        <fig id="pcbi-1002628-g004" orientation="portrait" position="float">
          <object-id pub-id-type="doi">10.1371/journal.pcbi.1002628.g004</object-id>
          <label>Figure 4</label>
          <caption>
            <title>Schematic of the temporal aspects of model reduction with hybrid systems.</title>
            <p>This example assumes a model with hub-like connectivity, exhibiting multiple scale dynamics, and a periodic behavior (period <inline-formula id="pcbi.1002628.e018"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e018" xlink:type="simple"/></inline-formula>), but a similar process can be described for non-periodic dynamics. State variables are shown by boxes and their inter-coupling by lines. <bold>A</bold>) Dominant scale analysis identifies Regime I over some time window <inline-formula id="pcbi.1002628.e019"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e019" xlink:type="simple"/></inline-formula> (indicated on the blue time axis) within which a subset of the variables (yellow oval) are the most influential on the system's output; the other connections are effectively weak (dashed lines). <bold>B</bold>) The internal dynamics of the resulting sub-model for the regime (yellow puzzle piece) is analyzed in the context of known input and output conditions alongside the full model under equivalent conditions, and the parameters and contextual conditions for the reduction are tuned to maximize the accuracy of this representation over <inline-formula id="pcbi.1002628.e020"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e020" xlink:type="simple"/></inline-formula>. <bold>C</bold>) The consistency of the sub-model with the full dynamics beyond <inline-formula id="pcbi.1002628.e021"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e021" xlink:type="simple"/></inline-formula> is tested for the generation of accurate cyclic behavior over a period <inline-formula id="pcbi.1002628.e022"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e022" xlink:type="simple"/></inline-formula> for <inline-formula id="pcbi.1002628.e023"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e023" xlink:type="simple"/></inline-formula>, allowing for further refinement. <bold>D</bold>) The process in A–C is repeated for other regimes, creating four consecutive sub-models in this example. These should form a self-consistent cycle of entry and exit conditions (indicated by matching puzzle pieces) such that from the composition emerges a periodic behavior closely matching that of the full model.</p>
          </caption>
          <graphic mimetype="image" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.g004" xlink:type="simple"/>
        </fig>
        <p>In its focus on supporting the exploration and understanding of emergent dynamics across scales, PyDSTool permits embedding of data playback, simplified model components, or even analytical tools as surrogates inside MI objects, thereby creating a hybrid model of heterogeneous component types. For instance, an embedded optimization tool could interface with regular model components to infer a low-dimensional characterization (e.g. a functional curve fit or a reduced-order model) of the dynamics of some part of a larger process <xref ref-type="bibr" rid="pcbi.1002628-Clewley3">[40]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Ermentrout2">[41]</xref> (<xref ref-type="fig" rid="pcbi-1002628-g003">Figures 3</xref> and <xref ref-type="fig" rid="pcbi-1002628-g004">4</xref>). This exploratory approach can be described as ‘scaffolding,’ and permits users to focus on developing specific parts of a model in a contextually appropriate fashion. Some components may be temporary placeholders while others are refined, e.g. fitted to experimental data, such that the eventual goal may be to unify the model as an entirely ODE-based (non-hybrid) model. Similarly, scaffolding can allow model order reductions to be targeted to specific temporal or state sub-domains, increasing the degree of reduction possible. A more advanced example is replacing a dynamic variable with a surrogate time series that plays back experimental or simulated data (known as an ‘external input’ variable in PyDSTool) and ignoring feedback to it from other coupled variables.</p>
        <p>The scaffolding idea has not been exploited in computational software previously, but is conceptually related to using code stubs and testing with surrogate data in software engineering, and to the mathematical ‘buffering’ principle for tackling complex models of biochemical systems <xref ref-type="bibr" rid="pcbi.1002628-Voit1">[69]</xref>.</p>
      </sec>
      <sec id="s4b">
        <title>Example: The Hodgkin-Huxley action potential</title>
        <p>We present a hybrid system implementation of the reduced Hodgkin-Huxley (HH) action potential (AP) derived from a ‘dominant scale’ analysis <xref ref-type="bibr" rid="pcbi.1002628-Clewley7">[70]</xref>. Previously, rigorous mathematical approaches to this system have yielded asymptotically-valid DAEs with only implicit dynamics for some slow variables, whereas we derive a fully explicit reduced-order model of the dynamics throughout an AP <xref ref-type="bibr" rid="pcbi.1002628-Clewley6">[46]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Suckley1">[71]</xref>. Details of the ODEs for this system and their analysis can be found in these references, and for reasons of space we briefly summarize the mathematical setup. Coding details of this hybrid model specification can be found in Supplemental <xref ref-type="supplementary-material" rid="pcbi.1002628.s001">Texts S1</xref> and <xref ref-type="supplementary-material" rid="pcbi.1002628.s003">S3</xref>.</p>
        <p>There are four state variables in the HH model: <inline-formula id="pcbi.1002628.e024"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e024" xlink:type="simple"/></inline-formula> for the membrane potential and three ionic channel gating variables, two for the fast sodium (<inline-formula id="pcbi.1002628.e025"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e025" xlink:type="simple"/></inline-formula>, <inline-formula id="pcbi.1002628.e026"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e026" xlink:type="simple"/></inline-formula>) and one for delayed-rectifier potassium (<inline-formula id="pcbi.1002628.e027"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e027" xlink:type="simple"/></inline-formula>). These are given by differential equations for their first order kinetics, and are only coupled with the equation for <inline-formula id="pcbi.1002628.e028"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e028" xlink:type="simple"/></inline-formula> in a hub-like graph with non-symmetric coupling rules. The validity of a reduced regime determined by dominant scale analysis is determined by the truth of the defining assumptions. These include controls on the relative time scales of the variables (each available in explicit algebraic form) and the relative scales of dominance calculated as the quantities <inline-formula id="pcbi.1002628.e029"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e029" xlink:type="simple"/></inline-formula> for <inline-formula id="pcbi.1002628.e030"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e030" xlink:type="simple"/></inline-formula>, which includes the passive input terms for the leak conductance and an applied current <inline-formula id="pcbi.1002628.e031"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e031" xlink:type="simple"/></inline-formula> (<inline-formula id="pcbi.1002628.e032"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e032" xlink:type="simple"/></inline-formula> and <inline-formula id="pcbi.1002628.e033"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e033" xlink:type="simple"/></inline-formula> are dummy variables that are 0 or 1 depending on their inclusion in a regime). The <inline-formula id="pcbi.1002628.e034"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e034" xlink:type="simple"/></inline-formula> are essentially sensitivities of the quasi-static resting potential of <inline-formula id="pcbi.1002628.e035"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e035" xlink:type="simple"/></inline-formula> with respect to changes in each other variable, and are available in explicit algebraic form. The ‘active’ set of variables in a regime can now be defined as <inline-formula id="pcbi.1002628.e036"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e036" xlink:type="simple"/></inline-formula> such that <inline-formula id="pcbi.1002628.e037"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e037" xlink:type="simple"/></inline-formula> for some user-defined scale tolerance <inline-formula id="pcbi.1002628.e038"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e038" xlink:type="simple"/></inline-formula>. A terminal event will indicate that a variable has left <inline-formula id="pcbi.1002628.e039"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e039" xlink:type="simple"/></inline-formula> during the regime when the above inequality becomes an equality (a zero-crossing), with a similar event for variables joining <inline-formula id="pcbi.1002628.e040"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e040" xlink:type="simple"/></inline-formula>. Post-processing of trajectories is required to determine exactly <italic>which</italic> variable left or joined <inline-formula id="pcbi.1002628.e041"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e041" xlink:type="simple"/></inline-formula> (see Supplemental <xref ref-type="supplementary-material" rid="pcbi.1002628.s001">Text S1</xref>).</p>
        <p>Dominant scale analysis of a periodic orbit indicated four reduced regimes that capture the essential dynamics of qualitatively distinct parts of the AP cycle relative to <inline-formula id="pcbi.1002628.e042"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e042" xlink:type="simple"/></inline-formula> <xref ref-type="bibr" rid="pcbi.1002628-Clewley7">[70]</xref>. The sub-models for the regimes do not need to be decomposed further into sub-models, and so are implemented by NonHybridModels containing single Generator objects. Each sub-model contains <inline-formula id="pcbi.1002628.e043"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e043" xlink:type="simple"/></inline-formula> and a different set of active inputs requiring ODEs for zero or more truly dynamic state variables, resulting in a DAE. The simplified equations and their consistency conditions form the scaffolding for this sub-model. There is no coupling to <inline-formula id="pcbi.1002628.e044"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e044" xlink:type="simple"/></inline-formula> from the variables not in the active set, but we must track any changes they make because they are ‘slaved’ to <inline-formula id="pcbi.1002628.e045"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e045" xlink:type="simple"/></inline-formula>. The validation method requires that we simulate the non-active ‘shadow variables’ in order to correctly determine when the sub-model's assumptions become inconsistent with the original model <xref ref-type="bibr" rid="pcbi.1002628-Clewley4">[44]</xref>. For this situation, PyDSTool naturally supports sub-models having differing dimension by allowing dummy variables to be included in a sub-model. Thus all sub-models must formally include all state variables in one form or other.</p>
        <p>Taken together as a hybrid model, the piecewise-local reductions form a formal hypothesis about the key mechanistic relationships between variables during an AP. The inferred mechanistic description is formalized as a sequence of domain and transition rules called a ‘template’ (e.g., see Table 1 of <xref ref-type="bibr" rid="pcbi.1002628-Clewley6">[46]</xref>). Such clear and specific insights give an advantage for hybrid modeling over other forms of model reduction. For parameters corresponding to a fast inhibitory interneuron, the trajectories computed with this hybrid model are almost indistinguishable from that of the full model over a wide range of applied currents. For instance, the periods of oscillation match closely (<xref ref-type="fig" rid="pcbi-1002628-g005">Figure 5</xref>) as <inline-formula id="pcbi.1002628.e046"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e046" xlink:type="simple"/></inline-formula> is increased, except around the onset of AP oscillations from a steady state (<inline-formula id="pcbi.1002628.e047"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e047" xlink:type="simple"/></inline-formula>. <xref ref-type="fig" rid="pcbi-1002628-g006">Figure 6</xref> summarizes the similarity of APs in a more sophisticated dominant scale analysis that determined hybrid models from four HH-type neurons all matching the same template, thereby validating the proposed mechanism <xref ref-type="bibr" rid="pcbi.1002628-Clewley6">[46]</xref>. Greater mismatches between reduced and original model trajectories indicate weakening self-consistency conditions in the reductions and provide a diagnostic focus for refinement of the mechanisms at work.</p>
        <fig id="pcbi-1002628-g005" orientation="portrait" position="float">
          <object-id pub-id-type="doi">10.1371/journal.pcbi.1002628.g005</object-id>
          <label>Figure 5</label>
          <caption>
            <title>AP firing period comparison.</title>
            <p>The graph compares the period of regular AP firing in the original Hodgkin-Huxley model (‘x’ markers) and the hybrid reduction (‘o’ markers) as a function of applied current <inline-formula id="pcbi.1002628.e048"><inline-graphic xlink:href="info:doi/10.1371/journal.pcbi.1002628.e048" xlink:type="simple"/></inline-formula>. Zero period indicates no APs (steady state).</p>
          </caption>
          <graphic mimetype="image" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.g005" xlink:type="simple"/>
        </fig>
        <fig id="pcbi-1002628-g006" orientation="portrait" position="float">
          <object-id pub-id-type="doi">10.1371/journal.pcbi.1002628.g006</object-id>
          <label>Figure 6</label>
          <caption>
            <title>Voltage trace fits for various hybrid AP models.</title>
            <p>Voltage traces versus time summarize the qualitative fit of four smooth biophysical models of APs (solid lines) with their hybrid counterparts (dashed lines). The four sub-model regimes of the AP are indicated with Roman numerals, with onsets indicated by solid square or circular markers. <bold>A</bold>) The fast interneuron model studied here. <bold>B</bold>) Original Hodgkin-Huxley parameters. <bold>C</bold>) A Wang-Buzsáki form of interneuron. <bold>D</bold>) A heart interneuron model with a larger set of sub-threshold and AP ionic currents. <italic>Adapted from Figure 7 of Clewley </italic><xref ref-type="bibr" rid="pcbi.1002628-Clewley6">[<italic>46</italic>]</xref><italic>, in which full model and analysis details can be found</italic>.</p>
          </caption>
          <graphic mimetype="image" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.g006" xlink:type="simple"/>
        </fig>
      </sec>
    </sec>
    <sec id="s5">
      <title>Availability and Future Directions</title>
      <p>The software and its source code are publicly available, anonymously and for free, under the BSD license: <ext-link ext-link-type="uri" xlink:href="http://sourceforge.net/projects/pydstool/" xlink:type="simple">http://sourceforge.net/projects/pydstool/</ext-link>. The download is accompanied by a test suite, documentation of the API, and a link to online documentation at <ext-link ext-link-type="uri" xlink:href="http://pydstool.sourceforge.net" xlink:type="simple">http://pydstool.sourceforge.net</ext-link>. Sourceforge provides user forums for feedback about software use, bug reporting, etc. Interfaces to specialized modeling and simulation packages will continue to be developed in collaboration with interested users.</p>
      <p>This work reinforces the idea that a reduction should take place in the <italic>context</italic> of a particular phenomenon that the model captures, and that constraints from that context can be imposed as part of a computational reduction process. The hybrid model reduction methodology has determined an <italic>explicit</italic> mechanistic model for the sodium and potassium dynamics of the action potential process using a sequence of low-dimensional approximations with no <italic>a priori</italic> assumptions or formal asymptotic limits. This decompositional approach is intended to facilitate a more sophisticated investigation of underlying mechanisms in complex dynamics than the comparatively naive approaches of brute-force parameter sweeps and large-scale simulation. It also expected to lead to more effective methods of <italic>designing</italic> complex dynamics in continuous dynamical systems.</p>
      <p>The design of PyDSTool facilitates qualitative and multi-objective optimization techniques, which are increasingly recognized as important aspects of biological modeling <xref ref-type="bibr" rid="pcbi.1002628-Guckenheimer1">[3]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Daniels1">[72]</xref>, <xref ref-type="bibr" rid="pcbi.1002628-Druckmann1">[73]</xref>. Work in progress extends the use of PyDSTool classes to develop the concept of scaffolding further into model optimization and analysis applications <xref ref-type="bibr" rid="pcbi.1002628-Clewley8">[74]</xref>.</p>
    </sec>
    <sec id="s6">
      <title>Supporting Information</title>
      <supplementary-material id="pcbi.1002628.s001" mimetype="application/pdf" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.s001" xlink:type="simple">
        <label>Text S1</label>
        <caption>
          <p>Tutorial for Hybrid Model Implementation in PyDSTool.</p>
          <p>(PDF)</p>
        </caption>
      </supplementary-material>
      <supplementary-material id="pcbi.1002628.s002" mimetype="application/pdf" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.s002" xlink:type="simple">
        <label>Text S2</label>
        <caption>
          <p>Syntax-highlighted code for the demonstration script IF_squarespike_model.py.</p>
          <p>(PDF)</p>
        </caption>
      </supplementary-material>
      <supplementary-material id="pcbi.1002628.s003" mimetype="application/pdf" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.s003" xlink:type="simple">
        <label>Text S3</label>
        <caption>
          <p>Syntax-highlighted code for the demonstration script HH_DSSRTtest.py.</p>
          <p>(PDF)</p>
        </caption>
      </supplementary-material>
      <supplementary-material id="pcbi.1002628.s004" mimetype="application/zip" orientation="portrait" position="float" xlink:href="info:doi/10.1371/journal.pcbi.1002628.s004" xlink:type="simple">
        <label>Text S4</label>
        <caption>
          <p>Complete source code for the PyDSTool package (version 0.88.120504). Includes API documentation and help files linking to web pages. This file is identical to the current public release on Sourceforge.net.</p>
          <p>(ZIP)</p>
        </caption>
      </supplementary-material>
    </sec>
  </body>
  <back>
    <ack>
      <p>I thank S. Nolen and the anonymous reviewers for their constructive comments.</p>
    </ack>
    <ref-list>
      <title>References</title>
      <ref id="pcbi.1002628-Beard1">
        <label>1</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Beard</surname><given-names>DA</given-names></name>, <name name-style="western"><surname>Bassingthwaighte</surname><given-names>JB</given-names></name>, <name name-style="western"><surname>Greene</surname><given-names>AS</given-names></name> (<year>2005</year>) <article-title>Computational modeling of physiological systems</article-title>. <source>Physiol Genomics</source> <volume>23</volume>: <fpage>1</fpage>–<lpage>3</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Csete1">
        <label>2</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Csete</surname><given-names>ME</given-names></name>, <name name-style="western"><surname>Doyle</surname><given-names>JC</given-names></name> (<year>2002</year>) <article-title>Reverse engineering of biological complexity</article-title>. <source>Science</source> <volume>295</volume>: <fpage>1664</fpage>–<lpage>1669</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Guckenheimer1">
        <label>3</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Guckenheimer</surname><given-names>J</given-names></name> (<year>1998</year>) <article-title>Numerical computation in the information age</article-title>. <source>Computing Research News</source> <volume>10</volume>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley1">
        <label>4</label>
        <mixed-citation publication-type="other" xlink:type="simple">Clewley RH, Sherwood WE, LaMar MD, Guckenheimer JM (2007) PyDSTool, a software environment for dynamical systems modeling. Available: <ext-link ext-link-type="uri" xlink:href="http://pydstool.sourceforge.net" xlink:type="simple">http://pydstool.sourceforge.net</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Carnevale1">
        <label>5</label>
        <mixed-citation publication-type="other" xlink:type="simple">Carnevale NT, Hines ML (2006) The NEURON Book. Cambridge University Press.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Neural1">
        <label>6</label>
        <mixed-citation publication-type="other" xlink:type="simple">Neural simulation technology (NEST). Available: <ext-link ext-link-type="uri" xlink:href="http://www.nest-initiative.org" xlink:type="simple">http://www.nest-initiative.org</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Schaff1">
        <label>7</label>
        <mixed-citation publication-type="other" xlink:type="simple">Schaff J, Loew LM (1999) The virtual cell. In: Biocomputing: Proceedings of the 1999 Pacific Symposium. Altman RB, et al., editors. Singapore: World Scientific. 228–239.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-BioSPICE1">
        <label>8</label>
        <mixed-citation publication-type="other" xlink:type="simple"><article-title>Bio-SPICE simulation program</article-title>. Available: <ext-link ext-link-type="uri" xlink:href="http://biospice.sourceforge.net" xlink:type="simple">http://biospice.sourceforge.net</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Ermentrout1">
        <label>9</label>
        <mixed-citation publication-type="other" xlink:type="simple">Ermentrout GB (2002) Simulating, Analyzing, and Animating Dynamical Systems: A Guide to XPPAUT for Researchers and Students. Philadelphia: SIAM.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Back1">
        <label>10</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Back</surname><given-names>A</given-names></name>, <name name-style="western"><surname>Guckenheimer</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Myers</surname><given-names>M</given-names></name>, <name name-style="western"><surname>Wicklin</surname><given-names>F</given-names></name>, <name name-style="western"><surname>Worfolk</surname><given-names>P</given-names></name> (<year>1992</year>) <article-title>DsTool: Computer assisted exploration of dynamical systems</article-title>. <source>Notices Amer Math Soc</source> <volume>39</volume>: <fpage>303</fpage>–<lpage>309</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Kuznetsov1">
        <label>11</label>
        <mixed-citation publication-type="other" xlink:type="simple">Kuznetsov YA (1998) CONTENT – integrated environment for analysis of dynamical systems. tutorial. Technical Report UPMA-98-224, Ecole Normale Superieure de Lyon.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-The1">
        <label>12</label>
        <mixed-citation publication-type="other" xlink:type="simple">The MathWorks. MATLAB and Simulink for technical computing. Available: <ext-link ext-link-type="uri" xlink:href="http://www.mathworks.com" xlink:type="simple">http://www.mathworks.com</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Jones1">
        <label>13</label>
        <mixed-citation publication-type="other" xlink:type="simple">Jones E, Oliphant T, Peterson P, et al. (2001) SciPy: Open source scientific tools for Python. Available: <ext-link ext-link-type="uri" xlink:href="http://www.scipy.org/" xlink:type="simple">http://www.scipy.org/</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Commission1">
        <label>14</label>
        <mixed-citation publication-type="other" xlink:type="simple">Commission on Physical Sciences, Mathematics, and Applications (1991) Mathematical Foundations of High-Performance Computing and Communications. National Academy Press.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-National1">
        <label>15</label>
        <mixed-citation publication-type="other" xlink:type="simple">National Research Council of the National Academies (2005) Mathematics and 21st Century Biology. National Academy Press.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Muhanna1">
        <label>16</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Muhanna</surname><given-names>WA</given-names></name>, <name name-style="western"><surname>Pick</surname><given-names>RA</given-names></name> (<year>1994</year>) <article-title>Meta-modeling concepts and tools for model management: A systems approach</article-title>. <source>Manage Sci</source> <volume>40</volume>: <fpage>1093</fpage>–<lpage>1123</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-The2">
        <label>17</label>
        <mixed-citation publication-type="other" xlink:type="simple">The Eclipse Foundation. Eclipse modeling framework project. Available: <ext-link ext-link-type="uri" xlink:href="http://www.eclipse.org/modeling/emf/" xlink:type="simple">http://www.eclipse.org/modeling/emf/</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Davidson1">
        <label>18</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Davidson</surname><given-names>S</given-names></name>, <name name-style="western"><surname>Cohen-Boulakia</surname><given-names>S</given-names></name>, <name name-style="western"><surname>Eyal</surname><given-names>A</given-names></name>, <name name-style="western"><surname>Ludäscher</surname><given-names>B</given-names></name>, <name name-style="western"><surname>McPhillips</surname><given-names>T</given-names></name>, <etal>et al</etal>. (<year>2007</year>) <article-title>Provenance in scientific workow systems</article-title>. <source>IEEE Data Eng Bull</source> <volume>30</volume>: <fpage>44</fpage>–<lpage>50</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Grlach1">
        <label>19</label>
        <mixed-citation publication-type="other" xlink:type="simple">Görlach K, Sonntag M, Karastoyanova D, Leymann F, Reiter M (2011) Conventional workow technology for scientific simulation. In: Guide to e-science. Yang X, Wang L, Jie W, editors. Springer-Verlag.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-The3">
        <label>20</label>
        <mixed-citation publication-type="other" xlink:type="simple">The myGrid team. Taverna: open source and domain independent workow management system. Available: <ext-link ext-link-type="uri" xlink:href="http://www.taverna.org.uk" xlink:type="simple">http://www.taverna.org.uk</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Abelson1">
        <label>21</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Abelson</surname><given-names>H</given-names></name> (<year>1990</year>) <article-title>The bifurcation interpreter: a step towards the automatic analysis of dynamical systems</article-title>. <source>Computers Math Applic</source> <volume>20</volume>: <fpage>13</fpage>–<lpage>35</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Bradley1">
        <label>22</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Bradley</surname><given-names>E</given-names></name>, <name name-style="western"><surname>Easley</surname><given-names>M</given-names></name>, <name name-style="western"><surname>Stolle</surname><given-names>R</given-names></name> (<year>2001</year>) <article-title>Reasoning about nonlinear system identification</article-title>. <source>Artif Intell</source> <volume>133</volume>: <fpage>139</fpage>–<lpage>188</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Bratko1">
        <label>23</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Bratko</surname><given-names>I</given-names></name>, <name name-style="western"><surname>Suc</surname><given-names>D</given-names></name> (<year>2003</year>) <article-title>Learning qualitative models</article-title>. <source>AI Mag</source> <volume>24</volume>: <fpage>107</fpage>–<lpage>119</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Coiera1">
        <label>24</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Coiera</surname><given-names>E</given-names></name> (<year>1992</year>) <article-title>The qualitative representation of physical systems</article-title>. <source>Know Eng Rev</source> <volume>7</volume>: <fpage>55</fpage>–<lpage>77</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Chou1">
        <label>25</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Chou</surname><given-names>IC</given-names></name>, <name name-style="western"><surname>Voit</surname><given-names>E</given-names></name> (<year>2009</year>) <article-title>Recent developments in parameter estimation and structure identification in biochemical and genomic systems</article-title>. <source>Math Biosci</source> <volume>219</volume>: <fpage>57</fpage>–<lpage>83</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Fishwick1">
        <label>26</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Fishwick</surname><given-names>PA</given-names></name>, <name name-style="western"><surname>Narayanan</surname><given-names>NH</given-names></name>, <name name-style="western"><surname>Sticklen</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Bonarini</surname><given-names>A</given-names></name> (<year>1994</year>) <article-title>A multimodel approach to reasoning and simulation</article-title>. <source>IEEE Trans Sys Man Cyber</source> <volume>24</volume>: <fpage>1433</fpage>–<lpage>1449</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-GomezCabrero1">
        <label>27</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Gomez-Cabrero</surname><given-names>D</given-names></name>, <name name-style="western"><surname>Compte</surname><given-names>A</given-names></name>, <name name-style="western"><surname>Tegner</surname><given-names>J</given-names></name> (<year>2011</year>) <article-title>Workow for generating competing hypotheses from models with parameter uncertainty</article-title>. <source>Interface Focus</source> <volume>1</volume>: <fpage>438</fpage>–<lpage>449</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Lee1">
        <label>28</label>
        <mixed-citation publication-type="other" xlink:type="simple">Lee WW, Kuipers B (1993) A qualitative method to construct phase portraits. In: National Conference on Artificial Intelligence (AAAI-93). Menlo Park, Calif.: American Association for Artificial Intelligence. 614–619.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Li1">
        <label>29</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Li</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Kevrekidis</surname><given-names>PG</given-names></name>, <name name-style="western"><surname>Gear</surname><given-names>CW</given-names></name>, <name name-style="western"><surname>Kevrekidis</surname><given-names>IG</given-names></name> (<year>2007</year>) <article-title>Deciding the nature of the coarse equation through microscopic simulations: The baby-bathwater scheme</article-title>. <source>SIAM Rev</source> <volume>49</volume>: <fpage>469</fpage>–<lpage>487</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Talbi1">
        <label>30</label>
        <mixed-citation publication-type="other" xlink:type="simple">Talbi EG (2009) Metaheuristics: From Design to Implementation. New York: Wiley.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Yip1">
        <label>31</label>
        <mixed-citation publication-type="other" xlink:type="simple">Yip K (1987) Extracting qualitative dynamics from numerical experiments. In: National Conference on Artificial Intelligence (AAAI-87). Menlo Park, Calif.: American Association for Artificial Intelligence. 665–670.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley2">
        <label>32</label>
        <mixed-citation publication-type="other" xlink:type="simple">Clewley R (2010) PyDSTool Project Overview. Available: <ext-link ext-link-type="uri" xlink:href="http://www.ni.gsu.edu/~rclewley/PyDSTool/ProjectOverview.html" xlink:type="simple">http://www.ni.gsu.edu/~rclewley/PyDSTool/ProjectOverview.html</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Cornhill1">
        <label>33</label>
        <mixed-citation publication-type="other" xlink:type="simple">Cornhill JM, Testud P (2001) An Introduction to Maple V. Berlin: Springer.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Wolfram1">
        <label>34</label>
        <mixed-citation publication-type="other" xlink:type="simple">Wolfram Research. Mathematica. Available: <ext-link ext-link-type="uri" xlink:href="http://www.wolfram.com/mathematica/" xlink:type="simple">http://www.wolfram.com/mathematica/</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Goodman1">
        <label>35</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Goodman</surname><given-names>DFM</given-names></name>, <name name-style="western"><surname>Brette</surname><given-names>R</given-names></name> (<year>2009</year>) <article-title>The Brian simulator</article-title>. <source>Front Neurosci</source> <volume>3</volume>: <fpage>192</fpage>–<lpage>197</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Olivier1">
        <label>36</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Olivier</surname><given-names>BG</given-names></name>, <name name-style="western"><surname>Rohwer</surname><given-names>JM</given-names></name>, <name name-style="western"><surname>Hofmeyr</surname><given-names>JHS</given-names></name> (<year>2004</year>) <article-title>Modelling cellular systems with PySCeS</article-title>. <source>Bioinformatics</source> <volume>21</volume>: <fpage>560</fpage>–<lpage>561</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Carloni1">
        <label>37</label>
        <mixed-citation publication-type="other" xlink:type="simple">Carloni L, DiBenedetto M, Pinto A, Sangiovanni-Vincentelli A (2004) Modeling techniques, programming languages, and design toolsets for hybrid systems. Technical report, IST-2001-38314 WPHS, Columbus Project.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Rathinam1">
        <label>38</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Rathinam</surname><given-names>M</given-names></name>, <name name-style="western"><surname>Petzold</surname><given-names>LR</given-names></name> (<year>2003</year>) <article-title>A new look at proper orthogonal decomposition</article-title>. <source>SIAM J Numer Anal</source> <volume>41</volume>: <fpage>1893</fpage>–<lpage>1925</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Bose1">
        <label>39</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Bose</surname><given-names>A</given-names></name>, <name name-style="western"><surname>Manor</surname><given-names>Y</given-names></name>, <name name-style="western"><surname>Nadim</surname><given-names>F</given-names></name> (<year>2001</year>) <article-title>Bistable oscillations arising from synaptic depression</article-title>. <source>SIAM J Appl Math</source> <volume>62</volume>: <fpage>706</fpage>–<lpage>727</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley3">
        <label>40</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Clewley</surname><given-names>R</given-names></name> (<year>2011</year>) <article-title>Inferring and quantifying the role of an intrinsic current in a mechanism for a half-center bursting oscillation: A dominant scale and hybrid dynamical systems analysis</article-title>. <source>J Biol Phys</source> <volume>37</volume>: <fpage>285</fpage>–<lpage>306</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Ermentrout2">
        <label>41</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Ermentrout</surname><given-names>GB</given-names></name>, <name name-style="western"><surname>Kopell</surname><given-names>N</given-names></name> (<year>1998</year>) <article-title>Fine structure of neural spiking and synchronization in the presence of conduction delays</article-title>. <source>Proc Nat Acad Sci U S A</source> <volume>95</volume>: <fpage>1259</fpage>–<lpage>1264</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Spardy1">
        <label>42</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Spardy</surname><given-names>L</given-names></name>, <name name-style="western"><surname>Markin</surname><given-names>SN</given-names></name>, <name name-style="western"><surname>Shevtsova</surname><given-names>NA</given-names></name>, <name name-style="western"><surname>Prilutsky</surname><given-names>BI</given-names></name>, <name name-style="western"><surname>Rybak</surname><given-names>IA</given-names></name>, <etal>et al</etal>. (<year>2011</year>) <article-title>A dynamical systems analysis of afferent control in a neuromechanical model of locomotion: I. rhythm generation</article-title>. <source>J Neural Eng</source> <volume>8</volume>: <fpage>065003</fpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Edwards1">
        <label>43</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Edwards</surname><given-names>D</given-names></name> (<year>2010</year>) <article-title>Neuromechanical simulation</article-title>. <source>Front Behav Neurosci 4: pii</source> <fpage>40</fpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley4">
        <label>44</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Clewley</surname><given-names>R</given-names></name>, <name name-style="western"><surname>Rotstein</surname><given-names>HG</given-names></name>, <name name-style="western"><surname>Kopell</surname><given-names>N</given-names></name> (<year>2005</year>) <article-title>A computational tool for the reduction of nonlinear ODE systems possessing multiple scales</article-title>. <source>Multiscale Model Simul</source> <volume>4</volume>: <fpage>732</fpage>–<lpage>759</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley5">
        <label>45</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Clewley</surname><given-names>R</given-names></name>, <name name-style="western"><surname>Soto-Treviño</surname><given-names>C</given-names></name>, <name name-style="western"><surname>Nadim</surname><given-names>F</given-names></name> (<year>2009</year>) <article-title>Dominant ionic mechanisms explored in the transition between spiking and bursting using local low-dimensional reductions of a biophysically realistic model neuron</article-title>. <source>J Comput Neurosci</source> <volume>26</volume>: <fpage>75</fpage>–<lpage>90</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley6">
        <label>46</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Clewley</surname><given-names>R</given-names></name> (<year>2010</year>) <article-title>Encoding the fine-structured mechanism of action potential dynamics with qualitative motifs</article-title>. <source>J Comput Neurosci</source> <volume>30</volume>: <fpage>391</fpage>–<lpage>408</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Lincoln1">
        <label>47</label>
        <mixed-citation publication-type="other" xlink:type="simple">Lincoln P, Tiwari A (2004) Symbolic systems biology: Hybrid modeling and analysis of biological networks. In: Hybrid Systems: Computation and Control HSCC. Alur R, Pappas G, editors. Springer. 660–672.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Deuhard1">
        <label>48</label>
        <mixed-citation publication-type="other" xlink:type="simple">Deuhard P, Heroth J (1996) Dynamic dimension reduction in ODE models. In: Scientific Computing in Chemical Engineering. Keil F, Mackens W, Voß H, Werther J, editors. Springer-Verlag. 29–43.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Jones2">
        <label>49</label>
        <mixed-citation publication-type="other" xlink:type="simple">Jones C (1994) Geometric singular perturbation theory. In: Dynamical systems. Montecatini Terme. Arnold L, editor. Dynamical systems.Montecatini Terme, Berlin: Springer-Verlag, Lecture notes in mathematics. 44–118.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Maas1">
        <label>50</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Maas</surname><given-names>U</given-names></name>, <name name-style="western"><surname>Pope</surname><given-names>SB</given-names></name> (<year>1992</year>) <article-title>Simplifying chemical kinetics: Intrinsic low dimensional manifolds in composition space</article-title>. <source>Combust Flame</source> <volume>88</volume>: <fpage>239</fpage>–<lpage>264</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Hodgkin1">
        <label>51</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Hodgkin</surname><given-names>AL</given-names></name>, <name name-style="western"><surname>Huxley</surname><given-names>AF</given-names></name> (<year>1952</year>) <article-title>Currents carried by sodium and potassium ions through the membrane of the giant axon of Loligo</article-title>. <source>J Physiol</source> <volume>117</volume>: <fpage>500</fpage>–<lpage>544</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Hong1">
        <label>52</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Hong</surname><given-names>T</given-names></name>, <name name-style="western"><surname>Xing</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Li</surname><given-names>L</given-names></name>, <name name-style="western"><surname>Tyson</surname><given-names>JJ</given-names></name> (<year>2011</year>) <article-title>A mathematical model for the reciprocal differentiation of T helper 17 cells and induced regulatory T cells</article-title>. <source>PLoS Comput Biol</source> <volume>7</volume>: <fpage>e1002122</fpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Kidd1">
        <label>53</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Kidd</surname><given-names>PB</given-names></name>, <name name-style="western"><surname>Wingreen</surname><given-names>NS</given-names></name> (<year>2010</year>) <article-title>Modeling the role of covalent enzyme modification in Escherichia coli nitrogen metabolism</article-title>. <source>Phys Biol</source> <volume>7</volume>: <fpage>16006</fpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Oliphant1">
        <label>54</label>
        <mixed-citation publication-type="other" xlink:type="simple">Oliphant TE (2006) Guide to NumPy. Provo, UT. Available: <ext-link ext-link-type="uri" xlink:href="http://www.tramy.us/. Accessed 10 June 2012" xlink:type="simple">http://www.tramy.us/. Accessed 10 June 2012</ext-link>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Hunter1">
        <label>55</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Hunter</surname><given-names>JD</given-names></name> (<year>2007</year>) <article-title>Matplotlib: A 2D graphics environment</article-title>. <source>Comput Sci Eng</source> <volume>9</volume>: <fpage>90</fpage>–<lpage>95</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Doedel1">
        <label>56</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Doedel</surname><given-names>E</given-names></name>, <name name-style="western"><surname>Keller</surname><given-names>HB</given-names></name>, <name name-style="western"><surname>Kernevez</surname><given-names>JP</given-names></name> (<year>1991</year>) <article-title>Auto</article-title>. <source>Int J Bifurc Chaos</source> <volume>1</volume>: <fpage>493</fpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Guckenheimer2">
        <label>57</label>
        <mixed-citation publication-type="other" xlink:type="simple">Guckenheimer J, Holmes P (1983) Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields. Applied Mathematical Sciences. New York: Springer-Verlag.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Hairer1">
        <label>58</label>
        <mixed-citation publication-type="other" xlink:type="simple">Hairer E, Nørsett SP, Wanner G (1993) Solving ordinary differential equations I: Nonstiff Problems. Berlin: Springer-Verlag.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Hindmarsh1">
        <label>59</label>
        <mixed-citation publication-type="other" xlink:type="simple">Hindmarsh AC, Serban R (2008) User documentation for CVODE v2.6.0. Technical Report UCRLSM- 208108, LLNL.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Myers1">
        <label>60</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Myers</surname><given-names>CR</given-names></name>, <name name-style="western"><surname>Gutenkunst</surname><given-names>RN</given-names></name>, <name name-style="western"><surname>Sethna</surname><given-names>JP</given-names></name> (<year>2007</year>) <article-title>Python unleashed on systems biology</article-title>. <source>Comput Sci Eng</source> <volume>9</volume>: <fpage>34</fpage>–<lpage>37</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Hucka1">
        <label>61</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Hucka</surname><given-names>M</given-names></name>, <name name-style="western"><surname>Finney</surname><given-names>A</given-names></name>, <name name-style="western"><surname>Sauro</surname><given-names>HM</given-names></name>, <name name-style="western"><surname>Bolouri</surname><given-names>H</given-names></name>, <name name-style="western"><surname>Doyle</surname><given-names>JC</given-names></name>, <etal>et al</etal>. (<year>2003</year>) <article-title>The systems biology markup language (SBML): A medium for representation and exchange of biochemical network models</article-title>. <source>Bioinformatics</source> <volume>9</volume>: <fpage>524</fpage>–<lpage>531</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-INCF1">
        <label>62</label>
        <mixed-citation publication-type="other" xlink:type="simple">INCF Multiscale Modeling Task Force (2011) NineML. Available: <ext-link ext-link-type="uri" xlink:href="http://software.incf.org/software/nineml" xlink:type="simple">http://software.incf.org/software/nineml</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-INCF2">
        <label>63</label>
        <mixed-citation publication-type="other" xlink:type="simple">INCF Multiscale Modeling Task Force (2011) Python API for NineML. Available: <ext-link ext-link-type="uri" xlink:href="http://phobos.incf.ki.se/" xlink:type="simple">http://phobos.incf.ki.se/</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Guckenheimer3">
        <label>64</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Guckenheimer</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Meloon</surname><given-names>B</given-names></name> (<year>2000</year>) <article-title>Computing periodic orbits and their bifurcations with automatic differentiation</article-title>. <source>SIAM J Sci Stat Comp</source> <volume>22</volume>: <fpage>951</fpage>–<lpage>985</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Simic1">
        <label>65</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Simic</surname><given-names>SN</given-names></name>, <name name-style="western"><surname>Johansson</surname><given-names>KH</given-names></name>, <name name-style="western"><surname>Lygeros</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Sastry</surname><given-names>S</given-names></name> (<year>2005</year>) <article-title>Towards a geometric theory of hybrid systems</article-title>. <source>Dynam Contin Discrete Impuls Systems, Series B</source> <volume>12</volume>: <fpage>649</fpage>–<lpage>687</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Lapique1">
        <label>66</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Lapique</surname><given-names>L</given-names></name> (<year>1907</year>) <article-title>Recherches quantitatives sur l'excitation électriques des nerfs traitée comme une polarization</article-title>. <source>J Physiol Pathol Gen</source> <volume>9</volume>: <fpage>620</fpage>–<lpage>635</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Levin1">
        <label>67</label>
        <mixed-citation publication-type="other" xlink:type="simple">Levin M (1998) Combinatorial Engineering of Decomposable Systems. New York: Springer.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Dill1">
        <label>68</label>
        <mixed-citation publication-type="other" xlink:type="simple">Dill DL, Lincoln P (2003) Evolution as design engineer. In: Computational Methods in Systems Biology, First International Workshop, CMSB 2003. Priami C, editor. Springer. 202–206.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Voit1">
        <label>69</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Voit</surname><given-names>EO</given-names></name>, <name name-style="western"><surname>Ferreira</surname><given-names>AEN</given-names></name> (<year>1998</year>) <article-title>Buffering in models of integrated biochemical systems</article-title>. <source>J Theor Biol</source> <volume>191</volume>: <fpage>429</fpage>–<lpage>438</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley7">
        <label>70</label>
        <mixed-citation publication-type="other" xlink:type="simple">Clewley R (2004) Dominant-scale analysis for the automatic reduction of high-dimensional ODE systems. In: ICCS 2004 Proceedings. New England Complex Systems Institute. Minai A, Bar-Yam Y, editors. Boston, MA. Available: <ext-link ext-link-type="uri" xlink:href="http://necsi.org/events/iccs/openconf/author/papers/f237.pdf" xlink:type="simple">http://necsi.org/events/iccs/openconf/author/papers/f237.pdf</ext-link>. Accessed 10 June 2012.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Suckley1">
        <label>71</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Suckley</surname><given-names>R</given-names></name>, <name name-style="western"><surname>Biktashev</surname><given-names>V</given-names></name> (<year>2003</year>) <article-title>The asymptotic structure of the Hodgkin-Huxley equations</article-title>. <source>Int J Bifurc Chaos</source> <volume>13</volume>: <fpage>3805</fpage>–<lpage>3826</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Daniels1">
        <label>72</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Daniels</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Anderson</surname><given-names>EW</given-names></name>, <name name-style="western"><surname>Nonato</surname><given-names>LG</given-names></name>, <name name-style="western"><surname>Silva</surname><given-names>CT</given-names></name> (<year>2010</year>) <article-title>Interactive vector field feature identification</article-title>. <source>IEEE Trans Vis Comput Graph</source> <volume>16</volume>: <fpage>1560</fpage>–<lpage>8</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Druckmann1">
        <label>73</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Druckmann</surname><given-names>S</given-names></name>, <name name-style="western"><surname>Banitt</surname><given-names>Y</given-names></name>, <name name-style="western"><surname>Gidon</surname><given-names>A</given-names></name>, <name name-style="western"><surname>Schurmann</surname><given-names>F</given-names></name>, <name name-style="western"><surname>Markram</surname><given-names>H</given-names></name>, <etal>et al</etal>. (<year>2007</year>) <article-title>A novel multiple objective optimization framework for constraining conductance-based neuron models a novel multiple objective optimization framework for constraining conductance-based neuron models by experimental data</article-title>. <source>Front Neurosci</source> <volume>1</volume>: <fpage>7</fpage>–<lpage>18</lpage>.</mixed-citation>
      </ref>
      <ref id="pcbi.1002628-Clewley8">
        <label>74</label>
        <mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Clewley</surname><given-names>R</given-names></name>, <name name-style="western"><surname>Dobric</surname><given-names>M</given-names></name> (<year>2010</year>) <article-title>A qualitative optimization technique for biophysical neuron models with many parameters</article-title>. <source>BMC Neurosci</source> (<supplement>Suppl 1</supplement>) <fpage>P39</fpage>.</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>