## Introduction

Cell size, shape, and organelle location tightly regulate the dynamics of biochemical signal transduction; indeed even small molecule second messengers such as calcium (Ca2+), cyclic adenosine monophosphate (cAMP), and inositol trisphosphate (IP3) are reported to have distinct spatial microdomains within cells1,2. Despite recent studies reporting the localization of these signaling molecules, the role of cell size and shape in controlling local intracellular signaling reactions, and how this spatial information originates and is propagated remains poorly understood. It has been hypothesized that spatial and temporal separation of second messengers can be a powerful means of specifying signaling functions through the interplay of cell shape and biochemical regulators3,4. Therefore, an emerging concept in the understanding of signal transduction is that cell signaling is profoundly inhomogeneous in space, and that the spatio-temporal dynamics of signal molecules encode signaling specificity5,6. This concept has been approached both theoretically4,7,8 and experimentally9,10,11,12,13.

One particular cell type where shape and signaling are closely related is the neuron. Communication in neurons is mediated by synapses and consists of complex signal transduction cascades. The presynaptic terminals release neurotransmitters that are then taken up by the post-synaptic spines to initiate a series of electrical, chemical, and mechanical events. Many of these events are tightly coupled to the dynamics of Ca2+, cAMP, and IP314,15,16. These second messengers are involved not only in the propagation of action potentials but also in downstream effects such as long-term potentiation (LTP), long-term depression (LTD), and structural plasticity. In particular, dendritic spines, which are thin post-synaptic protrusions17,18,19, have received much attention, especially because their density and morphology play a crucial role in mediating synaptic plasticity20,21,22,23,24. Changes in dendritic spine shape and density are symptomatic of several neuropathologies and neurodegenerative diseases such as Alzheimer’s, Parkinson’s, and drug addiction25,26,27,28,29. Thus, it is believed that the morphology of spines is closely related to their function: in fact, reciprocal changes between the structure and function of spines impact both local and global integration of signals within dendrites20,30,31,32. Recently, Ramirez et al.33 proposed that a combination of the geometry of dendritic spines and a characteristic propagation of Cdc42 induce localization of the protein in a timescale longer than the one estimated from the diffusion timescale alone.

Dendritic spines have characteristic shapes and internal organization; a schematic of the mushroom-like morphology of mature spines is shown in Fig. 1. A very thin neck (40~200 nm in diameter and 0.08~1.1 μm long) separates an actin-rich bulbous head (0.3~1.5 μm in diameter) from the dendrite, suggesting that the spine head acts as an isolated signaling compartment6,12,13,34,35,36,37. Additionally, roughly 14–19% of spines contain a distinct organelle called the spine apparatus (SA), which is a protrusion of the smooth endoplasmic reticulum (ER). The spine apparatus may also be of various shapes that can change in response to signaling stimuli over days6,38,39,40,41. It is generally accepted that changes in dendritic spine calcium levels, as well as localized protein synthesis, play a central role in structural plasticity, and these two processes may be influenced by the presence and shape of a spine apparatus. Experimental observations have shown that mice lacking spine apparatus (synaptopodin-deficient mice) show deficits in LTP and impaired spatial learning, thus supporting the hypothesis that the spine apparatus is involved in synaptic plasticity42,43,44,45,46,47,48. Furthermore, it has been hypothesized that computational modeling of the processes underlying structural plasticity could help to identify the regulatory feedback that governs the switch between LTD and LTP in ER-containing spines49.

Despite the emerging importance of the role of spine shape and internal organization in synaptic plasticity, the precise nature of how the physical aspects of a dendritic spine affect signaling dynamics of second messengers such as IP3, Ca2+, and cAMP remains poorly understood. In this paper, we conducted a systems biophysics study with the goal of identifying some of the design principles associated with the regulation of second messenger dynamics in dendritic spines. Specifically, using a combination of theory and computation, we sought to answer the following questions: (a) How are the spatio-temporal dynamics of second messengers within the spine affected by spine geometry? (b) How do the presence, size, and shape of the spine apparatus affect these spatio-temporal dynamics? And (c) how does different localization of the postsynaptic density (PSD, a protein-dense region in the postsynaptic membrane) affect the spatio-temporal dynamics of the second messenger? Using a minimal model to represent reaction-diffusion events within the spine, we showed that in the short timescale, the geometric features of the spine play an important role in establishing the spatio-temporal dynamics of the second messengers.

## Methods

### Governing equations

We developed and analyzed a reaction-diffusion model of second messenger dynamics with time-dependent flux boundary conditions. The resulting system of equations was analytically and numerically solved in simplified geometries to identify how the dynamics of second messengers are related to the geometrical parameters (see Fig. 1b). We considered a second messenger with concentration distribution C = C(x, t), where x is the vector of the spatial coordinates and t is time. In the volume of the domain, the dynamics of C are then given by the following partial differential equation (PDE):

$$\frac{\partial C}{\partial t}+\frac{1}{\tau }C=D{\nabla }^{2}C,$$
(1)

where D is the diffusion constant of the species C, 2 represents the Laplacian operator in three dimensions, and τ is a time constant. τ represents a decay time constant associated with C. In the case of Ca2+, τ can be interpreted as the effective binding rate of rapid buffers. For IP3, τ represents the rate of degradation and for cAMP it represents the activity of phosphodiesterase. Our main goal in this study was to explore the solution to Eq. (1) for different geometries. Therefore, we chose a constant value of τ = 50 ms. Specialization of this model to Ca2+ and cAMP can be found in Bell et al.50 and Ohadi et al.51,52, respectively.

### Boundary conditions

To completely define the dynamics of C in the domain, we need to prescribe boundary conditions on both boundaries of the domain. Since the dynamics of the receptor-mediated events at the PM and on the organelle membranes are time-dependent fluxes due to signaling reactions53,54,55,56, we prescribed the following boundary conditions

$$D{\rm{\nabla }}C\cdot \hat{{\bf{n}}}{|}_{PM}={J}_{PM}(t),\,\,D{\rm{\nabla }}C\cdot \hat{{\bf{n}}}{|}_{ER}={J}_{ER}(t).$$
(2)

The fluxes JPM and JER usually depend on many nonlinear reaction terms. For the purposes of our analyses, we used biexponential functions to describe the PM flux and included a slight delay in the ER flux to write

