Computational Modeling of Single Neuron Extracellular Electric Potentials and Network Local Field Potentials using LFPsim

Local Field Potentials (LFPs) are population signals generated by complex spatiotemporal interaction of current sources and dipoles. Mathematical computations of LFPs allow the study of circuit functions and dysfunctions via simulations. This paper introduces LFPsim, a NEURON-based tool for computing population LFP activity and single neuron extracellular potentials. LFPsim was developed to be used on existing cable compartmental neuron and network models. Point source, line source, and RC based filter approximations can be used to compute extracellular activity. As a demonstration of efficient implementation, we showcase LFPs from mathematical models of electrotonically compact cerebellum granule neurons and morphologically complex neurons of the neocortical column. LFPsim reproduced neocortical LFP at 8, 32, and 56 Hz via current injection, in vitro post-synaptic N2a, N2b waves and in vivo T-C waves in cerebellum granular layer. LFPsim also includes a simulation of multi-electrode array of LFPs in network populations to aid computational inference between biophysical activity in neural networks and corresponding multi-unit activity resulting in extracellular and evoked LFP signals.


INTRODUCTION
Extracellular recording is a classical method used to study neuronal behavior at the population level (Caton, 1874). Studies based on this technique have contributed significantly to the current understanding of network behavior (Mitzdorf, 1985;Di et al., 1990;Kandel and Buzsáki, 1997;Scherberger et al., 2005;Montgomery and Buzsáki, 2007;Colgin et al., 2009). Biophysical computations underlying extracellular recording technique have aided the development of reliable quantitative mathematical models that elucidate the generation of extracellular potential (LFP) from transmembrane ionic currents (Gold et al., 2007). The forward modeling schema was developed in 1960s and used transmembrane ionic currents to calculate extracellular field potential from biophysical neuronal models (Rall and Shepherd, 1968;Plonsey, 1969). The technique has been validated using single neuron models (Holt and Koch, 1999;Gold et al., 2006;Diwakar et al., 2011) and network models (Lindén et al., 2011;Reimann et al., 2013).
An extracellular microelectrode or "LFP electrode" is comprised of a sharp metal or solution-filled glass tip at one end with the line end connected to a data acquisition system. The extracellular electrode has been known to record voltage fluctuations from the extracellular medium generated by spatially inhomogeneous transmembrane currents related to neuronal processes (Eccles, 1951). The relative range of a microelectrode is reported in the range of 0-10 kHz and attributed to sources (neuronal processes) within the vicinity of the electrode (Egert et al., 2002;Buzsaki, 2006;Lindén et al., 2011). In the case of evoked post-synaptic activity, Local Field Potential (LFP) is the signal recorded below 500 Hz (low-frequency component) and high frequency component (>500 Hz) has been referred as Multi Unit Activity (MUA) (Buzsáki, 2004). LFPs are population signals presumed to be composed of several components, including synaptic transmembrane current, action potentials and sodium currents, calcium spikes, and ephaptic contacts (Buzsáki et al., 2012;Einevoll et al., 2013;Mineault et al., 2013).
Popular models for extracellular current sources include the Point Source Approximation (PSA; Rall and Shepherd, 1968;Holt and Koch, 1999), Line Source Approximation (LSA; Gold et al., 2006), and low-pass RC filter (Bédard et al., 2004). These have been used along with the forward modeling schema to calculate the extracellular field potential generated by neuronal process at distance "r." These techniques vary in their theory of estimation of field potentials from transmembrane synaptic currents. LSA generally displays more accuracy in the prediction of field potential except at a close distance, less than a micron away from the sources (Rosenfalck, 1969;Trayanova et al., 1990;Gold et al., 2006). Detailed biophysical understanding of the generation of this ensemble response has implicated this signal (LFP) as a valuable technique to study network function. LFP recordings have also been known to help connecting hand movement patterns to underlying neuronal mechanisms with implications on the development of neuroprosthetic devices (Mehring et al., 2003;Rickert et al., 2005).
We developed a script-based GUI tool, LFPsim in order to facilitate computation of extracellular potential in simulations of conductance based cable models of neurons and networks (Migliore et al., 2003;Hines et al., 2004;Gleeson et al., 2012). LFPsim is a plug-in script developed toward this goal of modeling and analysis of extracellular activity using NEURON simulation environment (Hines and Carnevale, 1997). Tools like ViSAPy (Hagen et al., 2015), LFPy (Lindén et al., 2014), VERTEX (Tomsett et al., 2015) require reimplementation of some models. Our goal was to allow reuse of NEURON (Hines and Carnevale, 2000) models and to allow constraining multicompartmental models via LFPs (Gold et al., 2007). LFPsim was developed to compute electric potential of single neuron, population LFP and their spatio-temporal dynamics using existing and new models in NEURON and available on ModelDB.

