zhubonan / aiida-castep

Interface with AiiDA to automate CASTEP calculations and preserve their provenance.
MIT License
7 stars 3 forks source link

Inherit from BaseRestartWorkflow in AiiDA core #13

Open zhubonan opened 3 years ago

zhubonan commented 3 years ago

AiiDA core has a reference implementation of the BaseRestartWorkChain:

https://github.com/aiidateam/aiida-core/blob/develop/aiida/engine/processes/workchains/restart.py

The CastepBaseWorkChain implemented here in the plugin was based on an eariler version of this, but the exact implementation has now diverged to some extended. It allows handling some common errors such ionic relaxation convergence, out of walltimes and electronic convergence issues.

It would be useful to refector and make CastepBaseWorkChain inherit from BaseRestartWorkChain. Similar work has been done for the aiida-vasp plugin previously.

The advantage of the BaseRestartWorkChain is that it provides a framework for handling restarts as well as allowing customising the "handlers" at individual run level.

ml-evs commented 3 years ago

I'll try to tackle this one over the next couple of weeks - I will open a draft PR as soon as I have something, so if I haven't opened one by the time you want this done, please feel free to go for it yourself...