chemtools.toolbox.densbased.DensityLocalTool

class chemtools.toolbox.densbased.DensityLocalTool(dens, grad, lap, ked)[source]

Density Local Tool Class.

Initialize class from arrays.

Parameters:
  • dens (np.ndarray) – Electron density evaluated on a set of points, \(\rho(\mathbf{r})\).
  • grad (np.ndarray) – Gradient vector of electron density evaluated on a set of points, \(\nabla \rho(\mathbf{r})\).
  • lap (np.ndarray) – Laplacian of electron density evaluated on a set of points, \(\nabla^2 \rho(\mathbf{r})\).
  • ked (np.ndarray) – Positive-definite or Lagrangian kinetic energy density evaluated on a set of points; \(\tau_\text{PD} (\mathbf{r})\) or \(G(\mathbf{r})\).
classmethod from_molecule(molecule, points, spin='ab', index=None)[source]

Initialize class using instance of Molecule and points.

Parameters:
  • molecule (Molecule) – An instance of Molecule class.
  • points (np.ndarray) – The (npoints, 3) array of cartesian coordinates of points.
  • spin (str, optional) – Type of occupied spin orbitals; options are ‘a’, ‘b’ & ‘ab’.
  • index (sequence, optional) – Sequence of integers representing the index of spin orbitals.
classmethod from_file(fname, points, spin='ab', index=None)[source]

Initialize class from file.

Parameters:
  • fname (str) – Path to molecule’s file.
  • points (np.ndarray) – The (npoints, 3) array of cartesian coordinates of points.
  • spin (str, optional) – Type of occupied spin orbitals; options are ‘a’, ‘b’ & ‘ab’.
  • index (sequence, optional) – Sequence of integers representing the index of spin orbitals.
density

Electron density \(\rho\left(\mathbf{r}\right)\).

gradient

Gradient of electron density \(\nabla \rho\left(\mathbf{r}\right)\).

This is the first-order partial derivatives of electron density w.r.t. coordinate \(\mathbf{r} = \left(x\mathbf{i}, y\mathbf{j}, z\mathbf{k}\right)\),

\[\nabla\rho\left(\mathbf{r}\right) = \left(\frac{\partial}{\partial x}\mathbf{i}, \frac{\partial}{\partial y}\mathbf{j}, \frac{\partial}{\partial z}\mathbf{k}\right) \rho\left(\mathbf{r}\right)\]
gradient_norm

Norm of the gradient of electron density.

\[\lvert \nabla \rho\left(\mathbf{r}\right) \rvert = \sqrt{ \left(\frac{\partial\rho\left(\mathbf{r}\right)}{\partial x}\right)^2 + \left(\frac{\partial\rho\left(\mathbf{r}\right)}{\partial y}\right)^2 + \left(\frac{\partial\rho\left(\mathbf{r}\right)}{\partial z}\right)^2 }\]
ked_general(a)

Compute general(ish) kinetic energy density.

\[\tau_\text{G} \left(\mathbf{r}, \alpha\right) = \tau_\text{PD} \left(\mathbf{r}\right) + \tfrac{1}{4} (a - 1) \nabla^2 \rho\left(\mathbf{r}\right)\]
Parameters:a (float) – Value of parameter \(a\).
ked_gradient_expansion

Gradient expansion approximation of kinetic energy density.

\[\tau_\text{GEA} \left(\mathbf{r}\right) = \tau_\text{TF} \left(\mathbf{r}\right) + \tfrac{1}{9} \tau_\text{W} \left(\mathbf{r}\right) + \tfrac{1}{6} \nabla^2 \rho\left(\mathbf{r}\right)\]

This is a special case of ked_gradient_expansion_general() with \(a=\tfrac{1}{9}\) and \(b=\tfrac{1}{6}\).

ked_gradient_expansion_empirical

Empirical gradient expansion approximation of kinetic energy density.

\[\tau_\text{empGEA} \left(\mathbf{r}\right) = \tau_\text{TF} \left(\mathbf{r}\right) + \tfrac{1}{5} \tau_\text{W} \left(\mathbf{r}\right) + \tfrac{1}{6} \nabla^2 \rho\left(\mathbf{r}\right)\]

This is a special case of ked_gradient_expansion_general() with \(a=\tfrac{1}{5}\) and \(b=\tfrac{1}{6}\).

ked_gradient_expansion_general(a, b)

General gradient expansion approximation of kinetic energy density.

\[\tau_\text{genGEA} \left(\mathbf{r}\right) = \tau_\text{TF} \left(\mathbf{r}\right) + a \, \tau_\text{W} \left(\mathbf{r}\right) + b \, \nabla^2 \rho\left(\mathbf{r}\right)\]
Parameters:
  • a (float) – Value of parameter \(a\).
  • b (float) – Value of parameter \(b\).
ked_hamiltonian

Hamiltonian kinetic energy density denoted by \(K(\mathbf{r})\).

\[\tau_\text{ham} \left(\mathbf{r}\right) = \tau_\text{PD} \left(\mathbf{r}\right) - \tfrac{1}{4} \nabla^2 \rho\left(\mathbf{r}\right)\]

This is a special case of ked_general() with \(a=0\).

ked_positive_definite

Positive definite or Lagrangian kinetic energy density, \(G(\mathbf{r})\).

\[\tau_\text{PD} \left(\mathbf{r}\right) = \tfrac{1}{2} \sum_i^N n_i \rvert \nabla \phi_i \left(\mathbf{r}\right) \lvert^2\]
ked_thomas_fermi

Thomas-Fermi kinetic energy density.

\[\tau_\text{TF} \left(\mathbf{r}\right) = \tfrac{3}{10} \left(6 \pi^2 \right)^{2/3} \left(\frac{\rho\left(\mathbf{r}\right)}{2}\right)^{5/3}\]
ked_weizsacker

Weizsacker kinetic energy density.

\[\tau_\text{W} \left(\mathbf{r}\right) = \tfrac{1}{8} \frac{\lvert \nabla\rho\left(\mathbf{r}\right) \rvert^2}{\rho\left(\mathbf{r}\right)}\]
laplacian

Laplacian of electron density \(\nabla ^2 \rho\left(\mathbf{r}\right)\).

This is defined as the trace of Hessian matrix of electron density which is equal to the sum of its \(\left(\lambda_1, \lambda_2, \lambda_3\right)\) eigen-values:

\[\nabla^2 \rho\left(\mathbf{r}\right) = \nabla\cdot\nabla\rho\left(\mathbf{r}\right) = \frac{\partial^2\rho\left(\mathbf{r}\right)}{\partial x^2} + \frac{\partial^2\rho\left(\mathbf{r}\right)}{\partial y^2} + \frac{\partial^2\rho\left(\mathbf{r}\right)}{\partial z^2} = \lambda_1 + \lambda_2 + \lambda_3\]
reduced_density_gradient

Reduced density gradient.

\[s\left(\mathbf{r}\right) = \frac{1}{2\left(3\pi ^2 \right)^{1/3}} \frac{\lvert \nabla\rho\left(\mathbf{r}\right) \rvert}{\rho\left(\mathbf{r}\right)^{4/3}}\]
shannon_information

Shannon information defined as \(\rho(r) \ln \rho(r)\).