dyson.solvers.static.density#

Density matrix relaxing solver.

Functions

get_fock_matrix_function(mf)

Get a function to compute the Fock matrix for a given density matrix.

Classes

DensityRelaxation(*args, **kwargs)

Solve a self-energy and relax the density matrix in the presence of the auxiliaries.

dyson.solvers.static.density.get_fock_matrix_function(mf: scf.hf.RHF) StaticFunction[source]#

Get a function to compute the Fock matrix for a given density matrix.

Parameters:

mf – Mean-field object.

Returns:

Function to compute the Fock matrix.

class dyson.solvers.static.density.DensityRelaxation(*args: Any, **kwargs: Any)[source]#

Bases: StaticSolver

Solve a self-energy and relax the density matrix in the presence of the auxiliaries.

Parameters:
  • get_static – Function to get the static self-energy (including Fock contributions) for a given density matrix.

  • self_energy – Self-energy.

  • nelec – Target number of electrons.

occupancy: float = 2.0#
solver_outer#

alias of AuxiliaryShift

solver_inner#

alias of AufbauPrinciple

diis_min_space: int = 2#
diis_max_space: int = 8#
max_cycle_outer: int = 20#
max_cycle_inner: int = 50#
conv_tol: float = 1e-08#
favour_rdm: bool = True#
converged: bool | None = None#
classmethod from_self_energy(static: Array, self_energy: Lehmann, overlap: Array | None = None, **kwargs: Any) DensityRelaxation[source]#

Create a solver from a self-energy.

Parameters:
  • static – Static part of the self-energy.

  • self_energy – Self-energy.

  • overlap – Overlap matrix for the physical space.

  • kwargs – Additional keyword arguments for the solver.

Returns:

Solver instance.

Notes

To initialise this solver from a self-energy, the nelec and get_static keyword arguments must be provided.

classmethod from_expression(expression: BaseExpression, **kwargs: Any) DensityRelaxation[source]#

Create a solver from an expression.

Parameters:
  • expression – Expression to be solved.

  • kwargs – Additional keyword arguments for the solver.

Returns:

Solver instance.

kernel(*args: Any, **kwargs: Any) Any#

Run the solver.

property get_static: StaticFunction#

Get the static self-energy function.

property self_energy: Lehmann#

Get the self-energy.

property nelec: int#

Get the target number of electrons.

property overlap: Array | None#

Get the overlap matrix for the physical space.

property nphys: int#

Get the number of physical states.