Overview of LFPsim
LFPsim was designed as an easy-to-use tool for modeling and computing extracellular electric field of single neuron and LFP of a population of neurons. LFPsim uses NEURON's extracellular mechanism to calculate total ionic currents from neuronal compartments. Three biophysical modeling schemas were implemented to model the extracellular activity. The field potential was calculated using PSA, LSA (Holt and Koch, 1999;Gold et al., 2006) and Resistance-Capacitance (RC) based low-pass filter techniques (Bédard et al., 2004). Extracellular potential at each time step (dt) was calculated by setting pointers to "lfp.mod" and for multiple recording points, "mea.mod." "lfp.mod" and "mea.mod" are NMODL files used by the LFPsim to calculate extracellular potential generated by individual current sources at each time step.

Extracellular Potential and Cable Compartments
Extracellular field potentials were computed from transmembrane ionic currents in the extracellular medium (Reimann et al., 2013). Transmembrane ionic currents are summed active currents generated from individual ion channels of neuronal processes and they diffuse into extracellular medium when action potential propagate in the neuron.
With NEURON, the transmembrane ionic currents in multicompartmental models can be calculated by summing up all active currents estimated using extracellular mechanism from NEURON as implemented in LFPsim (see Equation 1). Circuit representation of intracellular and extracellular potentials is shown in Figure 1A. Transmembrane ionic currents are approximated such that the total current through a compartment is equal to the current density as the center of the compartment times the membrane area of the compartment (Segev et al., 1989;De Schutter, 2010).
Where, I ionic represent the ionic currents and c m ∂V m ∂t represent the capacitive current.
The forward modeling schemas (Rall and Shepherd, 1968;Holt and Koch, 1999) allow modeling the extracellular field potential around neurons ( Figure 1B). The computational schemas of the LFPsim involve two steps. (1) Estimation of total ionic current from detailed biophysical model of neuronal compartments.
(2) Calculation of field potential at a point, P(x,y,z) from calculated ionic currents. In LFPsim, computations were estimated for each time step.

