# chemtools.conceptual.linear.LinearLocalTool¶

class chemtools.conceptual.linear.LinearLocalTool(dict_density, n_max=None, global_softness=None)[source]

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

Considering the interpolated linear energy model and its derivatives, 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 $$N$$.

Given the electron density corresponding to energy values used for interpolating the energy model, i.e., $$\rho_{N_0 - 1}(\mathbf{r})$$, $$\rho_{N_0}(\mathbf{r})$$ and $$\rho_{N_0 + 1}(\mathbf{r})$$, the density of the $$N$$ electron system $$\rho_{N}(\mathbf{r})$$ is given by:

$\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}$

The density derivative with respect to the number of electrons at fixed external potential is given by:

$\begin{split}\left(\frac{\partial \rho_N(\mathbf{r})}{\partial N}\right)_{v(\mathbf{r})} = \begin{cases} \rho_{N_0}(\mathbf{r}) - \rho_{N_0-1}(\mathbf{r})=f^-(\mathbf{r}) & \text{ for } N < N_0 \\ \rho_{N_0+1}(\mathbf{r}) - \rho_{N_0}(\mathbf{r})=f^+(\mathbf{r}) & \text{ for } N > N_0 \\ \end{cases}\end{split}$

The derivative at $$N = N_0$$ doesn’t exist, however, the average value of $$f^-(\mathbf{r})$$ and $$f^+(\mathbf{r})$$, denoted by $$f^0(\mathbf{r})$$ is assigned as the first derivative.

Initialize linear density model to compute local reactivity descriptors.

Parameters: dict_density (dict) – Dictionary of number of electrons (keys) and corresponding density array (values). This model expects three energy values corresponding to three consecutive number of electrons differing by one, i.e. $$\{(N_0 - 1): \rho_{N_0 - 1}\left(\mathbf{ r}\right), N_0: \rho_{N_0}\left(\mathbf{r}\right), (N_0 + 1): \rho_{N_0 + 1}\left( \mathbf{r}\right)\}$$. The $$N_0$$ value is considered as the reference number of electrons. n_max (float, optional) – Maximum number of electrons that system can accept, i.e. $$N_{\text{max}}$$. See base.BaseGlobalTool.n_max. global_softness (float, optional) – Global softness. See base.BaseGlobalTool.softness.
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(n_elec)[source]

Evaluate density model $$\rho_N(\mathbf{r})$$ at the $$N_{\text{elec}}$$.

The functional derivative of energy model $$E(N)$$ w.r.t. external potential at fixed number of electrons, evaluated at the given number of electrons $$N_{\text{elec}}$$, i.e.

$\left.\rho_N(\mathbf{r}) = {\left(\frac{\delta E(N)}{\delta v(\mathbf{r})}\right)_N} \right|_{N = N_{\text{elec}}}$
Parameters: n_elec (float) – Number of electrons, $$N_{\text{elec}}$$.
density_derivative(n_elec, order=1)[source]

Evaluate n-th derivative of density w.r.t. number of electrons at $$N_{\text{elec}}$$.

The n-th order derivative of density model $$\rho_N(\mathbf{r})$$ w.r.t. the number of electrons, at fixed external potential, evaluated at the given number of electrons $$N_{\text{elec}}$$ is:

$\left. \left(\frac{\partial^n \rho_N(\mathbf{r})}{\partial N^n} \right)_{v(\mathbf{r})}\right|_{N = N_{\text{elec}}}$
Parameters: n_elec (float) – Number of electrons, $$N_{\text{elec}}$$. order (int, optional) – The order of derivative denoted by $$n$$ in the formula.

Note

For $$N_{\text{elec}} = N_0$$ the first, second and higher order density derivatives correspond to the fukui function, dual descriptor and hyper fukui function, respectively.

dual_descriptor

Dual descriptor of $$N_0$$-electron system.

This is defined as the 2nd derivative of density model $$\rho_N(\mathbf{r})$$ w.r.t. the number of electrons, at fixed external potential, evaluated at $$N_0$$, or the functional derivative of chemical hardness w.r.t. external potential, at fixed number of electrons, i.e.

$\Delta f_{N_0}(\mathbf{r}) = {\left( \frac{\delta \eta}{\delta v(\mathbf{r})} \right)_N} = \left. \left(\frac{\partial^2 \rho_N(\mathbf{r})}{\partial N^2} \right)_{v(\mathbf{r})}\right|_{N = N_0}$

where $$\eta$$ is the chemical hardness.

fukui_function

Fukui function of $$N_0$$-electron system.

This is defined as the 1st derivative of density model $$\rho_N(\mathbf{r})$$ w.r.t. the number of electrons, at fixed external potential, evaluated at $$N_0$$, or the functional derivative of chemical potential w.r.t. external potential, at fixed number of electrons, i.e.

$f_{N_0}(\mathbf{r}) = {\left( \frac{\delta \mu}{\delta v(\mathbf{r})} \right)_N} = \left. \left(\frac{\partial \rho_N(\mathbf{r})}{\partial N} \right)_{v(\mathbf{r})}\right|_{N = N_0}$

where $$\mu$$ is the chemical potential.

global_softness

Global softness.

hyper_softness

Chemical hyper-softness of $$N_0$$-electron system.

$s_{N_0}^{(2)}\left(\mathbf{r}\right) = S^2 \cdot \Delta f_{N_0}\left(\mathbf{r}\right)$

where $$S$$ is the global softness, and $$\Delta f_{N_0}\left(\mathbf{r}\right)$$ is the dual descriptor.

n0

Reference number of electrons, i.e. $$N_0$$.

n_max

Maximum number of electrons that the system accepts, i.e. $$N_{\text{max}}$$.

softness

Chemical softness of $$N_0$$-electron system.

$s_{N_0}\left(\mathbf{r}\right) = S \cdot f_{N_0}\left(\mathbf{r}\right)$

where $$S$$ is the global softness, and $$f_{N_0}\left(\mathbf{r}\right)$$ is fukui function.