I have implemented a very small class for SCF convergence errors. With this class, it becomes possible to automatically alter parameters in a calculation if an SCF convergence error occurs. For example, one can try to converge with a mixing beta parameter of 0.7, catch a KohnShamConvergenceError with a try: except: clause, reduce beta to 0.35 (or do another change), and try again. In this way, one can go to increasingly more demanding mixing parameters as the need arises, rather than always using it and spending more time finishing calculations. This type of error handling is used in GPAW, and it is basically the same code as is used there: https://gitlab.com/gpaw/gpaw/blob/master/gpaw/__init__.py
I have implemented a very small class for SCF convergence errors. With this class, it becomes possible to automatically alter parameters in a calculation if an SCF convergence error occurs. For example, one can try to converge with a mixing beta parameter of 0.7, catch a KohnShamConvergenceError with a try: except: clause, reduce beta to 0.35 (or do another change), and try again. In this way, one can go to increasingly more demanding mixing parameters as the need arises, rather than always using it and spending more time finishing calculations. This type of error handling is used in GPAW, and it is basically the same code as is used there: https://gitlab.com/gpaw/gpaw/blob/master/gpaw/__init__.py