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

Agreement on smearing for SCF? #211

Open
bosonie opened this issue Jul 19, 2021 · 7 comments
Open

Agreement on smearing for SCF? #211

bosonie opened this issue Jul 19, 2021 · 7 comments

Comments

@bosonie
Copy link
Collaborator

bosonie commented Jul 19, 2021

To determine the occupation of electronic states during the SCF cycle, DFT codes often use a smearing. Currently in our implementation each code select the preferred smearing in the spirit of using "the best available". Please note that METAL and INSULATOR electronic type might implement a different smearing (or no smearing, i.e. fixed occupation).
Does it make sense to talk about a common approach in this respect?
Also, recent developments might suggest problems in treating insulators with certain smearing. Ping @flavianojs for more insights on this. We have METAL as default to treat materials with unknown nature.

@blokhin
Copy link
Member

blokhin commented Sep 8, 2021

We use a very simple technique to guess if we should expect metal or non-metal, hopefully it makes sense in this case as well:

def guess_metal(ase_obj):
    """
    Make an educated guess of the metallic compound character,
    returns bool
    """
    non_metallic_atoms = {
    'H',                                  'He',
    'Be',   'B',  'C',  'N',  'O',  'F',  'Ne',
                  'Si', 'P',  'S',  'Cl', 'Ar',
                  'Ge', 'As', 'Se', 'Br', 'Kr',
                        'Sb', 'Te', 'I',  'Xe',
                              'Po', 'At', 'Rn',
                                          'Og'
    }
    return not any([el for el in set(ase_obj.get_chemical_symbols()) if el in non_metallic_atoms])

@bosonie
Copy link
Collaborator Author

bosonie commented Sep 8, 2021

Thanks @blokhin for the feedback. This will definitely be useful when we will implement and "AUTOMATIC" ElectronicType. Here however it is more to discuss what kind of smearing to use in various cases.

@giovannipizzi @azadoks let's try to confine here the discussion.

@bosonie
Copy link
Collaborator Author

bosonie commented Sep 8, 2021

Let's try to summarize. So far a user can define a METAL or INSULATOR calculation. In case nothing is specified, METAL is assumed to be the safest choice.
Soon we will merge a PR #215 that will extend to have an UNKNOWN choice (that will become the default) for a "safest" smearing.
However here we would like to discuss to have a uniform choice of smearings among codes. So far each code implement its peculiar choice

@bosonie
Copy link
Collaborator Author

bosonie commented Sep 8, 2021

Here #176 a suggestion from the Abinit developers. Should we agree on that?

@flavianojs
Copy link

Hi guys,

Please see my comment in #176 .
If you guys are in contact with the Abinit developers, we could implement and test the protocol I developed to tackle the non-unique Fermi energy problem when using cold smearing for semiconductors. I think that in one week's time, we could implement and test this protocol.

@azadoks
Copy link
Contributor

azadoks commented Sep 8, 2021

Thanks for all the interest in this!

One thing we may want to tabulate first is which codes have which smearing methods implemented.
If we're looking for a protocol that all (or nearly all) codes can use, it would be good to first know what the possibilities are.
I'd worry about having cold smearing in the protocol if many codes need to implement cold smearing, Flaviano's method, or both.

@bosonie
Copy link
Collaborator Author

bosonie commented Oct 22, 2021

Stimulated by the project on oxides equation of states, we started to wonder what is the most feasible way to compare results among different codes. Two possibilities:

  1. We let every code decide on the smearing type, smearing value, k-point density, but require very tight convergence. This means to try to converge to the limit 0T with different smearing.
    Up side: results are well converged and physical.
    Down side: some results might be unstable numerically: small smearing values, below 0.13eV /0.01 Ry, lead to an imprecise integration even with super dense k meshes. Moreover calculations will be relatively costly.
    Extra info: thanks to @sponce24 study, we have a demonstration that converging with different smearing types is feasible with quantum espresso and abinit. We also have an idea of the computational cost.

  2. All the code use the same values for smearing and broadening. Which one?
    Extra info: a list of supported smearing types for each code has been collected and it reveals that only Fermi-Dirac is supported by every code.

This issue is relevant mostly for obtaining oxides results, but also to define guidelines for protocols. Let's also keep in mind that the definition of electronic type is very important for this issue. To know in advance if we are treating a metal or an insulator will make the treatment a lot clearer.

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

No branches or pull requests

4 participants