3.8.1. horton.matrix.base – Base classes

class horton.matrix.base.LinalgFactory(default_nbasis=None)

Bases: object

Optional arguments:

default_nbasis
The default basis size when constructing new operators/expansions.
create_expansion(nbasis=None)
create_four_index(nbasis=None)
create_one_index(nbasis=None)
create_three_index(nbasis=None)
create_two_index(nbasis=None)
classmethod from_hdf5(grp)

Construct an instance from data previously stored in an h5py.Group.

Arguments:

grp
An h5py.Group object.
set_default_nbasis(nbasis)
to_hdf5(grp)

Write a LinalgFactory to an HDF5 group

Argument:

grp
A h5py.Group instance to write to.
class horton.matrix.base.LinalgObject

Bases: object

assign(other)
change_basis_signs(signs)
clear()
copy()
classmethod from_hdf5(grp)
new()
permute_basis(permutation)
randomize()
to_hdf5(grp)
class horton.matrix.base.OneIndex(nbasis)

Bases: horton.matrix.base.NIndexObject

assign(other)
change_basis_signs(signs)
clear()
copy(begin=0, end=None)
from_hdf5(grp)
get_element(i)
iadd(other, factor=1)
iscale(factor)
new()
permute_basis(permutation)
randomize()
set_element(i, value)
to_hdf5(grp)
ndim

The number of axes in the N-index object.

shape
class horton.matrix.base.Expansion(nbasis, nfn=None)

Bases: horton.matrix.base.LinalgObject

assign(other)
change_basis_signs(signs)
check_normalization(olp, eps=0.0001)
clear()
copy()
error_eigen(fock, overlap)
from_hdf5(grp)
new()
permute_basis(permutation)
randomize()
to_hdf5(grp)
class horton.matrix.base.TwoIndex(nbasis)

Bases: horton.matrix.base.NIndexObject

assign(other)
change_basis_signs(signs)
clear()
copy(begin0=0, end0=None, begin1=None, end1=None)
from_hdf5(grp)
get_element(i, j)
iadd(other, factor=1)
inner(vec0, vec1)
iscale(factor)
itranspose()
new()
permute_basis(permutation)
randomize()
set_element(i, j, value)
sum()
to_hdf5(grp)
trace()
ndim

The number of axes in the N-index object.

shape
class horton.matrix.base.ThreeIndex(nbasis)

Bases: horton.matrix.base.NIndexObject

assign(other)
change_basis_signs(signs)
clear()
copy(begin0=0, end0=None, begin1=None, end1=None, begin2=None, end2=None)
from_hdf5(grp)
get_element(i, j, k)
iadd(other, factor=1)
iscale(factor)
new()
permute_basis(permutation)
randomize()
set_element(i, j, k, value)
to_hdf5(grp)
ndim

The number of axes in the N-index object.

shape
class horton.matrix.base.FourIndex(nbasis)

Bases: horton.matrix.base.NIndexObject

assign(other)
change_basis_signs(signs)
clear()
copy(begin=0, end=None)
from_hdf5(grp)
get_element(i, j, k, l)
iadd(other, factor=1)
iscale(factor)
new()
permute_basis(permutation)
randomize()
set_element(i, j, k, l, value)
to_hdf5(grp)
ndim

The number of axes in the N-index object.

shape
horton.matrix.base.parse_four_index_transform_exps(exp0, exp1, exp2, exp3, Class)

Parse the optional arguments exp1, exp2 and exp3.

Arguments:

exp0, exp1, exp2, exp3

Four sets of orbitals for the mo transformation. Some may be None but only the following not None combinations are allowed:

  • (exp0,): maintain eight-fold symmetry (if any)
  • (exp0, exp1): maintain four-fold symmetry (if any)
  • (exp0, exp2): maintain two-fold symmetry (if any)
  • (exp0, exp1, exp2, exp3): break all symmetry
Class
The expected class of the exps objects.

Returns: exp0, exp1, exp2, exp3. (All not None)