horton_part.becke module
Becke partitioning
- class BeckeWPart(coordinates, numbers, pseudo_numbers, grid, moldens, spindens=None, lmax=3, k=3, logger=None, grid_type=1)
Bases:
WPart
Becke partitioning with Becke-Lebedev grids
- __init__(coordinates, numbers, pseudo_numbers, grid, moldens, spindens=None, lmax=3, k=3, logger=None, grid_type=1)
Optional arguments: (that are not defined in
WPart
)- k
The order of the polynomials used in the Becke partitioning.
- property cache
Cache.
- calc_radial_distances()
Calculate radial distance w.r.t coordinates.
- clear()
Discard all cached results, e.g. because wfn changed
- compute_pseudo_population(index)
Compute pseudo population
- property coordinates
Center/Atomic coordinates.
- Type:
ndarray(M, 3)
- property density_cutoff
Get the density cutoff value.
Density values below this cutoff are considered to be invalid.
- Returns:
The cutoff value for density.
- Return type:
float
- do_all()
Computes all properties and return a list of their keys.
- do_charges()
Compute atomic charges.
- do_density_decomposition()
Compute density decomposition.
- do_moments()
Compute atomic multiple moments.
Calculates various types of multipoles, including Cartesian, Spherical, and Radial moments. The order of the moments is determined by the lmax parameter.
- do_partitioning()
Run partitioning.
- do_populations()
Compute atomic populations.
- do_spin_charges()
Compute atomic spin charges.
- get_grid(index=None)
Return an integration grid
Optional arguments:
- index
The index of the atom. If not given, a grid for the entire system is returned. If self.local is False, a full system grid is always returned.
- get_moldens(index=None, output=None)
Retrieves the molecular electron density (moldens) on the atomic grid.
This method converts the molecular electron density to the atomic grid specified by the index. If an output array is provided, the result is stored in that array.
- Parameters:
index (int or None, optional) – The index of the atom for which the electron density is required. If None, electron density for all atoms is considered. Default is None.
output (np.ndarray or None, optional) – An optional array to store the resulting electron density. If provided, the result is saved in this array. Default is None.
- Returns:
The molecular electron density on the atomic grid.
- Return type:
np.ndarray
- get_spindens(index=None, output=None)
Retrieves the spin density (spindens) on the atomic grid.
This method converts the spin density to the atomic grid specified by the index. If an output array is provided, the result is stored in that array.
- Parameters:
index (int or None, optional) – The index of the atom for which the spin density is required. If None, spin density for all atoms is considered. Default is None.
output (np.ndarray or None, optional) – An optional array to store the resulting spin density. If provided, the result is saved in this array. Default is None.
- Returns:
The spin density on the atomic grid.
- Return type:
np.ndarray
- get_wcor(index)
Load correction of weights.
- property grid
Molecular grid.
- property grid_type
Get the type of grids used for partitioning density.
- Returns:
The type of grids used in the partitioning process.
- Return type:
str
- property k
The order of the Becke switching function.
- linear = True
- property lmax
The maximum angular momentum index for moment calculations.
- property local
Whether local grids are included.
- name = 'b'
- property natom
The number of atoms in the molecule.
- property negative_cutoff
Get the negative cutoff value.
Values less than this threshold are treated as negative in computations.
- Returns:
The negative cutoff value.
- Return type:
float
- property nelec
The number of electrons in the molecule.
- property numbers
Atomic numbers
- property on_molgrid
Check whether quantities are computed on molecular grids.
These grids are used for evaluating various properties, including:
AIM (Atoms-in-Molecule) weight functions: \(w_a(\mathbf{r})\).
Pro-atom density: :math:`
- ho_a^0(mathbf{r})`.
Pro-molecule density: :math:`
- ho^0(mathbf{r})`.
Mean-square deviation during computations.
- bool
True if quantities are computed on molecular grids, False otherwise.
- property only_use_molgrid
Check whether intermediate values are computed exclusively using molecular grids.
When set to True, all quantities are computed solely on the molecular grid.
- Returns:
True if intermediate values are computed only using the molecular grid, False otherwise.
- Return type:
bool
- options = ['lmax', 'k']
- property population_cutoff
Get the population cutoff criterion.
This represents the allowed difference between the sum of proatom parameters and the reference population for determining accuracy of methods.
- Returns:
The cutoff value for population differences.
- Return type:
float
- property pseudo_numbers
Atomic charges.
- property radial_distances
Get the radial distances of points from the atomic coordinates.
The radial distances are calculated as the L2 norm (Euclidean distance) of the points relative to the atomic coordinates.
Notes
Accessing this property triggers the calculation of radial distances via the calc_radial_distances method.
- Returns:
A list containing the radial distances of points for each atom.
- Return type:
list
- setup_grids()
Setup grids used in partitioning.
# 1. atom_grids + mol_grid, use atoms for everything and mol_grid is only used for weights calculation # 2. atom_grids + mol_grid, use mol_grid for everything but atom_grids are used applied contratins. # 3. mol_grid, use mol_grid for everything, like in gLISA+.
- to_atomic_grid(index, data)
Load atomic contribution of molecular properties.
- update_at_weights()
Updates the at_weights arrays in the case (and all related arrays)
- variables_stored_in_cache()
The properties stored in cache obj.