3.5.2. horton.grid.base – Base classes for 3D integration grids

class horton.grid.base.IntGrid(points, weights, subgrids=None)

Bases: object

Arguments:

points
A numpy array with shape (npoint,3) with the Cartesian coordinates of the grids points.
weights
The integration weights of the grid points

Optional arguments:

subgrids
Can be given when this grid is composed of several other grids. The points data is shared, but the weights of the subgrids may be different.
eval_decomposition(*args, **kwargs)

Evaluate a spherical decomposition

Arguments:

cubic_splines
A list cubic splines, where each item is a radial function that is associated with a corresponding real spherical harmonic.
center
The center of the spherically symmetric function
output
The output array

Optional arguments:

cell
A unit cell when periodic boundary conditions are used.
eval_spline(*args, **kwargs)

Evaluate a spherically symmetric function

Arguments:

cubic_spline
A cubic spline with the radial dependence
center
The center of the spherically symmetric function
output
The output array

Optional arguments:

cell
A unit cell when periodic boundary conditions are used.
integrate(*args, **kwargs)

Integrate the product of all arguments

Arguments:

data1, data2, ...
All arguments must be arrays with the same size as the number of grid points. The arrays contain the functions, evaluated at the grid points, that must be multiplied and integrated.

Optional arguments:

center=None
When given, multipole moments are computed with respect to this center instead of a plain integral.
lmax=0
The maximum angular momentum to consider when computing multipole moments
mtype=1
The type of multipole moments: 1=``cartesian``, 2=``pure``, 3=``radial``, 4=``surface``.
segments=None
This argument can be used to divide the grid in segments. When given, it must be an array with the number of grid points in each consecutive segment. The integration is then carried out over each segment separately and an array of results is returned. The sum over all elements gives back the total integral.
zeros()
points

The grid points.

shape

The shape of the grid.

size

The size of the grid.

subgrids

A list of grid objects used to construct this grid.

weights

The grid weights.