aiidateam / aiida-quantumespresso-hp

MIT License
3 stars 0 forks source link

Allow to use ortho-atomic projectors for 'relax' as well #12

Closed MackeEric closed 1 year ago

MackeEric commented 3 years ago

As of QE v.6.7, forces and stresses can now be calculated with Löwdin-orthogonalized projectors as well. Therefore, we should add the possibility of using these projectors for (vc)-relax calculations, which is currently being prevented in the 'run_relax' method by

    if u_projection_type_relax != self.defaults.u_projection_type_relax:
        self.report(
            f'warning: you specified `u_projection_type = {u_projection_type_relax}` in the input parameters, but '
            r'this will crash pw.x, changing it to `{self.defaults.u_projection_type_relax}`'
        )

because in the defaults 'u_projection_type_relax': 'atomic'. Honestly, I would prefer to have the default u_projection_type_relax changed to ortho-atomic for consistency (what do you think, @timrov?). However, we have a version problem because if you try to use ortho-atomic projectors with any version prior to 6.7, pw.x will crash when calculating the forces.

sphuber commented 3 years ago

The version problem is indeed tricky. For now there is no (reliable) way for the workchain to tell what version of the code will be run and so what inputs can be set. I think then that at least we should keep support for both, and at most provide some kind of switch to change the behaviour if the user knows what he is doing.

MackeEric commented 3 years ago

Yes, I guess the switch-option would be a temporary solution. If the plugin is released one day, we may think of a better solution or we just drop support for any QE <6.7.

bastonero commented 1 year ago

Fixed in #32