vossjo / ase-espresso

ase interface for Quantum Espresso
GNU General Public License v3.0
65 stars 55 forks source link

Implement a new class for exceptions due to convergence errors #14

Closed RKBK closed 7 years ago

RKBK commented 8 years ago

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

chuanshi commented 8 years ago

Looks good to me