TransBasis

class triqs_dft_tools.trans_basis.TransBasis(SK=None, hdf_datafile=None)[source]

Computates rotations into a new basis, using the condition that a given property is diagonal in the new basis.

__init__(SK=None, hdf_datafile=None)[source]

Initialization of the class. There are two ways to do so:

  • existing SumkLDA class : when you have an existing SumkLDA instance
  • from hdf5 archive : when you want to use data from hdf5 archive

Giving the class instance overrides giving the string for the hdf5 archive.

Parameters:

SK : class SumkLDA, optional

Existing instance of SumkLDA class.

hdf5_datafile : string, optional

Name of hdf5 archive to be used.

calculate_diagonalisation_matrix(prop_to_be_diagonal='eal')[source]

Calculates the diagonalisation matrix w, and stores it as member of the class.

Parameters:

prop_to_be_diagonal : string, optional

Defines the property to be diagonalized.

  • ‘eal’ : local hamiltonian (i.e. crystal field)
  • ‘dm’ : local density matrix
Returns:

wsqr : double

Measure for the degree of rotation done by the diagonalisation. wsqr=1 means no rotation.

rotate_gf(gf_to_rot)[source]

Uses the diagonalisation matrix w to rotate a given GF into the new basis.

Parameters:

gf_to_rot : BlockGf

Green’s function block to rotate.

Returns:

gfreturn : BlockGf

Green’s function rotated into the new basis.

write_trans_file(filename)[source]

Writes the new transformation T into a file readable by dmftproj. By that, the requested quantity is diagonal already at input.

Parameters:

filename : string

Name of the file where the transformation is stored.