3.12.10. horton.part.stockholder – Base classes for all stockholder partitioning schemes

class horton.part.stockholder.StockholderWPart(coordinates, numbers, pseudo_numbers, grid, moldens, spindens=None, local=True, lmax=3)

Bases: horton.part.stockholder.StockHolderMixin, horton.part.base.WPart

Arguments:

coordinates
An array (N, 3) with centers for the atom-centered grids.
numbers
An array (N,) with atomic numbers.
pseudo_numbers
An array (N,) with effective charges. When set to None, this defaults to“numbers.astype(float)“.
grid
A Molecular integration grid. This must be a BeckeMolGrid instance with mode==’keep’ or mode==’only’.
moldens
The spin-summed electron density on the grid.

Optional arguments:

spindens
The spin difference density on the grid.
local
If True: use the proper atomic grid for each AIM integral. If False: use the entire molecular grid for each AIM integral.
lmax
The maximum angular momentum in multipole expansions.
__getitem__(key)
__init__(coordinates, numbers, pseudo_numbers, grid, moldens, spindens=None, local=True, lmax=3)

Arguments:

coordinates
An array (N, 3) with centers for the atom-centered grids.
numbers
An array (N,) with atomic numbers.
pseudo_numbers
An array (N,) with effective charges. When set to None, this defaults to“numbers.astype(float)“.
grid
A Molecular integration grid. This must be a BeckeMolGrid instance with mode==’keep’ or mode==’only’.
moldens
The spin-summed electron density on the grid.

Optional arguments:

spindens
The spin difference density on the grid.
local
If True: use the proper atomic grid for each AIM integral. If False: use the entire molecular grid for each AIM integral.
lmax
The maximum angular momentum in multipole expansions.
clear()

Discard all cached results, e.g. because wfn changed

compute_pseudo_population(index)
do_all()

Computes all properties and return a list of their keys.

do_charges(instance)
do_density_decomposition(instance)
do_hartree_decomposition(instance)
do_moments(instance)
do_partitioning(instance)
do_populations(instance)
do_prosplines()
do_spin_charges(instance)
eval_proatom(index, output, grid=None)
eval_spline(index, spline, output, grid=None, label=’noname’)
fix_proatom_rho(index, rho, deriv)

Check if the radial density for the proatom is correct and fix as needed.

Arguments:

index
The atom for which this proatom rho is created.
rho
The radial density
deriv
the derivative of the radial density or None.
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_memory_estimates()
get_moldens(index=None, output=None)
get_proatom_rho(index, *args, **kwargs)
get_proatom_spline(index, *args, **kwargs)
get_rgrid(index)
get_spindens(index=None, output=None)
get_wcor(index)
to_atomic_grid(index, data)
update_at_weights()
update_pro(index, proatdens, promoldens)
cache
coordinates
grid
linear = False
lmax
local
name = None
natom
numbers
pseudo_numbers
class horton.part.stockholder.StockholderCPart(coordinates, numbers, pseudo_numbers, grid, moldens, spindens=None, local=True, lmax=3, wcor_numbers=None, wcor_rcut_max=2.0, wcor_rcond=0.1)

Bases: horton.part.stockholder.StockHolderMixin, horton.part.base.CPart

Arguments:

grid
The uniform integration grid based on the cube file.
moldens
The spin-summed electron density on the grid.

Optional arguments:

spindens
The spin difference density on the grid.
local
Whether or not to use local (non-periodic) sub grids for atomic integrations.
lmax
The maximum angular momentum in multipole expansions.
wcor_numbers
The list of element numbers for which weight corrections are needed.
wcor_rcut_max
The maximum cutoff sphere used for the weight corrections.
wcor_rcond
The regularization strength for the weight correction equations.
__getitem__(key)
__init__(coordinates, numbers, pseudo_numbers, grid, moldens, spindens=None, local=True, lmax=3, wcor_numbers=None, wcor_rcut_max=2.0, wcor_rcond=0.1)

Arguments:

grid
The uniform integration grid based on the cube file.
moldens
The spin-summed electron density on the grid.

Optional arguments:

spindens
The spin difference density on the grid.
local
Whether or not to use local (non-periodic) sub grids for atomic integrations.
lmax
The maximum angular momentum in multipole expansions.
wcor_numbers
The list of element numbers for which weight corrections are needed.
wcor_rcut_max
The maximum cutoff sphere used for the weight corrections.
wcor_rcond
The regularization strength for the weight correction equations.
clear()

Discard all cached results, e.g. because wfn changed

compute_pseudo_population(index)
do_all()

Computes all properties and return a list of their keys.

do_charges(instance)
do_moments(instance)
do_partitioning(instance)
do_populations(instance)
do_prosplines()
do_spin_charges(instance)
eval_proatom(index, output, grid=None)
eval_spline(index, spline, output, grid=None, label=’noname’)
fix_proatom_rho(index, rho, deriv)

Check if the radial density for the proatom is correct and fix as needed.

Arguments:

index
The atom for which this proatom rho is created.
rho
The radial density
deriv
the derivative of the radial density or None.
get_cutoff_radius(index)
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_memory_estimates()
get_moldens(index=None, output=None)
get_proatom_rho(index, *args, **kwargs)
get_proatom_spline(index, *args, **kwargs)
get_rgrid(index)
get_spindens(index=None, output=None)
get_wcor(index=None)
get_wcor_funcs(index)
to_atomic_grid(index, data)
to_sys_grid(index, data)
update_at_weights()
update_pro(index, proatdens, promoldens)
cache
coordinates
grid
linear = False
lmax
local
name = None
natom
numbers
pseudo_numbers
wcor_numbers