Simplified solver interface for adding new solvers #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main changes
Broke up the SolverStructure object in multiple classes
dmft_tools/solver.py
now contains only a dispatchercreate_solver
that imports the corresponding modules if it finds them and points to the correct DMFT solver classsolvers
which contains the abstract class and every child classdmft_tools/solvers/abstractdmftsolver.py
contains an abstract classAbstractDMFTSolver
that cannot be initialized, but contains all the common parts of the init of each solver as well as some commonly used functions (I kept the tail fitting here even though we use it basically only once, but I think in theory it should be usable with every imaginary freq solver)dmft_tools/solvers/SOLVERNAME_interface.py
which contains theSOLVERNAMEInterface
class which always inherits from AbstractDMFTSolver and adds the solver specifics, I have made sure alway to keep separate the triqs_solver object from the solid_dmft solver object (there were problems for ctint with some of the flags not being passed correctly)Minor changes
dmft_tools/solver.py
is moved to a new moduledmft_tools/common.py
I tested the implementations with all solvers we have and with the solid_dmft tests.
This should streamline adding new solvers for the future