logsdail / carmm

Scripts for creation, manipulation and analysis of geometric and electronic structure of molecular models
GNU General Public License v3.0
5 stars 17 forks source link

Restarting wrapper for ASE calculators #130

Open PavelStishenko opened 11 months ago

PavelStishenko commented 11 months ago

The problem

Several ASE workflows are overly optimistic about capabilities of calculators to converge for any geometry. So when a calculators fails to converge for some geometry generated by Dynamics, Optimization, or NEB algorithms, there is no way to recover and the whole calculation fails.

Suggestion

It looks possible to implement a Calculator class that would wrap another Calculator. The wrapper should be capable to catch exceptions raised by the wrapped calculator, and to recreate it with slightly tuned parameters, that should give better chance for convergence. Possible targets for parameters tuning are initial spins, mixer parameters, initial density matrix, etc.

Wrapper implementation details

Wrapper constructor arguments

The Wrapper Calculator should be created using two parameters: a list of tuned parameters for restarts and a function (or callable object) that creates an instance of the wrapped calculator with tuned parameters.