Modeling Extracellular Potential from Transmembrane Current
From individual current sources, the extracellular potential was computed using PSA, LSA (Holt and Koch, 1999;Gold et al., 2006) and RC low pass filter techniques, implemented within LFPsim.
Studies (Rall and Shepherd, 1968;Bédard et al., 2004;Gold et al., 2006) indicate neuropil can be modeled as an isotropic volume conductor with no capacitive effect of the medium for frequency range (0-3000 Hz). This allows the extracellular FIGURE 1 | Schematic of modeling extracellular potential and recording from single neuronal compartment and neuronal ensembles. (A) Electrical equivalent circuit of granule cell model (Diwakar et al., 2009) with extracellular mechanism; Two layers of RC compartments added at the dendrite (indicative representation). (B) Cartoon of LFP electrode (microelectrode) recording from cerebellar granular layer ensemble. Schematic representation of different approximation techniques (C-E) used to model extracellular potential from detailed biophysical model of a neuronal compartment. (C) Each electrical source related to the neuronal compartment in Point Source Approximation (PSA) technique, is assumed to be at the center of the neuritic process. (D) In the Line Source Approximation (LSA) method, the electrical source was modeled as a line passing through the center of the neuritic volume. (E) The extracellular medium's low pass filtering properties was modeled as a Resistance-Capacitance (RC) filter. medium to be described as a purely ohmic conductivity (Plonsey, 1969;Holt, 1998).
In quasistatic approximation of Maxwell's equation, the electric field (E) and magnetic field (B) are effectively decoupled (Hämäläinen et al., 1993). ∇ * E = 0, the electric field in the extracellular medium can be related to extracellular potential ( ) by E = −∇ . A linear relationship was assumed between the transmembrane current density (J m ) and the extracellular field potential (see Equation 2, Hämäläinen et al., 1993). σ denotes the extracellular conductivity.
Extracellular potential generated from a neuronal compartment or segment can be generally approximated as either to a point or line source (Holt and Koch, 1999;Gold et al., 2006). Point source models assume transmembrane currents are generated from a point at the center of the neurite (see Figure 1C). Currents from each compartment across three dimensional space were computed from individual point sources. In the first schema, PSA technique was implemented in LFPsim to estimate the extracellular waveform. For a single point source, "I" denotes the transmembrane current generated from the source, "σ " denotes the conductivity of the medium and "r" denotes the distance from source to the point of measurement. Extracellular potential ( ) at a distance "r" is computed as Considering "n" point sources in the extracellular medium, LFP was computed as, LFP denotes the estimated LFP from transmembrane ionic currents.
As a second technique, LSA was implemented in LFPsim. LSA implementation assumed continuous distribution of the transmembrane currents generated from a line which passes through the axis of the neurite (see schematic in Figure 1D). LSA implementation have been known to better approximate the extracellular signal (except at very close distance, less than 1 µm away; Rosenfalck, 1969;Trayanova et al., 1990;Gold et al., 2006). LSA implementations have been previously modeled and validated on pyramidal neurons (Gold et al., 2006). Assuming line distribution of currents, extracellular potential of a line segment was estimated as For "n" individual sources (line segments) in the extracellular medium, LFP was computed as in Equation (7), Where, LFP denotes the calculated LFP from transmembrane ionic current, " s" denotes the length of single line source, "r" denotes the radial distance from the line, "h" denotes the longitudinal distance from the end of the line, l = s+h denotes the distance from the start of the line, "σ " denotes the conductivity of the extracellular medium (see Figure 1D for schematic) and "I" denotes the transmembrane current generated from the source. In another schema, neuronal processes were considered as passive compartments ( Figure 1E). The low pass filtering property of the extracellular medium was modeled using a simple RC (low pass) filter (Bédard et al., 2004). Extracellular potential ( ) at a distance "d" can be calculated as For "n" sources in extracellular medium, the computation is denoted as in Equation (9), Where "V 0 " denotes individual compartment transmembrane ionic currents, "t" denotes the time constant (t = E r E c ). "E C " denotes capacitance of extracellular medium, set to specific capacitance of the membrane (Johnston and Wu, 1995;Bédard et al., 2004). In this schema, homogenous capacitance was assumed throughout the extracellular space, "E R " denoted resistance of extracellular medium and standard value was assumed (cytoplasmic resistivity of squid axon set to 0.35 m; see Bédard et al., 2006, for discussion on these parameters).
The LFPsim interface includes 4 views; Morphology view window (Figure 2A) is a shape plot which helps to visualize neuron morphology and extracellular electrode location (showed in blue). Right clicking on this window allows options to the user to view the model at different angles and allows selecting LFP electrode location by selecting "LFP_electrode" menu, Voltage changes view window ( Figure 2B) is a space plot to visualize voltage changes across the neuronal membrane during activity. Voltage range from −70 to +40 mV was defined as color map; computed LFP view panel ( Figure 2C) allows viewing the simulated LFP trace in all three methods; simulation control ( Figure 2D) includes controls for setting electrode parameters and extracellular medium properties and running simulation. LFPsim will be made publically available at ModelDB (http:// modeldb.yale.edu).

Computing MEA Field Potential
Multiple Electrode Array (MEA) recordings have been extensively used in electrophysiology to study neuronal circuit function in brain slices and intact brains (BeMent et al., 1986;Mapelli and D'Angelo, 2007;Mapelli et al., 2010;Spira and Hai, 2013). Computational reconstruction of multiple electrodes was aimed to help observe, constrain and model activity at network level. In LFPsim, "MEA" like observation was modeled mathematically by spatially arranging individual electrodes in a square matrix (see Figures 1C, 3A). The tip of the individual electrode was considered as the recording point of the electrodes. The effect of saline layer interfacing between brain slice and MEA chip is not considered in the model in order to reduce the complexity .Field potential generated from a neuronal area was modeled using LSA (see Equations 6, 7). LFP at a point, MEA(x,y,z) was computed using Equation (10).
For multi-electrode computation, a cerebellar granular layer network model was used to reproduce "MEA" LFP feature of LFPsim. The network model was simulated with centersurround excitation (Parasuram et al., 2015), with a single spike as input (in vitro behavior) through mossy fibers. The cerebellar circuit was simulated for 200 ms, input stimuli to network was provided at t = 20 ms through mossy fibers by single spike to compute in vitro post-synaptic LFP Diwakar et al., 2011;Parasuram et al., 2011). After loading the model in LFPsim in NEURON, multi electrode location was set by accessing "MEA" properties described in LFPsim (see Figures 3B,C). By default, an array of 4-by-4 LFP electrodes was deployed and distance between electrodes was set to 100 microns (see schematic, Figure 3A). The number of electrodes, distance and plane of electrode can be altered via the LFPsim interface.

Models of Neurons and Networks
The cerebellum granule neuron model (Diwakar et al., 2009), a detailed biophysical model consisting of 52 active cable compartments, was used to compute extracellular potential. Distribution and localization of the channels have been described previously (D'Angelo et al., 2001;Diwakar et al., 2009). The model has four excitatory (with AMPA and NMDA receptor dynamics) and four inhibitory (GABA) synapses, located at the distal end of the dendrites. A mossy fiber excites both Granule and Golgi cells of same glomeruli. In the model, the mossy fibers excited granule cells via excitatory synapses (D'Angelo et al., 2001;Nieus et al., 2006) and Golgi cell axon inhibited the granule cells via GABAergic synapse (Nieus et al., 2006). A detailed biophysical model of the cerebellum Golgi neuron (Solinas et al., 2007) was used to construct the cerebellar network. The Golgi neuron model consisted of a soma, three dendrites and an axon. Most of the ion channels mechanisms were placed at the soma as described in Solinas et al. (2007). Synaptic model including AMPA, NMDA, GABA receptor dynamics were implemented as described in Solinas et al. (2010).
Pyramidal neuron models were adapted from Mainen and Sejnowski (1996), models of L3 Pyramidal neuron, L3 Stellate neuron and L5 Pyramidal neuron were used to study extracellular field potential computation in complex neurons. The models were stimulated by somatic current injection 70, 100, 200 pA and synaptic activations as reported in Mainen and Sejnowski (1996).
The cerebellar granular layer network model consisted of 730 Multi-compartmental granule neurons (Diwakar et al., 2009), 40 Mossy Fibers (MF) and approximately 8500 synapses to a pack 35 µm cubic slice of cerebellar cortex. The network was simulated with in vitro pattern (single spike as input at 500 Hz) to generate the N 2a and N 2b waves ( Figure 5A) as reported in Mapelli and D'Angelo (2007) and in simulation by Diwakar et al. (2011) and Parasuram et al. (2011). Plasticity conditions were simulated in cerebellar granular layer by modifying intrinsic excitability of sodium channel and release probability of excitatory synapses (Nieus et al., 2006). As an alternative model in this study, a biophysical network model of neocortex (Vierling-Claassen et al., 2010) was used, (ModelDB accession no: 141273). The model represents cortical layer II/III circuits containing three cell types: pyramidal fast spiking, regular spiking, and low-threshold spiking interneurons. The model was developed in NEURON and input to the model was varied at frequencies to generate LFP waves at 8, 32, and 56 Hz FS as mentioned in Vierling-Claassen et al. (2010).

Implementation
LFP modeling schemas (PSA, LSA, and RC methods) were implemented in "extracellular_electrode.hoc." In LFPsim, field potential calculation at each time step, dt, was coded in NMODL, "lfp.mod" was for simulating single electrode LFP simulation and "mea.mod" for multiple electrode simulation. Procedures for changing electrode recording position were implemented in "move_electrode.hoc." "multiple_electrode.hoc" contains implementation of LFP for multiple electrode simulation. "multiple_electrode1.hoc" contains functions to set multi electrode simulation. "mea_run_then_plot.hoc, " contains the functions to plot MEA trace using a NEURON graph plot and "tool_interface.hoc" contains the GUI interface script. Details for using LFPsim for computing single extracellular potential and population LFP are included in Supplementary Material. The current version of the tool was not designed to run on parallel platforms, and therefore may not be suitable for very large scale networks.

Simulations
All simulations were performed with the NEURON version 7.4 simulation environment. Single neuron and network simulations were performed on a 6-core Intel(R) Xeon(R) CPU W3670 at 3.20 GHz processor and 8GB of RAM. All code is available from ModelDB (http://modeldb.yale.edu) with accession number 190140.

Computing Single Neuron Electric Potentials Depend on Detailed Biophysical Modeling
Using LFPsim, extracellular field potentials from electrotonically compact cerebellar granule neuron (Diwakar et al., 2009) and morphologically complex neurons of neocortical column (Mainen and Sejnowski, 1996) were computed.
With spike inputs via 3 mossy fiber synapses, the granule neuron model generated a single action potential. Extracellular potential calculated at a point in the vicinity of the axon showed increased amplitude compared to other recording positions near the neuron (see Figure 4). The techniques, PSA and LSA approximations showed similar responses in terms of estimated extracellular signal for single neurons. The low pass filter based method exhibits reduced amplitude and width in  Mainen and Sejnowski, 1996) and the corresponding extracellular potential for the first spike was calculated and plot for various locations in the neighborhood of the neuron. Red, blue, green traces were extracellular signals estimated using LSA, PSA, and low pass filter based techniques respectively. the computed wave (see Figure 4). The nature of the single neuron extracellular potential depended on compartmental contributions and morphological details (Parasuram et al., 2011). We also observed that non-detailed models did not provide reliable field potential reconstructions (data not shown).
With the neocortical column (Mainen and Sejnowski, 1996), L3 pyramidal neuron, L3 stellate neuron, and L5 pyramidal neuron models, extracellular potential computations were similar to those in experimental studies. Somatic current injections (70-200 pA) were provided as inputs (Mainen and Sejnowski, 1996) and extracellular potential for the first spike was calculated (see Figure 4). The RC-based method showed reduced extracellular signal amplitude and width (See Figure 4) although PSA and LSA had no significant differences.

Estimating Local Field Potential from Microcircuits
In this study, two biophysically detailed network models, implemented in NEURON were used to compute network LFPs. For structurally less complex, small scale networks, the cerebellar granular layer model was used (Parasuram et al., 2011). A network model of neocortex (Vierling-Claassen et al., 2010) was used to investigate the role of cable structures in LFP simulations on complex microcircuit models.

Cerebellar Granular Layer Evoked LFP Reconstructions Showed N 2 Waves In vitro and T-C Waves In vivo
With single spikes as mossy fiber inputs, evoked post-synaptic LFP on cerebellum granular layer generated the N 2a and N 2b waves ; see Figure 5B). With bursts as inputs to reflect trigeminal and cortical inputs via mossy fibers, in vivo evoked LFP simulations generated T and C waves as observed in Crus-IIa (Bower and Woolston, 1983) of rat cerebellum. Computed in vivo LFP (see Figure 5C) also reproduced plasticity related amplitude and lag changes Parasuram et al., 2011).

