class RecursionSelfEnergy(save_self_energies=None, tolerance=None, maximum_iteration=None, sparse_threshold=None, storage_strategy=None, enable_block_algorithm=None)

Self-energy calculator based on the Recursion method. This method is an iterative scheme for getting self energies, with convergence \(O(2^N)\)

  • storage_strategy (SaveInMemory | StoreOnDisk | NoStorage) – The way self energies are stored between iterations.
    Default: SaveInMemory()
  • tolerance (float > 0) – The tolerance of convergence of the self energies before termination of the recursion.
    Default: 1e-13
  • maximum_iteration (int > 0) – The maximum number of recursion steps allowed before termination.
    Default: 400
  • sparse_threshold (float > 0) – Self energies (in Hartree) smaller than this value treated as 0 when storing as sparse matrix.
    Default: 1e-12
  • enable_block_algorithm (bool) – Flag that determines whether an algorithm exploiting the block structure of the transfer matrices should be used if possible.
    Default: True
  • save_self_energies

    Deprecated since version 2017.0: Use storage_strategy instead.

Returns:Whether to use the algorithm that exploits the block structure of the transfer matrices.
Return type:bool
Returns:The maximum number of recursion steps.
Return type:int

Deprecated since version 2017.0.

Returns:Values treated as 0.
Return type:float
Returns:The way self energies are stored between iterations.
Return type:SaveInMemory | StoreOnDisk | NoStorage
Returns:The tolerance of convergence.
Return type:float

Usage Examples

Define that the self energies on the complex contour are calculated with the recursion method, and the self energies calculated in the first iteration of the SCF loop are saved in memory and reused in the following iterations.

device_algorithm_parameters = DeviceAlgorithmParameters(

Storing the self energies potentially requires a significant amount of memory. Therefore it can be useful to define that the self energies on the complex contour are not saved.

device_algorithm_parameters = DeviceAlgorithmParameters(

While this reduces the required memory, it also has a negative impact on performance.

Instead of saving the self energies in memory, they can stored on disk. This setting provides the same performance as SaveInMemory() and requires sufficient disk space (potentially hundreds of gigabytes).

device_algorithm_parameters = DeviceAlgorithmParameters(


The RecursionSelfEnergy uses the iterative scheme by Lopez, Lopez and Rubio [hLSLSR85] for calculating the self energy matrix.


[hLSLSR85]M. P. Lopez Sancho, J. M. Lopez Sancho, and J. Rubio. Highly convergent schemes for the calculation of bulk and surface Green functions. J. Phys. F: Metal Physics, 15(4):851, 1985. URL: