MoIndexTranslation
- class libadcc.MoIndexTranslation(*args, **kwargs)
Bases:
pybind11_builtins.pybind11_object
Overloaded function.
__init__(self: libadcc.MoIndexTranslation, arg0: libadcc::MoSpaces, arg1: str) -> None
Construct a MoIndexTranslation class from an MoSpaces object and the identifier for the space (e.g. o1o1, v1o1, o3v2o1v1, …)
__init__(self: libadcc.MoIndexTranslation, arg0: libadcc::MoSpaces, arg1: List[str]) -> None
Construct a MoIndexTranslation class from an MoSpaces object and the list of identifiers for the space (e.g. [“o1”, “o1”] …)
Attributes Summary
Return the MoSpaces object supplied on initialisation
Return the number of dimensions.
Return the length along each dimension.
Return the space supplied on initialisation.
Methods Summary
block_index_of
(self, arg0)Get the block index of an index, i.e. get the index which points to the block of the tensor in which the element with the passed index is contained in.
block_index_spatial_of
(self, arg0)Get the spatial block index of an index
combine
(*args, **kwargs)Overloaded function.
full_index_of
(self, arg0)Map an index given in the space, which was passed upon construction, to the corresponding index in the full MO index range (the ffff space).
hf_provider_index_of
(self, arg0)Map an index (given in the space passed upon construction) to the indexing convention of the host program provided to adcc as the HF provider.
inblock_index_of
(self, arg0)Get the in-block index, i.e. the index within the tensor block.
map_range_to_hf_provider
(self, arg0)Map a range of indices to host program indices, i.e. the indexing convention used in the HfProvider, which provides the SCF data to adcc.
spin_of
(self, arg0)Get the spin block of each of the index components as a string.
split
(self, arg0)Split an index into block index and in-block index
split_spin
(self, arg0)Split an index into a spin block descriptor, a spatial block index and an in-block index.
Attributes Documentation
- mospaces
Return the MoSpaces object supplied on initialisation
- ndim
Return the number of dimensions.
- shape
Return the length along each dimension.
- space
Return the space supplied on initialisation.
- subspaces
Methods Documentation
- block_index_of(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Get the block index of an index, i.e. get the index which points to the block of the tensor in which the element with the passed index is contained in.
- block_index_spatial_of(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Get the spatial block index of an index
The spatial block index is the result of block_index_of modulo the spin blocks, i.e. it maps an index onto the index of the spatial blocks only, such that the resulting value is identical for two index where the MOs only differ by spin. For example the 1st core alpha and the 1st core beta orbital will map to the same value upon a call of this function.
- combine(*args, **kwargs)
Overloaded function.
combine(self: libadcc.MoIndexTranslation, arg0: tuple, arg1: tuple) -> tuple
Combine a block index and an in-block index into the appropriate index. Effectively undoes the effect of ‘split’.
combine(self: libadcc.MoIndexTranslation, arg0: str, arg1: tuple, arg2: tuple) -> tuple
Combine a spin block (given as a string of ‘a’s or ‘b’s), a spatial-only block index and an in-block index into the appropriate index. Essentially undoes the effect of ‘spin_of’, ‘block_index_spatial_of’ and ‘inblock_index_of’.
- full_index_of(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Map an index given in the space, which was passed upon construction, to the corresponding index in the full MO index range (the ffff space).
- hf_provider_index_of(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Map an index (given in the space passed upon construction) to the indexing convention of the host program provided to adcc as the HF provider.
- inblock_index_of(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Get the in-block index, i.e. the index within the tensor block.
- map_range_to_hf_provider(self: libadcc.MoIndexTranslation, arg0: tuple) list
Map a range of indices to host program indices, i.e. the indexing convention used in the HfProvider, which provides the SCF data to adcc.
Since the mapping between subspace and host program indices might not be contiguous, a list of pairs of ranges is returned. In each pair, the first entry represents a range of indices (indexed in the MO subspace) and the second entry represents the equivalent range of indices in the Hartree-Fock provider these are mapped to.
- ranges Tuple of pairs of indices: One index pair for each dimension. Each
pair describes the range of indices along one axis, which should be mapped to the indexing convention of the HfProvider. The range should be thought of as a half-open interval [start, end), where start and end are the indexed passed as a pair to the function.
- spin_of(self: libadcc.MoIndexTranslation, arg0: tuple) str
Get the spin block of each of the index components as a string.
- split(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Split an index into block index and in-block index
- split_spin(self: libadcc.MoIndexTranslation, arg0: tuple) tuple
Split an index into a spin block descriptor, a spatial block index and an in-block index.