$${J}_{PM}(t)=\gamma ({e}^{-\frac{t}{\alpha }}-{e}^{-\frac{t}{\beta }})\,\,\,{\rm{a}}{\rm{n}}{\rm{d}}\,\,\,{J}_{ER}(t)=\zeta \,{J}_{PM}(t-{t}_{ER}).$$
(3)

Here, the amplitude parameter γ, the time constants α and β, the amplitude of the PM-ER flux ratio ζ, and ER delay tER are free parameters that can be fit to experimental57 or simulation data6.

Finally, to simulate the effect of the efflux through the spine neck, we included an outlet flux in a portion of the outer membrane defined as

$$D\,\nabla C\cdot \hat{{\bf{n}}}{|}_{N}={J}_{N}(t)={K}_{N}C(t){|}_{N},$$
(4)

where KN is a constant with units of a velocity (μm/s).

### Geometries

We modeled the volume of the dendritic spine head using idealized geometries such that, to first approximation, they resemble the shape of a mature spine. We investigated three idealized geometries: spherical shells, oblate spheroidal shells, and idealized spheroidal mushroom-like geometries (see Fig. 1b–e). The dimensions of the spherical shell shape are denoted as outer radius Ro and internal Ri = ρRo. To highlight the combined effect of curvatures and size of the membranes, we considered oblate spheroidal shells and spheroidal mushroom-like geometry with outer eccentricity eo and inner eccentricity ei. As a result, the dimensions of the outer shell are major axis ao and minor axis bo = eoao. The dimensions of the inner shell are major axis ai = ρao and minor axis bi = eiai. The mushroom-like geometry was constructed by removing the intersection between the oblate spheroidal shell (Fig. 1c) and another oblate spheroid centered at bo in the vertical axis of symmetry with minor axis bo/10 and major axis ao (Fig. 1d). In this study, the geometrical parameters ρ, ei, and eo were varied (in the range (0, 1]) to quantify the geometrical influence on the spatio-temporal dynamics of second messengers (C). For all simulations, we set the outer radius (and major axis) as Ro = ao = 250 nm.

### Computational tools

To assist in the derivation of the analytical solutions (Section 3.1), we used Mathematica 11.358. Simulations for the dynamics of second messengers were performed using finite element methods available through the commercial package COMSOL Multphysics 5.3a with MATLAB2018a59. In particular, the coefficient - form PDE interface was used along with parametrized geometries. The solutions were produced with the parametric sweep utility. Wolfram Mathematica 11.3 and MATLAB2018a60 were used for post-processing the solutions and generating the figures.

### Model analysis and relevant parameters

To compare the effect of different model geometries on the spatiotemporal dynamics of C, we defined the following metrics:

• Gradient Metric: In order to quantify a local measure of the spatial gradient of the species C, we defined

$$\Vert \nabla C\Vert =\sqrt{(\frac{\partial C}{\partial {x}_{i}}{{\bf{e}}}_{i})\cdot (\frac{\partial C}{\partial {x}_{i}}{{\bf{e}}}_{i})},$$
(5)

where xi are the components of the position vector x in the direction defined by the vector bases ei, i = {1, 2, 3}, and the repeated indices indicate summation.

• Extent of gradient: A global measure of the variability of second messenger in the spine was defined as:

$${\rm{\Psi }}(t)=\frac{{\Vert \nabla C\Vert }_{mean}(t)}{{\Vert \nabla C\Vert }_{max}},$$
(6)

where ||C||mean(t) is the spatially averaged value of the gradient of C in Eq. 5 and ||C||max is the maximum peak value. This quantity gives us insight on the localization of second messengers. When Ψ(t) tends to zero, there is no concentration gradient in the spine.

• Lifetime of the gradient: We defined the lifetime of the gradient as the time, τΨ, needed to let Ψ(t) become lower than a threshold value Ψth. In this work, we used Ψth = 25% as the value beyond which the distribution of C is uniform. This quantity gives us insight into the variation of the lifetime of the gradient with respect to different geometr ies and boundary conditions.

$${\tau }_{{\rm{\Psi }}}={t}^{\ast }:\,\,{\rm{\Psi }}({t}^{\ast }) < {{\rm{\Psi }}}_{th}$$
(7)

For clarity, the parameters used in the model are summarized in Table 1.

## Results

### Analytical solution

Eq. 1 is a homogeneous PDE with time-dependent BCs given by Eq. (2). To solve it, we used the method of Generalized eigenfunction expansion after formally transforming the problem into one with homogeneous boundary conditions; as a result, the PDE becomes nonhomogeneous61. We defined a function, the so-called reference concentration distribution w(x, t), such that it satisfies the given nonhomogeneous boundary condition, i.e.:

$$D\,{{\rm{\nabla }}w\cdot \hat{{\bf{n}}}|}_{PM}={J}_{PM}(t)\,\text{and}\,{D{\rm{\nabla }}w\cdot \hat{{\bf{n}}}|}_{ER}={J}_{ER}(t).$$
(8)

We considered a solution for C such that

$$C=v+w,$$
(9)

where the unknown function v is the solution of the new nonhomogeneous PDE with homogeneous BCs. This equation is obtained by substituting Eq. (9) into Eq. (1), resulting in,

$$\begin{array}{cc} PDE:\,\frac{{\rm{\partial }}v}{{\rm{\partial }}t}=D{{\rm{\nabla }}}^{2}v-\frac{1}{\tau }v+Q,\\ BCs:\,{\rm{\nabla }}v\cdot \hat{{\bf{n}}}{|}_{PM}=0,\,\text{and}\,\,\,{\rm{\nabla }}v\cdot \hat{{\bf{n}}}{|}_{ER}=0.\end{array}$$
(10)

Here, $$Q=D{\nabla }^{2}w-\frac{\partial w}{\partial t}-\frac{1}{\tau }w$$ is a source term for v. For a homogeneous initial condition for C, the following initial condition holds for v and w,

$$v{|}_{t=0}=-\,w{|}_{t=0}\triangleq g({\bf{x}}),$$
(11)

where g(x) is the initial condition for v. To solve Eq. (10), the method of eigenfunction expansion is used, which consists of expanding the unknown function v in a series of spatial eigenfunctions Λ, resulting in

$$v({\bf{x}},t)=\mathop{\sum }\limits_{n=1}^{\infty }\,{T}_{n}(t){{\rm{\Lambda }}}_{n}({\bf{x}}).$$
(12)

Here, Tn(t) are the generalized Fourier coefficients of the eigenfunctions Λn(x). The eigenfunctions can be found using the associated homogeneous version (Q = 0) of Eq. 10. Using the method of separation of variables, v = T(t)Λ(x), we can write,

