chemtools.toolbox.interactions.LOL¶
-
class
chemtools.toolbox.interactions.
LOL
(dens, grad, ked, grid=None, trans='inverse_rational', trans_k=1, trans_a=1, denscut=0.0005)[source]¶ Localized Orbital Locator (LOL) introduced by Becke and Schmider.
The LOL ratio is defined as:
\[\zeta_\text{LOL}(\mathbf{r}) = \frac{\tau_\text{TF}(\mathbf{r})}{\tau_\text{PD}(\mathbf{r})}\]where \(\tau_\text{TF}(\mathbf{r})\) and \(\tau_\text{PD}(\mathbf{r})\) are Thomas-Fermi and positive-definite (Lagrangian) kinetic energy densities defined in
chemtools.toolbox.kinetic.KED
.The LOL is computed by transforming the ratio:
\[\text{LOL}(\mathbf{r}) = f\left(\zeta_\text{LOL}(\mathbf{r})\right)\]where the transformation \(f\) can be:
\[\begin{split}\text{inverse_rational : } \, f(\zeta, k, a) &= 1 - \frac{1}{1 + a \, \zeta^k} \\ \text{inverse_hyperbolic: } \, f(\zeta, k, a) &= \tfrac{1}{2} \left(1 + \tanh\left(-a \left(\zeta^{-k} - \zeta^{k}\right)\right)\right)\end{split}\]Traditionally, the ‘inverse_rational’ transformation with \(k=1\) and \(a=1\) is used.
Initialize class from arrays.
Parameters: - dens (np.ndarray) – Electron density of grid points, \(\rho(\mathbf{r})\).
- grad (np.ndarray) – Gradient of electron density of grid points, \(\nabla \rho(\mathbf{r})\).
- ked (np.ndarray) – Positive-definite or Lagrangian kinetic energy density of grid points; \(\tau_\text{PD} (\mathbf{r})\) or \(G(\mathbf{r})\).
- grid (instance of Grid, optional) – Grid used for computation of LOL. Only if this a CubeGrid one can generate the scripts.
- trans (str, optional) – Type of transformation applied to LOL ratio; options are ‘inverse_rational’ or ‘inverse_hyperbolic’.
- trans_k (float, optional) – Parameter \(k\) of transformation.
- trans_a (float, optional) – Parameter \(a\) of transformation.
- denscut (float, optional) – Value of density cut. LOL value of points with density < denscut is set to zero.
-
classmethod
from_molecule
(molecule, spin='ab', index=None, grid=None, trans='inverse_rational', trans_k=1, trans_a=1, denscut=0.0005)[source]¶ Initialize class from molecule.
Parameters: - molecule (instance of Molecule class.) – Instance of Molecular class.
- spin (str, optional) – Type of occupied spin orbitals; options are ‘a’, ‘b’ & ‘ab’.
- index (int or sequence of int, optional) – Sequence of spin orbital indices to use. If None, all occupied spin orbitals are used.
- grid (instance of Grid, optional) – Grid used for computation of LOL. Only if this a CubeGrid one can generate the scripts. If None, a cubic grid is constructed from molecule with spacing=0.1 & extension=2.0.
- trans (str, optional) – Type of transformation applied to ELF ratio; options are ‘inverse_rational’ or ‘inverse_hyperbolic’.
- trans_k (float, optional) – Parameter \(k\) of transformation.
- trans_a (float, optional) – Parameter \(a\) of transformation.
- denscut (float, optional) – Value of density cut. LOL value of points with density < denscut is set to zero.
-
classmethod
from_file
(fname, spin='ab', index=None, grid=None, trans='inverse_rational', trans_k=1, trans_a=1, denscut=0.0005)[source]¶ Initialize class from wave-function file.
Parameters: - fname (str) – Path to a molecule’s file.
- spin (str, optional) – Type of occupied spin orbitals; options are ‘a’, ‘b’ & ‘ab’.
- index (int or sequence of int, optional) – Sequence of spin orbital indices to use. If None, all occupied spin orbitals are used.
- grid (instance of Grid, optional) – Grid used for computation of LOL. Only if this a CubeGrid one can generate the scripts. If None, a cubic grid is constructed from molecule with spacing=0.1 & extension=2.0.
- trans (str, optional) – Type of transformation applied to LOL ratio; options are ‘inverse_rational’ or ‘inverse_hyperbolic’.
- trans_k (float, optional) – Parameter \(k\) of transformation.
- trans_a (float, optional) – Parameter \(a\) of transformation.
- denscut (float, optional) – Value of density cut. LOL value of points with density < denscut is set to zero.
-
ratio
¶ The LOL ratio evaluated on the grid points.
-
value
¶ The \(\text{LOL}(\mathbf{r})\) evaluated on grid points.
-
generate_scripts
(fname, isosurf=0.5)[source]¶ Generate VMD scripts & cube file to visualize LOL iso-surface.
Parameters: - fname (str) – A string representing the path to a fname of generated files. The VMD script and cube file will be named fname.vmd and fname-lol.cube, respectively.
- isosurf (float) – Value of LOL iso-surface used in VMD script.