Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broyden refactoring #73

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from
Open

Broyden refactoring #73

wants to merge 2 commits into from

Conversation

alberto-carta
Copy link
Collaborator

Refactored the mixing to bring in more consistency, now there is a single linear/broyden mixing scheme that can mix either the Sigma or the G0.
There is a small difference at the bookeeping level for the broyden mixing from last implementation (the number of iterations was off by one for some reason) so in the current implementation broy_max_it = 7 is equivalent to the previous broy_max_it=8.
I also added a counter that gets written to the h5 achive which counts the CSC steps, this is to signal to quantum espresso how many mixing steps it should include in the DFT charge density mixing (separate PR for QE will arrive, at the moment this update is also compatible with the previous QE versions)

There is also an added flag which allows one to perform the G update every impurity iteration instead of computing all impurities and then updating. Overall this adds 4 flags in the read_config:

"""
'update_mu_each_imp': {'converter': BOOL_PARSER,
'used': True, 'default': False},

                             'mix_quantity': {'converter': lambda s: list(map(str, s.split(','))),
                                        'used': True,
                                        'default': []},

                             'mix_type': {'valid for': lambda x, _: x in ('linear', 'broyden'),
                                            'used': True, 'default': 'linear'},

                             'mix_greed': {'converter': float, 'valid for': lambda x, _: x > 0,
                                           'used': True, 'default': 1.0},

""
which take place of the previous G0 and Sigma mixing related flags.

The code still needs a little bit of cleaning (removing commented out code and adding description of new flags in the read config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant