Skip to content
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

Element-projected phonon DOS and bandstructure #222

Open
janosh opened this issue Oct 6, 2024 · 0 comments
Open

Element-projected phonon DOS and bandstructure #222

janosh opened this issue Oct 6, 2024 · 0 comments
Labels
enhancement Improvement to existing features/functionality phonons Phonon bands and DOS plots plotly Concerning plotly-powered functions

Comments

@janosh
Copy link
Owner

janosh commented Oct 6, 2024

the phonon_dos and phonon_bands functions should be upgraded to handle element-projected DOS and band structures

def phonon_dos(
doses: PhononDos | dict[str, PhononDos],
*,
stack: bool = False,
sigma: float = 0,
units: Literal["THz", "eV", "meV", "Ha", "cm-1"] = "THz",
normalize: Literal["max", "sum", "integral"] | None = None,
last_peak_anno: str | None = None,
**kwargs: Any,
) -> go.Figure:
"""Plot phonon DOS using Plotly.
Args:
doses (PhononDos | dict[str, PhononDos]): PhononDos or dict of multiple.
stack (bool): Whether to plot the DOS as a stacked area graph. Defaults to
False.
sigma (float): Standard deviation for Gaussian smearing. Defaults to None.
units (str): Units for the frequencies. Defaults to "THz".

def phonon_bands(
band_structs: PhononBands | dict[str, PhononBands],
line_kwargs: dict[str, Any] | None = None,
branches: Sequence[str] = (),
branch_mode: BranchMode = "union",
shaded_ys: dict[tuple[YMin | YMax, YMin | YMax], dict[str, Any]]
| bool
| None = None,
**kwargs: Any,
) -> go.Figure:
"""Plot single or multiple pymatgen band structures using Plotly, focusing on the
minimum set of overlapping branches.
Warning: Only tested with phonon band structures so far but plan is to extend to
electronic band structures.
Args:

example of what this could look like from abipy:

sphx_glr_plot_phonon_pjdos_001

@janosh janosh added enhancement Improvement to existing features/functionality plotly Concerning plotly-powered functions phonons Phonon bands and DOS plots labels Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing features/functionality phonons Phonon bands and DOS plots plotly Concerning plotly-powered functions
Projects
None yet
Development

No branches or pull requests

1 participant