aiidateam / aiida-common-workflows

A repository for the implementation of common workflow interfaces across materials-science codes and plugins
https://aiida-common-workflows.readthedocs.io
MIT License
52 stars 30 forks source link

Feedback from Abinit developers -- changes to smearing #176

Closed zooks97 closed 2 years ago

zooks97 commented 3 years ago

After receiving feedback from the Abinit developers, we have decided that it is necessary to change some defaults in the Abinit protocol.

The current defaults for smearing type are:

The suggested changes are:

The Abinit developers strongly advise using Gaussian smearing instead of Fermi-Dirac smearing in general. In the case of unknown electronic type, the use of MV cold smearing is not advised as it can give occupations which do not uniquely define a Fermi energy when using the bisection method. However, MV cold smearing is advised for metals as it gives the lowest error in total free energy.

For these reasons, in the case of unknown electronic type, we propose to use Gaussian smearing; in the case of known metallic electronic type, MV cold smearing; and in the case of known insulating electronic type, fixed occupations.

I will soon make a pull request which implements these changes. However, if we want to include these choices in the paper, we need to re-run the Abinit calculations, slightly modify the text of the paper, and re-generate many of the figures.

sphuber commented 3 years ago

Thanks for the detailed post @zooks97 . Note that although the ElectronicType enum already has an AUTOMATIC constant, we haven't really added broad support for all plugins, so most only support METAL or INSULATOR. This is because we haven't decided yet if AUTOMATIC should mean that the input generator should simply select slightly different parameters, or the workchain should actually take charge to run separate initial calculations to try and determine the character and then use that for the rest of the workchain. The latter is of course non-trivial and potentially costly, and for the former it can be doubted whether that really constitutes "automatic".

Nevertheless, applying the other changes make a lot of sense and I would apply them to the code and text before publication. I will now look at the PR.

giovannipizzi commented 3 years ago

pinging @flavianojs who fixed the issue of multiple zeros for MV (at least in QE) so he can comment more on that point

flavianojs commented 3 years ago

Hi guys,

I have treated the problem of multiple Fermi energies when using cold smearing in QE. It is basically a protocol that combines bisection and Newton's minimization methods. I am sure the same treatment can be given to Abinit, such that you would have a simpler workflow: in case of unknown metallicity, you could safely use cold smearing.

@ltalirz had already contacted me about doing such an implementation on Abinit, but we did do it so far. Maybe it is time for us to push for that!?

ltalirz commented 3 years ago

@ltalirz had already contacted me about doing such an implementation on Abinit, but we did do it so far. Maybe it is time for us to push for that!?

That was for CP2K, see https://github.com/cp2k/cp2k/issues/1359

I still think it would be very worthwhile and not very hard to do; at the moment I'm unfortunately caught up in other work. Please don't wait for me!