$$\frac{1}{T}\frac{dT}{dt}=-({\lambda }^{2}+\frac{1}{\tau }),\,\,{\rm{a}}{\rm{n}}{\rm{d}}\,\,\,\frac{{{\rm{\nabla }}}^{2}{\rm{\Lambda }}}{{\rm{\Lambda }}}=\frac{-\,{\lambda }^{2}}{D},$$
(13)

where λ is a separation constant.

The separation between time and space highlights the pseudo-harmonic nature of the distribution of second messenger (C). The temporal ordinary differential equation (ODE in Eq. (13)) has an exponential decay as the solution, which is affected by both λ and the timescale τ. The spatial PDE in Eq. (13) represents the Helmholtz wave equation, which is separable in 11 three-dimensional coordinate systems, and for each of them, there exists a specific family of solutions, known as the harmonic wave functions62,63. However, the presence of internal and external time-dependent boundary conditions and the transcendental nature of the kernel of the solution limit the possibility of finding explicit solutions and restrict the solution to an implicit form. In what follows, we further specialize this analysis for spherical domains with and without an inner boundary (Sections 3.1.1 and 3.1.2) and oblate spheroidal shells (Section 3.1.3).

#### Analytical solution in spherical shells with uniformly distributed BCs

We first considered a spherical shell with an inner boundary of radius Ri, an outer radius of Ro, and with uniformly distributed influx on both membranes (see Fig. 1c). We used a spherical coordinate system (x = (rer, θeθ, ϕeϕ)) defined in terms of the Cartesian (x, y, z) coordinates as shown in Fig. 2a, where r [0, ∞), θ [0, 2 π), and ϕ [0, π] represent the radial, the azimuthal, and polar coordinates respectively64. Exploiting the spherical symmetry of both the domain and the boundary condition, we assumed that C(x, t), and thus v(x, t) and w(x, t), depend only on the radial coordinate r. That is, we assume that there is no dependence on the angular coordinates θ and ϕ. Thus, the Laplacian and normal gradient operators are:

$${{\rm{\nabla }}}^{2}=\frac{1}{{r}^{2}}\frac{{\rm{\partial }}}{{\rm{\partial }}r}({r}^{2}\frac{{\rm{\partial }}}{{\rm{\partial }}r})\,\,\,{\rm{a}}{\rm{n}}{\rm{d}}\,\,\,\hat{{\bf{n}}}\cdot {\rm{\nabla }}=\frac{{\rm{\partial }}}{{\rm{\partial }}r}.$$
(14)

In this framework, the simplest way to define w(r, t) respecting the conditions in Eq. (8) is

$$w(r,t)=\frac{{J}_{ER}(t)}{D}(r-{R}_{i})-\frac{{J}_{PM}(t)+{J}_{ER}(t)}{D}\frac{{(r-{R}_{i})}^{2}}{2({R}_{i}-{R}_{o})}.$$
(15)

The homogeneous initial condition for C and Eq. (15), result in the initial condition for v as,

$$v(r,0)=-\,\frac{{J}_{ER}(0)}{D}(r-{R}_{i})+\frac{{J}_{PM}(0)+{J}_{ER}(0)}{D}\frac{{(r-{R}_{i})}^{2}}{2({R}_{i}-{R}_{o})}=g(r).$$
(16)

The solution of the Helmholtz Equation (Eq. (13)) in spherical coordinates is the sum of spherical Bessel functions of the first kind (j) and the second kind (y) of zero order61,62,63,

$${\rm{\Lambda }}(r)=a\,j(\frac{\lambda }{\sqrt{D}}r)+b\,y(\frac{\lambda }{\sqrt{D}}r),$$
(17)

where a and b are integration constants. Due to the homogeneity of both the PDE and BCs, there exists a non-trivial solution for v if we impose the determinant condition61. The BCs in Eq. (10) now become

