Convergence Tips

If you're having difficulty with electronic convergence, see some tips below based on the code you're using.

 

ASE-Quantum Espresso

  • Try adjusting the smearing method (default is based on a Fermi-Dirac distribution).  Other options are listed here, but generally Gaussian smearing is a good idea.
    calc = espresso( ...
         smearing='gauss',
         ...)

     

  • The default mixing parameters are quite aggressive, and will often fail for more heterogeneous systems (alloys, oxides, et cetera).  They are passed to ASE-Espresso in a dictionary with defaults shown below:
    calc = espresso(...
         convergence = {'energy': 1e-6,
                        'mixing': 0.7,
                        'nmix': 8,
                        'mixing_mode': 'plain',
                        'maxsteps': 100,
                        'diag': 'david'},
    
         ...)

    You may want to consider changing:
    mixing and nmix - 'mixing' controls the relative size of the contribution previous SCF iterations' electronic densities.  Lowering the value of 'mixing' is often required to allow the system to converge, but reducing it too far will provide aphysical results.  As a general rule, the argument passed for 'mixing' should be at least 0.1, and the arguments passed for 'mixing' and 'nmix' should have a product of at least 1.

    mixing_mode - For systems with reduced symmetry (including calculations at a surface) it is often helpful to use the 'local-TF' mixing mode, which more easily accounts for a heterogeneous charge density.

    maxsteps - 100 steps is usually enough for many systems, and 200 steps might be more reasonable for the remainder. ​  Unless you can see a clear trend towards electronic convergence, increasing 'maxsteps' beyond 200 is likely just causing your calculation to take longer to fail.

    diag - I have yet to encounter a system where changing this parameter has eased convergence.  However, in the interest of completeness, it may also be set to 'cg' to follow a conjugate-gradient based approach.  This is substantially slower than the default Davidson diagonalization.

    In summary, a common setup I use for oxide surfaces is shown below:

    calc = espresso(...
         convergence = {'energy': 1e-6,
                        'mixing': 0.2,
                        'mixing_mode': 'local-TF',
                        'nmix': 10,
                        'maxsteps': 200,
                        'diag': 'david'},
         ...)

     

  • By default ASE-Espresso adds ten "extra" bands (based on the number of valence electrons in the pseudopotentials).  This is often enough, however it doesn't scale with system size.  Adding additional empty bands will slightly increase computational cost per SCF iteration, but may reduce overall computational time by reducing the number of SCF steps required.  As a general rule, it makes sense to have up to 20-30% more bands than needed based on valence electron count alone.
  • If you are using more advanced computational techniques (Hubbard "+U" correction, exact exchange, et cetera) you may find it helpful to refer to those user guides (coming soon).

 

VASP

  • If you're using spin-polarization or a dipole correction, try starting from the CHGCAR of a non-spin-polarized calculation by setting:
    ISTART = 0
    ICHARG = 1
  • Use linear mixing:
    BMIX = 0.0001
    BMIX_MAG = 0.0001
  • Reduce AMIX and AMIX_MAG
  • Reduce MAXMIX (default is 45)
  • Restart from partly converged results by stopping after 20 electronic steps and restarting from WAVECAR (ie ISTART = 1

For further information, see: https://www.vasp.at/vasp-workshop/slides/optelectron.pdf

 

GPAW

Check out the guide GPAW has put together for just this purpose!  Link