Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhBaseWorkChain: better handler for convergence #986

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bastonero
Copy link
Collaborator

Plain lowering down the alpha mix could not work always. The nmix_ph is already an improvement, leading to the usage of more iterations into the mixing. The rate of the alpha mix change is also increased, and below a certain threshold a multi mix approach is tried. Afterwards, the handler finishes the strategies.

Plain lowering down the alpha mix could not work always.
The `nmix_ph` is already an improvement, leading to the usage
of more iterations into the mixing. The rate of the alpha mix change
is also increased, and below a certain threshold a multi mix approach
is tried. Afterwards, the handler finishes the strategies.
Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bastonero! Just left a few questions/comments.


return ProcessHandlerReport(True)

# now try playing with the mixing parameters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my runs I had immediately set alpha_mix to 0.4 in the overrides. I didn't gather any statistics, but I did get a noticable improvement in convergence. Something to consider?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One additional note on the line below this one (which was already there ^^): The user can also set alpha_mix instead of alpha_mix(1) and this would work fine. If we only look for alpha_mix(1) and then set it, I think we override the alpha_mix specified by the user.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the user have to specify alpha_mix(i) = X, and not simply alpha_mix = X

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always just used alpha_mix:

mabercx@uan04:/pfs/lustrep3/scratch/project_465000106/mabercx/88/a0/a0e0-3391-4e6b-b4da-fc98886eaa4a> grep alpha_mix aiida.in
  alpha_mix =   4.0000000000d-01
mabercx@uan04:/pfs/lustrep3/scratch/project_465000106/mabercx/88/a0/a0e0-3391-4e6b-b4da-fc98886eaa4a> grep alpha_mix aiida.out | head -n 5
      thresh= 1.000E-02 alpha_mix =  0.400 |ddv_scf|^2 =  1.410E-08
      thresh= 1.187E-05 alpha_mix =  0.400 |ddv_scf|^2 =  3.525E-09
      thresh= 5.937E-06 alpha_mix =  0.400 |ddv_scf|^2 =  7.637E-11
      thresh= 8.739E-07 alpha_mix =  0.400 |ddv_scf|^2 =  2.221E-13
      thresh= 4.713E-08 alpha_mix =  0.400 |ddv_scf|^2 =  3.612E-14

src/aiida_quantumespresso/workflows/ph/base.py Outdated Show resolved Hide resolved
@bastonero bastonero requested a review from mbercx November 28, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants