-
Notifications
You must be signed in to change notification settings - Fork 17
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
Avoid unnecessary errors when launching Wannier90OptimizeWorkChain
…
#40
Conversation
@@ -76,7 +88,7 @@ class Wannier90OptimizeWorkChain(Wannier90BandsWorkChain): | |||
# chk file by setting `restart = plot` in wannier90.win. | |||
_WANNIER90_PLOT_INPUTS = ( | |||
"wannier_plot", | |||
"bands_plot", | |||
# "bands_plot", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if you could add some explanations before the commented bands_plot
, sth like
the bands_plot is commented out since it is rather cheap to compute, and also we want to check the band distance during each iteration of optimizing dis_proj_min/max even if we set `separate_plotting = True`
.get("wannier_plot", False) | ||
): | ||
builder.separate_plotting = True | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move these lines after the next conditional of if reference_bands:
, so that we only separate_plotting
if we are going to optimize_disproj
if builder.optimize_disproj == True:
YOUR_LINES_HERE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Do we still want to automatically separate plotting only if wannier_plot == True
or always if optimize_disproj == True
? The latter will cause a warning in case no plotting inputs are specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we auto set separate_plotting = True
only if both wannier_plot = True
and optimize_disproj = True
…related to `separate_plotting` input. Replace the errors with user warnings and extend the warning messages. 1. Automatically set `separate_plotting=True` if `optimize_disproj == True` and `wannier_plot == True` 2. Replace the error with a warning if `separate_plotting == True` but no plotting input is specified 3. Throw an error if `wannier_plot == True` but `separate_plotting == False`
…related to the
separate_plotting
input.Replace the errors with user warnings and extend the warning messages.