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

👌 PwBaseWorkChain: Improve handling of SCF convergence issues #987

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Nov 28, 2023

  1. 👌 PwBaseWorkChain: Improve handling of SCF convergence issues

    The current error handler for the `PwBaseWorkChain` that deals with SCF convergence
    issues only tries to reduce the `mixing-beta` by 20% each time the calculation fails,
    and doesn't consider the rate of convergence.
    
    Here we improve the error handling for this case by calculating the slope on the
    logarithm of the "scf accuracy". Based on some statistics presented in
    
    aiidateam#961
    
    We noted two points:
    
    1. Most of the calculations that converge do so within 50 SCF steps.
    2. For those that don't, there is a very low chance of convergence in case the scf
       accuracy slope is higher than -0.1.
    
    Hence, we:
    
    * Limit the default number of maximum steps (`electron_maxstep`) to 50.
    * In case of SCF convergence failure, check the scf accuracy slope. If < -0.1, do a
      full restart.
    * Else, check the `mixing_beta`. If above 0.1, half it and restart the calculation.
    mbercx committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    a3da4cd View commit details
    Browse the repository at this point in the history
  2. 🤔 A bunch of questionable changes

    * Stick to 50 `electron_maxstep`
    * Refuse to increase number of SCF step if slope good
    * Switch to `local-TF` mixing if lowsym or lowdim
    * Finally, reduce mixing beta and increase ndim
    mbercx committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    33a7259 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Configuration menu
    Copy the full SHA
    a9baa69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a691f04 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. tmp commit

    mbercx committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    4d15f6d View commit details
    Browse the repository at this point in the history