-
Notifications
You must be signed in to change notification settings - Fork 82
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
seekpath_structure_analysis
: HubbardStructureData
compatibility
#1007
Conversation
hubbard_type=parameter.hubbard_type, | ||
use_kinds=True, | ||
) | ||
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.
Here we should add the NotImplementedError
with a clear message to the user or implement a generalized function(s) for V
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 know. ^^ Just for future reference: I typically leave a PR in "Draft" status until it's ready for proper review, and request a review at that point. 🙃
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.
ah yeah i know , i was putting a comment here just as a reminder , sorry :)
635ff40
to
0ecfdad
Compare
Alright, started working on this, but will wait until after #998 is merged so I can also refactor the structure fixtures a bit. One thing to note is that the |
0ecfdad
to
f7bf374
Compare
@bastonero in this comment you mention moving the logic for finding the primitive
So I'm inclined to keep the logic where it is for now? Especially since it'll be rather incomplete. Once we have implemented the holy grail |
I don't think it has any QE related logic, as it should be just a mapping.
Fine to me to keep it there for the moment being,
I think it's possible to have a generic |
f7bf374
to
d645069
Compare
Co-authored-by: AndresOrtegaGuerrero <[email protected]>
@bastonero @AndresOrtegaGuerrero I unfortunately don't have time to refactor the fixtures for generating structures, so the current test generates its own specific Hubbard structure. I still don't really understand why the |
What do you mean by this ? (You mean why seekpath returns a different structure as |
That, and why the returned primitive and conventional structures are the same. |
Maybe we should open an issue an pin Giovanni for this ? |
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.
LGTM
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 @mbercx. Maybe not in this PR, but we should block at the very beginning the usage of HubbardStructureData with intersites in the Bands workchain.
Just left a minor change request, then looks good.
"""Update the structure based on Hubbard parameters if the input structure is a HubbardStructureData.""" | ||
hubbard_structure = HubbardStructureData.from_structure(structure) | ||
|
||
if any(parameter.hubbard_type == 'V' for parameter in orig_structure.hubbard.parameters): |
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.
One can still have intersite parameters, but indicate U
for instance. Why not using the utils.hubbard.is_intersite_hubbard
method?
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 point, thanks @bastonero. The is_intersite_hubbard
function is perfect indeed.
@bastonero also added a test to check that structures with intersite parameters indeed raise a |
93c5385
to
9b15578
Compare
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 @mbercx, great job. Sorry to be a bit paranoid, but it would be good to have a test where the primitive structure is smaller then the original one. For instance, cubic Si? The input structure being 8-atoms, it should return the primitive structure with 2 atoms. Or you can also simply make a supercell using from ase.build import make_supercell
if I remember correctly.
Thanks @bastonero. You mean an example where this fails (EDIT: i.e. with intersite interactions)? The current |
Ann sorry @mbercx , didn't notice it was 4 sites. Good to go then! |
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.
@mbercx thanks a lot, good for me!
Fixes #999
This PR was split off from #998. Look there for the initial discussion on the choices made in this PR.