# Parallel Simulations of the Sharp Wave-Ripples of the Hippocamp on Multicore CPUs and GPUs
## 2 Materials and Methods
### Mathematical Model  
The presented work stems from [5], where data had been recorded from 6-7 months old Brown Norway rats during natural sleep. The developed computational model comprises a limited portion of the CA1 pyramidal layer, which is subjected to strong excitatory inputs from the CA3 region. Here, the aim is to reproduce the activity of a group of neurons that, in vivo, could be evaluated using a single electrode, thus assuring optimal comparability between the experimental observations and the model. Two neuronal types have been considered, pyramidal and parvalbumin positive basket cells, since ripples are measured only in the pyramidal layer. More specifically, a 5:1 ratio between numerosity of neuron types is maintained, consistently with real anatomy; in particular, 800 pyramidal cells and 160 interneurons. All-to-all connectivity has been implemented, while synapses connecting the pyramidal cells to one another are weaker and in reduced number. Figure 1 shows cell types and network schematic with connections. Local Filed Potential (LFP) data have been considered and processed using MATLAB R2020a (MathWorks, Natick, MA, USA): the data underwent filtering to better observe sharp wave ripple (SWR) complexes and consequently calculate ripple duration as the duration of SWR. In addition, ripple frequency has been derived as average inter-peak interval of filtered LFP, while ripple inter-arrival times are computed as the time interval between the onset of two consecutive ripples. The CA1 hippocampus computational model considered in our work as the starting point for our optimization is composed of 160 interneurons and 800 pyramidal cells. The equations adopted to model the functional behaviour of every neuron are as follows, and all the parameters related to both neuron types have been kept the same as in [5]. Their values are shown in Table 1.  
\[\dot{Cv}=-g_{L}(v-E_{L})+g_{L}\Delta e^{\frac{v-V_{t}}{\Delta}}-w+I(t) \tag{1}\]  
\[\tau_{w}\dot{w}=a(v-E_{L})-w \tag{2}\]  
\[v(t)=V_{thr}\implies v(t+dt)=V_{r}\text{, }w(t+dt)=w(t)+b \tag{3}\]  
In addition, cells are receiving different inputs, but always maintaining the same structure. In the following equations describing the inputs, \(I_{\text{DC}}\) is kept constant for each cell, but will assume different values from a normal distribution a priori defined, depending on the single neuron, while \(\eta_{t}\) is the stochastic Ornstein-Uhlenbeck (OU) process. \(\beta\) coefficients differ among cell types, namely \(\beta\) = 80 in the case of pyramidal cells and \(\beta\) = 90 for interneurons:  
\[I(t)=I_{\text{DC}}+\beta\eta_{t}+I_{syn}(t)+I_{inp}(t) \tag{4}\]  
\[\tau d\eta_{t}=-\eta_{t}dt+dW_{t} \tag{5}\]  
\[I_{inp}(t)=I_{max}\Big{(}1+e^{-\frac{t-t_{on}}{k}}\Big{)}^{-1}\Big{(}1+e^{- \frac{t-t_{off}}{k}}\Big{)}^{-1} \tag{6}\]  
Considering the generic cell with index \(n\), two equations define synaptic currents, where \(F\) is the normalization factor and \(H\) is the Heaviside function. Each value of \(g\) is \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Parameter** & **Description** & **Pyramidal Cells** &
\begin{tabular}{l} **Inhibitory** \\ **Interneurons** \\ \end{tabular} \\ \hline \(C\) & Membrane capacitance & 200 pF & 200 pF \\ \hline \(g_{L}\) & Leakage conductance & 10 nS & 10 nS \\ \hline \(E_{L}\) & Reversal potential & \(-\)58 mV & \(-\)70 mV \\ \hline \(a\) & Coupling parameter & 2 & 2 \\ \hline \(b\) & Coupling parameter & 100 pA & 10 pA \\ \hline \(\Delta\) & Sharpness of action potential initiation & 2 mV & 2 mV \\ \hline \(\tau_{w}\) & Membrane time constant & 120 ms & 30 ms \\ \hline \(V_{t}\) & Intrinsic threshold & \(-\)50 mV & \(-\)50 mV \\ \hline \(V_{r}\) & Resting potential & \(-\)46 mV & \(-\)58 mV \\ \hline \(V_{thr}\) & Threshold & 0 mV & - \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Model parameters and their values. Figure 1: circles represent single cells, where the blue ones are the pyramidal cells while the green are the interneurons.