Skip to content

Commit

Permalink
Fix phonon (materialsproject#404)
Browse files Browse the repository at this point in the history
* Small fix for phonon component

* Use disabled attribute directly in Button

* Update pull-request.yml

---------

Co-authored-by: Patrick Huck <[email protected]>
  • Loading branch information
yang-ruoxi and tschaume authored Sep 4, 2024
1 parent 4726297 commit 1d58114
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 12 additions & 3 deletions crystal_toolkit/components/phonon.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,18 @@ def _get_data_list_dict(
"Number of bands": f"{bs.nb_bands:,}",
"Number of q-points": f"{bs.nb_qpoints:,}",
# for NAC see https://phonopy.github.io/phonopy/formulation.html#non-analytical-term-correction
"Has NAC (see phonopy docs)": bs.has_nac,
"Has imaginary frequencies": bs.has_imaginary_freq(),
"Has eigen-displacements": bs.has_eigendisplacements,
Label(
[
"Has ",
html.A(
"NAC",
href="https://phonopy.github.io/phonopy/formulation.html#non-analytical-term-correction",
target="blank",
),
]
): "Yes" if bs.has_nac else "No",
"Has imaginary frequencies": "Yes" if bs.has_imaginary_freq() else "No",
"Has eigen-displacements": "Yes" if bs.has_eigendisplacements else "No",
"Min frequency": min_freq_report,
"max frequency": f"{max(dos.frequencies):.2f} THz",
}
Expand Down
2 changes: 0 additions & 2 deletions crystal_toolkit/helpers/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ def __init__(
rounded: bool = False,
loading: bool = False,
static: bool = False,
disabled: bool = False,
**kwargs,
) -> None:
"""The button is an essential element of any design. It's meant to look and behave as an interactive element of your page.
Expand All @@ -261,7 +260,6 @@ def __init__(
_update_css_class(kwargs, "is-rounded", rounded)
_update_css_class(kwargs, "is-loading", loading)
_update_css_class(kwargs, "is-static", static)
_update_css_class(kwargs, "is-disabled", disabled)
super().__init__(*args, **kwargs)


Expand Down

0 comments on commit 1d58114

Please sign in to comment.