# chemtools.toolbox.conceptuallocal.LinearLocalTool¶

class chemtools.toolbox.conceptuallocal.LinearLocalTool(density_zero, density_plus, density_minus, n0)[source]

Class of local conceptual DFT reactivity descriptors based on the linear energy model.

Considering the interpolated linear energy expression,

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

and its derivative with respect to the number of electrons at constant external potential,

$\begin{split}\mu\left(N\right) = \begin{cases} \mu^- &= E\left(N_0\right) - E\left(N_0 - 1\right) = - IP && N < N_0 \\ \mu^0 &= 0.5 \left(E\left(N_0 + 1\right) - E\left(N_0 - 1\right)\right) = -0.5 (IP + EA) && N = N_0 \\ \mu^+ &= E\left(N_0 + 1\right) - E\left(N_0\right) = - EA && N > N_0 \\ \end{cases}\end{split}$

the linear local tools are obtained by taking the functional derivative of these expressions with respect to external potential $$v(\mathbf{r})$$ at fixed number of electrons.

Initialize class.

Parameters: density_zero (np.ndarray) – Electron density of $$N_0$$-electron system, i.e. $$\rho_{N_0}\left(\mathbf{r}\right)$$. density_plus (np.ndarray) – Electron density of $$(N_0 + 1)$$-electron system, i.e. $$\rho_{N_0 + 1}\left(\mathbf{r}\right)$$. density_minus (np.ndarray) – Electron density of $$(N_0 - 1)$$-electron system, i.e. $$\rho_{N_0 - 1}\left(\mathbf{r}\right)$$. n0 (float) – Reference number of electrons, i.e. $$N_0$$, which corresponds to the integral of density_zero over all space.
ff_plus

Fukui Function from above, $$f^+(\mathbf{r})$$.

$f^+\left(\mathbf{r}\right) = \rho_{N_0 + 1}\left(\mathbf{r}\right) - \rho_{N_0}\left(\mathbf{r}\right)$
ff_minus

Fukui Function from below, $$f^-(\mathbf{r})$$.

$f^-\left(\mathbf{r}\right) = \rho_{N_0}\left(\mathbf{r}\right) - \rho_{N_0 - 1}\left(\mathbf{r}\right)$
ff_zero

Fukui Function from center, $$f^0(\mathbf{r})$$.

This is defined as the average of ff_plus and ff_minus,

$f^0\left(\mathbf{r}\right) = \frac{f^+\left(\mathbf{r}\right) + f^-\left(\mathbf{r}\right)}{2} = \frac{\rho_{N_0 + 1}\left(\mathbf{r}\right) - \rho_{N_0 - 1}\left(\mathbf{r}\right)}{2}$
density(number_electrons=None)[source]

Return linear electron density of $$N$$-electron system, $$\rho_{N}(\mathbf{r})$$.

This is defined as the functional derivative of linear energy model w.r.t. external potential at fixed number of electrons, i.e.,

$\begin{split}\rho_{N}(\mathbf{r}) = \begin{cases} \rho_{N_0}(\mathbf{r}) + \left[\rho_{N_0}(\mathbf{r}) - \rho_{N_0 - 1}(\mathbf{r}) \right] \left(N - N_0\right) & \text{ for } N \leqslant N_0 \\ \rho_{N_0}(\mathbf{r}) + \left[\rho_{N_0 + 1}(\mathbf{r}) - \rho_{N_0}(\mathbf{r}) \right] \left(N - N_0\right) & \text{ for } N \geqslant N_0 \\ \end{cases}\end{split}$
Parameters: number_electrons (float, default=None) – Number of electrons. If None, the $$\rho_{N_0}\left(\mathbf{r}\right)$$ is returned.
fukui_function(number_electrons=None)[source]

Return linear Fukui function of $$N$$-electron system, $$f_{N}(\mathbf{r})$$.

This is defined as the functional derivative of linear chemical potential w.r.t. external potential at fixed number of electrons,

$\begin{split}f_{N}(\mathbf{r}) = \begin{cases} f^-(\mathbf{r}) &= \rho_{N_0}(\mathbf{r}) - \rho_{N_0 - 1}(\mathbf{r}) && N < N_0 \\ f^0\left(\mathbf{r}\right) &= 0.5 \left(\rho_{N_0 + 1}\left(\mathbf{r}\right) - \rho_{N_0 - 1}\left(\mathbf{r}\right)\right) && N = N_0 \\ f^+(\mathbf{r}) &= \rho_{N_0 + 1}(\mathbf{r}) - \rho_{N_0}(\mathbf{r}) && N > N_0 \\ \end{cases}\end{split}$
Parameters: number_electrons (float, default=None) – Number of electrons. If None, the $$f^0\left(\mathbf{r}\right)$$ is returned.
softness(global_softness, number_electrons=None)[source]

Return linear softness of $$N$$-electron system, $$s_N(\mathbf{r})$$.

$\begin{split}s_N\left(\mathbf{r}\right) = S \cdot f_N\left(\mathbf{r}\right) = \begin{cases} S \cdot f^-(\mathbf{r}) & N < N_0 \\ S \cdot f^0\left(\mathbf{r}\right) & N = N_0 \\ S \cdot f^+(\mathbf{r}) & N > N_0 \\ \end{cases}\end{split}$
Parameters: global_softness (float) – The value of global softness. number_electrons (float, default=None) – Number of electrons. If None, the $$S \cdot f^0\left(\mathbf{r}\right)$$ is returned.