Tensor
- class adcc.Tensor(sym_or_mo, space=None, permutations=None, spin_block_maps=None, spin_blocks_forbidden=None)
Bases:
libadcc.Tensor
Construct an uninitialised Tensor from an
MoSpaces
or aSymmetry
object.More information about the last four, symmetry-related parameters see the documentation of the
Symmetry
object.- Parameters
sym_or_mo – Symmetry or MoSpaces object
spaces (str, optional) – Space of the tensor, can be None if the first argument is a
Symmetry
object.permutations (list, optional) – List of permutational symmetries of the Tensor.
spin_block_maps (list, optional) – List of mappings between spin blocks
spin_blocks_forbidden (list, optional) – List of forbidden (i.e. forced-to-zero) spin blocks.
Notes
An
MoSpaces
object is contained in many datastructures of adcc, including theAdcMatrix
, theLazyMp
, theReferenceState
and any solver or ADC results state.Examples
Construct a symmetric tensor in the “o1o1” (occupied-occupied) spaces:
>>> Tensor(mospaces, "o1o1", permutations=["ij", "ji"])
Construct an anti-symmetric tensor in the “v1v1” spaces:
>>> Tensor(mospaces, "v1v1", permutations=["ab", "-ba"])
Construct a tensor in “o1v1”, which maps the alpha-alpha block anti-symmetrically to the beta-beta block and which has the other spin blocks set to zero:
>>> Tensor(mospaces, "o1v1", spin_block_maps=[("aa", "bb", -1)], ... spin_blocks_forbidden=["ab", "ba"])
Methods Summary
select_below_absmax
(tolerance)Select the absolute maximal values in the tensor, which are below the given tolerance.
Methods Documentation
- select_below_absmax(tolerance)
Select the absolute maximal values in the tensor, which are below the given tolerance.