-
Notifications
You must be signed in to change notification settings - Fork 867
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
Clean up io.vasp.outputs.Outcar
docstring
#4160
base: master
Are you sure you want to change the base?
Clean up io.vasp.outputs.Outcar
docstring
#4160
Conversation
io.vasp.Outcar
docstringio.vasp.outputs.Outcar
docstring
@@ -2323,7 +2326,7 @@ def read_table_pattern( | |||
attribute_name: str | None = None, | |||
last_one_only: bool = True, | |||
first_one_only: bool = False, | |||
) -> list: | |||
) -> list: # TODO: clarify table-like data type |
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.
Tag: important: clarify type of table-like data
dfb33f7
to
404ed50
Compare
404ed50
to
6b80819
Compare
e5783c7
to
f3dc1e1
Compare
|
||
|
||
umask = os.umask(0) | ||
os.umask(umask) |
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 believe this is doing nothing (set umask
to 0, but reset it back the original umask
immediately)
@@ -2605,7 +2703,7 @@ def read_nmr_efg_tensor(self) -> list[NDArray]: | |||
"""Parses the NMR Electric Field Gradient Raw Tensors. | |||
|
|||
Returns: | |||
A list of Electric Field Gradient Tensors in the order of Atoms from OUTCAR. | |||
list[NDArray]: Electric Field Gradient Tensors in the order of atoms. |
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.
double check type
@@ -2046,7 +2071,8 @@ def __init__(self, filename: PathLike) -> None: | |||
e_wo_entrp = float(match[1]) | |||
if e0 is None and (match := e0_pattern.search(clean)): | |||
e0 = float(match[1]) | |||
if all([nelect, total_mag is not None, efermi is not None, run_stats]): | |||
|
|||
if nelect is not None and total_mag is not None and efermi is not None and run_stats: |
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.
Tag: use truthy to check run_stats
(dict[str, float | None]
) might yield unexpected results as None as dict value ({"a": None}
) is also truthy
Clean up
io.vasp.outputs.Outcar
docstring/commentRenders accessible from self.data
(the internalself.data
dictionary) vsRenders accessible from attributes
(instance attributes)Clean up
util.io_util.micro_pyawk
Warning
The
debug/postdebug
is likely debug args, no usage across the entire code bass, schedule them for removal after one-year grace period in case someone really need them.