# chemtools.toolbox.conceptualglobal.GeneralGlobalTool¶

class chemtools.toolbox.conceptualglobal.GeneralGlobalTool(expr, n0, n_energies, n_symbol=None, n0_symbol=None, guess=None, opts=None)[source]

Class of global conceptual DFT reactivity descriptors based on the user-specified energy model.

The energy model is approximated as a symbolic function of the number of electrons, and the unknown parameters are obtained by interpolating to the given values of energy; i.e. the number of parameters in the model should equal the number of given energy values and the corresponding number of electrons.

The $$n^{\text{th}}$$-order derivative of the symbolic energy model with respect to the number of electrons at fixed external potential is calculated symbolically.

Initialize class.

Parameters: expr (sp.Exp) – The energy expression representing the dependence of energy on the number of electrons. n0 (float) – Reference number of electrons, i.e. $$N_0$$. n_energies (dict) – The energy values of expr at different electron-numbers. The dict has int (electron-number) keys, float (energy) values. n_symbol (sp.Symbol, default=sp.symbols('N')) – The symbol in expr that represents the number of electrons. n0_symbol (sp.Symbol, optional) – The symbol in expr that represents the electron-number at which to evaluate expr. If not specified, assume that it is already expressed numerically in expr. guess (dict, optional) – Guesses at the values of the parameters of expr. The dict has sp.Symbol keys, float values. opts (dict, optional) – Optional keyword arguments to pass to the scipy.optimize.root() solver that is used to solve for the parameters in the model.
params

Parameter dictionary of energy model.

n_symbol

Symbol used to denote the number of electrons.

expression

Energy expression as a function of number of electrons, $$E(N)$$.

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 and BaseGlobalTool.hyper_hardness, respectively.