-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix bug on band_kpoints_distance for periodicity x and xy #547
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #547 +/- ##
==========================================
+ Coverage 80.72% 80.77% +0.04%
==========================================
Files 49 49
Lines 3414 3412 -2
==========================================
Hits 2756 2756
+ Misses 658 656 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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 @AndresOrtegaGuerrero. But I guess there may be a more proper solution for this, let's see how @superstar54's idea.
"fast": 0.1, | ||
"moderate": 0.025, | ||
"precise": 0.015, |
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.
Emmm.... Where are those values come from? I think we need a centrailse place for such value, is qeapp.yaml
a good place for it? If it is from the aiida-quantumespresso
protocol, then there is PwBaseWorkChain.get_protocol_inputs(protocol)
to get it rather than define it again 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.
@unkcpz so these values come from the protocol from bands in the quantum espresso plugin. For 1D and 2D we have to remove bands_kpoints_distance
from the inputs.
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.
My point is if it is from protocol, you can read it by PwBaseWorkChain.get_protocol_inputs(protocol)
, is that work?
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 modified as you suggested , and it works :)
report[ | ||
"bands_kpoints_distance" | ||
] = qeapp_wc.inputs.bands.bands_kpoints_distance.value | ||
else: |
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.
@superstar54 there are still hardcoded code for bands and pdos here, are these able to be removed by the plugin implementation?
I think there are two ways to show the plugin's summary info.
What are your opinions? @AndresOrtegaGuerrero @unkcpz |
In the first one, the entry can just append in the same tab of 'Workflow Summary' without generating another tab? , Because if that is the case, is nice since there you can get like different sections of the options for each plugin, like one for pdos, for bands, and for future ones. I am assuming this requires a different PR to address this?, right @superstar54 ? |
Yes
Yes.
I agree. |
I agree, please open an issue and add a comment so we remember to clean up the code after the plugin is there in the future. |
@unkcpz @superstar54 do you maybe know why i cant get all the checks to be completed? |
The issue is #549 |
There is only one test that failed which is arm64 test. I guess it was some problem on the self-runner (Marnik's mac workstation), I'll check it after. There is nothing to worry about if the amd64 checks are passed, hopefully. |
for more information, see https://pre-commit.ci
report["bands_kpoints_distance"] = PwBandsWorkChain.get_protocol_inputs( | ||
report["protocol"] | ||
)["bands_kpoints_distance"] | ||
|
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 think this is not correct, this will make the report distance only rely on the protocol.
The if..else is still needed as your previous change.
If the user sets the bands_kpoints_distance
, it needs to be updated in the report. Am I missing something?
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.
So far the user doesnt have the option to modify bands_kpoints_distance
from the bands plugin (qe app)
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.
Good! Then it is all fine for me.
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.
@AndresOrtegaGuerrero thanks!
this PR fixes a bug on the bands (summary_viewer.py) logic when running a bands for periodicity x and xy. The bug rises for not having bands_kpoints_distance in the input for periodicity x and xy