Abstract
Objective. We present a computational method that implements a reduced set of Maxwell's equations to allow simulation of cells under realistic conditions: sub-micron cell morphology, a conductive non-homogeneous space and various ion channel properties and distributions. Approach. While a reduced set of Maxwell's equations can be used to couple membrane currents to extra- and intracellular potentials, this approach is rarely taken, most likely because adequate computational tools are missing. By using these equations, and introducing an implicit solver, numerical stability is attained even with large time steps. The time steps are limited only by the time development of the membrane potentials. Main results. This method allows simulation times of tens of minutes instead of weeks, even for complex problems. The extracellular fields are accurately represented, including secondary fields, which originate at inhomogeneities of the extracellular space and can reach several millivolts. We present a set of instructive examples that show how this method can be used to obtain reference solutions for problems, which might not be accurately captured by the traditional approaches. This includes the simulation of realistic magnitudes of extracellular action potential signals in restricted extracellular space. Significance. The electric activity of neurons creates extracellular potentials. Recent findings show that these endogenous fields act back onto the neurons, contributing to the synchronization of population activity. The influence of endogenous fields is also relevant for understanding therapeutic approaches such as transcranial direct current, transcranial magnetic and deep brain stimulation. The mutual interaction between fields and membrane currents is not captured by today's concepts of cellular electrophysiology, including the commonly used activation function, as those concepts are based on isolated membranes in an infinite, isopotential extracellular space. The presented tool makes simulations with detailed morphology and implicit interactions of currents and fields available to the electrophysiology community.
Export citation and abstract BibTeX RIS
Content from this work may be used under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
1. Introduction
Extracellular potentials (EPs) influence the activity of neurons [1–3]. Neuronal activity itself, synaptic currents, sub-threshold oscillations and action currents sum up over neuronal populations and continuously change local potentials. Recent findings contribute to the mounting evidence that these endogenous EPs talk back to neurons and influence synchronization of firing patterns in vitro and in vivo [4–6]. Moreover, in therapy and diagnostics, strong, super-threshold fields are used in the form of electroconvulsive therapy, transcranial magnetic stimulation or deep brain stimulation to activate large populations of neurons [7–9]. Recently, techniques that utilize weaker, sub-threshold fields such as direct current stimulation or alternating current stimulation have been developed [10, 11] and were reported to influence motor cortex excitability and higher functions like motor learning or memory [12–14].
Although a number of modeling tools have been introduced to study the interaction of EPs and neurons [15–20], new research tools are required to more accurately model this relation. In some applications, it is enough to calculate the EP waveform from a given number of neuronal sources [21], or to simply study the unidirectional effects of EPs [22–24]. However, for key applications such as understanding of how local potentials facilitate the synchronization of cell ensembles, or to model simultaneous stimulation and recording in complex geometrical setups (e.g. multi-unit arrays and novel brain–machine interfaces [25–28]), it is important to understand both directions of the neuron–EP interplay [29, 20].
When the 'forward' effect, i.e. the creation of EPs by neuronal activity, is of interest, EPs are calculated with the line-source approximation [17]: the membrane currents are computed for each linear segment of a one-dimensional compartmental neuron model. These currents are then used to calculate the EP according to standard volume conductor theory [29–31]. This approach does not consider the feedback from EPs in the neuron and its applicability is limited to locations farther than 1 µm away from the active membrane [17]. Interactions between adjacent cells within sub-micrometer distance and the effect of clustering of ion channels cannot be treated. Furthermore, volume conductor theory assumes the extracellular medium to be homogeneous and isotropic. This ignores the strong secondary fields [32] caused by the inhomogeneities due to the cellular structure of tissues. Secondary fields can give rise to the so-called virtual electrodes, and can dominate the effect of EPs on excitable tissue [33]. Secondary fields at tissue boundaries are sometimes considered, both for stimulation (e.g. [34, 35]) and endogenous extracellular fields [36].
To simulate the 'feedback' effect, i.e. the changes in the cell caused by EPs, similar principles are connected in a different sequence. The EP is computed from external current sources while assuming piecewise homogeneity, hence ignoring the possibility of virtual electrodes on cellular scales. Neurons are then represented by a concatenation of one-dimensional cables and the effect of the EP is included by means of the activation function [15] as an additional source term in the cable equation (CEq) [37]. In finite cables, this effect is calculated by projecting the extracellular field onto the axis of the cables, and the stimulation itself is emulated by current injection in the ends [38–41].
The activating function is an approximation whose utility has been questioned [42, 43]. As it simply acts as an additional source term in the CEq, its applicability is also limited to particular geometries. A simple illustration of the problem is its inability to properly represent a spherical cell body inside a homogeneous field. To compute the effect, the sphere has to be approximated by cylindrical sections. When the field is directed perpendicular to the cylinders' axes, this does not exert any influence on the cell body (see figure 5). The simulated effect of the EP on this symmetric structure erroneously depends on the cosine of the polar angle of the field direction.
A correct solution of the forward and feedback problem in the neuron–EP interaction requires a complete spatial representation of the neuronal membrane and its relation to the intra- and extracellular potentials. This comprises a self-consistent solution of the Laplace equation governing the potential and the nonlinear equations that determine the voltage-dependent membrane currents (i.e. the sources of the potential changes). The solution to the Laplace equation for arbitrary geometries can be achieved with finite difference method (FDM), boundary element method (BEM), finite volume method (FVM), or finite element method (FEM). A numerical time iteration scheme then has to be selected to model the evolution of the potentials.
FEM and related methods have been used to model the stimulation of arbitrarily shaped cells for studies of the effects of electroporation, as well as to model simple neuronal geometries [16, 18, 44, 20, 45]. These approaches have however failed to provide a widely available tool that can fully model the neuron–EP bidirectional interaction. The deficiencies can be summarized in three aspects: computational limitations to represent detailed geometries, lack of efficient time evolution schemes and the use of closed and commercial numerical solvers. FDM approaches such as those described in [44] represent geometries in meshes with a fixed-grid spacing determined by the smallest feature in the domain. Due to the very large number of elements, the computation time of these simulations is impractically long for realistic, sub-micrometer morphological features. BEM approaches [46, 47], although more computationally efficient, cannot represent spatially heterogeneous conductivities. FEM and FVM have been employed in other cases [16, 18, 20, 48, 45], but these systems have been limited to unrealistic spatial scales [19, 48], restrictive time evolution schemes [16, 18, 19, 48, 45], two dimensions [18] and the absence of ion channels [16, 18, 19, 45]. The use of closed source [18, 19, 48] and commercial software [16, 20, 45] is a common feature among all these works, hindering its applicability and replicability of their results in other scientific studies.
The importance of computationally efficient methods is emphasized if the details of neuronal geometries are considered, e.g. in fine distal dendrites, or the sub-micrometer distances between cells. In the two-dimensional simulations of Ying and Henriquez [18] for instance, the explicit Euler method was used. The explicit Euler method requires extremely fine time steps for micrometer geometries, limiting the physiological times that can be simulated. These requirements become more stringent as the geometry is extended to three dimensions and the complexity of the spatial domain increases. Besides the realistic, true sub-micron distances fundamental for the study of cell-to-cell interaction, times beyond a few milliseconds are crucial for the study of neuronal synchronization and more complex stimulation protocols. To our knowledge, such simulations have not been performed, most likely because of the large computation time involved.
In this work, we present a numerical method for the treatment of heterogeneous, three-dimensional, intra- and extracellular spaces separated by membranes with voltage-dependent conductances. To permit efficient simulation of detailed geometries, two main strategies are used: first, the equations governing the time evolution of the electric potential in space were separated from the nonlinear equations that treat the membrane currents. This follows the ideas of heart bidomain solvers [49] and a previous approach [18]. Second, an implicit time iteration scheme based on the Crank–Nicolson (CN) method is introduced. This scheme allows simulation time steps which are orders of magnitude longer than the Euler scheme, without causing numerical instabilities. The use of this implicit method also grants applicability of adaptive time-step schemes, shortening computation times by one to two orders of magnitude.
The FEM presented here has been implemented in an open-source software tool. The tool can run simulations that extend over physiologically relevant times (tens to hundreds of microseconds), can allow the representation of detailed sub-micrometer cell morphologies and can include ion channels with arbitrary voltage-dependent gating schemes. The tool can represent stimulation, recording and feedback between extracellular fields and the membrane at realistic spatial and temporal scales. In the next sections, we introduce the physical model and provide essential details of the solving procedure. Treating standard geometries, we demonstrate that the numerical solutions with the method converge to the analytical solutions. We present stability conditions for the numerical scheme chosen, describing the time-step limits for a given spatial discretization. Finally, we point out that the presented approach can treat problems that are only inadequately captured by the CEq, activation function and line-source approximations. This suggests a use of our tool as a reference to test and correct the solutions obtained by widely used CEq solvers such as NEURON and GENESIS. By working through a set of instructive examples, we demonstrate the importance of simulating neurons with realistic time and space scales. The tool is available for download under the project Cancer, Heart and Soft-Tissue Environment (CHASTE) [50] (http://www.cs.ox.ac.uk/chaste).
2. Methods
2.1. Description of the model
The model represents the electrical activity of a biological cell inside a conductive medium (figure 1(A)). Space is segregated into an extracellular domain Ωe and possibly multiple intracellular domains Ωi (Ω = Ωe∪Ωi). The domains do not overlap (Ωe∩Ωi = ∅) and are each characterized by space-dependent conductivity tensors σe and σi. Unit normal vectors at domain boundaries point outward and are denoted ne, i. Intra- and extracellular domains are separated by membranes Γ, assumed of zero thickness. Membranes accumulate charge due to capacitance and can harbor voltage-dependent ion channels. The voltage channels can follow nonlinear differential equations, for instance, Hodgkin–Huxley-like kinetics.
For neural electric phenomena, a few simplifications in Maxwell's equations are possible. Typical spatial and temporal dimensions of neural current fluxes, together with the dielectric and magnetic parameters of biological media, render the feedback from the induced magnetic field onto the electric field negligible. Electromagnetic waves do not play an important role in the scales observed. The high polarizability of water, combined with the typical conductance of biological tissue, ensures that any free, unbalanced charge is balanced within fractions of a nanosecond. This is faster than the scale at which the electric processes of interest unfold.
These two relations justify the use of the quasi-static approximation of Maxwell's equations. In this approximation, the charge density in aqueous media is assumed to be zero [51, 52]. This however does not exclude the possibility of current volume density sources, and they are allowed in the extra- and intracellular spaces (ρe, i). In the quasi-static approximation, Poisson's equation governs the extra- and intracellular potentials Φe, i:
In the absence of current sources, this simplifies to Laplace's equation
On the exterior boundary ∂Ωe, Dirichlet, Neumann or a mixture of both boundary conditions (BCs) can be applied (figures 1(B) and (C)):
If a grounding Dirichlet boundary is specified, then the solution is unique. When only Neumann BCs are specified, the problem is solvable up to an arbitrary constant if the total current through the boundary is conserved.
Membrane voltage is defined for any given point on the membrane as the potential difference for the same point in intra- and extracellular spaces:
Extracellular and intracellular current toward Γ is continuous for any small volume intersecting it and is denoted by the membrane current Im:
As current reaches one patch of membrane, it can either trigger the same amount of current being released in the opposite side or cross it through ionic flux. Total membrane current corresponds to the exchange of capacitive current plus the sum of transmembrane ionic currents (Iion):
with Cm being the membrane capacitance per unit area. Ionic currents Iion(Vm, u) can be determined by nonlinear ordinary differential equations depending on the membrane voltage and a vector of gating variables uΓ at every node of Γ:
A simple passive membrane current can also be used:
with Rm being a constant membrane resistance. The main variables and parameters of the model are summarized in table A1.
2.2. Space discretization
To solve the complete space and membrane problem, the equations governing the potentials in the intra- and extracellular domains and the equations governing the time development of the membrane currents are solved alternatingly. Equations (1), (2), and (6) with BCs (3) and (4) are solved for a fixed moment in time with a fixed Vm using the FEM. A complete discretization and proof of existence of the solution for this spatial problem was presented by Lamichhane and Wohlmuth [53]. The FEM discretization is shown in appendix A.1.
2.3. Time discretization
Equation (7) is solved for a discrete time step after the solution of equations (1), (2) and (6) with the procedure specified in section A.1. At each time step, the discrete space equations (A.4) and (A.3) are solved for a fixed voltage vector Vm. The resulting Im is used together with the vector of ionic currents per node to find the next membrane voltage. The time iteration can be either explicit with the Euler method or implicit in the case of the CN method. The explicit scheme is easily obtainable with the previous values:
The new is then ready to be used again to solve the spatial equations.
The Euler scheme, however, is limited (see section 3) and an implicit CN was implemented. The CN scheme requires the next membrane current value :
is an unknown future value of Im and might prompt for an additional numerical strategy (e.g. a Newton solver). Still, through a careful re-arrangement of the terms, the same linear solver used to find Φ can be employed. Defining and , one obtains
Combining the time iteration with the linear system as a vector in the advanced time step Muk + 1 = bk + 1 results in
After matrix manipulation and C = −cG, the new linear system is
For the solution of (10), the system was factorized to eliminate Im as done with system (A.11). However after the same factorization procedure [53], the left-hand side is non-symmetric (due to matrix C). The generalized minimal residual method was used instead of CG in this case.
Contrary to the Euler method, any solution to (10) depends on the previous Im (implicit in gn). This makes the method particularly weak at initialization and fast changing exterior stimuli. A better solution can be obtained by pre-calculating in a predictor–corrector scheme. This will be referred to as the Euler–Crank–Nicholson (ECN) method (see also figures 3(E) and (F)).
2.4. Computer setup
The software solver was written in C++ code, linked to the GNU-LGPL library CHASTE. CHASTE is being actively developed by the Computational Biology Group at the Oxford Computing Laboratory [50]. This framework provides functionalities for the solution of PDEs and ODEs for the heart and other tissues but does not provide cell membrane representations. To include the concept of insulating membranes, various additions to the CHASTE package were added using standard object-oriented programming techniques. These extended CHASTE's bidomain and ion channel functionalities, implementing the model, are presented in section 2. In its current version, the tool has been in development for 21 months. We named our tool CHASTE-Membrane and can be obtained for free on http://www.cs.ox.ac.uk/chaste/download.html under the 'Bolt-on Projects' section.
Two- and three-dimensional meshes were generated with the GNU-GPL tool Gmsh [54]. The neuron reconstruction presented in section 3 used NEURON's [55] Python's interface to parse the 1D geometry and Gmsh to generate the mesh. A custom-written Python code was used for the demarcation of the cell membranes and post-processing. Extra- and intracellular spaces are effectively independent meshes that only share node positions at the interfaces. Example meshes are provided in the software toolbox online. Paraview (Kitware Inc.) was used for visualization and sampled extraction of potentials over space. We used PETSc (Argonne National Lab.), integrated in CHASTE, to solve the linear systems produced by the FEM method. For the convergence simulations, an absolute tolerance value of 10−14 was used. For the simulations of figures 8 and 9, an absolute tolerance value of 10−6 was used. For the rest of the simulations, a relative tolerance value of 10−6 was used. All simulations, except the example in figures 8 and 9, were executed in a single processing core of an Intel® Core 2 Quad 2.83 GHz CPU, in a desktop computer with 4 GB RAM.
3. Results
3.1. Convergence, stability and computation time
The solution scheme, introduced in the previous section, consists of two separate procedures: one solves equation (A.11) finding the electric potential Φ and the current Im, under BCs on ∂Ω; the other adds up the membrane currents that result from the electric potential and ion fluxes, updating the membrane voltage Vm. The new Vm represents an updated condition on Γ. Given stationary BCs, if Vm over Γ corresponds to a steady-state value, the electric potential will correspond to the steady-state distribution of potential in Ω. In this stationary case, the implementation of the spatial solver (equation (A.11)) can be tested independent of time evolution (equations (8) and (9)).
Making use of this principle, it was assessed how the discretization of space influences the precision of the solution. For sufficiently fine spacing, the numerical solution should eventually converge toward the analytical solution. One of the cases where the analytical solution is known is for a 2D circular cell stimulated by a homogeneous field started at time t = 0 (see appendix section A.3. for this solution). Figures 2(A) and (B) show simulations for such a cell with diameter d = 15 µm and compare it to the analytical solution. The numerical precision was judged by comparison of the numerical solution ϕn and the analytic solution ϕa, measured by the normalized root mean square deviation (NRMSD):
As the typical grid spacing h went from 8 to 0.5 µm, the magnitude of the computed electric potential approached the analytic solution (figures 2(A) and (B)).
Download figure:
Standard imageThe analytic solution assumes an infinite extracellular space, so the analytical and numerical results disagreed in the proximity of the domain boundaries ∂Ω. In a similar simulation, a distance from the membrane to the boundary of two times the cell diameter produces an error of 2.96% (figure 3(C)). At a distance of nine times the diameter, the error drops to negligible 0.69% (figure 3(C)).
Download figure:
Standard imageAfter confirming the accuracy of the spatial part of the numerical scheme, convergence was tested for the time development of the potential and membrane voltage as the time step was reduced. A configuration similar to that of figure 2 was used in figures 3(A) and (B). The extracellular field was imposed with Dirichlet BCs and was turned on at t = 0. For a mesh with a typical spacing of h = 1 µm, the numerical solution comes very close to the analytical solution after the transition phase. This is equivalent to the observation of figure 2. However, the initial phase of the Vm buildup is not captured properly (figure 3(A), left).
To achieve an accurate representation of the membrane voltage development, it is necessary to reduce the time step. The numerical solution converges to the analytic solution as the time step is reduced first to 5 ns and then to 0.5 ns (figures 3(A) and (B)). Because a smaller time step also allows for finer grid spacing, the grid was improved moderately. This had no influence on the convergence (data not shown). It was found empirically that the machine time per mesh node and per simulation time step (MTNT) was largely independent of the specific problem or the dimension. For the Euler forward solver used for figures 3(A) and (B), the MTNT amounts to 80–90 µs.
A similar MTNT (120 µs) was found for the next example: a 1 µm thin and 80 µm long cable under an axial field. The grid was generated with an intended grid spacing of 0.5 µm. A time step as small as 2 ns was necessary to achieve a stable solution. Due to the different morphology, the typical time of the Vm buildup is much larger than in the previous case. To compute a 300 ms time course, the simulation took 26 h (explicit Euler method). With many hours of computation time for a single 80 µm long cable, a timely treatment of realistic problems would not be possible with this approach. Using our insight into the different stability conditions for the Euler and CN solvers (see appendix), the latter was implemented. The CN solver tolerates orders of magnitude longer time steps keeping numerical stability (figure 3(D) CN 100 ns, CN 1 µs and appendix). CN and Euler solvers reach comparable precision when compared to a similar solution with the CEq in perfectly conducting extracellular space [15] (figure 3(D), dotted line). A combination of the computational steps that are used in the Euler and CN methods allows us to compensate the shortcomings of the CN alone (section 2). The resulting ECN solution is precise, even at times when the stimuli change, and allows for large time steps that would lead to numerical instability with the explicit Euler method alone (figure 3(E), ECN 100 ns). The instability of the explicit Euler method can be seen in the diverging zigzag lines in figures 3(E) and (F) (Euler 100 ns).
Stability of the explicit Euler scheme requires time steps in the order of hCm/σ, where Cm/σ is typically ∼10 ns µm−1. This means that a morphology with details in the 100 nm range demands 1 ns time steps (see appendix A.2.). The implicit CN scheme, on the other hand, is unconditionally stable for real-world parameters and can, theoretically, tolerate time steps close to the membrane time constant. Convergence results and simulation times for the different methods can be seen in table A2.
3.2. Representing neuron details
With the application of the CN solver to FEM problems with individual domains and insulating membranes, it seemed possible to treat realistic geometries and timescales within computation times of hours. This was put to a more rigorous test by the simulation of a 600 µm long and 0.5 µm thick axon-like fiber under stimulation by a strong field (1000 V m−1). Cable endings are especially interesting for the effects of neuron stimulation because under spatially homogeneous conditions, endings are the places where the largest depolarization occurs [37, 56]. The exact shape of the endings and the influence of this shape on the magnitude of the induced depolarization have not been studied.
To show the potential of our approach to represent fine details in the morphology and analyze their effect, three different meshes representing differently shaped presynaptic boutons were created (figure 4(A)). The response of a finite neurite to an external field can be divided into two phases: a very rapid, initial depolarization (few microseconds) and a later equilibration of membrane currents (milliseconds). To represent both phases, a simulation duration of 8 ms was chosen. With a typical mesh spacing h = 0.25 µm (imposed by the cable radius), the explicit Euler method required a time step of 4 ns to avoid divergence due to numerical instability. The total computation time with the Euler forward method was eight weeks for cable I (figure 4(B)). The same precision was obtained more than 230 times faster, when the ECN solver was used with a time step of 1 µs, demonstrating the importance of this approach (figure 4(B)). Note that the numerical solution displays a small difference to the analytical solution in the steady-state membrane potential. This is likely an effect of the finite diameter of the 3D cable. Overall, the NRMSD was 1%.
Download figure:
Standard imageAlthough the ECN method was fast, to resolve the influence of the bouton shape on the depolarization in the initial phase, the time step of 1 µs was too large. For this purpose, the use of adaptive time steps is more appropriate. In this way, the fast response at the beginning of the simulation and the slow response at the steady state can be captured. With this approach, computation times can be reduced further (figures 4(C) and (D)). For this example, the points at which the time steps were switched had been chosen manually, guided by the magnitude of the membrane currents Im. This approach is motivated by the fact that the change in the potential depends on Im in equation (9). For large membrane currents, the time steps have to be chosen short in order to capture the rapid changes in the potential. This scheme can be extended into an automatically adapting time step: the values of Im are available during the computation, as equation (A.12) is solved. Depending on the recent Im values, the next time step can be chosen.
We found that the different bouton shapes influence the membrane potential Vm and the EP. The presence of a synaptic bouton increases the membrane depolarization during the initial phase, reflecting the rapid redistribution of charge in the bouton compartment. In the steady state, after several milliseconds, the larger surface of the bouton leads to a larger ionic current. This diminishes the depolarization, but increases the EPs (figure 4(E)).
3.3. Deficiencies of the cylinder segmentation under external stimulation
The vast majority of studies of neuronal morphology is based on calculations that approximate the cell by cylindrical sections. The membrane potential in each section then develops according to the CEq. This approximation is very powerful and its application dominates the picture of electrical processes in excitable cells that we have today. Even the values for a basic parameter such as the cytosolic conductivity (σi) are obtained by matching measured voltage differences with voltage differences predicted from cable models [57]. The approximation of neurons as concatenations of cylindrical cables breaks down on the micrometer scale, for instance, when fine structures such as synaptic boutons or dendritic spines deviate from axial symmetry. While attempts can be made to account for the presence of extra membrane in the spines (by adjusting the surface capacitance and conductance obtaining valid expressions for the average voltage across a longer segment) on the microscopic scale, only a right representation of the morphological details can give correct simulations of the membrane voltages.
Even larger problems arise, when the relevant physical processes do not evolve within the axial/radial coordinates of the cable segments. To describe the interaction between a cylindrical segment and the extracellular field, only the field's component perpendicular to the cylinders faces is used to compute the CEq [38]. This works well as long as the approximation of a very thin cable is appropriate but it completely fails for spherical structures like cell bodies (figure 5). The key problem is the fact that only the area of the cylinder's faces determines the magnitude of the stimulus, while the area of the cylinder side determines the capacitance and conductance of the membrane. Face area and side area cannot at the same time match the effective areas of the sphere. This causes an erroneous result for the effect of extracellular stimulation of a cell body, even in the case that the field is oriented along the cylinders' axes (approximate 30% error in figure 5(B), 0°). When the orientation is changed, the approximation breaks down completely (figures 5(A) and (B)). This is a fundamental problem of the approximation by cylindrical segments and can only be solved when the membrane surface itself determines the orientation of the electric fluxes and not the axis of a segment.
Download figure:
Standard image3.4. Modeling multiple cells
In the brain, neurons are not surrounded by empty, infinitely conductive space. Neurons and supporting cells are densely packed so that only about 20% of the brain volume is extracellular space [60]. Determining the influence of other cell bodies in the potential signal of the neuron is the key to understand the shape of extracellularly recorded action potentials (APs) and in general of local potentials. Collections of cells surrounding a neuron represent resistance and capacitance that have to be accounted for. The effect of this distribution in the extracellular space is still debated [61].
The tool presented in this work can be used to model collections of passive and active cells at close distances, resolving the EP during their activity. To illustrate the importance of representing other cell bodies, a model of a tight packing of 2D cells under stimulation was implemented (figure 6).
Download figure:
Standard imageUnder a homogeneous electric field, a collection of cells in this configuration behaves essentially as a series of capacitors and resistors fed by a constant voltage source. When the voltage is turned on, current flows freely from one end of the circuit to another and the potential decays in the resistors (extra- and intracellular spaces). As charge builds up in the capacitors (the cell membranes), the current flow decreases and the membrane voltage increases. At the steady state, the potential difference across the entire equivalent 'circuit' is determined by the first and last membranes along the field direction. If the various capacitors and resistors have similar properties, the potential drops are distributed more or less equally across them (figure 6(D)). The main effect is that the membrane voltage of the cell targeted for stimulation is lower, compared to that of an isolated cell (figure 6(C)). For neuro-stimulation techniques such as transcranial magnetic stimulation that aims at supra-threshold activation of the cell and utilizes rapidly rising, strong stimuli as in this example, the shadowing effect and its consequences (e.g. secondary fields caused by the inhomogeneities of tissue [32]) can determine success or failure of stimulation. The formation of local secondary fields as visible in the potential gradients along the gaps between cells is not represented by activating function and the 'far-field' approach of the line-source method.
The case presented in figure 6 is equivalent to the transversal stimulation of a bundle of 'infinitely' long cells in 3D. In CEq solvers, such as NEURON, transversal stimulation exerts no effect on the membrane voltage, just as shown in figure 5. As the FEM does not impose any symmetry assumptions, it can represent the distortions of the EP caused by even more local obstructions, like a single small spherical cell body next to an active cell. The example in figure 7 demonstrates the influence of neighboring cells on the EPs during an AP. The slightly larger sphere in the center represents a neuronal soma that would receive a depolarizing current during the initial phase of an AP (in reality that would be the lateral current originating at the axon initial segment). This typically depolarizes the soma at a rate of up to 400 V s−1. In the simulation, the current is supplied by an injection inside the cell with a current that varies over time, mimicking a real AP current shape. When the waveform of the resulting EPs between the active cell and the passive cell is compared to the EP at the opposite site, the amplifying influence of the adjacent membrane can be seen (figures 7(A) and (C)). At the peak amplitude, the potential is amplified by 8 µV (figure 7(D)). This difference is determined by the nearby cell whose own response and membrane voltage (figure 7(C), inset) distorts the potential in this region. Amplitudes of tens of microvolts can be typical of extracellular action potential (eAP) recordings at the given conductivity (figure 7(B)). With realistic complementary shapes of neighboring cells, the magnitude of the amplification would be much larger. The 8 µV effect on the potential is well resolved by the method although its magnitude is much smaller than the typical membrane voltage (tens of millivolts).
Download figure:
Standard imageNote that in this simulation, a current injection was given to the central cell. This illustrates the possibility to stimulate by current injection at arbitrary locations, which is a feature that would give the user the possibility to more precisely model stimulation via a pipette.
3.5. Realistic configurations
Comprehending effects of EPs and in general of the electrical functions of the cell requires realistic geometries and a realistic distribution of voltage-dependent channels. The construction of new stimulation and recording devices [25–28] such as those required to advance nerve–computer and brain–computer interfaces demands modeling environments that can model this heterogeneity. Simulation methods able to model biological tissue and artificial materials more realistically will be fundamental to lower development and experimentation costs.
To demonstrate the capabilities of the method and the tool to represent realistic setups, in figure 8, simulation of a cultured neuron equipped with voltage-gated ion channels on top of a glass coverslip is presented. This preparation is interesting for the development of multi-unit micro electrode arrays [62, 20].
Download figure:
Standard imageThe morphology presented in figure 8 was generated from parts of the reconstruction of cell D151 from [30] (see section 2). The bottom of the cell was flattened to represent the interface with the glass; the cell and the glass were separated by a distance of 0.8 µm. The complete mesh consisted of 21 732 nodes and 86 716 tetrahedra in a domain of dimensions 340×200×60 µm3. An adaptive mesh was used, with refinements near and inside the cell down to 300 nm. A heterogeneous distribution of sodium and potassium voltage-dependent channels was set along the cell. The sodium conductances for the dendrite, soma/hillock, initial segment and the rest of the axon were, respectively, 10, 20, 120 and 20 mS cm−2. The potassium conductances, for the same sections, were 10, 20, 30 and 20 mS cm−2. Mammal kinetics at 23° were used [63].
The simulation of 8 ms of activity in this setup with the reference software required only 45 min on a single processor core. The solver was configured to use the ECN method with a fixed time step of 40 µs. A longer 100 ms simulation was executed with the same parameters producing a spike train (figure 8(E)). This required 6 h 27 min with a time step Δt = 100 µs. Computation time could be reduced to 4 h 16 min when the computation was distributed to two processors, and to 3 h 21 min in four processors. However, the mesh was not optimally partitioned (see section 4). A video of this simulation is provided online as the supplementary material, available from stacks.iop.org/JNE/10/026019/mmedia; there, only every second time step is displayed.
When the extracellular space is altered by the presence of other cells, the magnitude of EPs changes drastically. To demonstrate this, the layout of the realistic configuration was extended to include a passive cell that covers the soma, leaving a 1 µm cleft. This does not change the waveform of the intracellular potential during the AP (not shown) but the EP excursion increases 18-fold (figure 8(F)). This solves a longstanding problem of unrealistically small eAPs that occur when the line-source approximation is used to compute AP-induced EPs (see section 4).
3.6. Representation of the cell under low-intensity fields
A number of experimental studies investigated the influence of weak external fields on the neuronal population activity [5, 4]. Strikingly, fields strengths as low as 1 V m−1 or even 0.2 V m−1 [1, 3] were able to alter the temporal structure of ongoing spike activity. A full investigation of possible mechanisms of the observed effects with FEM simulations is outside the scope of our study and some aspects, such as polarization of thin processes in cultured neurons, are well captured in cable simulators (see, for instance, [64]). There is however one aspect our tool is particularly well suited to investigate: the membrane potential changes in the somatic region. To this end, we used a more complete reconstruction of the neuron from above (figure 8, cell D151 from [30]) and exposed it to a stationary field of 1 V m−1. In figure 9, the resulting change of the resting membrane voltage of the entire neuron is shown in the left panels; the region around the soma is magnified on the right. Given the small magnitude of the induced field, the voltage changes about 400 µV and one can assume linearity. Fields of opposite orientation would cause effects of opposite sign. As the reconstructed neuron has a rather symmetric layout of the dendritic tree and the axon emerges from the base of the soma, only a week polarization of the axon hillock occurs. This would change for asymmetric configurations, for instance, for axons emerging from a primary basal dendrite.
Download figure:
Standard image4. Discussion
Our quantitative understanding of electrophysiology is based on the concepts of the Hodgkin–Huxley model and the CEq. These concepts describe the behavior of isolated cells inside an isopotential space. EPs can be added to this picture following the concept of the activating function [15]; however, there are fundamental limitations to the validity of this approach for structures that are not thin, such as somata (figure 5). The intrinsic feedback between endogenous extracellular fields and cellular activity is never captured by the traditional approaches, as always only one direction, e.g. membrane currents to potentials, is captured. When the physical problem is formulated in a way that takes the interaction between currents and fields into account, this results in partial differential equations with nonlinear BCs. While a few simulations have been published that addressed this problem, they focused on either stimulation of cells by extracellular fields (passive membrane [65], two dimensions [18]) or on the detection of endogenous fields by planar electrodes [20]. Moreover, proprietary software was used. To our knowledge, no finite element software is openly available, which would provide a self-consistent picture of the mutual feedback between currents and potentials.
The presented numerical method allows detailed simulations of the electric activity of excitable cells and their interaction with EPs. Membranes are explicitly modeled. They can have arbitrary shapes on realistic sub-micrometer scales and contain voltage-dependent conductances. The extracellular space is an integral part of the mathematical structure. Therefore, the interplay between membrane potential, membrane currents and extracellular fields is intrinsic to the simulations. The method is able to solve problems with mixed BCs, to represent geometric details and to allow relatively long simulated times short computation times. The code of a reference implementation of the method, CHASTE Membrane, is released as an open source and builds upon the open-source initiative CHASTE [50]. Along with CHASTE, other modern, mainstream high performance and parallel, open computing libraries are used, including PETSc (Argonne National Lab.), MPI (Message Passing Interface standard), HDF5 (NCSA and others), VTK (Kitware Inc.) and CellML (Europe's Virtual Physiological Human Project). The use of open and well-supported libraries ensures their continued development and optimization. CellML grants access to a public library of ion channel kinetics definitions and eases the implementation of new ion channel models (http://www.cellml.org/).
Numerical precision and convergence of the method were demonstrated using analytically tractable problems. The basic stability criterion turned out to be linearly related to the typical grid spacing h , unlike the h2 dependence found for the heat equation, models of propagation of APs [40, 66] and bidomain models of electric activity in the heart [49]. The linear dependence on h is a consequence of the separation of the time and space equations and the dimensionality of the problem: only the component of potential gradients that is oriented perpendicular to the membrane contributes to the membrane current Im. This directionality is also the reason why the linear relation between the typical grid spacing h and the largest allowed time step also holds for three dimensions. Replacing the Euler forward solver of CHASTE by the implicit and numerically more stable CN solver, it was possible to increase the simulation time step and thereby reduce computation time by orders of magnitude. For the CN solver, the time step can approach the membrane time constant, while for the Euler forward solver, the much shorter cell time constant [59] was limiting. This finding is fundamental for long-time simulations where the main observed phenomena lie mainly in the membrane time constant regime. To reduce computation time further, adaptive time steps and adaptive meshing were used to reduce the number of time steps and nodes, without compromising precision at structural details and rapid temporal changes.
In the software implementation, standard finite element techniques were employed to solve the numerical problem. Interaction with the cells is possible via BCs that allow, for instance, to fix the voltage at a membrane element or the current that flows into the membrane. This is comparable to the voltage clamp and current clamp point processes that are available for user interaction in CEq simulation tools such as NEURON or GENESIS.
Going beyond the possibilities of CEq tools, the finite element approach allows the implementation of other physical elements important for neural recording and stimulation, including extraneous elements such as glass pipettes. Heterogeneous distribution or properties of ion channels can be implemented on a triangle-by-triangle basis, without imposing a radial symmetry. These are important features, necessary to understand, for instance, the heterogeneity of the shapes of extracellularly recorded APs [62, 67]. But the most powerful feature that this software offers over the capabilities of CEq solvers is the explicit definition of extracellular space. This allows a direct examination of effects like ephaptic coupling not only on large scales but also for directly opposing membranes, conductivity heterogeneities and anisotropies in the extracellular space, when the assumptions of the line-source approach break down.
Despite the large improvements with respect to time step and computation time, finite element simulations do not have the potential to fully replace tools such as NEURON or GENESIS for problems that are insensitive to the limited conductance of extracellular space, the detailed geometry of dendrites or the heterogeneity of ion channel densities. However with mounting evidence for the synchronization of APs by EPs [4–6] and the progress in neuro-stimulation techniques, many questions arise that cannot be comprehensively addressed under the assumptions of the CEq. In this area, the presented method can enhance the understanding of neural activity, stimulation of neurons and recording from neurons.
The examples presented here were intended to demonstrate possible applications and give an idea of the computation times involved. They focused on the interaction between extracellular fields and neuronal activity using realistic spatial scales and realistic parameters. A key aspect is the effect of crammed extracellular space (figures 6 and 7) and the interaction between extracellular fields and neuronal activity on realistic spatial scales and with realistic parameters. In particular, the direct comparison of eAP in free and crammed spaces (figure 8(F)) reveals the advantages of the presented tool. Studies that used the line-source approximation have repeatedly noted that the experimentally observed magnitudes of EPs are best explained by simulations, when the intracellular resistance is assumed to be smaller than suggested by experiments and the extracellular resistance is assumed to be higher than the intracellular resistance (see, for instance, [30, 36]). This can be appreciated from figure 7(D) that shows a theoretical maximum for the eAP amplitude of around 50 µV—far less than experimentally observed amplitudes of >150 µV. In our simulations, the bulk conductance is identical in the intra- and extracellular spaces and corresponds to experimentally determined values. The realistic magnitude of the eAP occurs naturally, when a realistic structure of the extracellular space is assumed. No assumptions of a hard-to-define 'effective' extracellular resistance are necessary. The eAP waveforms and amplitudes in figure 8 represent measurements as they would be obtained by ideal point electrodes. In other words, they are upper boundaries to the signals that real electrodes with non-zero impedance and a spatial extension would report. In principle, the electrodes themselves could also be modeled in this tool, using zero-flux BCs on the glass surface. Numerous other problems can be addressed by simulations with this method: starting from small geometries (e.g. in the study of depolarization of spines of different morphology), all the way to very large systems (e.g. in the cross-talk of local field potentials and electrical activity of hundreds of tightly packed cells).
Several steps have already been taken to shorten the computation time further. The structures of the software code already allow run-time alteration of the time step. Simulation of intrinsic neuronal activity will greatly benefit from this adaptation scheme because currents and electric fields change on timescales much larger than the cell time constant, which is important mostly for the rapid fields imposed by neuro-stimulation methods. What is needed is an automatic scheme to choose the appropriate time step. Three timescales are important. First, to ascertain numerical stability, the maximal time step is limited by the membrane time constant (see the stability discussion in appendix A.2.). Second, the time step has to be approximately one order of magnitude smaller than the timescale on which the ionic conductances change. For sodium channels at physiological temperature, this requires time steps of 10 µs or better. Third, to ascertain precision, the change of the membrane potential has to be captured accurately. For external stimulation of short cables, where the time course of membrane potential changes is only limited by the cell time constant, this can require picosecond time steps (figure 4(D)). As the sum of ionic and membrane currents drives changes in the membrane potential (7), we proposed to use the magnitude of this sum membrane currents, as the criterion. Further tests are needed to establish whether this approach is generally applicable.
This method was built from the beginning with parallelism in mind and the software framework supports distributed solution of linear systems and distributed meshes. Initial tests have been performed and the most important aspect now is the development of better partition algorithms for the main mesh. It has to be automatically determined whether it is preferred to partition a given cell membrane or rather to keep as much as possible of the cell in a given parallel machine. The greatest benefits from parallelization will obviously come from the distribution of large meshes as the time evolution of the problem is tightly coupled.
Acknowledgments
The authors thank Fred Wolf and Gert Lube for very helpful discussions. This research was financially supported by the German Ministry for Education and Research through the Bernstein Focus Neurotechnology, Göttingen (01GQ0811 and 01GQ0810) and partly by the Göttingen Graduate School for Neurosciences, Biophysics und Molecular Biosciences (DFG grant GSC 226/1).
Appendix:
A.1. Space discretization
At any given moment, the membrane voltage Vm is assumed fixed and the system of partial differential equations is solved for variables Im and Φe, i (denoted Φ when the domain is indifferent). The classic weak FEM formulation is obtained by multiplying equations (1) and (2) by test functions ve, vi, integrating and applying Green's first identity:
In equation (A.2), the assumption that no cell is open to the exterior boundary is made. The interface condition on Γ is comparable to a Neumann condition, with the difference that in this model, Im is an unknown, sub-dimensional function on membrane space. Condition (5) is expressed in the weak form as
with u being a test function also restricted to membrane space. Equation (A.3) can be understood as a special Dirichlet BC where the values must comply with a fixed potential difference Vm. The complete system of spatial equations is formed by (A.3) and the sum of equations (A.1) and (A.2):
Here, σ, Φ, v represent the corresponding symbol in any of the non-overlapping domains Ωe, i. In (A.4), the operator[ ]i, e changes the sign of the operand according to the face Γ that is being evaluated (integration is performed in the intracellular and extracellular face of Γ).
The matrix form of the problem is obtained by choosing a set of piecewise linear basis functions for each of the NΩ nodes in a triangulation Ωh, and for each of the NΓ nodes in a triangulation Γh. The result is a system of M = NΩ + NΓ equations:
The Neumann term was dropped but can be added in any future step.
Let Φk, and be the approximations of values Φ(xk), Im(xj) and Vm(xl) at triangulation nodes xk ∈ Ωh, xj ∈ Γh and xl ∈ Γh. The continuous functions can then be replaced by , and , and the gradient by
Equations (A.5) and (A.6) for a given and a given are now
Left-hand side entries of the matrix linear system form can then be defined as Aik = σ∫Ω∇vk · ∇vi dx and . Right-hand side vector entries can be defined as and . The system of equations,
can be written in the matrix form as
Matrix equation (A.11) has to be solved to obtain the potential Φ and membrane current Im at any time step.
Although the Laplacian A matrix is positive definite, in general the matrix M is symmetric but indefinite. In [53], a factorization procedure is presented which can produce an equivalent positive-definite system after the elimination of vector Im through static condensation. In that form, the conjugate gradient method can be used to solve the linear system. This form was used for the explicit Euler solver presented in the next sections. Although the details of the factorization in [53] will not be presented in this paper, we will still motivate the expression for Im, as it is required for the stability analysis. This expression can be readily extracted from equation (A.11):
Due to symmetry between the membrane current expression and the voltage potential expressions (note that the Im part of (A.9) and the Φ part of (A.10) produce the same matrix B), and a special node re-organization (nodes that touch the interface are moved to the bottom of the matrix), a left pseudo-inverse matrix WT can be constructed for B such that
This expression depends only on Φ. Replaced back into equation (A.11), a linear system exclusively in terms of Φ can be obtained.
Table A1. List of the main variables and constants of the model, units used and rough absolute orders of magnitude for typical neuronal cells.
Name | Definition | Unit | Order |
---|---|---|---|
Φe, i | Extrac./Intrac. potential | mV | 100–101 |
Vm | Membrane voltage | mV | 101–102 |
Im | Current toward the membrane | µA cm−2 | 101–104 |
Iion | Trans-membrane ionic current | µA cm−2 | 101 |
σe, i | Extrac./Intrac. conductivity | mS cm−1 | 101 |
Cm | Membrane specific capacitance | µF cm−2 | 100 |
Rm | Membrane specific resistance | Ω cm² | 103–104 |
d | Cell diameter | cm | 10−3 |
E | Electric field | mV cm−1 | 100–104 |
Table A2. Complete results with the three methods (Euler, CN and ECN) for the convergence experiment in figures 3(A) and (B) with the reference software. The time step used, the typical element size (h), the method, computation duration in seconds and the NRMSD to the analytic solution are shown. The extra duration of the CN is explained by the extra restriction imposed to the solver to satisfy values of . Although ECN solves two linear systems at each time step, the durations are similar compared to CN. This is explained by the second solution of the linear system using the potential calculated in the first solution as the initial guess in the generalized minimal residual method.
Δt | h | Method | Duration | NRMSD |
---|---|---|---|---|
50 ns | 1 µm | Eul. | 5.78 s | 4.40 % |
1 µm | CN | 11.17 s | 6.04 % | |
1 µm | ECN | 11.88 s | 0.29 % | |
5 ns | 0.5 µm | Eul. | 228.57 s | 0.31 % |
0.5 µm | CN | 591.67 s | 0.68 % | |
0.5 µm | ECN | 610.22 s | 0.15 % | |
0.5 ns | 0.25 µm | Eul. | 11 053.0 s | 0.05 % |
0.25 µm | CN | 24 414.1 s | 0.08 % | |
0.25 µm | ECN | 26 267.7 s | 0.12 % |
A.2. Stability of the numerical scheme
The explicit Euler form of the problem, although easily implementable, is only conditionally stable. As presented in section 2.3, a Crank–Nicolson (CN) scheme can be adapted to the solving algorithm providing excellent results (figures 3 and 4). In this section, the strict stability requirements for the Euler scheme and the more flexible CN requirements are shown.
The stability analysis for the general discretized version of the problem (equations (A.7), (A.8), (8) and (9)) is complex for two reasons: first, the piecewise nature of the problem resulting from the membrane, and second, the separation of the space and time equations in two steps. This results in a situation, where actually the difference between potentials, the membrane voltage, is the relevant parameter on the membrane, while in the classic stability analysis of the diffusion equation, it is the potential itself. The membrane is the place where local source terms, the membrane currents, are much more likely to cause instabilities than the solution of the Laplace or Poisson equation. Therefore, we restrict our study to this area and neglect possible variations in potentials of the non-membrane nodes.
The problem was analyzed for a regular 2D triangulation of typical element length h (figure A1(A)). At the membrane interface, an expression for Im can be obtained and replaced in (8) and (9). Beginning with (A.7), for a membrane node xj, assuming no external current sources, and uj = 1, one obtains
Note that uj = 1 is a common assumption in FEM implementations of the Neumann BC. This assumption was also used in the membrane test functions of the computer solver. The membrane current at node xj can be calculated from either the extracellular or intracellular potentials. With the adjacent extracellular nodes, this value is
In the two-dimensional triangulation (figure A1(A)), expansion and integration with the classic 'hat' test functions in (A.14) produce for the extra- and intracellular parts:
Subtracting (A.16) from (A.15) and employing the definition of membrane voltage , one obtains
As mentioned above at this point, the fluctuations of the exterior values around the 'true' values are ignored. In this case, the standard ansatz of the von Neumann stability analysis can be used: a linear combination of periodic solutions of the form
with j, n being the space and time indexes, the imaginary unit and γ a variable wave number. The starting condition for Vm is on average zero. This implies that potentials in the extra- and intracellular regions of a region of membrane are on average the same. For simplicity, we choose this value to be zero. Under these conditions, potentials are allowed to fluctuate but only at larger scales than the fluctuations of Vm. Inserting (A.17) in the Euler scheme (8) and using a passive membrane resistance produces
Replacing (A.18) into (A.19) leads to the amplification factor
Stability is obtained under the condition |ξE| ⩽ 1, which is true for
In cell biology, it is usual that Cmh/σ ≪ RmCm so the condition can be approximated by
This was tested in numerical experiments in 2D and 3D (figures A1(B)–(D)). The factor 4/3 is not exact as we dropped the contribution of the exterior values . Their influence should be on the order of the other potential-difference terms in (A.17) so that the result presented here is of the correct order.
Download figure:
Standard imageThe restriction on the time step is laxer in the CN scheme. Inserting (A.17) into the CN scheme (9) expands to
The use of (A.18) produces the amplification factor
Adding to the inequality −1 ⩽ ξCN ⩽ 1 gives
α and β are always positive, so the left inequality is always true. The right part establishes that the stability limits are set by the millisecond-scale membrane time constant τm = RmCm: