Skip to content

Commit

Permalink
Improve docstring of KappaDOSTHM
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Nov 22, 2024
1 parent 9a29c6b commit a6ca55e
Showing 1 changed file with 24 additions and 3 deletions.
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

0 comments on commit a6ca55e

Please sign in to comment.