Molecule Class
Molecule class tht reads wavefunction information and computes various quantities.
- class cugbasis.Molecule
Bases:
pybind11_object
- Attributes:
Methods
Compute electron density \(\rho(\mathbf{r})\).
Compute the molecular electrostatic potential.
Compute the empirical gradient expansion approximation of kinetic energy density.
Compute the general gradient expansion approximation of kinetic energy density.
Compute the general(ish) kinetic energy density.
Compute the general kinetic energy density on a grid of points.
Compute the gradient of the electron density.
Compute the gradient expansion approximation of kinetic energy density
Compute the Hessian of the electron density.
Compute the Laplacian of the electron density.
Compute Molecular Orbitals
Compute the norm of a three-dimensional vector using GPU.
Compute the positive definite kinetic energy density on a grid of points.
Compute the reduced density gradient.
Compute the Schrödinger kinetic energy density.
Compute the Shannon information density."
Compute the Thomas-Fermi kinetic energy density.
Compute the Weizsacker Kinetic energy density.
Get the wavefunction file path.
- property atcoords
Cartesian coordinates of the atomic centers.
- property atnums
Atomic number of atomic centers.
- compute_density()
Compute electron density \(\rho(\mathbf{r})\).
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- Returns:
The electron density evaluated on each point.
- Return type:
ndarray(N,)
- compute_electrostatic_potential()
Compute the molecular electrostatic potential.
\[\Phi(\mathbf{r}) = \sum_{i=1}^{N_{atom}} \frac{Z_A}{|\mathbf{r} - \mathbf{R}_A|} - \int \frac{\rho(\mathbf{r}^\prime)}{|\mathbf{r} - \mathbf{r}^\prime| }d\mathbf{r}^\prime,\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_empirical_gradient_expansion_ked()
Compute the empirical gradient expansion approximation of kinetic energy density.
\[\tau_{EGEA}(\mathbf{r}) = \tau_{TF}(\mathbf{r}) + \frac{1}{5} \tau_W(\mathbf{r}) + \frac{1}{6} \nabla^2 \rho(\mathbf{r})\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_general_gradient_expansion_ked()
Compute the general gradient expansion approximation of kinetic energy density.
\[\tau_{GGE}(\mathbf{r}) = \tau_{TF}(\mathbf{r}) + \alpha \tau_{W}(\mathbf{r}) + \beta \nabla^2 \rho(\mathbf{r})\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
alpha (float) – Constant parameter.
beta (float) – Constant parameter.
- compute_general_ked()
Compute the general(ish) kinetic energy density.
\[\tau_G(\mathbf{r}, \alpha) = \tau_{PD}(\mathbf{r}) + \frac{1}{4} (\alpha - 1) \nabla^2 \rho(\mathbf{r}),\]where \(a\) is a constant parameter. When \(a=0\), then it is the ‘Schrödinger’ kinetic energy, when \(a=1\), then it is the positive-definite kinetic energy.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
alpha (float) – The constant parameter.
- compute_general_kinetic_energy_density()
Compute the general kinetic energy density on a grid of points.
\[t_\alpha(r) = t_+(r) + \alpha \nabla^2 \rho(r)\]where \(t_+(r)\) is the positive definite kinetic energy density and \(\nabla^2\) is the Laplacian.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
alpha (float) – Constant parameter.
- compute_gradient()
Compute the gradient of the electron density.
\[\nabla \rho(\mathbf{r}) = \bigg(\frac{\partial \rho}{\partial x}, \frac{\partial \rho}{\partial y}, \frac{\partial \rho}{\partial z} \bigg),\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- Returns:
The gradient of the electron density evaluated on each point.
- Return type:
ndarray(N, 3)
- compute_gradient_expansion_ked()
Compute the gradient expansion approximation of kinetic energy density
\[\tau_{GEA}(\mathbf{r}) = \tau_{TF}(\mathbf{r}) + \frac{1}{9} \tau_W(\mathbf{r}) + \frac{1}{6} \nabla^2 \rho(\mathbf{r})\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_hessian()
Compute the Hessian of the electron density.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- Returns:
The Hessian of the electron density evaluated on each point.
- Return type:
ndarray(N, 3, 3)
- compute_laplacian()
Compute the Laplacian of the electron density.
\[\nabla^2 \rho(\mathbf{r}) = \sqrt{\bigg(\frac{\partial \rho}{\partial x} \bigg)^2 + \bigg(\frac{\partial \rho}{\partial y} \bigg)^2 + \bigg(\frac{\partial \rho}{\partial z} \bigg)^2}\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_molecular_orbitals()
Compute Molecular Orbitals
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- Returns:
The M molecular orbitals evaluated on each point.
- Return type:
ndarray(M, N)
- compute_norm_of_vector()
Compute the norm of a three-dimensional vector using GPU.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_positive_definite_kinetic_energy_density()
Compute the positive definite kinetic energy density on a grid of points.
\[\tau_{PD}(\mathbf{r}) = \frac{1}{2} \sum_{i=1}^{N} \big|\nabla \phi_i (\mathbf{r})\big|^2,\]where \(\phi_i\) is the molecular orbitals. In the QTAIM community, this is denoted as \(G(\mathbf{r})\).
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_reduced_density_gradient()
Compute the reduced density gradient.
\[s(\mathbf{r}) = \frac{1}{2(3 \pi^2)^{1/3}}\frac{|\nabla \rho(\mathbf{r})|}{\rho(\mathbf{r})^{4/3}}.\]Note it may be more efficient to compute each component individually, then using Numpy to compute this quanity.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_schrodinger_ked()
Compute the Schrödinger kinetic energy density.
This is the general(sh) kinetic energy density when \(a=0\):
\[K(\mathbf{r}) = \tau_{PD}(\mathbf{r}) - \frac{1}{4} \nabla^2 \rho(\mathbf{r}),\]In the QTAIM community, this is denoted as \(K(\mathbf{r})\).
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_shannon_information_density()
Compute the Shannon information density.”
\[s(\mathbf{r}) = -\rho(\mathbf{r}) \log \rho(\mathbf{r}),\]where the integral gives the Shannon entropy of the electron density.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_thomas_fermi_ked()
Compute the Thomas-Fermi kinetic energy density.
\[\tau_{TF}(\mathbf{r}) = \frac{3}{10} (3\pi)^{2/3} \rho(\mathbf{r})^{5/3}\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- compute_weizsacker_ked()
Compute the Weizsacker Kinetic energy density.
\[\tau_W(\mathbf{r}) = \frac{\big|\nabla \rho(\mathbf{r}) \big|^2}{8\rho(\mathbf{r})}\]- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- get_file_path()
Get the wavefunction file path.
- class cugbasis.Promolecule
Bases:
pybind11_object
- Attributes:
atcoords
Cartesian coordinates of the atomic centers.
atnums
Atomic number of atomic centers.
promol_coeffs
Get the coefficients as a dictionary with keys element_parameter_type (e.g.
promol_exps
Get the exponents as a dictionary with keys element_parameter_type (e.g.
Methods
Compute promolecular density \(\rho^\circ(\mathbf{r})\).
Compute the electrostatic potential on \(\rho^\circ(\mathbf{r})\).
- property atcoords
Cartesian coordinates of the atomic centers.
- property atnums
Atomic number of atomic centers.
- compute_density()
Compute promolecular density \(\rho^\circ(\mathbf{r})\).
\[\rho^\circ(\mathbf{r}) = \sum_A \bigg[ \sum_i c_i \frac{\alpha}{\pi}^{3/2} e^{-\alpha r_{A} ^2} + \sum_j d_j \frac{2 \alpha^{5/2}}{3 \pi^{3/2}} r_A^2 e^{-\alpha r_A^2} \bigg],\]where \(A\) is an atom, \(c_i, d_j\) are the s-type, p-type coefficients respectively. Note this is normalized. Please see the paper “An information-theoretic approach to basis-set fitting of electron densities and other non-negative functions”.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- Returns:
The promolecular density evaluated on each point.
- Return type:
ndarray(N,)
- compute_esp()
Compute the electrostatic potential on \(\rho^\circ(\mathbf{r})\).
\[\Phi(\mathbf{r}) = \sum_{i=1}^{N_{atom}} \frac{Z_A}{|\mathbf{r} - \mathbf{R}_A|} - \int \frac{\rho^\circ(\mathbf{r}^\prime)}{|\mathbf{r} - \mathbf{r}^\prime| }d\mathbf{r}^\prime,\]where \(Z_A\) is the atomic number of atom A.
- Parameters:
points (ndarray(N, 3)) – Cartesian coordinates of \(N\) points in three-dimensions.
- Returns:
The promolecular electrostatic potential evaluated on each point.
- Return type:
ndarray(N,)
- property promol_coeffs
Get the coefficients as a dictionary with keys element_parameter_type (e.g. f_coeffs_p).
- property promol_exps
Get the exponents as a dictionary with keys element_parameter_type (e.g. f_coeffs_p).