aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
53 stars 78 forks source link

`PwBaseWorkChain`: handler for BFGS history failure #985

Closed bastonero closed 9 months ago

bastonero commented 10 months ago

Sometimes the BFGS algorithm for ionic minimizaiton fails, and the current handler simply restart from scratch. This might work, but here we try to improve upon this simplistic solution, trying first to lower the trusted radius, and then trying to switch algorithm.

mbercx commented 10 months ago

Thanks @bastonero! Does this one fix https://github.com/aiidateam/aiida-quantumespresso/issues/637?

I remember I was testing this when @giovannipizzi first opened the issue (and then got distracted, as usual), and the damped was very effective for relax, but not-so-effective for vc-relax. The strategy here is already quite good, but we may consider immediately switching to the damped algorithm for calculation == relax.

bastonero commented 10 months ago

Thanks @mbercx !

Thanks @bastonero! Does this one fix #637?

Yes, that was the idea (I forgot the number of that issue, thanks for linking).

I remember I was testing this when @giovannipizzi first opened the issue (and then got distracted, as usual), and the damped was very effective for relax, but not-so-effective for vc-relax. The strategy here is already quite good, but we may consider immediately switching to the damped algorithm for calculation == relax.

Ok, amazing, then it's also tested! We can then proceed as you suggest.

bastonero commented 10 months ago

@sphuber now working with the new logic suggested by @mbercx . I also added for the relax case the fire algorithm`. I think it's new, we should make sure from which version of QE it's implemented. But now we just support the latest 3 versions correct?

sphuber commented 10 months ago

But now we just support the latest 3 versions correct?

I think we only support v6.6 and newer, but maybe for the next release we already even planned to drop support for v6 completely. @mbercx ?

bastonero commented 10 months ago

Looking into QE history it seems the fire algorithm is there since a while, so it should be a safe addition.

mbercx commented 10 months ago

I think we only support v6.6 and newer, but maybe for the next release we already even planned to drop support for v6 completely. @mbercx ?

According to our compatibility guarantees, we support the last 3 minor releases, as well as older versions for up to two years. As QE v6.8 was released in July 2021:

Screenshot 2023-11-27 at 10 09 16

We can also drop support for that in the next aiida-quantumespresso release.

bastonero commented 10 months ago

Nevertheless, I didn't understand whether this fire algorithm is something brand new or it was introduced years ago. I cannot find on their GitLab changelog when this was introduced. Maybe it is already quite old stuff, so no need to drop support (yet)