chemtools.conceptual.cubic.CubicGlobalTool¶
-
class
chemtools.conceptual.cubic.
CubicGlobalTool
(dict_energy, omega=0.5)[source]¶ Class of global conceptual DFT reactivity descriptors based on the cubic energy model.
The energy is approximated as a quadratic function of the number of electrons,
\[E(N) = a + b N + c N^2 + d N^3\]Given \(E(N_0 - 1)\), \(E(N_0)\) and \(E(N_0 + 1)\) values, the unknown parameters of the energy model are obtained by interpolation.
First, second and higher order derivatives of the cubic energy model with respect to the number of electrons at fixed external potential are given by:
\[\begin{split}\left(\frac{\partial E}{\partial N}\right)_{v(\mathbf{r})} &= b + 2 c N + 3 d N^2\\ \left(\frac{\partial^2 E}{\partial N^2}\right)_{v(\mathbf{r})} &= 2 c + 6 d N\\ \left(\frac{\partial^3 E}{\partial N^3}\right)_{v(\mathbf{r})} &= 6 d \\ \left(\frac{\partial^n E}{\partial N^n}\right)_{v(\mathbf{r})} &= 0 \quad \text{for} \quad n \geq 3\end{split}\]Initialize cubic energy model to compute global reactivity descriptors.
Parameters: - dict_energy (dict) – Dictionary of number of electrons (keys) and corresponding energy (values). This model expects three energy values corresponding to three consecutive number of electrons differing by one, i.e. \(\{(N_0 - 1): E(N_0 - 1), N_0: E(N_0), (N_0 + 1): E(N_0 + 1)\}\). The \(N_0\) value is considered as the reference number of electrons.
- omega (float) – Value of omega parameter in the energy model.
-
omega
¶ Parameter \(\omega\) in the energy model.
-
params
¶ Parameters \(a\), \(b\), \(c\), and \(d\) of energy model.
-
energy
(n_elec)[source]¶ Return the energy model \(E(N)\) evaluated for the specified number of electrons.
Parameters: n_elec (float) – Number of electrons, \(N_{\text{elec}}\).
-
energy_derivative
(n_elec, order=1)[source]¶ Return the \(n^{\text{th}}\)-order derivative of energy w.r.t. the number of electrons.
This returns the \(n^{\text{th}}\)-order derivative of energy model \(E(N)\) w.r.t. to the number of electrons, at fixed chemical potential, evaluated for the specified number of electrons.
\[\left. \left(\frac{\partial^n E}{\partial N^n} \right)_{v(\mathbf{r})}\right|_{N = N_{\text{elec}}}\]Parameters: - n_elec (float) – Number of electrons, \(N_{\text{elec}}\).
- order (int, default=1) – The order of derivative denoted by \(n\) in the formula.
Note
For \(N_{\text{elec}} = N_0\) the first, second and higher order derivatives are equal to the
BaseGlobalTool.chemical_potential
,BaseGlobalTool.chemical_hardness
andBaseGlobalTool.hyper_hardness
, respectively.
-
chemical_hardness
¶ Chemical hardness of the \(N_0\)-electron system.
This chemical hardness is defined as the second derivative of the energy model w.r.t. the number of electrons, at fixed external potential, evaluated at \(N_0\).
\[\eta = \left. \left(\frac{\partial^2 E}{\partial N^2} \right)_{v(\mathbf{r})} \right|_{N = N_0}\]
-
chemical_potential
¶ Chemical potential of the \(N_0\)-electron system.
The chemical potential is defined as the first derivative of the energy model w.r.t. the number of electrons, at fixed external potential, evaluated at \(N_0\),
\[\mu = \left. \left(\frac{\partial E}{\partial N} \right)_{v(\mathbf{r})} \right|_{N = N_0}\]
-
convert_mu_to_n
(mu, guess=None)¶ Return the number of electrons \(N\) matching the given chemical potential \(\mu\).
Chemical potential is a function of the number of electrons, \(\mu(N)\), as it is the first derivative of energy model \(E(N)\) with respect to the number of electrons at fixed external potential,
\[\mu(N) = \left(\frac{\partial E(N)}{\partial N}\right)_{v(\mathbf{r})}\]Here we solve for \(N\) which results in the specified \(\mu\) according to the equation above, i.e. \(N(\mu) = \mu^{-1}(N)\), using
scipy.optimize.newton
.Parameters: - mu (float) – Chemical potential, \(\mu\).
- guess (float, default=None) – Initial guess used for solving for \(N\).
If
None
, the reference number of electrons \(N_0\) is used as an initial guess.
-
ea
¶ The same as
electron_affinity
.
-
electrofugality
¶ Electrofugalityof the \(N_0\)-electron system.
\[\nu_{\text{electrofugality}} = \text{sgn}\left(N_{\text{max}} - N_0 + 1\right) \times \left(E(N_0 - 1) - E(N_{\text{max}})\right)\]
-
electron_affinity
¶ Electron affinity (EA) of the \(N_0\)-electron system.
\[EA = E\left(N_0\right) - E\left(N_0 + 1\right)\]
-
electronegativity
¶ Mulliken electronegativity defined as negative
chemical_potential
.\[\chi_{\text{Mulliken}} = - \mu\]
-
electrophilicity
¶ Electrophilicity of the \(N_0\)-electron system.
\[\omega_{\text{electrophilicity}} = \text{sgn}\left(N_{\text{max}} - N_0\right) \times \left(E(N_0) - E(N_{\text{max}})\right)\]
-
eta
¶ The same as
chemical_hardness
.
-
grand_potential
(n_elec)¶ Return the grand potential model evaluated for the specified number of electrons.
\[\begin{split}\Omega [\mu(N_{\text{elec}}); v(\mathbf{r})] &= E(N_{\text{elec}}) - \mu(N_{\text{elec}}) \times N_{\text{elec}} \\ &= E(N_{\text{elec}}) - \left.\left(\frac{\partial E(N)}{\partial N} \right)_{v(\mathbf{r})}\right|_{N = N_{\text{elec}}} \times N_{\text{elec}}\end{split}\]Parameters: n_elec (float) – Number of electrons, \(N_{\text{elec}}\).
-
grand_potential_derivative
(n_elec, order=1)¶ Evaluate the \(n^{\text{th}}\)-order derivative of grand potential at the given n_elec.
This returns the \(n^{\text{th}}\)-order derivative of grand potential model w.r.t. to the chemical potential, at fixed external potential, evaluated for the specified number of electrons \(N_{\text{elec}}\).
That is,
\[\left. \left(\frac{\partial^n \Omega}{\partial \mu^n} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} = \left. \left(\frac{\partial^{n-1}}{\partial \mu^{n-1}} \frac{\partial \Omega}{\partial \mu} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} = - \left. \left(\frac{\partial^{n-1} N}{\partial \mu^{n-1}} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} \quad n = 1, 2, \dots\]These derivatives can be computed using the derivative of energy model w.r.t. number of electrons, at fixed external potential, evaluated at \(N_{\text{elec}}\). More specifically,
\[\begin{split}\left. \left(\frac{\partial \Omega}{\partial \mu} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} &= - N_{\text{elec}} \\ \left. \left(\frac{\partial^2 \Omega}{\partial \mu^2} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} &= -\frac{1}{\eta^{(1)}}\end{split}\]where \(\eta^{(n)}\) denotes the \((n+1)^{\text{th}}\)-order derivative of energy w.r.t. number of electrons evaluated at \(N_{\text{elec}}\), i.e.
\[\eta^{(n)} = \left. \left(\frac{\partial^{n+1} E}{\partial N^{n+1}} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} \qquad n = 1, 2, \dots\]To compute higher-order derivatives, Faa di Bruno formula which generalizes the chain rule to higher derivatives can be used. i.e. for \(n \geq 2\),
\[\left. \left(\frac{\partial^n \Omega}{\partial \mu^n} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} = \frac{-\displaystyle\sum_{k=1}^{n-2} \left.\left(\frac{\partial^k \Omega}{\partial \mu^k} \right)_{v(\mathbf{r})} \right|_{N = N_{\text{elec}}} \cdot B_{n-1,k} \left(\eta^{(1)}, \eta^{(2)}, \dots, \eta^{(n-k)} \right)} {B_{n-1,n-1} \left(\eta^{(1)}\right)}\]where \(B_{n-1,k} \left(x_1, x_2, \dots, x_{n-k}\right)\) denotes the Bell polynomials.
Parameters: - n_elec (float) – Number of electrons, \(N_{\text{elec}}\).
- order (int, default=1) – The order of derivative denoted by \(n\) in the formula.
-
grand_potential_mu
(mu)¶ Evaluate the grand potential model for the specified chemical potential \(\mu\).
To evaluate grand potential model, first the number of electrons corresponding to the specified \(\mu\) is found, i.e. \(N(\mu)=\mu^{-1}(N)\), then the grand potential in computed by,
\[\Omega [\mu(N); v(\mathbf{r})] = E(N(\mu)) - \mu \times N(\mu)\]Parameters: mu (float) – Chemical potential \(\mu\).
-
grand_potential_mu_derivative
(mu, order=1)¶ Evaluate the \(n^{\text{th}}\)-order derivative of grand potential at the given mu.
This returns the \(n^{\text{th}}\)-order derivative of grand potential model w.r.t. chemical potential, at fixed external potential, evaluated for the specified chemical potential \(\mu\).
That is,
\[\left. \left(\frac{\partial^n \Omega}{\partial \mu^n} \right)_{v(\mathbf{r})} \right|_{N = N\left(\mu\right)} = \left. \left(\frac{\partial^{n-1}}{\partial \mu^{n-1}} \frac{\partial \Omega}{\partial \mu} \right)_{v(\mathbf{r})} \right|_{N = N\left(\mu\right)} = - \left. \left(\frac{\partial^{n-1} N}{\partial \mu^{n-1}} \right)_{v(\mathbf{r})} \right|_{N = N\left(\mu\right)} \quad n = 1, 2, \dots\]To evaluate this expression, the number of electrons corresponding to the specified \(\mu\) should is found, i.e. \(N(\mu)=\mu^{-1}(N)\).
Parameters: - mu (float) – Chemical potential, \(\mu\).
- order (int, default=1) – The order of derivative denoted by \(n\) in the formula.
-
hyper_hardness
(order=2)¶ Return the \(n^{\text{th}}\)-order hyper-hardness of the \(N_0\)-electron system.
The \(n^{\text{th}}\)-order hyper-hardness is defined as the \((n+1)^{\text{th}}\) -order derivative, where \(n \geq 2\), of the energy model w.r.t the number of electrons, at fixed external potential, evaluated at \(N_0\).
\[\eta^{(n)} = \left. \left(\frac{\partial^{n+1} E}{\partial N^{n+1}} \right)_{v(\mathbf{r})} \right|_{N = N_0} \quad \text{for} \quad n \geq 2\]Parameters: order (int, default=2) – The order of hyper-hardness denoted by \(n \geq 2\) in the formula.
-
hyper_softness
(order)¶ Return the \(n^{\text{th}}\)-order hyper-softness of the \(N_0\)-electron system.
The \(n^{\text{th}}\)-order hyper softness is defined as the \((n+1)^{\text{th}}\) -order derivative, where \(n \geq 2\), of the grand potential model w.r.t the number of electrons at fixed external potential evaluated at \(N_0\).
\[S^{(n)} = - \left. \left(\frac{\partial^{n+1} \Omega}{\partial \mu^{n+1}} \right)_{v(\mathbf{r})} \right|_{N = N_0} \quad \text{for} \quad n \geq 2\]Parameters: order (int, default=2) – The order of hyper-hardness denoted by \(n \geq 2\) in the formula.
-
ionization_potential
¶ Ionization potential (IP) of the \(N_0\)-electron system.
\[IP = E\left(N_0 - 1\right) - E\left(N_0\right)\]
-
ip
¶ The same as
ionization_potential
.
-
mu
¶ The same as
chemical_potential
.
-
n0
¶ Reference number of electrons, i.e. \(N_0\).
-
n_max
¶ Maximum number of electrons that the system can accept.
\[N_{\text{max}} = \underbrace {\min }_N E(N)\]
-
nucleofugality
¶ Nucleofugality of the \(N_0\)-electron system.
\[\nu_{\text{nucleofugality}} = \text{sgn}\left(N_0 + 1 - N_{\text{max}}\right) \times \left(E(N_0 + 1) - E(N_{\text{max}})\right)\]
-
softness
¶ Chemical softness of the \(N_0\)-electron system.
The chemical softness is defined as the second derivative of the grand potential model w.r.t the number of electrons, at fixed external potential, evaluated at \(N_0\). This is equal to the inverse chemical hardness.
\[S = - \left. \left(\frac{\partial^2 \Omega}{\partial \mu^2} \right)_{v(\mathbf{r})}\right|_{N = N_0} = \frac{1}{\eta}\]