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

Improve docstring of KappaDOSTHM #298

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions phono3py/other/kaccum.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,35 @@
class KappaDOSTHM:
"""Class to calculate DOS like spectram with tetrahedron method.

To compute usual DOS,
To compute usual DOS on all GR grid points:

```
freqs, _, _ = ph3.get_phonon_data()
freqs_grg = freqs[bzgrid.grg2bzg]
kappados = KappaDOSTHM(
np.ones(freqs.shape, dtype=float)[None, :, :, None],
freqs,
np.ones(freqs_grg.shape, dtype=float)[None, :, :, None],
freqs_grg,
bzgrid,
num_sampling_points=201
)
```

To compute DOS on ir-grid points:

```
freqs, _, _ = ph3.get_phonon_data()
ir_grid_points, ir_grid_weights, ir_grid_map = get_ir_grid_points(bzgrid)
freqs_ir = freqs[bzgrid.grg2bzg[ir_grid_points]]
kappados = KappaDOSTHM(
np.ones(freqs_ir.shape, dtype=float)[None, :, :, None],
freqs_ir,
bzgrid,
ir_grid_points=ir_grid_points,
ir_grid_weights=ir_grid_weights,
ir_grid_map=ir_grid_map,
num_sampling_points=201,
)
```

"""

Expand Down
Loading