Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmshn committed Dec 14, 2023
1 parent 7c4a5c7 commit 408fc01
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 18 additions & 1 deletion pymatgen/analysis/defects/plotting/optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,24 @@ def _plot_matrix_elements(


def _get_dataframe(d_eigs: dict, me_plot_data: list[tuple]) -> pd.DataFrame:
"""Convert the eigenvalue and matrix element data into a pandas dataframe."""
"""Convert the eigenvalue and matrix element data into a pandas dataframe.
Args:
d_eigs:
The dictionary of eigenvalues for the defect state. In the format of
(iband, ikpt, ispin) -> eigenvalue
me_plot_data:
A list of tuples in the format of (iband, ikpt, ispin, eigenvalue, matrix element)
Returns:
A pandas dataframe with the following columns:
ib: The band index of the state the arrow is pointing to.
jb: The band index of the defect state.
kpt: The kpoint index of the state the arrow is pointing to.
spin: The spin index of the state the arrow is pointing to.
eig: The eigenvalue of the state the arrow is pointing to.
M.E.: The matrix element of the transition.
"""
_, ikpt, ispin = next(iter(d_eigs.keys()))
df = pd.DataFrame(
me_plot_data,
Expand Down
1 change: 0 additions & 1 deletion pymatgen/analysis/defects/plotting/phases.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ def _convex_hull_2d(
points: list[dict],
x_element: Element,
y_element: Element,
tol: float = 0.001,
competing_phases: list = None,
) -> list[dict]:
"""Compute the convex hull of a set of points in 2D.
Expand Down

0 comments on commit 408fc01

Please sign in to comment.