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:

ζLOL(r)=τTF(r)τPD(r)

where τTF(r) and τPD(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:

LOL(r)=f(ζLOL(r))

where the transformation f can be:

inverse_rational : f(ζ,k,a)=111+aζkinverse_hyperbolic: f(ζ,k,a)=12(1+tanh(a(ζkζk)))

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, ρ(r).
  • grad (np.ndarray) – Gradient of electron density of grid points, ρ(r).
  • ked (np.ndarray) – Positive-definite or Lagrangian kinetic energy density of grid points; τPD(r) or G(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 LOL(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.