$$\begin{array}{ccc}(a\frac{{\rm{\partial }}\,j(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r}+b\frac{{\rm{\partial }}(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r})|{}_{r={R}_{i}} & = & 0,\,\,{\rm{a}}{\rm{n}}{\rm{d}}\\ (a\frac{{\rm{\partial }}\,j(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r}+b\frac{{\rm{\partial }}\,y(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r})|{}_{r={R}_{o}} & = & 0.\end{array}$$
(18)

The eigenvalues λn are the roots of the characteristic polynomial

$$p(\lambda )=\frac{{\rm{\partial }}j(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r}|{}_{r={R}_{i}}\,\frac{{\rm{\partial }}y(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r}|{}_{r={R}_{o}}-\frac{{\rm{\partial }}j(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r}|{}_{r={R}_{o}}\frac{{\rm{\partial }}y(\frac{\lambda }{\sqrt{D}}r)}{{\rm{\partial }}r}|{}_{r={R}_{i}}.$$
(19)

After some algebraic manipulation and exploiting the properties of the Bessel functions, it is possible to rearrange p(λ) as

$$p({\lambda }_{D})=({\lambda }_{D}^{2}\rho +1)\,\sin \,({\lambda }_{D}(1-\rho ))+{\lambda }_{D}(\rho -1)\,\cos \,({\lambda }_{D}(1-\rho )),$$
(20)

where $${\lambda }_{D}=\frac{\lambda {R}_{o}}{\sqrt{D}}$$ and $$\rho =\frac{{R}_{i}}{{R}_{o}}$$. p(λD) is a transcendental function and the zeros can be found only numerically as showing in Fig. 2b.

Assuming that the eigenvalues λn have been found, the expansion in Eq. (12) can be specialized as follows,

$$v(r,t)={a}_{n}(t)j({\lambda }_{n}r)+{b}_{n}(t)y({\lambda }_{n}r).$$
(21)

Exploiting the orthogonality of the eigenfunctions, we can now determine the initial values of the generalized Fourier coefficients as61

$${a}_{n}(0)=\frac{{\int }_{{R}_{i}}^{{R}_{o}}\,g(r)j({\lambda }_{n}r)dr}{{\int }_{{R}_{i}}^{{R}_{o}}\,j{({\lambda }_{n}r)}^{2}dr},\,\text{and}\,{b}_{n}(0)=\frac{{\int }_{{R}_{i}}^{{R}_{o}}\,g(r)y({\lambda }_{n}r)dr}{{\int }_{{R}_{i}}^{{R}_{o}}\,y{({\lambda }_{n}r)}^{2}dr}.$$
(22)

Substituting Eq. (21) back into Eq. (10), we obtain two nonhomogeneous first order ODEs for the Fourier coefficients that must respect the initial conditions in Eq. (22),

$$\begin{array}{rcl}\frac{d{a}_{n}}{dt}+({\lambda }_{n}^{2}+\frac{1}{\tau }){a}_{n} & = & \frac{{\int }_{{R}_{i}}^{{R}_{o}}\,Q(r,t)j({\lambda }_{n}r)dr}{{\int }_{{R}_{i}}^{{R}_{o}}\,j{({\lambda }_{n}r)}^{2}dr}\equiv {q}_{a}(t),\,{\rm{and}}\\ \frac{d{b}_{n}}{dt}+({\lambda }_{n}+\frac{1}{\tau }){b}_{n} & = & \frac{{\int }_{{R}_{i}}^{{R}_{o}}\,Q(r,t)y({\lambda }_{n}r)dr}{{\int }_{{R}_{i}}^{{R}_{o}}\,y{({\lambda }_{n}r)}^{2}dr}\equiv {q}_{b}(t).\end{array}$$
(23)

The solutions of the above equations are given by

$${a}_{n}(t)={a}_{n}(0)+{e}^{-({\lambda }_{n}^{2}+\frac{1}{\tau })t}{\int }_{0}^{t}\,{q}_{a}(t){e}^{({\lambda }_{n}^{2}+\frac{1}{\tau })t}\,dt,\,\mathrm{and}\,$$
(24)
$${b}_{n}(t)={b}_{n}(0){e}^{-({\lambda }_{n}^{2}+\frac{1}{\tau })t}+{e}^{-({\lambda }_{n}^{2}+\frac{1}{\tau })t}{\int }_{0}^{t}\,{q}_{b}(t){e}^{({\lambda }_{n}^{2}+\frac{1}{\tau })t}\,dt.$$
(25)

Despite the complexity of these coefficients, we observed that the amplitude of the wave functions in Eqs (24) and (25) are implicitly related to the temporal dynamics of the biochemical reactions on the membranes of the spine (through Q), intricately coupled by the morphology (through λn), and reaction kinetics (through τ).

#### Analytical solution in spherical domains with anti-periodic BCs

We next analyzed the effect of localized influx and efflux at the outer membrane representative of fluxes at PSD and at the neck, respectively. In this context, we investigated the analytical solution of Eq. (1) in a spherical domain with no inner boundary and anti-periodic BCs at the outer domain (see Fig. 2c) written as

$$D\,{\rm{\nabla }}C\cdot \hat{{\bf{n}}}{|}_{PM}=\{\begin{array}{cclc} & {J}_{PM}(t) & \text{for}\,\,\,\,-{\varphi }_{0}\,\le \, & \varphi \,\le +{\varphi }_{0}\\ {J}_{N}(t) & \,=-{J}_{PM}(t) & \text{for}\,\pi -{\varphi }_{0}\,\le \, & \varphi \,\le \,\pi +{\varphi }_{0}.\end{array}$$
(26)

Here, JN reflects efflux through the neck. We assumed that the amplitude of the influx and efflux are the same to simplify our analysis and obtain a semi-analytical solution by exploiting the axial symmetry of the domain and BCs. As a result, C(x, t) and therefore v(x, t), and w(x, t) depend on r and ϕ but not θ. The Laplacian and normal gradient operators in spherical coordinates (Fig. 2a) are

$${{\rm{\nabla }}}^{2}=\frac{1}{{r}^{2}}\frac{{\rm{\partial }}}{{\rm{\partial }}r}({r}^{2}\frac{{\rm{\partial }}}{{\rm{\partial }}r})+\frac{1}{{r}^{2}\sin \,\varphi }\frac{{\rm{\partial }}}{{\rm{\partial }}\varphi }(\sin \,\varphi \frac{{\rm{\partial }}}{{\rm{\partial }}\varphi }),\,\,\text{and}\,\hat{{\bf{n}}}\cdot {\rm{\nabla }}=\frac{{\rm{\partial }}}{{\rm{\partial }}r}$$
(27)

In this framework, the simplest way to define w(r, ϕ, t) respecting Eq. (8) and Eq. (26) is

$$w(r,\varphi ,t)=\frac{{J}_{PM}(t)}{D}[{\rm{\Pi }}(\frac{\varphi }{{\varphi }_{0}})-{\rm{\Pi }}(\frac{\varphi -\pi }{{\varphi }_{0}})]\frac{{r}^{2}}{2{R}_{o}},$$
(28)

where Π(ϕ) is a rectangle function. Given the homogeneous initial condition for C and Eq. (28), the initial condition for v is

$$v(r,0)=-\,w(r,\varphi ,0)=g(r,\varphi ).$$
(29)

Using separation of variables, Λ = R(r)Φ(ϕ), the Helmholtz equation in Eq. (13) leads to the following two equations

$${r}^{2}\frac{{R}^{{\rm{^{\prime} }}{\rm{^{\prime} }}}}{R}+2r\frac{{R}^{{\rm{^{\prime} }}}}{R}+{r}^{2}{\frac{\lambda }{D}}^{2}-m(m+1)=0,\,\,{\rm{a}}{\rm{n}}{\rm{d}}$$
(30)
$$\frac{{\rm{\Phi }}^{\prime\prime} }{{\rm{\Phi }}}+\frac{\cos \,\varphi }{\sin \,\varphi }\frac{{\rm{\Phi }}^{\prime} }{{\rm{\Phi }}}\text{'}+m(m+1)=0.$$
(31)

Here, m is a separation constant. Due to the anti-symmetric periodic condition (Φ[0] = −Φ[π]), the solution of Eq. (31) involves the Legendre functions, Lm(ϕ), of the first kind and of odd mth order,

$${\rm{\Phi }}(\varphi )={C}_{m}{L}_{m}(\cos \,\varphi ).$$
(32)

The solutions of Eq. (31) are spherical Bessel functions of the first kind of mth order (jm(r))61,62,63,64,

$$R(r)={a}_{m}\,{j}_{m}(\frac{\lambda }{\sqrt{D}}r).$$
(33)

To find the λmn eigenvalues we need to enforce homogeneous BCs ($$\nabla v\cdot \hat{{\bf{n}}}{|}_{PM}=0$$) that correspond to finding the roots of derivative of the Bessel functions such that

$${\lambda }_{mn}:{J}_{m}^{^{\prime} }({\lambda }_{mn}r)|{}_{r={R}_{o}}=0.$$
(34)

Assuming that the eigenvalues λmn can be found, the expansion in Eq. (12) can be written as

$$v(r,\varphi ,t)={a}_{mn}(t){j}_{m}({\lambda }_{mn}r){L}_{m}(\cos \,\varphi ).$$
(35)

Exploiting the orthogonality of the eigenfunctions the initial values of the generalized Fourier coefficients are given by

$${a}_{mn}(0)=\frac{{\int }_{0}^{\pi }\,{\int }_{0}^{{R}_{o}}\,g(r,\varphi ){j}_{m}({\lambda }_{mn}r){L}_{m}(\cos \,\varphi )drd\varphi }{{\int }_{0}^{\pi }\,{\int }_{0}^{{R}_{o}}\,{j}_{m}{({\lambda }_{mn}r)}^{2}{L}_{m}{(\cos \varphi )}^{2}drd\varphi }.$$
(36)

Substituting Eq. (35) back into Eq. (10), we obtain a nonhomogeneous first order ODE for the Fourier coefficients that must respect the initial conditions in Eq. (36),

$$\frac{d{a}_{mn}}{dt}+({\lambda }_{mn}^{2}+\frac{1}{\tau }){a}_{mn}=\frac{{\int }_{0}^{\pi }\,{\int }_{0}^{{R}_{o}}\,Q(r,\varphi ,t){j}_{m}({\lambda }_{mn}r){L}_{m}(\cos \,\varphi )drd\varphi }{{\int }_{0}^{\pi }\,{\int }_{0}^{{R}_{o}}\,{{\rm{j}}}_{m}{({\lambda }_{mn}r)}^{2}{L}_{m}{(\cos \varphi )}^{2}drd\varphi }\equiv {q}_{anm}(t).$$
(37)

The solution of the above equation leads to the following expression for amn(t),

$${a}_{mn}(t)={a}_{mn}(0){e}^{-({\lambda }_{mn}^{2}+\frac{1}{\tau })t}+{e}^{-({\lambda }_{mn}^{2}+\frac{1}{\tau })t}{\int }_{0}^{t}\,{q}_{a}(t){e}^{({\lambda }_{mn}^{2}+\frac{1}{\tau })t}dt.$$
(38)

It is worth noticing that, with respect to the uniformly distributed BCs, the asymmetry of the localized fluxes introduced new angular harmonics Lm in addition to the radial wave functions Jm. Thus, in addition to the complex coupling between morphology of the spine and degradation kinetics, we found that the spatial distribution of the biochemical reactions on the membrane of the spines (through ϕ0) also regulates the dynamics of second messengers.

#### Analytical solution in oblate spheroidal shells with uniformly distributed BCs

We next obtained the analytical solutions for the case of the confocal oblate spheroidal shell with uniformly distributed BCs (Eq. (2)). The dimensions of the outer shell are major axis ao and minor axis bo = eoao. The dimensions of the inner shell are major axis ai = ρao and minor axis bi = eiai. We used the oblate spheroidal coordinates system x = (ξeξ, ηeη, ϕeϕ) related to the Cartesian coordinates as shown in Fig. 2d where ξ [0, ∞), η [−π/2, π/2], and ϕ [0, 2π). Surfaces with constant ξ, η, and ϕ are oblate spheroids, confocal one-sheeted hyperboloids of revolution, and half-planes through the z-axis, respectively (Fig. 2d). To express the Laplacian in oblate spheroidal coordinates, an alternative set of spheroidal coordinates, ε1 = sinh ξ, ε2 = sin η, and ε3 = ϕ, can be used62,63,64,65,66,67,68 as follows

$${{\rm{\nabla }}}^{2}=\frac{1}{{a}_{o}^{2}({\varepsilon }_{1}^{2}+{\varepsilon }_{2}^{2})}\{\frac{{\rm{\partial }}}{{\rm{\partial }}{\varepsilon }_{1}}[({\varepsilon }_{1}^{2}+1)\frac{{\rm{\partial }}}{{\rm{\partial }}{\varepsilon }_{1}}]+\frac{{\rm{\partial }}}{{\rm{\partial }}{\varepsilon }_{2}}[(1-{\varepsilon }_{2}^{2})\frac{{\rm{\partial }}}{{\rm{\partial }}{\varepsilon }_{2}}]\}+\frac{1}{{a}_{o}^{2}({\varepsilon }_{1}^{2}+1)(1-{\varepsilon }_{2}^{2})}\frac{{{\rm{\partial }}}^{2}}{{\rm{\partial }}{{\varepsilon }_{3}}^{2}}.$$
(39)

The normal gradient to the boundary of oblate ellipsoids is given by

$$\hat{{\bf{n}}}\cdot \nabla =\frac{1}{{h}_{{\varepsilon }_{1}}}\frac{\partial }{\partial {\varepsilon }_{1}},\,{\rm{where}}\,{h}_{{\varepsilon }_{1}}={a}_{o}\sqrt{\frac{{\varepsilon }_{1}^{2}+{\varepsilon }_{2}^{2}}{{\varepsilon }_{1}^{2}+1}}.$$
(40)

We assume that it is possible to establish a reference function w such that the BCs (Eq. (8)) in oblate spheroidal coordinates Eq. (40) are satisfied. In this framework, the Helmholtz equation in Eq. (13) has solution in the form Λ = w1(ε1)w2(ε2)w3(ε3), where w1, w2, and w3 satisfy the following spheroidal wave equations respectively62,63,65,66,67,68,

$$\frac{{\rm{d}}}{{\rm{d}}{\varepsilon }_{1}}((1+{\varepsilon }_{1}^{2})\frac{{\rm{d}}{w}_{1}}{{\rm{d}}{\varepsilon }_{1}})-(k+{\sigma }^{2}(1-{\varepsilon }_{1}^{2})-\frac{{\mu }^{2}}{1+{\varepsilon }_{1}^{2}}){w}_{1}=0,$$
(41)
$$\frac{{\rm{d}}}{{\rm{d}}{\varepsilon }_{2}}((1-{\varepsilon }_{2}^{2})\frac{{\rm{d}}{w}_{2}}{{\rm{d}}{\varepsilon }_{2}})+(k+{\sigma }^{2}(1-{\varepsilon }_{2}^{2})-\frac{{\mu }^{2}}{1-{\varepsilon }_{2}^{2}}){w}_{2}=0,{\rm{a}}{\rm{n}}{\rm{d}}$$
(42)
$$\frac{{{\rm{d}}}^{2}{w}_{3}}{{\rm{d}}{{\varepsilon }_{3}}^{2}}+{\mu }^{2}{w}_{3}=0.$$
(43)

with $${\sigma }^{2}=-\,{\lambda }^{2}{a}_{o}^{2}/D$$ and, k and μ2 are new separation constants. The solutions of Eqs (4143) involve the spheroidal harmonic functions

$${w}_{1}({\varepsilon }_{1})={a}_{1}{S}_{n}^{\mu (1)}(i{\varepsilon }_{1},\sigma )+{b}_{1}{S}_{n}^{\mu (2)}(i{\varepsilon }_{1},\sigma ),$$
(44)
$${w}_{2}({\varepsilon }_{2})={a}_{2}{P}_{n}^{\mu }({\varepsilon }_{2},{\sigma }^{2})+{b}_{2}{Q}_{n}^{\mu }({\varepsilon }_{2},{\sigma }^{2}),{\rm{and}}$$
(45)
$${w}_{3}({\varepsilon }_{3})={a}_{3}\,\cos (\mu \,{\varepsilon }_{3})+{b}_{3}\,\sin (\mu \,{\varepsilon }_{3}).$$
(46)

Here, the eigenfunctions S, P and Q are the so-called radial wave functions, spheroidal wave functions of first kind, and spheroidal wave functions of second kind respectively, while a1, a2, b1, b2, c1, and c2 are integration constants. The oblate spheroidal solution can be simplified assuming the oblate symmetry of both the geometry and the BCs and thus we write Λ = w1(ε1)w2(ε2) and μ = 0. Also in this case, the associated eigenvalues can be found by imposing the determinant condition in an implicit form. Similar to the spherical case (Eqs (2425) the generalized Fourier coefficients (Eq. (12)) will have an exponential time decay highlighting the pseudo-harmonic nature of the solution. As a result a deviation from the spherical shape introduces more complex spatial dependence for C. In addition to the radial variation, new angular wave functions regulate the spatiotemporal dynamics of second messengers in the ϕ direction.

### Combined effect of spine apparatus size and diffusion coefficient on the lifetime of second messengers gradient

Thus far we have elaborated on the pseudo-harmonic nature of the solution showing how the analytical solutions can be provided implicitly. In order to visualize these solutions, we now explore the parameter space numerically. We begin with a simulation of the spatiotemporal dynamics of C in a spherical spine head with a radius r = Ro and a spherical spine apparatus with a radius Ri = ρRo (Fig. 1 and Table 1). For simplicity, we start with uniformly distributed influx (JPM(t) and JER(t)) boundary conditions on the outer and inner boundary but with no outlet (JN(t) = 0). For illustrative purposes, we chose a set of parameters for the boundary conditions (Fig. 3a) such that we can match previously reported dynamics of calcium6. For a diffusion coefficient D = 100 μm2/s and ρ = 0.5, the profile of C at a location exactly halfway between the two membranes is shown in (red line, Fig. 3b); this temporal profile is in good agreement with previous observations (see inset in Fig. 3b). Therefore, for all the following simulations, we used the time constants (α, β, and tER) as shown in Fig. 3a. The amplitude parameters (γ and ζ) have been customized to the specific geometry, to avoid abnormal peaks of concentration of second messengers.

A characteristic feature of the spatio-temporal dynamics of C is the lifetime of the gradient, which is affected by both the ratio between the radii (ρ) and the diffusion coefficient (D). To decode how these two quantities affect the spatiotemporal dynamics of C, we conducted the following simulations – (i) spine apparatus size was varied by changing ρ; we used three different values of ρ (0.1, 0.5, and 0.9) to capture the extreme volume changes due to small, medium, and large spine apparatus. (ii) The diffusion constant of C was varied to capture the range of intracellular diffusion from a crowded regime to free diffusion (1, 10, 100 μm2/s)69,70,71,72,73,74,75. We found that with small spine apparatus (ρ = 0.1), a significant concentration gradient exists in the radial direction when the diffusion coefficient is small (D = 1 μm2/s) at early time points but not for larger diffusion coefficients (Fig. 4a). As the spine apparatus gets larger, there is less volume available in the spine and more surface area for the internal membrane and consequently more flux through the ER. Therefore, the variability of C is smaller even for a lower diffusion coefficient (Fig. 4a–c).

To quantify the lifetime of the gradient, we calculated the norm of the gradient of C (Eq. (5)) as a function of time. Again, when the spine apparatus is small and the diffusion coefficient is small, the gradient lasts longer. An increase in diffusion coefficient for a given spine apparatus size reduces the lifetime (Fig. 4d). As the size of the spine apparatus increases, even for small diffusion coefficients, the lifetime of the gradient decreases (Fig. 4d–f) confirming that small spine apparatus and low diffusion will result in longer time gradients of C. On the other hand, a large apparatus, even with a small diffusion coefficient will result in rapid propagation of second messengers from the PM to the ER membrane.

Given that our results are sensitive to the value of diffusion coefficients, we surveyed the literature for estimates of diffusion coefficient of different second messengers (Table 2). Based on this survey and the fact that the spine has a highly crowed environment characterized by a viscosity 5 times higher than the other cell types76, we chose a value of D = 10 μm2/s for the remaining simulations.

### Size and shape of the spine and spine apparatus affect the gradient of signaling molecules

We next investigated the effect of the shape of the spine and the spine apparatus. This is particularly relevant since dendritic spines are known to have distinct shapes and their shape is associated with function22,30,31. Because the shape of the spine is a result of many different geometric properties, we focused specifically on curvature by modeling the spine shapes as different ellipsoidal shells. Even though this is a mathematical idealization, the resulting solutions provide insight into how curvature variations along the ellipsoids affect the harmonic functions that govern the profile of C, for uniformly spatially distributed boundary conditions. As before, the ratio between PM-ER size is controlled by ρ and now the shape is controlled by the eccentricities of the inner and outer ellipsoids ei and eo respectively (Fig. 1c and Table 1). We conducted a systematic variation of the magnitude of these geometrical parameters and analyzed their effect on the spatio-temporal dynamics of C (Fig. 5). The influx JPM(t) was considered distributed on all the outer boundary except for a smaller portion ($$\simeq$$0.2 μm in diameter12) to include the presence of an outlet flux due to the neck JN(t) (see Fig. 1c).

For a given value of eo and ei, both set to 0.5 in this case, as ρ increases, the location of maximum concentration changes from the equator to the pole. This is because of the pseudoharmonic nature of the solutions and a complex interplay among curvatures and distance between the membranes that induces a nonuniform distribution of the surface (and thus flux) per available volume (Fig. 5a). Where the outer membrane is more curved, there is more surface per volume and this is where higher levels of concentration are attained. The increase in flux per volume can also be caused by changing the distance between the membranes. In fact, when this distance is too small, the curvature effects became secondary. Furthermore, when there is less volume available in the spine (increasing ρ), the overall concentration of C increases. For a constant ρ and eo, increasing ei, which results in the spine apparatus tending towards a spherical geometry (Fig. 5b), C passes from a spherical-like distribution (ei = 0.1) to a localization of the maximum on the pole (ei = 1) through an intermediate situation where the maximum is confined at the equator (ei = 0.5). These results hold even in the case of constant ρ and ei and decreasing eo (Fig. 5c). Thus, the shape and size effects of the spine and spine apparatus are a result of PM shape and ER membrane shape and the relative volume enclosed. In fact, a significant difference between maximum and minimum peaks hold for tens of milliseconds, before a well-mixed condition is reached (Fig. 5d), as showed by the asymptotic evolution of the extent of gradient Ψ (Fig. 5e).

We plotted τΨ (Table 1) for three constant values of ei (0.1, 0.5, and 1) as a function of ρ ([0.02, 0.9]) and eo ([0.1, 0.9]) (Fig. 5f). If τΨ were unaffected by geometrical parameters, we would expect to see a flat plane for each value of ei. We observed that the lifetime of the gradient depends on ρ and eo in a nonlinear manner and it is not affected by the inner eccentricity. A big ER in a spheroidal −like spine (ρ → 1 and eo → 1) represents a geometrical barrier against the diffusion of C (τΨ $$\simeq$$ 35 ms). On the contrary, a spine with a flattened head (small eo) with a very small or absent ER (ρ → 0) has a 4-fold shorter lifetime of the gradient (τΨ $$\simeq$$ 8 ms). We found that the paraboloidal trend of τΨ from simulation is in very good agreement with the one from theory, τΨ $$\simeq$$ L2/6D. Here, the length L is defined as the semi-perimeter of the ellipses with axis ai = ρRo and bo = eoRo and calculated with the approximated formula $${L}^{2}\simeq {R}_{o}^{2}{\pi }^{2}({e}_{o}^{2}+{\rho }^{2})/2$$ (see the inset in Fig. 5g). It is worth highlighting that the simulations include coupling with the timescale of the reaction, the dynamics due to the boundary conditions, as well as their distribution at the boundary of the domain whereas the analysis is based on length scale and diffusivity alone. This results in an overall extension of the lifetime of the gradient with respect to the theoretical estimation.

The results from these simulations can be summarized as follows: first, unlike spherical shells where the spatial variation is only in the radial direction, ellipsoidal shells show a spatial variation in the z and the r directions (Fig. 5a–c); second, the spatial variation of C, particularly the location of high and low concentrations of C at a given time can switch from the equator to the pole or vice versa depending on the geometry alone (Fig. 5a–c); third, the nonlinear trend of the timescale τΨ can be understood in terms of classical diffusion lifetime as long as the length scales are corrected for the geometries (Fig. 5d–g). Thus, these simulations predict that a deviation from spherical shape provides spines access to a more complex phase space with respect to the properties of the gradient of C and its lifetime.

### Consequences of a localized input of second messengers in dendritic spines

Thus far, we have shown that geometry by itself, in the presence of uniformly distributed boundary conditions, produces transient localization of second messengers. However, in reality, the influx at the outer boundary is not unifor mly distributed but is mostly localized to specific regions of the spine head. In fact, as shown by the reconstruction of many dendritic spines6,12,13,40,77,78,79,80, the post-synaptic density, a portion of the PM rich in ionotropic receptors is localized along different positions of the membrane. Furthermore, the spine neck acts as a sink for second messengers, allowing signal transmission toward the dendritic shaft. Therefore, we next analyzed the combined effect of spine geometries, influx BCs localized to specific portions of the boundary and presence of an outlet in the neck region (Fig. 6).

We first considered a spine where the influx is confined to the upper pole region of the head. (Fig. 6a–e). In this representative case (such as ρ = 0.9, eo = 0.8, and ei = 0.1), there is a significant localization of high concentration of C close to the pole lasting for more than 20 ms (Fig. 6b–d). The gradient extends from the top to the bottom of the spine head with the spine apparatus acting as a geometric barrier for diffusion of C. The lifetime of the gradient depends on the geometrical parameters in a similar way as the uniform influx BCs, as shown by the surfaces τΨ(ρ, ei, eo) in Fig. 6e.

Furthermore, when the PM influx is localized to the side of the spine (Fig. 6f–j), a big ER in a spheroidal−like spine (ρ → 1 and eo → 1) still represents a geometrical barrier against the diffusion of C. On the other hand, the lifetime of the gradient (Fig. 6j) appears to be much shorter (τΨ = [8~15] ms) because the influx is localized closer to the neck, providing a shorter path to the efflux boundary. From these simulations, we conclude that a localized influx on the side of the spine reduces the dependence of τΨ to the geometrical parameters ρ and eo when compared with the case of influx localized on the pole of the spine or that of uniformly distributed influx (see Figs 5f and 6e,j).

### Mushroom morphology, localization of influx and variation of the size of the spine

Until now we have considered spheroidal geometry with a fixed spine size. Depending on the brain region, spine type, and species the dendritic spine dimensions vary (0.3~1.5 μm in diameter)12,13. Furthermore, Bourne and Harris observed that heads with diameters bigger than 0.6 μm have a mushroom morphology37. Therefore, we investigated how the size and shape of the spine head and of the ER (i.e. varying Ro, eo, ρ, and ei), affect the spatio-temporal dynamic of second messengers in idealized mushroom-like geometry with localized influx and efflux in the pole and neck region, respectively (see Fig. 7a).

We first maintained a fixed shape (Fig. 7a: ρ = 0.9, eo = 0.8 and ei = 0.1) and varied the spine dimension (Ro = 250, 400, and 600 nm). The increase in size slightly affects the spatial distribution and the time course of Cmax, Cmin, and Cmean (see Fig. 7 and insets). This because the PSD areas scale with the spine size12. Furthermore, the higher available volume reduced the peak value of the gradient but simultaneously elongated its lifetime (Fig. 7e). In fact, the surfaces of τΨ as a function of ρ, ei, and eo for the three spine dimensions showed that the lifetime of the gradient increased up to 45 ms (Fig. 7f–h). Furthermore, from the simulations we noticed that the increase in dimension induced a more complex nonlinear dependence of τΨ to ρ and eo. In fact, we observed a notable non-monotonic trend where eo increases, a trend that cannot be traced with classical diffusion lifetime alone (compare Figs 5g and 7h).

Finally, comparing between the mushroom-like and spheroidal geometries, both with a localized influx in the pole of the spine (Figs 6 and 7) we noticed that spatial distribution and the τΨ surfaces are in very good agreement. Thus, all the geometrical principles discussed for the oblate spheroidal geometries hold for the idealized mushroom-like case.

### Nonlinear reaction kinetics affects the spatiotemporal dynamics of C in the long timescale

Thus far, we have only considered linear kinetics of second messengers decay within the domain that could be related to the binding of second messengers to buffers. However, signal transduction events and transport via membranes are often nonlinear, particularly in the dendritic spine33,81,82,83. We extended our model to investigate whether nonlinear kinetics would change the effect of geometry and BCs. To do this, we modified the reaction-diffusion equation in Eq. (1) to include Michaelis–Menten84 kinetics as follows

$$\frac{\partial C}{\partial t}+{V}_{max}\frac{C}{{K}_{M}+C}=D{\nabla }^{2}C,$$
(47)

where the maximum rate is Vmax = Cmax/τ and KM is the Michaelis-Menten constant.

We performed the simulations with Cmax = 4 μM, τ = 50 ms, and KM = 2 μM, chosen for sake of representation and compared the results obtained with linear reaction kinetics (Eq. (1)). The comparison of the case previously presented (Fig. 8a–c) showed that the complexity introduced with a nonlinear reaction does not affect the spatiotemporal dynamics of second messengers in the short timescale (t < 10 ms), but affects the long-term dynamics showing a decay with different slopes. Furthermore, the localization and value of the maximum concentration do not depend on the kinetics, but rather are governed by the geometry and BCs. The kinetics affects the dynamics when a well-mixed distribution is already reached in all the cases, exhibiting different decay rates.

## Discussion

Recent experimental observations have presented detailed, high-resolution images of the architecture of dendritic spines highlighting a complex internal organization40,77,78,79,80. Such observations serve to highlight the role of geometry and spatial features in cellular phenomena. In this work, we used a general framework to study the effect of spine geometry including the internal organization in an idealized mathematical model with the goal of identifying some governing principles that regulate the spatio-temporal dynamics of second messengers. To do this, we developed and analyzed a general mathematical model, in which, a reaction-diffusion partial differential equation (PDE) with time-dependent mixed boundary conditions (BCs) we re analytically and numerically solved.

We arrive at the following conclusions form this work. First, the lifetime of second messengers gradients in dendritic spines depends on the intrinsic coupling between geometry of the spines and boundary conditions. These boundary conditions reflect the signaling events that take place at the membrane. Numerical simulations demonstrated how the shape of the spine governs the transient localization of peak concentration of second messengers. The lifetime of this localization depends nonlinearly on the geometry. Furthermore, we also showed that localized BCs, confined to a portion of the boundary, reduce the effect of the presence of a big and spheroidal-like ER if the influx is on the side of the spine head. Analytical investigation (Section 3.1) showed that geometry dictates the specific kind of harmonic function for the spatial distribution of second messengers. The temporal dynamics in the long time is governed by the kinetics of signaling reaction in the cytoplasm. However, this separation of temporal and spatial effects is not straightforward. The time-dependent BCs (Eq. (2)) represent both the kinetics of the membrane reactions and the curvature of the boundary (in the $$\nabla C\cdot \hat{{\bf{n}}}$$ term). Therefore, time-dependent BCs represent the coupling between shape and kinetics (Fig. 9).

Second, localization of the fluxes plays an important role in governing the spatiotemporal dynamics of second messengers. The lifetime of the gradient is affected by the pole vs. side localization of the spine head suggesting that the localization of the PSD plays a crucial role in spine signaling. Third, the organelle membrane plays two roles. One is to act as a diffusion barrier and the second is to act as source or sink of BCs. An emerging idea in shape regulation of signaling is the role played by organelles such as the endoplasmic reticulum and nucleus53,85. In the case of spines, the spine apparatus is thought to play a critical role in governing synaptic plasticity42,43,44,45,46,47,48. We find that the relative organization of the two membranes, PM and the ER membrane, affect the geometric landscape through both shape and boundary condition effects. We also find that the organelles can act as a physical barrier to diffusion extending the lifetime of the gradient. And finally, at short timescales, the nature of the kinetics in the cytoplasm does not alter our conclusions but kinetics play an important role in the long timescale especially in coupled cascades3,5,86,87. These predictions are applicable not just to spines but also to cells in general.

Even though our model is simplified, it allows us to identify some common principles by which geometry can be used to alter timescales of signal transduction. The notion that shape alone can affect signal transduction (Figs 4 and 5) is a principle that is now being well-accepted in the literature3,4,5,7,8,9,10 and we now extend this idea to signaling subcompartments such as dendritic spines.

Despite the relatively simple model presented here, we found that the spatial dependence of second messengers at short timescales was nonintuitive and exhibited a complex dependence on geometry. One potential design principle that we have identified here is that dendritic spines may be able to ensure rapid and robust signal propagation from the head toward the neck and thus toward the dentritic shaft by combining flattened head shape with very small or absence of ER, especially if the influx is localized at the pole of the spine. On the contrary, if the goal is to localize second messengers for a longer time, such as to promote synaptic plasticity, a design that allows the growth of bigger ER in a spheroidal-shaped head would help to ensure longer lifetime of the gradient. Future efforts need to consider the dynamics of both the spine and the spine apparatus during structural plasticity to incorporate mechanochemical effects.

Based on these insights, the next steps in spine systems biology can focus on specific signal transduction pathways and use reconstructions of realistic geometries to identify how the simple mathematics presented here translate into computational biology. Additionally, experimentally advances in localized imaging of second messengers molecules will be necessary to test and validate the predictions made by computational modeling. These combined efforts will enable us to extend these simple models to biologically relevant processes.