ezpzbz / aiida-catmat

Collection of AiiDA WorkChains Developed in CATMAT project
MIT License
3 stars 1 forks source link

SCF convergence handling #66

Open ezpzbz opened 3 years ago

ezpzbz commented 3 years ago

In the below section of VaspMultiStageWorkChain (https://github.com/morgan-group-bath/aiida-bjm/blob/9335c95034d7569ba83b7bfd648f171124e298ac/aiida_bjm/workchains/vasp_multistage.py#L523-L532), if we face an issue and change the ALGO to All, then if the same issue happens, none of if elif conditions will meet, and therfore, the process gets excepted with:

algo = self.ctx.modifications['ALGO']
KeyError: 'ALGO'

Solution is that having an else or elif to capture this and breaks the process peacefully with proper exit code.