Skip to content

Commit

Permalink
Merge pull request #298 from phonopy/kappadosthm-docstring
Browse files Browse the repository at this point in the history
Improve docstring of KappaDOSTHM
  • Loading branch information
atztogo authored Nov 22, 2024
2 parents 9a29c6b + a6ca55e commit 6dff7e9
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 6dff7e9

Please sign in to comment.