triqs_dft_tools.block_structure.BlockStructure

class triqs_dft_tools.block_structure.BlockStructure(gf_struct_sumk=None, gf_struct_solver=None, solver_to_sumk=None, sumk_to_solver=None, solver_to_sumk_block=None, deg_shells=None, corr_to_inequiv=None, transformation=None)[source]

Contains information about the Green function structure.

This class contains information about the structure of the solver and sumk Green functions and the mapping between them.

Do not write the individual elements of this class to a HDF file, as they belong together and changing one without the other can result in unexpected results. Always write the BlockStructure object as a whole.

Parameters:
gf_struct_sumklist of list of tuple

gf_struct_sumk[ish][idx] = (block_name, dimension of block)

for correlated shell ish; idx is just a counter in the list

gf_struct_solverlist of dict

gf_struct_solver[ish][block] = dimension of that block

for inequivalent correlated shell ish

solver_to_sumklist of dict

solver_to_sumk[ish][(from_block,from_idx)] = (to_block,to_idx)

maps from the solver block and index to the sumk block and index for inequivalent correlated shell ish

sumk_to_solverlist of dict

sumk_to_solver[ish][(from_block,from_idx)] = (to_block,to_idx)

maps from the sumk block and index to the solver block and index for inequivalent correlated shell ish

solver_to_sumk_blocklist of dict

solver_to_sumk_block[ish][from_block] = to_block

maps from the solver block to the sumk block for inequivalent correlated shell ish

deg_shellslist of lists of lists OR list of lists of dicts

In the simple format, deg_shells[ish][grp] is a list of block names; ish is the index of the inequivalent correlated shell, grp is the index of the group of symmetry-related blocks. When the name of two blocks is in the same group, that means that these two blocks are the same by symmetry.

In the more general format, deg_shells[ish][grp] is a dictionary whose keys are the block names that are part of the group. The values of the dict for each key are tuples (v, conj), where v is a transformation matrix with the same matrix dimensions as the block and conj is a bool (whether or not to conjugate). Two blocks with v_1, conj_1 and v_2, conj_2 being in the same symmetry group means that

\[C_1(v_1^\dagger G_1 v_1) = C_2(v_2^\dagger G_2 v_2),\]

where the \(G_i\) are the Green’s functions of the block, and the functions \(C_i\) conjugate their argument if the bool conj_i is True.

corr_to_inequivlist

a list where, for each correlated shell, the index of the corresponding inequivalent correlated shell is given

transformationlist of numpy.array or list of dict

a list with entries for each ish giving transformation matrices that are used on the Green’s function in sumk space before converting to the solver space Up to the change in block structure,

\[G_{solver} = T G_{sumk} T^\dagger\]

if \(T\) is the transformation of that particular shell.

Note that for each shell this can either be a numpy array which applies to all blocks or a dict with a transformation matrix for each block.

Attributes:
effective_transformation_solver

Return the effective transformation matrix

effective_transformation_sumk

Return the effective transformation matrix

gf_struct_solver_dict

The structure of the solver Green’s function

gf_struct_solver_list

The structure of the solver Green’s function

gf_struct_sumk_dict

The structure of the sumk Green’s function

gf_struct_sumk_list

The structure of the sumk Green’s function

inequiv_to_corr

A list mapping an inequivalent correlated shell to a correlated shell

sumk_to_solver_block

Methods

adapt_deg_shells(gf_struct[, ish])

Adapts the deg_shells to a new gf_struct Internally called when using pick_gf_struct and map_gf_struct

approximate_as_diagonal()

Create a structure for a GF with zero off-diagonal elements.

check_gf(G[, ish, space])

check whether the Green's function G has the right structure

check_matrix(G[, ish, space])

check whether the matrix G has the right structure

convert_gf(G[, G_struct, ish_from, ish_to, ...])

Convert BlockGf from its structure to this structure.

convert_matrix(G[, G_struct, ish_from, ...])

Convert matrix from its structure to this structure.

convert_operator(O[, ish])

Converts a second-quantization operator from sumk structure

create_gf([ish, gf_function, space])

Create a zero BlockGf having the correct structure.

create_matrix([ish, space, dtype])

Create a zero matrix having the correct structure.

full_structure(gf_struct, corr_to_inequiv)

Construct structure that maps to itself.

map_gf_struct_solver(mapping)

Map the Green function structure from one struct to another.

pick_gf_struct_solver(new_gf_struct)

Pick selected orbitals within blocks.

pick_gf_struct_sumk(new_gf_struct)

Pick selected orbitals within blocks.

copy

Methods

__init__([gf_struct_sumk, gf_struct_solver, ...])

adapt_deg_shells(gf_struct[, ish])

Adapts the deg_shells to a new gf_struct Internally called when using pick_gf_struct and map_gf_struct

approximate_as_diagonal()

Create a structure for a GF with zero off-diagonal elements.

check_gf(G[, ish, space])

check whether the Green's function G has the right structure

check_matrix(G[, ish, space])

check whether the matrix G has the right structure

convert_gf(G[, G_struct, ish_from, ish_to, ...])

Convert BlockGf from its structure to this structure.

convert_matrix(G[, G_struct, ish_from, ...])

Convert matrix from its structure to this structure.

convert_operator(O[, ish])

Converts a second-quantization operator from sumk structure

copy()

create_gf([ish, gf_function, space])

Create a zero BlockGf having the correct structure.

create_matrix([ish, space, dtype])

Create a zero matrix having the correct structure.

full_structure(gf_struct, corr_to_inequiv)

Construct structure that maps to itself.

map_gf_struct_solver(mapping)

Map the Green function structure from one struct to another.

pick_gf_struct_solver(new_gf_struct)

Pick selected orbitals within blocks.

pick_gf_struct_sumk(new_gf_struct)

Pick selected orbitals within blocks.

Attributes

effective_transformation_solver

Return the effective transformation matrix

effective_transformation_sumk

Return the effective transformation matrix

gf_struct_solver_dict

The structure of the solver Green's function

gf_struct_solver_list

The structure of the solver Green's function

gf_struct_sumk_dict

The structure of the sumk Green's function

gf_struct_sumk_list

The structure of the sumk Green's function

inequiv_to_corr

A list mapping an inequivalent correlated shell to a correlated shell

sumk_to_solver_block