Symmetry

class libadcc.Symmetry(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

Overloaded function.

  1. __init__(self: libadcc.Symmetry, arg0: libadcc.MoSpaces, arg1: str) -> None

Construct a Symmetry class from an MoSpaces object and the identifier for the space (e.g. o1o1, v1o1, o3v2o1v1, …). Python binding to libadcc::Symmetry.

  1. __init__(self: libadcc.Symmetry, arg0: libadcc.MoSpaces, arg1: str, arg2: Dict[str, Tuple[int, int]]) -> None

Construct a Symmetry class from an MoSpaces object, a space string and a map to supply the number of orbitals for some additional axes. For the additional axis the pair contains either two numbers (for the number of alpha and beta orbitals in this axis) or only one number and a zero (for an axis, which as only one spin kind, alpha or beta).

This is an advanced constructor. Use only if you know what you do.

Attributes Summary

empty

Is the symmetry empty (i.e.

irreps_allowed

The list of irreducible representations, for which the tensor shall be non-zero.

mospaces

Return the MoSpaces object supplied on initialisation

ndim

Return the number of dimensions.

permutations

The list of index permutations, which do not change the tensor.

shape

Return the shape of tensors constructed from this symmetry.

space

Return the space supplied on initialisation.

spin_block_maps

A list of tuples of the form ("aaaa", "bbbb", -1.0), i.e. two spin blocks followed by a factor.

spin_blocks_forbidden

List of spin-blocks, which are marked forbidden (i.e.

Methods Summary

clear(self)

Clear the symmetry.

describe(self)

Return a descriptive string.

Attributes Documentation

empty

Is the symmetry empty (i.e. noy symmetry setup)

irreps_allowed

The list of irreducible representations, for which the tensor shall be non-zero. If this is not set, i.e. an empty list, all irreps will be allowed.

mospaces

Return the MoSpaces object supplied on initialisation

ndim

Return the number of dimensions.

permutations

The list of index permutations, which do not change the tensor. A minus may be used to indicate anti-symmetric permutations with respect to the first (reference) permutation.

For example the list [“ij”, “ji”] defines a symmetric matrix and [“ijkl”, “-jikl”, “-ijlk”, “klij”] the symmetry of the ERI tensor. Not all permutations need to be given to fully describe the symmetry. Beware that the check for errors and conflicts is only rudimentary at the moment.

shape

Return the shape of tensors constructed from this symmetry.

space

Return the space supplied on initialisation.

spin_block_maps

A list of tuples of the form (“aaaa”, “bbbb”, -1.0), i.e. two spin blocks followed by a factor. This maps the second onto the first with a factor of -1.0 between them.

spin_blocks_forbidden

List of spin-blocks, which are marked forbidden (i.e. enforce them to stay zero). Blocks are given as a string in the letters ‘a’ and ‘b’, e.g. [“aaba”, “abba”]

Methods Documentation

clear(self: libadcc.Symmetry) None

Clear the symmetry.

describe(self: libadcc.Symmetry) str

Return a descriptive string.