-
Notifications
You must be signed in to change notification settings - Fork 14
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 tot magnetization #512
Conversation
@unkcpz This is a draft, but in order for me to continue there must be a PR (in aiida-quantumespresso) to deal with the logic that if the system has |
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 a lot for trying this @AndresOrtegaGuerrero, and sorry for the late review. The logic looks all good, but I think it requires some iron-up on the clarity of implementation. Can you fix the conflict and we arrange a pair coding session to check things together?
parameters["kpoints_distance"] = self.value.get("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.
Can you write a comment here for all conditions?
For instance:
# insulator and colliner: xxxx
# metal and collinear: xxx
Can the if..else clause below can be simplified with inverse and break return?
self.pseudo_setter.structure = None | ||
self.pseudo_setter._reset() | ||
else: | ||
self.pseudo_setter._reset() |
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.
Why can not call pseudo_setter.structure = None if input_structure is not None
? If I understand correct, the reset should also do self.structure=None
first.
To complete this PR the following requirements should be met
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #512 +/- ##
==========================================
- Coverage 75.73% 75.47% -0.26%
==========================================
Files 60 60
Lines 4319 4404 +85
==========================================
+ Hits 3271 3324 +53
- Misses 1048 1080 +32
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.
@AndresOrtegaGuerrero , thanks for the work! LGTM!
There are two things we could improve:
- If users set
Magnetism
toOff
, the Magnetization section could be hidden. - When switching on
Magnetism
, the pdos plot could has an optios to plotup
anddown
in two sides.
Could you create issues on this? so that we can do these in the future PRs.
@superstar54 thank you for the review, I thought i fixed the duplication i will have a look. Regarding the tot_magnetization , i kept as a Real number since in the pw.x manual is a real. |
In the fixed occupation, if one sets a non-integer value for the |
Then i guess it should be conditioned then , thank you ! |
If `tot_magnetization` is specified, the results contain a fermi energy for each spin channel. The general support was added in aiidalab#512 and this commit introduces the required changes to the widget.
This PR solves #412