dyson.solvers.static.chempot#
Chemical potential optimising solvers.
Functions
|
Search for a chemical potential in a Green's function using Aufbau principle and bisection. |
|
Search for a chemical potential in a Green's function using the Aufbau principle. |
|
Search for a chemical potential in a Green's function using a global minimisation. |
Classes
|
Solve a self-energy and assign a chemical potential based on the Aufbau principle. |
|
Shift the self-energy auxiliaries to best assign a chemical potential. |
|
Base class for a solver for a self-energy that optimises the chemical potential. |
- dyson.solvers.static.chempot.search_aufbau_global(greens_function: Lehmann, nelec: int, occupancy: float = 2.0) tuple[float, float][source]#
Search for a chemical potential in a Green’s function using a global minimisation.
- Parameters:
greens_function – Green’s function.
nelec – Target number of electrons.
occupancy – Occupancy of each state, typically 2 for a restricted reference and 1 otherwise.
- Returns:
The chemical potential and the error in the number of electrons.
- dyson.solvers.static.chempot.search_aufbau_direct(greens_function: Lehmann, nelec: int, occupancy: float = 2.0) tuple[float, float][source]#
Search for a chemical potential in a Green’s function using the Aufbau principle.
- Parameters:
greens_function – Green’s function.
nelec – Target number of electrons.
occupancy – Occupancy of each state, typically 2 for a restricted reference and 1 otherwise.
- Returns:
The chemical potential and the error in the number of electrons.
- dyson.solvers.static.chempot.search_aufbau_bisect(greens_function: Lehmann, nelec: int, occupancy: float = 2.0, max_cycle: int = 1000) tuple[float, float][source]#
Search for a chemical potential in a Green’s function using Aufbau principle and bisection.
- Parameters:
greens_function – Green’s function.
nelec – Target number of electrons.
occupancy – Occupancy of each state, typically 2 for a restricted reference and 1 otherwise.
max_cycle – Maximum number of iterations.
- Returns:
The chemical potential and the error in the number of electrons.
- class dyson.solvers.static.chempot.ChemicalPotentialSolver(*args: Any, **kwargs: Any)[source]#
Bases:
StaticSolverBase class for a solver for a self-energy that optimises the chemical potential.
- Parameters:
static – Static part of the self-energy.
self_energy – Self-energy.
nelec – Target number of electrons.
- property static: Array#
Get the static part of the self-energy.
- kernel(*args: Any, **kwargs: Any) Any#
Run the solver.
- class dyson.solvers.static.chempot.AufbauPrinciple(*args: Any, **kwargs: Any)[source]#
Bases:
ChemicalPotentialSolverSolve a self-energy and assign a chemical potential based on the Aufbau principle.
- Parameters:
static – Static part of the self-energy.
self_energy – Self-energy.
nelec – Target number of electrons.
- method: Literal['direct', 'bisect', 'global'] = 'global'#
- classmethod from_self_energy(static: Array, self_energy: Lehmann, overlap: Array | None = None, **kwargs: Any) AufbauPrinciple[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
neleckeyword argument must be provided.
- classmethod from_expression(expression: BaseExpression, **kwargs: Any) AufbauPrinciple[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.
- class dyson.solvers.static.chempot.AuxiliaryShift(*args: Any, **kwargs: Any)[source]#
Bases:
ChemicalPotentialSolverShift the self-energy auxiliaries to best assign a chemical potential.
- Parameters:
static – Static part of the self-energy.
self_energy – Self-energy.
nelec – Target number of electrons.
Notes
Convergence is met when either of the thresholds
conv_tolorconv_tol_gradare met, rather than both, due to constraints of thescipy.optimize.minimize()method.- solver#
alias of
AufbauPrinciple
- classmethod from_self_energy(static: Array, self_energy: Lehmann, overlap: Array | None = None, **kwargs: Any) AuxiliaryShift[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
neleckeyword argument must be provided.
- classmethod from_expression(expression: BaseExpression, **kwargs: Any) AuxiliaryShift[source]#
Create a solver from an expression.
- Parameters:
expression – Expression to be solved.
kwargs – Additional keyword arguments for the solver.
- Returns:
Solver instance.
- objective(shift: float) float[source]#
Objective function for the chemical potential search.
- Parameters:
shift – Shift to apply to the self-energy.
- Returns:
The error in the number of electrons.
- gradient(shift: float) tuple[float, Array][source]#
Gradient of the objective function.
- Parameters:
shift – Shift to apply to the self-energy.
- Returns:
The error in the number of electrons, and the gradient of the error.
- kernel(*args: Any, **kwargs: Any) Any#
Run the solver.