Simulating Distinct Neocortical Oscillations Reproduce Enhanced LFP
Enhanced LFP by regular spiking interneurons in primary somatosensory neocortex has been known to be controlled by low-threshold spiking and fast-spiking interneurons (Vierling-Claassen et al., 2010). On the neocortical microcircuit simulations with LFPsim, gamma resonance during FS drive was reproduced (see Figures 6A,B) as reported in the study (Vierling-Claassen et al., 2010). Light drive input frequency in the model was varied at frequencies (8, 32, and 56 Hz) to generate corresponding LFP wave responses.

Comparison of Different Modeling Schemas and their Computational Complexity
Three modeling methods generated extracellular field potentials of single neurons and neural microcircuits. Computed extracellular waves (based on PSA and LSA) showed linear drop in amplitude when the recording electrode moved away from the neuronal process (see Figures 7A,E). LFP wave computed from (PSA and LSA) also showed the similar amplitude and shape for recording sites farther than 120 microns from the neurite (see Figure 7B).
Extracellular potentials of a granule neuron, computed when the electrode was in the vicinity to the soma ( Figure 7D, LSA in red, PSA in green, Simple RC in blue) showed similar behavior. LSA and RC based LFP waveforms showed similar amplitude but the PSA generated LFP wave showed slightly reduced amplitude compared to the other techniques.
Attenuation properties of the extracellular medium was studied on a multi compartmental model of the granule neuron (Diwakar et al., 2009) by varying extracellular resistivity from 0.24 to 0.42 m (Nicholson and Freeman, 1975;Goto et al., 2010). Extracellular wave amplitude showed a linear decrease, when the resistivity of extracellular medium increased (see Figure 7C).
LFP algorithmic implementations were analyzed using RAM model of order analysis (Hartmanis, 1971). PSA-based estimations of extracellular electric potential of a single current source at a given point for a single time step (dt) used in 21 unit operations (each arithmetic operation was counted as one unit in order analysis methods), LSA used 70 units and RC filter used 21 units. For a neuron model with "n" compartments, 70*n units for LSA to calculate the electric potential for single time step. For large "n" on network models, the algorithms will run in the order of TS, O (TS) where "TS, " denotes the total time steps in the simulation.
Computation time and memory requirements to simulate large scale network models of LFPsim was analyzed. Real time measurements for computed LFPs were plotted corresponding to a 100 ms of simulation (See Figure 7F). Augmenting granule neuron population sizes indicated a linear increment in computing time when network model was scaled by increasing number of current sources ( Figure 7F). The amount of RAM used to compute LFP for a model did not vary much throughout the simulation ( Figure 7G).

