A.8 No convergence of the s.c.f. cycle even after many iterations
One first thing first: If you encountered unexpected s.c.f. convergence issues, did look at your exact geometry.in file in a viewing program, such as jmol? One of the most common reasons to find unexpectedly bad s.c.f. convergence for apparently harmless structures are issues such as the wrong lattice parameter for the structure in question, an atom in the wrong location, or the wrong structure altogether. Structures that are chemically unstable are often not happy at all when it comes to the stability of their electronic structure, and slow or no s.c.f. convergence can be an indicator of a simple geometry mistake.
Successful strategies for s.c.f. convergence in standard electronic structure problems have been developed in the field for a long time. Still, there remain some particular pathological classes of calculations, and even some of particular physical interest: large metallic slabs, where charge oscillations can occur; spin-polarized systems with closely competing spin states; systems near the crossing of two Kohn-Sham eigenvalues at the Fermi level; etc.
Visualizing the actual s.c.f. convergence behavior of your run can be a first step to success. See Sec. 3.10.1 for a brief description of how to do this.
The adjust_scf keyword now automatically controls s.c.f. convergence. It may be best to first remove all scf-convergence related keywords from control.in and see if this works. Sometimes, problems arise from mis-setting such keywords. As a result, for example we no longer recommend setting any of the sc_accuracy_* keywords explicitly.
If a control.in file without any scf-convergence related keywords does not solve the problem, the next steps are to adjust the available keywords carefully and step by step.
The standard s.c.f. convergence strategy within FHI-aims is to use mixer pulay, with a configurable charge_mix_param and number of mixed iterations n_max_pulay. These, possibly together with a preconditioner, should be modified first in order to see whether the problem can be contained.
A first line of defense against bad s.c.f. convergence is the sc_init_iter keyword. This keyword resets the Pulay mixer completely after a specified number of s.c.f. iterations. This is done only for the first s.c.f. cycle and can dramatically improve the covergence behaviour of problematic cases. The current default (as of this writing) is for the mixer to reset itself after 1001 iterations.
Typical settings that work for wide varieties of systems are as follows:
-
•
Semiconducting or insulating solids or molecules (i.e., insulating systems with an appreciable band gap):
mixer pulay
charge_mix_param 0.2
occupation_type gaussian 0.01
are usually enough to work for such systems.
-
•
Metallic systems with no appreciable band gap, slabs to model surface phenomena, etc.:
mixer pulay
charge_mix_param 0.02
occupation_type gaussian 0.1
or similar should usually work. Note that charge_mix_param 0.02 is not a small value for a mixing parameter, since this is employed with a Pulay mixer. After several iterations, the Pulay mixer has usually figured out what the right mixing parameters should be and thereby tends to undo the slowing effect of a small mixing parameter.
-
•
Periodic slab models that are still problematic:
In periodic systems, FHI-aims uses a Kerker preconditioner by default, in addition to the usual Pulay mixer. For very anisotropic metallic systems (think graphene sheet with a 10x10 unit cell and a large vacuum), the Kerker preconditioner may not be appropriate – switching it off may help:
preconditioner kerker off
-
•
Slow convergence for spin polarized systems:
Only ever run a spin polarized calculation if there is a good reason to do so. Running a clearly non-spin-polarized system with spin none just for aesthetic reasons is a bad idea: It will double your computer time usage in the best of cases, and it will require you to begin the calculation from some finite spin initialization that may not be close to the self-consistent electronic structure you are seeking. Thus, spin polarization may add additional s.c.f. cycles and cost extra time in any case.
Obviously, please do run spin polarized calculations if there is a good physical reason to do so. Just do not underestimate the cost. It is also wise ( = essential!) to think about the initial moments chosen for the initialization of the calculation. The closer the initial moment distribution matches the expected self-consistent result, the better (faster) the convergence.
In contrast, beginning every spin-polarized calculation with a high spin state for every atom may be a highly bad idea. In particular, do not run molecular or condensed phase calculations (i.e., anything other than single free atoms) with default_initial_moment hund. Hund’s rules, which can be read up on Wikipedia and a host of other sources, apply to free atoms. Condensed systems have very different spin moment distributions.
Beyond this, s.c.f. convergence issues can be highly system-specific in our experience, and general guidelines are hard to give. Things that will always work to some extent are:
-
•
a linear mixer with a (very!!) small charge_mix_param, which in the limit will guarantee convergence, albeit at the expense of excessively many s.c.f. cycles to reach convergence
-
•
A increased broadening specified with occupation_type. This is essential especially for metalic systems, but for small clusters, the quality of the obtained total energies will deteriorate somewhat as a result, since these suddenly correspond to fractional (very high temperature) occupation numbers around the Fermi level.
For particularly hard cases, we also recommend to review in detail all the options available in Sec. 3.10; better yet, contact us (see Section 1.7).
While trying out all these options, however, we strongly suggest to use the output_level full keyword, in order to have the actual eigenvalue spectrum printed across different s.c.f. iterations, and then to visualize the behaviour of the eigenvalue spectrum as a function of s.c.f. iteration. In many cases, this step may yield some critical physical insight into the nature of the problem. For example, Kohn-Sham density functional theory may sometimes be forced to place competing electronic levels ( and in rare earth elements are a good example, but there are many others!) at the Fermi level in order to ensure a given (ground-state) fractional occupation. The search for the correct occupation of these levels will then oscillate between different iterations, and could be the source of the instability. Stabilizing such a problem is still not easy, but at least, looking at the electronic structure as it develops may give some critical hint as to what is happening, instead of leaving the user groping in the dark.