-
Notifications
You must be signed in to change notification settings - Fork 877
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
Improve types for electronic_structure.{bandstructure/cohp}
#3873
Improve types for electronic_structure.{bandstructure/cohp}
#3873
Conversation
…matgen into type-elec-struct
@@ -1057,7 +1079,26 @@ def get_projections_on_elements_and_orbitals(self, el_orb_spec): | |||
return result | |||
|
|||
|
|||
def get_reconstructed_band_structure(list_bs, efermi=None): | |||
@overload | |||
def get_reconstructed_band_structure( # type: ignore[overload-overlap] |
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.
Need a closer look at this type error, perhaps it's because mypy
might be false-positive in determining overlapping types python/mypy#4020.
electronic_structure
electronic_structure.{bandstructure/cohp}
electronic_structure.{bandstructure/cohp}
electronic_structure.{bandstructure/cohp}
atom1 (str): The first atom that contributes to the bond. | ||
atom2 (str): The second atom that contributes to the bond. | ||
length (float): Bond length. | ||
translation: translation list, e.g. [0, 0, 0]. |
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.
It's a bit unclear to me what is translation
? Is it a 3D vector?
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.
Same wording is used as in Lobster. It describes the unit cell in which the atom is in. [0 0 0] is the normal cell, but the atom might be translated to the neighboring cell
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 for clarifying! I just searched the wrong documentation ;) I searched Lobster_FAQ_5.0.0
instead of Lobster_Users_Guide_5.0.0
.
If atoms are not located in the original unit cell, the corresponding translation vector can be added by the keyword "cell" like this:
cobiBetween atom 1 atom 2 atom 3 cell 1 0 0
Update: clarified in 0e75e0d
cb427d7
to
94ea368
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 @DanielYang59 for your continued clean up efforts! 👍
All good, thanks for reviewing. I would clean up the merge conflicts in #3880 to get it ready for review. Thanks for your time :) |
Summary
electronic_structure
bandstructure
cohp
append
in 8e25238 for performanceCaution
Change the cell translation vector
translation
fromlist[float]
totuple[float, float, float] (Vector3D)
in 9551db2 and 5fcf236New custom type
SpinLike
:pymatgen/pymatgen/electronic_structure/cohp.py
Lines 120 to 121 in c83d5d5
Script for testing
lobsterpy
Bash script