Estimating Multiple Electrode Field Potential using LFPsim
Using multiple spaced virtual recording electrodes, in vitro "MEA" recording of granular layer and spatial attenuation of cerebellar N 2a and N 2b LFP waves (see Figure 3D) was simulated in a 400 × 400 µm area of granule neurons with 100 µm spacing among electrodes. LFP computed from peripheral electrodes showed decreased amplitude and width of N 2a and N 2b waves  in comparison to the center of MEA (Figure 3D). Arraybased representation also reproduced the inherent amplitude decay modeled as a characteristic of the extracellular space.  (Diwakar et al., 2009). (B) Amplitude difference between LSA and PSA with increasing recording distance. (C) Variations in extracellular potential amplitude by increasing the extracellular resistivity from 0.24 to 0.42 m (Nicholson and Freeman, 1975;Goto et al., 2010;Einevoll et al., 2013). (D) Comparing LSA, PSA, and RC-filter methods by computing extracellular waveforms of a single granule neuron model (Diwakar et al., 2009). (E) Attenuation of extracellular potential with increase in recording distance. (F) Simulation time for increasing number of current sources to evaluate computational load. (G) RAM usage for increasing number of current sources.

DISCUSSION
In this paper, we have presented LFPsim as a NEURONbased script, to mathematically compute single neuron electric potential and population LFP. LFPsim uses the forward modeling method to model extracellular potential. Three biophysical modeling schemas, PSA, LSA (Holt and Koch, 1999;Gold et al., 2006) and RC-based low pass filter techniques were implemented to model the extracellular activity. LFPsim uses NEURON to execute the algorithms, the schemas were implemented in hoc and NMODL (Hines and Carnevale, 1997).
We were able to compute LFP from several biophysical models of neurons and networks implemented in NEURON. For single neuron electric potential computations, we chose an electrically compact neuron, cerebellar granule neuron (Diwakar et al., 2009) and a structurally complex, pyramidal neuron (Mainen and Sejnowski, 1996). A simulation on single compartmental models exhibited unreliable LFPs compared to that of multicompartmental models (Parasuram et al., 2011). To test the reliability of LFPsim in computing LFP on microcircuits we used a neocortical network (Vierling-Claassen et al., 2010) and cerebellar granule cell population. LFPsim reproduced in vitro N 2a and N 2b post-synaptic LFP waves of cerebellar granular layer and neocortical LFP's at 8, 32, and 56 Hz (current injection). The tool also allowed network models to be recruited for "multielectrode array" like LFP traces and to allow model-based testing of spatial attenuation properties of extracellular medium.
In addition to mechanistic properties related to extracellular spike time, LFPsim also computed cerebellum granular layer evoked LFP during induced plasticity conditions, LTD and LTP. LTD showed the depression of width and lesser amplitude while LTP shows bigger amplitude and wider wave width in the T-C (Trigeminal and Cortical) components of the in vivo waveform. LFPsim was also employed on other biophysical neuron and network models (Ferrante et al., 2008;Morgan and Soltesz, 2008;Hu et al., 2009;Publio et al., 2009;Li and Cleland, 2013).
Simulations indicated that extracellular potentials generated using PSA and LSA showed little difference in amplitude and width for a distant neurite (>120 µm) from the recording point. But, simulations of LFPs in close proximity to neurons on both single neurons and network models suggested that the LSA technique was more accurate for morphologically complex neurons and on electronically compact neurons like granule neurons. The role of extracellular resistivity on the nature of the extracellular field potential was studied by simulating field potential by varying the resistance from 0.24 to 0.42 M -mm consistent with the coupled role of extracellular medium attenuation on decreases of recorded wave amplitude.
On-the-fly implementation of LFP modeling schemas without disk write, effectively reduced I/O operations and the need for additional secondary storage ( Figure 7G). We also compared the implementation with an offline implementation where we saved all ionic currents as a plain text file. The simulations of LFPs from stored ionic currents required a few gigabytes of storage and 16 min of runtime on a workstation with 6 CPU cores running at 3.20 GHz processor and 8GB of RAM. On-the-fly estimation also helps to compute cortical LFP without saving the transmembrane currents into additional storage (Glabska et al., 2014). Additionally, we employed NEURON's Interviews library components for the GUI. In this version, all electrode parameters and the extracellular medium properties can be directly accessed via the interface.
A variety of LFP modeling tools available today, study origin and nature of extracellular potential calculated from multicompartmental neuron models. Python-based LFPy (Lindén et al., 2014), ViSAPy, that extends LFPy for calculating extracellular potential from multicompartmental neuron models and for any geometries of recording electrodes (Hagen et al., 2015), ViMEAPy, a python-based Multi Electrode Array (MEA) trace modeling tool  and VERTEX (Tomsett et al., 2015) were different from LFPsim in terms of use with NEURON (Hines and Carnevale, 1997) hoc models. Compared to LFPy, VERTEX, ViSAPy, and ViMEAPy, LFPsim computes LFPs from NEURON hoc models allowing some of the ModelDB NEURON models to be used without significant re-implementation. In LFPsim, MEA like recording was implemented as a computation of LFPs arranged to seem like a spatial matrix. Unlike in ViMEAPy, the effect of saline bath was not implemented in the tool (Hagen et al., 2015). In our simulations, LFPsim could compute LFP from large network models composed of a million current sources. Although, we foresee a future implementation on python-based models and for MPI-compatible simulations, LFPsim is currently unusable with parallel models.

CONCLUSION
LFPsim provides a tool-enabled approach to study extracellular potential of single cells and small neural populations. The current version of LFPsim can be employed on existing NEURON models to compute extracellular field potential in single neurons and network implementations. LFPsim is publicly available on ModelDB (https://senselab.med.yale.edu/ModelDB/ShowModel. cshtml?model=190140).

SUPPLEMENTARY MATERIAL
The Supplementary Material for this article can be found online at: http://journal.frontiersin.org/article/10.3389/fncom. 2016.00065