chemtools.toolbox.orbsbased.OrbitalLocalTool

class chemtools.toolbox.orbsbased.OrbitalLocalTool(molecule, points)[source]

Class of orbital-based descriptive tools.

Initialize class using instance of Molecule and grid points.

Parameters:
  • molecule (Molecule) – An instance of Molecule class
  • points (np.ndarray) – Grid points, given as a 2D array with 3 columns, used for calculating local properties.
classmethod from_molecule(molecule, points)[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.
classmethod from_file(fname, points)[source]

Initialize class from file.

Parameters:
  • fname (str) – Path to molecule’s files.
  • points (np.ndarray) – Grid points, given as a 2D array with 3 columns, used for calculating local properties.
electrostatic_potential

Molecular Electrostatic Potential.

\[V \left(\mathbf{r}\right) = \sum_A \frac{Z_A}{\rvert \mathbf{R}_A - \mathbf{r} \lvert} - \int \frac{\rho \left(\mathbf{r}"\right)}{\rvert \mathbf{r}" - \mathbf{r} \lvert} d\mathbf{r}"\]
compute_orbital_expression(index, spin='a')[source]

Compute molecular orbital expression of the specified orbitals on the grid.

Parameters:
  • index (np.ndarray, int, list, tuple) – The indexes of the orbitals to be computed. As is common in chemistry we start the orbital numbering at 1 and are not using the python numbering.
  • spin (str) – the spin of the orbitals to be calculated.
average_local_ionization_energy

Average local ionization energy of alpha and beta electrons.

\[IP \left(\mathbf{r}\right) = \frac{\sum_{i \in \mathrm{MOs}} n_i \epsilon_i \phi_i(\mathbf{r}) \phi_i^*(\mathbf{r})}{\rho(\mathbf{r})}\]
compute_spin_chemical_potential(temperature, maxiter=500, tolerance=1e-12)[source]

Compute temperature-dependent spin of alpha and beta electrons. on the grid.

Spin chemical potential, \(\mu_{\sigma, T}\), at temperature \(T\) is found by solving the following one-dimensional nonlinear equation:

\[N_{\sigma} = \sum_{i = 1}^{N_{\text{basis}}} \left( \frac{1} {1 + e^{\frac{(\epsilon_{i \sigma} - \mu_{\sigma, T})}{k_{\text{B}} T}}} \right)\]

where the \(\sigma \in \{ \alpha, \beta\}\) denotes the electron spin, the \(N_{\sigma}\) is the number of \(\sigma\)-spin electrons, the \(\epsilon_{i \sigma}\) specifies the energy of \(i^{\text{th}}\) \(\sigma\)-molecular orbital, and the \(\mu_{\sigma, T}\) represents the chemical potential of \(\sigma\)-electrons at temperature \(T\). The \(k_{\text{B}}\) is the Boltzmann constant.

This equation is solved using scipy.optimize.bisect routine for finding root of a function within \([a, b]\) interval. The first and last \(\sigma\)-molecular orbital energies have been used as bracketing interval to find \(\mu_{\sigma, T}\) at the given temperature \(T\).

Parameters:
  • temperature (float) – Temperature at which to evaluate the spin chemical potential (in Kelvin).
  • maxiter (int, optional) – Maximum number of iterations of scipy.optimize.bisect routine.
  • tolerance (float, optional) – Convergence tolerance of scipy.optimize.bisect routine.
Returns:

  • spin_mu_a (float) – Alpha spin chemical potential.
  • spin_mu_b (float) – Beta spin chemical potential.

compute_temperature_dependent_density(temperature)[source]

Compute temperature-dependent density of alpha and beta electrons on the grid.

The temperature-dependent \(\sigma\)-density at temperature \(T\) is defined as,

\[\rho_{\sigma, T} \left(\mathbf{r}\right) = \sum_{i = 1}^{N_{\text{basis}}} \left( \frac{1}{1 + e^{\frac{(\epsilon_{i\sigma} - \mu_{\sigma, T})}{k_{\text{B}} T}}} \right) |\phi_i (\mathbf{r})|^2\]

where the \(\sigma \in \{ \alpha, \beta\}\) denotes the electron spin, the \(\epsilon_{i \sigma}\) specifies the energy of \(i^{\text{th}}\) \(\sigma\)-molecular orbital, the \(\mu_{\sigma, T}\) represents the temperature- dependent spin chemical potential of \(\sigma\)-electrons, and the \(\phi_{i\sigma}(\mathbf{r})\) denotes the \(i^{\text{th}}\) \(\sigma\)- molecular orbital. The \(k_{\text{B}}\) is the Boltzmann constant.

Parameters:temperature (float) – Temperature at which to evaluate the spin chemical potential (in Kelvin).
Returns:
  • dens_a (np.array) – Temperature-dependent density of alpha electrons evaluated on the grid points.
  • dens_b (np.array) – Temperature-dependent density of beta electrons evaluated on the grid points.
compute_temperature_dependent_state(temperature)[source]

Compute temperature-dependent local density of state of alpha & beta electrons on grid.

The temperature-dependent \(\sigma\)-density at temperature \(T\) is defined as,

\[g_{\sigma, T} \left(\mathbf{r}\right) = \sum_{i = 1}^{N_{\text{basis}}} \frac{\frac{-1}{k_{\text{B}} T} e^{\frac{(\epsilon_{i\sigma} - \mu_{\sigma, T})}{k_{\text{B}} T}}} {\left(1 + e^{\frac{(\epsilon_{i\sigma} - \mu_{\sigma, T})}{k_{\text{B}} T}}\right)^2} |\phi_i (\mathbf{r})|^2\]

where the \(\sigma \in \{ \alpha, \beta\}\) denotes the electron spin, the \(\epsilon_{i \sigma}\) specifies the energy of \(i^{\text{th}}\) \(\sigma\)-molecular orbital, the \(\mu_{\sigma, T}\) represents the temperature- dependent spin chemical potential of \(\sigma\)-electrons, and the \(\phi_{i\sigma}(\mathbf{r})\) denotes the \(i^{\text{th}}\) \(\sigma\)- molecular orbital. The \(k_{\text{B}}\) is the Boltzmann constant.

Parameters:temperature (float) – Temperature at which to evaluate the spin chemical potential (in Kelvin).
Returns:
  • dens_a (np.array) – Temperature-dependent local density of state of alpha electrons.
  • dens_b (np.array) – Temperature-dependent local density of state of beta electrons.