# Linear Energy Model¶

In this model, the energy is approximated as a piece-wise linear function of the number of electrons:

$E(N) = a + b N$

Todo

Technically, linear model has two parameters, so providing two E values is enough to fit the model.

$\begin{split}\text{For } N \leq N_0: E\left(N\right) &= a + b N \\ a &= E\left(N_0\right) - N_0 \left(E\left(N_0\right) - E\left(N_0 - 1\right)\right) \\ b &= E\left(N_0\right) - E\left(N_0 - 1\right)\end{split}$
$\begin{split}\text{For } N \geq N_0: E\left(N\right) &= a + b N \\ a &= E\left(N_0\right) - N_0 \left(E\left(N_0 + 1\right) - E\left(N_0\right)\right) \\ b &= E\left(N_0 + 1\right) - E\left(N_0\right)\end{split}$

The model requires three values of $$E(N)$$ to interpolate the energy. Commonly, the energies of the system with $$N_0 - 1$$, $$N_0$$ and $$N_0 + 1$$ electrons are provided. Fitting the energy expression to the given data points results in two equations:

$\begin{split}E\left(N\right) &= \begin{cases} \left(N_0 - N\right) E\left(N_0 - 1\right) + \left(N - \left(N_0 - 1\right)\right) E\left(N_0\right) & \text{ for } N < N_0 \\ \left(N_0 + 1 + N\right) E\left(N_0 - 1\right) + \left(N - N_0\right) E\left(N_0 + 1\right) & \text{ for } N \geqslant N_0 \\ \end{cases} \\\end{split}$

or equivalently,

$\begin{split}E\left(N\right) &= \begin{cases} E\left(N_0\right) + \left(N_0 - N\right) \cdot IP & \text{ for } N < N_0 \\ E\left(N_0\right) + \left(N_0 - N\right) \cdot EA & \text{ for } N \geqslant N_0 \\ \end{cases} \\\end{split}$

At this stage, the energy expression can be evaluated for any given number of electrons as implemented in chemtools.tool.globaltool.LinearGlobalTool.energy.

The energy model is not differentiable at integer number of electrons, so the chemical potential is not defined. Instead one calculates the chemical potential from above, below and averaged:

$\begin{split}\mu^{+} &= \left( \frac{\partial E}{\partial N} \right)_{v(\mathbf{r})}^+ = -EA \\ \mu^{-} &= \left( \frac{\partial E}{\partial N} \right)_{v(\mathbf{r})}^- = -IP \\ \mu^{0} &= \frac{\mu^{+} + \mu^{-}}{2} = \frac{-\left(IP + EA\right)}{2} \\\end{split}$

In this model, the second- and higher-order derivatives of the energy with respect to the number of electrons are zero except when the number of electrons is an integer, where they are undefined (because the energy model is nondifferentiable). So the chemical hardness and hyper-hardnesses are all zero, and the global softness and global hyper-softness are not defined.

Calculating derived global reactivity indicators for the linear energy model requires that one first compute the maximum number of electrons that can be accepted by the system. It is only possible to do this when the $$N_0-$$ electron system has lower energy than the $$(N_0+1)$$ and $$(N_0-1)$$ electron systems. In that case, $$N_{\text{max}}=N_0$$ which gives $$\Delta N_{\text{max}}=0$$, and

Todo

include the generalized signed definitions.

$\begin{split}\omega_{\text{electrophilicity}} &= E\left(N_0\right) - E\left(N_{\text{max}}\right) = 0 \\ \nu_{\text{nucleofugality}} &= E\left(N_0 + 1\right) - E\left(N_{\text{max}}\right) = - EA \\ \nu_{\text{electrofugality}} &= E\left(N_0 - 1\right) - E\left(N_{\text{max}}\right) = IP\end{split}$