The Computed TB09 meta-GGA Exchange-Correlation Potential Diverged ...¶
If you see a message similar to this:
# The computed TB09 meta-GGA exchange-correlation potential # # diverged in 0.02 % of the simulation volume, and was # # truncated to be in the range [-10.0000, 10.0000] Hartree
then you should check a few things. First of all, if this is a bulk crystal calculation, then you may have a real problem. Check your settings and system geometry carefully! On the other hand, if your system actually contains vacuum (like a nanowire or surface), then it may not be a problem at all. But, still best to be careful! From a formal perspective, the TB09 functional  is really designed for bulk materials because you assume that it is safe to divide by the electron density. But if the density n(r) is very small or even zero, the evaluation of the exchange-correlation energy may diverge. To safeguard against this, the total exchange-correlation potential (which contains a term that scales as 1/n(r); see Eq. (1) in Ref. 1) is checked for divergence and limited to the range -10 to 10 Hartree; any larger values encountered will trigger the message above. But this should only happen in the vacuum region where the exact value of the potential is not so important anyway. If you want to be on the really safe side you can plot the exchange-correlation potential and see if it looks sane. One could almost even say that it’s a good thing that you get this message for a nanowire or surface, as it indicates that you probably have enough vacuum, since the density really is small in the vacuum region. The one place where things still can (and probably will!) go wrong for a system with vacuum is in the self-consistent evaluation of the “c” parameter (Eq. 3 in Ref. 1) which also contains 1/n(r). Therefore, you should always determine c for a bulk material (either self-consistently or via fitting) and then hard-code this value in your script for the systems containing vacuum. Cf. the corresponding discussion in the InAs tutorial!
References  F. Tran and P. Blaha, Phys. Rev. Lett. 102, 226401 (2009)