gem.solvers.gem_solver.gemSolver
- class gem.solvers.gem_solver.gemSolver(solver_params=None, solver_type=None)[source]
Base class of every GEM impurity solver.
Fragment checks that the solver it receives is a gemSolver, so any new solver must inherit from this class. SolverTemplate is a commented skeleton to copy, SimpleED a working implementation.
A subclass is expected to:
call
super().__init__(solver_params=..., solver_type=...), which setsself.typeandself.solver_params;override every method listed in
mandatory_methods.
Solver-specific parameters are not passed by Fragment: they are read from
self.solver_paramsand fixed once when the solver is built, e.g.num_eig = self.solver_params.get('num_eig', default). In principle they can be changed from fragment.solver.solver_params.The whole surface the rest of GEM touches is:
build_Hemb(D, eloc, Lambdac, V2E), called positionally, andsolve_Hemb(verbose=, T=), called with these two keywords only;calc_density_matrix()andcompute_E2loc(), without arguments; all four from Fragment.solve_impurity;the attributes
gs_ene(ground-state energy of the embedding Hamiltonian) andZpart(partition function divided by exp(-gs_ene/T), hence 1 at zero temperature), set by solve_Hemb and read by Lattice.compute_functional;self.type, only used in the printouts;optionally
compute_E1loc(nimp), used by Fragment.compute_energy, andcalc_double_occ(i), used by Gdmft.run.
Everything else is up to the solver. In particular the constructor arguments (dimensions, symmetry sectors, whether the calculation is thermal, …) are decided when the solver is built: the Fragment only ever sees the object and never sets them.
Methods
Double occupancy of the impurity level i.
compute_E1loc(nimp)One-body local energy of the impurity block.
Names of the mandatory methods that are still the gemSolver stubs, i.e. that this solver has not implemented.
build_Hemb
calc_density_matrix
compute_E2loc
solve_Hemb
Methods
|
|
|
|
Double occupancy of the impurity level i. |
|
|
One-body local energy of the impurity block. |
Names of the mandatory methods that are still the gemSolver stubs, i.e. that this solver has not implemented. |
|
|
Attributes