fix typos and add codespell pre-commit hooks to catch future typos

This commit is contained in:
Janosh Riebesell 2025-02-04 13:41:45 -05:00
parent 00fb3b41f0
commit ece67a3201
52 changed files with 165 additions and 149 deletions

View File

@ -11,7 +11,7 @@ repos:
exclude: ^example/AlN-LDA/ exclude: ^example/AlN-LDA/
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.3 rev: v0.9.4
hooks: hooks:
- id: ruff - id: ruff
args: [--fix, --show-fixes] args: [--fix, --show-fixes]
@ -43,3 +43,13 @@ repos:
hooks: hooks:
- id: cmake-format - id: cmake-format
- id: cmake-lint - id: cmake-lint
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
stages: [pre-commit, commit-msg]
args:
- --ignore-words-list
- "te,groth,skelton,inout,mater"
- --check-filenames

View File

@ -162,7 +162,7 @@ void grg_get_double_grid_address(int64_t address_double[3],
/* -------------------------------------------------------*/ /* -------------------------------------------------------*/
/* Get address in single grid from address in double grid */ /* Get address in single grid from address in double grid */
/* -------------------------------------------------------*/ /* -------------------------------------------------------*/
/* This function shifts double-grid adress by PS and divides it by 2. */ /* This function shifts double-grid address by PS and divides it by 2. */
/* No modulo operation is applied to returned single-grid address. */ /* No modulo operation is applied to returned single-grid address. */
/* address : Single grid address. */ /* address : Single grid address. */
/* address_double : Double grid address. */ /* address_double : Double grid address. */

View File

@ -266,7 +266,7 @@ int64_t gridsys_get_thm_relative_grid_address(
return thm_get_relative_grid_address(relative_grid_addresses, rec_lattice); return thm_get_relative_grid_address(relative_grid_addresses, rec_lattice);
} }
/* relative_grid_addresses are given as P multipled with those from */ /* relative_grid_addresses are given as P multiplied with those from */
/* dataset, i.e., */ /* dataset, i.e., */
/* np.dot(relative_grid_addresses, P.T) */ /* np.dot(relative_grid_addresses, P.T) */
int64_t gridsys_get_integration_weight( int64_t gridsys_get_integration_weight(

View File

@ -140,7 +140,7 @@ int64_t gridsys_get_reciprocal_point_group(int64_t rec_rotations[48][3][3],
/** /**
* @brief Return D, P, Q of Smith normal form of A. * @brief Return D, P, Q of Smith normal form of A.
* *
* @param D_diag Diagonal elements of diagnoal matrix D * @param D_diag Diagonal elements of diagonal matrix D
* @param P Unimodular matrix P * @param P Unimodular matrix P
* @param Q Unimodular matrix Q * @param Q Unimodular matrix Q
* @param A Integer matrix * @param A Integer matrix
@ -157,7 +157,7 @@ int64_t gridsys_get_snf3x3(int64_t D_diag[3], int64_t P[3][3], int64_t Q[3][3],
* {tilde-R^T} * {tilde-R^T}
* @param rotations Original rotations matrices in reciprocal space {R^T} * @param rotations Original rotations matrices in reciprocal space {R^T}
* @param num_rot Number of rotation matrices * @param num_rot Number of rotation matrices
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param Q Unimodular matrix Q of Smith normal form * @param Q Unimodular matrix Q of Smith normal form
* @return int64_t * @return int64_t
*/ */
@ -174,7 +174,7 @@ int64_t gridsys_transform_rotations(int64_t (*transformed_rots)[3][3],
* array size of prod(D_diag) * array size of prod(D_diag)
* @param rotations Transformed rotation matrices in reciprocal space * @param rotations Transformed rotation matrices in reciprocal space
* @param num_rot Number of rotation matrices * @param num_rot Number of rotation matrices
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param PS Shift in GR-grid * @param PS Shift in GR-grid
*/ */
void gridsys_get_ir_grid_map(int64_t *ir_grid_map, void gridsys_get_ir_grid_map(int64_t *ir_grid_map,
@ -193,7 +193,7 @@ void gridsys_get_ir_grid_map(int64_t *ir_grid_map,
* @param bzg2grg Mapping table of bz_grid_addresses to gr_grid_addresses. In * @param bzg2grg Mapping table of bz_grid_addresses to gr_grid_addresses. In
* type-II, len(bzg2grg) == len(bz_grid_addresses) <= (D_diag[0] + 1) * * type-II, len(bzg2grg) == len(bz_grid_addresses) <= (D_diag[0] + 1) *
* (D_diag[1] + 1) * (D_diag[2] + 1). * (D_diag[1] + 1) * (D_diag[2] + 1).
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param Q Unimodular matrix Q of Smith normal form * @param Q Unimodular matrix Q of Smith normal form
* @param PS Shift in GR-grid * @param PS Shift in GR-grid
* @param rec_lattice Reduced reciprocal basis vectors in column vectors * @param rec_lattice Reduced reciprocal basis vectors in column vectors
@ -211,7 +211,7 @@ int64_t gridsys_get_bz_grid_addresses(
* *
* @param bz_grid_index BZ grid point index * @param bz_grid_index BZ grid point index
* @param rotation Transformed rotation in reciprocal space tilde-R^T * @param rotation Transformed rotation in reciprocal space tilde-R^T
* @param bz_grid_addresses BZ grid point adddresses * @param bz_grid_addresses BZ grid point addresses
* @param bz_map List of accumulated numbers of BZ grid points from the * @param bz_map List of accumulated numbers of BZ grid points from the
* first GR grid point to the last grid point. In type-II, [0, 1, 3, 4, ...] * first GR grid point to the last grid point. In type-II, [0, 1, 3, 4, ...]
* means multiplicities of [1, 2, 1, ...], with len(bz_map)=product(D_diag) + 1. * means multiplicities of [1, 2, 1, ...], with len(bz_map)=product(D_diag) + 1.
@ -234,7 +234,7 @@ int64_t gridsys_rotate_bz_grid_index(
* @param map_q Mapping table from all grid points to grid point indices of * @param map_q Mapping table from all grid points to grid point indices of
* irreducible q-points under the stabilizer subgroup of q * irreducible q-points under the stabilizer subgroup of q
* @param grid_index Grid point index of q in GR-grid * @param grid_index Grid point index of q in GR-grid
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param is_time_reversal With (1) or without (0) time reversal symmetry * @param is_time_reversal With (1) or without (0) time reversal symmetry
* @param num_rot Number of rotation matrices * @param num_rot Number of rotation matrices
* @param rec_rotations Transformed rotation matrices in reciprocal space * @param rec_rotations Transformed rotation matrices in reciprocal space
@ -262,7 +262,7 @@ int64_t gridsys_get_triplets_at_q(int64_t *map_triplets, int64_t *map_q,
* @param map_triplets Mapping table from all grid points to grid points of * @param map_triplets Mapping table from all grid points to grid points of
* independent q' * independent q'
* @param num_map_triplets First dimension of map_triplets * @param num_map_triplets First dimension of map_triplets
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param Q Unimodular matrix Q of Smith normal form * @param Q Unimodular matrix Q of Smith normal form
* @param bz_grid_type Data structure type I (old and sparse) or II (new and * @param bz_grid_type Data structure type I (old and sparse) or II (new and
* dense, recommended) of bz_map * dense, recommended) of bz_map

View File

@ -115,7 +115,7 @@ void ise_get_imag_self_energy_with_g(
/** /**
* g_pos contains the indices of g that are known non-zeros in series. * g_pos contains the indices of g that are known non-zeros in series.
* *
* ise_set_g_pos works for frquency points as bands. * ise_set_g_pos works for frequency points as bands.
* set_g_pos_frequency_point works for frequency sampling mode. * set_g_pos_frequency_point works for frequency sampling mode.
*/ */
g_pos = (int64_t(*)[4])malloc(sizeof(int64_t[4]) * num_band_prod); g_pos = (int64_t(*)[4])malloc(sizeof(int64_t[4]) * num_band_prod);

View File

@ -435,7 +435,7 @@ int64_t ph3py_get_BZ_triplets_at_q(
return num_ir; return num_ir;
} }
/* relative_grid_addresses are given as P multipled with those from dataset, /* relative_grid_addresses are given as P multiplied with those from dataset,
* i.e., * i.e.,
* np.dot(relative_grid_addresses, P.T) */ * np.dot(relative_grid_addresses, P.T) */
int64_t ph3py_get_integration_weight( int64_t ph3py_get_integration_weight(
@ -601,7 +601,7 @@ void ph3py_get_relative_grid_address(int64_t relative_grid_address[24][4][3],
/* tpi_get_neighboring_grid_points around multiple grid points for using /* tpi_get_neighboring_grid_points around multiple grid points for using
* openmp * openmp
* *
* relative_grid_addresses are given as P multipled with those from dataset, * relative_grid_addresses are given as P multiplied with those from dataset,
* i.e., * i.e.,
* np.dot(relative_grid_addresses, P.T) */ * np.dot(relative_grid_addresses, P.T) */
int64_t ph3py_get_neighboring_gird_points( int64_t ph3py_get_neighboring_gird_points(
@ -644,7 +644,7 @@ int64_t ph3py_get_neighboring_gird_points(
/* thm_get_integration_weight at multiple grid points for using openmp /* thm_get_integration_weight at multiple grid points for using openmp
* *
* relative_grid_addresses are given as P multipled with those from dataset, * relative_grid_addresses are given as P multiplied with those from dataset,
* i.e., * i.e.,
* np.dot(relative_grid_addresses, P.T) */ * np.dot(relative_grid_addresses, P.T) */
int64_t ph3py_get_thm_integration_weights_at_grid_points( int64_t ph3py_get_thm_integration_weights_at_grid_points(

View File

@ -198,7 +198,7 @@ int64_t recgrid_get_reciprocal_point_group(int64_t rec_rotations[48][3][3],
/** /**
* @brief Return D, P, Q of Smith normal form of A. * @brief Return D, P, Q of Smith normal form of A.
* *
* @param D_diag Diagonal elements of diagnoal matrix D * @param D_diag Diagonal elements of diagonal matrix D
* @param P Unimodular matrix P * @param P Unimodular matrix P
* @param Q Unimodular matrix Q * @param Q Unimodular matrix Q
* @param A Integer matrix * @param A Integer matrix
@ -215,7 +215,7 @@ int64_t recgrid_get_snf3x3(int64_t D_diag[3], int64_t P[3][3], int64_t Q[3][3],
* {tilde-R^T} * {tilde-R^T}
* @param rotations Original rotations matrices in reciprocal space {R^T} * @param rotations Original rotations matrices in reciprocal space {R^T}
* @param num_rot Number of rotation matrices * @param num_rot Number of rotation matrices
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param Q Unimodular matrix Q of Smith normal form * @param Q Unimodular matrix Q of Smith normal form
* @return int64_t * @return int64_t
*/ */
@ -232,7 +232,7 @@ int64_t recgrid_transform_rotations(int64_t (*transformed_rots)[3][3],
* array size of prod(D_diag) * array size of prod(D_diag)
* @param rotations Transformed rotation matrices in reciprocal space * @param rotations Transformed rotation matrices in reciprocal space
* @param num_rot Number of rotation matrices * @param num_rot Number of rotation matrices
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param PS Shift in GR-grid * @param PS Shift in GR-grid
* @return int64_t Number of ir_grid_points. * @return int64_t Number of ir_grid_points.
*/ */
@ -252,7 +252,7 @@ int64_t recgrid_get_ir_grid_map(int64_t *ir_grid_map,
* @param bzg2grg Mapping table of bz_grid_addresses to gr_grid_addresses. In * @param bzg2grg Mapping table of bz_grid_addresses to gr_grid_addresses. In
* type-II, len(bzg2grg) == len(bz_grid_addresses) <= (D_diag[0] + 1) * * type-II, len(bzg2grg) == len(bz_grid_addresses) <= (D_diag[0] + 1) *
* (D_diag[1] + 1) * (D_diag[2] + 1). * (D_diag[1] + 1) * (D_diag[2] + 1).
* @param D_diag Diagonal elements of diagnoal matrix D of Smith normal form * @param D_diag Diagonal elements of diagonal matrix D of Smith normal form
* @param Q Unimodular matrix Q of Smith normal form * @param Q Unimodular matrix Q of Smith normal form
* @param PS Shift in GR-grid * @param PS Shift in GR-grid
* @param rec_lattice Reduced reciprocal basis vectors in column vectors * @param rec_lattice Reduced reciprocal basis vectors in column vectors
@ -270,7 +270,7 @@ int64_t recgrid_get_bz_grid_addresses(
* *
* @param bz_grid_index BZ grid point index * @param bz_grid_index BZ grid point index
* @param rotation Transformed rotation in reciprocal space tilde-R^T * @param rotation Transformed rotation in reciprocal space tilde-R^T
* @param bz_grid_addresses BZ grid point adddresses * @param bz_grid_addresses BZ grid point addresses
* @param bz_map List of accumulated numbers of BZ grid points from the * @param bz_map List of accumulated numbers of BZ grid points from the
* first GR grid point to the last grid point. In type-II, [0, 1, 3, 4, ...] * first GR grid point to the last grid point. In type-II, [0, 1, 3, 4, ...]
* means multiplicities of [1, 2, 1, ...], with len(bz_map)=product(D_diag) + 1. * means multiplicities of [1, 2, 1, ...], with len(bz_map)=product(D_diag) + 1.

View File

@ -84,7 +84,7 @@ void reciprocal_to_normal_squared(
double *inv_sqrt_masses; double *inv_sqrt_masses;
lapack_complex_double *e0, *e1, *e2; lapack_complex_double *e0, *e1, *e2;
/* Inverse sqrt mass is multipled with eigenvectors to reduce number /* Inverse sqrt mass is multiplied with eigenvectors to reduce number
* of */ * of */
/* operations in get_fc3_sum. Three eigenvector matrices are looped /* operations in get_fc3_sum. Three eigenvector matrices are looped
* by */ * by */

View File

@ -1,7 +1,7 @@
/* Copyright (C) 2015 Atsushi Togo */ /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */ /* All rights reserved. */
/* These codes were originally parts of spglib, but only develped */ /* These codes were originally parts of spglib, but only developed */
/* and used for phono3py. Therefore these were moved from spglib to */ /* and used for phono3py. Therefore these were moved from spglib to */
/* phono3py. This file is part of phonopy. */ /* phono3py. This file is part of phonopy. */

View File

@ -1,7 +1,7 @@
/* Copyright (C) 2015 Atsushi Togo */ /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */ /* All rights reserved. */
/* Some of these codes were originally parts of spglib, but only develped */ /* Some of these codes were originally parts of spglib, but only developed */
/* and used for phono3py. Therefore these were moved from spglib to */ /* and used for phono3py. Therefore these were moved from spglib to */
/* phono3py. This file is part of phonopy. */ /* phono3py. This file is part of phonopy. */

View File

@ -1,7 +1,7 @@
/* Copyright (C) 2015 Atsushi Togo */ /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */ /* All rights reserved. */
/* These codes were originally parts of spglib, but only develped */ /* These codes were originally parts of spglib, but only developed */
/* and used for phono3py. Therefore these were moved from spglib to */ /* and used for phono3py. Therefore these were moved from spglib to */
/* phono3py. This file is part of phonopy. */ /* phono3py. This file is part of phonopy. */

View File

@ -1,7 +1,7 @@
/* Copyright (C) 2015 Atsushi Togo */ /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */ /* All rights reserved. */
/* These codes were originally parts of spglib, but only develped */ /* These codes were originally parts of spglib, but only developed */
/* and used for phono3py. Therefore these were moved from spglib to */ /* and used for phono3py. Therefore these were moved from spglib to */
/* phono3py. This file is part of phonopy. */ /* phono3py. This file is part of phonopy. */

View File

@ -195,7 +195,7 @@ void tpi_get_integration_weight_with_sigma(
} }
/** /**
* @brief Return grid points of relative grid adddresses in BZ-grid * @brief Return grid points of relative grid addresses in BZ-grid
* *
* @param neighboring_grid_points Grid points of relative grid addresses in * @param neighboring_grid_points Grid points of relative grid addresses in
* BZ-grid. * BZ-grid.

View File

@ -4,30 +4,33 @@ This directory contains python-sphinx documentation source.
## How to compile ## How to compile
``` ```sh
make html make html
``` ```
## Source files ## Source files
* `conf.py` contains the sphinx setting confiuration. * `conf.py` contains the sphinx setting configuration.
* `*.rst` are the usual sphinx documentation source and the filenames without `.rst` are the keys to link from toctree mainly in `index.rst`. * `*.rst` are the usual sphinx documentation source and the filenames without `.rst` are the keys to link from toctree mainly in `index.rst`.
## How to publish ## How to publish
Web page files are copied to `gh-pages` branch. At the phono3py github top directory, Web page files are copied to `gh-pages` branch. At the phono3py github top directory,
```
```sh
git checkout gh-pages git checkout gh-pages
rm -r .buildinfo .doctrees * rm -r .buildinfo .doctrees *
``` ```
From the directory the sphinx doc is complied, From the directory the sphinx doc is complied,
```
```sh
rsync -avh _build/ <phono3py-repository-directory>/ rsync -avh _build/ <phono3py-repository-directory>/
``` ```
Again, at the phono3py github top directory, Again, at the phono3py github top directory,
```
```sh
git add . git add .
git commit -a -m "Update documentation ..." git commit -a -m "Update documentation ..."
git push git push

View File

@ -102,7 +102,7 @@ Number of points to be sampled in the x-axis.
### Options for tensor properties ### Options for tensor properties
For cummulative thermal conductivity, the last value is given as the thermal For cumulative thermal conductivity, the last value is given as the thermal
conductivity in W/mK. For the other properties, the last value is effectively conductivity in W/mK. For the other properties, the last value is effectively
the sum of values on all mesh grids divided by number of mesh grids. This is the sum of values on all mesh grids divided by number of mesh grids. This is
understood as normalized for one primitive cell. Before version 1.11.13.1, the understood as normalized for one primitive cell. Before version 1.11.13.1, the

View File

@ -147,7 +147,7 @@ This is a major version release. There are backward-incompatible changes.
- Calculation method to transform supercell third-order force constants fc3 in - Calculation method to transform supercell third-order force constants fc3 in
real to reciprocal space was changed as described at {ref}`changelog_v290`. real to reciprocal space was changed as described at {ref}`changelog_v290`.
This results in the change of results with respect to those obtained by This results in the change of results with respect to those obtained by
phono3py version 2. To emulate v2 behaviour, use `--v2` option in phono3py phono3py version 2. To emulate v2 behavior, use `--v2` option in phono3py
command line script. For `Phono3py` class , `make_r0_average=True` (default) command line script. For `Phono3py` class , `make_r0_average=True` (default)
when instantiating it, and similarly for `phono3py.load` function. when instantiating it, and similarly for `phono3py.load` function.
- Completely dropped support of `disp_fc3.yaml` and `disp_fc2.yaml`. - Completely dropped support of `disp_fc3.yaml` and `disp_fc2.yaml`.
@ -175,7 +175,7 @@ This is a major version release. There are backward-incompatible changes.
## Dec-25-2023: Version 2.9.0 ## Dec-25-2023: Version 2.9.0
- Pre-release of version 3.0. - Pre-release of version 3.0.
- `--v3` option enables phono3py version 3 behaviour. In phono3py-v3, it is - `--v3` option enables phono3py version 3 behavior. In phono3py-v3, it is
planned to replace $\sum_{l'l''}\Phi_{\alpha\beta\gamma}(0\kappa, l'\kappa', planned to replace $\sum_{l'l''}\Phi_{\alpha\beta\gamma}(0\kappa, l'\kappa',
l''\kappa'') \cdots$ in Eq.(41) of l''\kappa'') \cdots$ in Eq.(41) of
<https://journals.jps.jp/doi/10.7566/JPSJ.92.012001> by <https://journals.jps.jp/doi/10.7566/JPSJ.92.012001> by
@ -235,7 +235,7 @@ This is a major version release. There are backward-incompatible changes.
- Installation using `setup.py` now requires creating `site.cfg` file. See - Installation using `setup.py` now requires creating `site.cfg` file. See
<https://phonopy.github.io/phono3py/install.html> and <https://phonopy.github.io/phono3py/install.html> and
[PR #59](https://github.com/phonopy/phono3py/pull/59). [PR #59](https://github.com/phonopy/phono3py/pull/59).
- Dorp python 3.6 support, and dependencies of numpy and matplotlib versions are - Drop python 3.6 support, and dependencies of numpy and matplotlib versions are
updated: updated:
- Python >= 3.7 - Python >= 3.7
@ -265,9 +265,9 @@ This is a major version release. There are some backward-incompatible changes.
from `dtype='intc'`. from `dtype='intc'`.
3. Python 3.5 or later is required. 3. Python 3.5 or later is required.
To emulate the version 1.x behaviour in `phono3py` command, try `--v1` option. To emulate the version 1.x behavior in `phono3py` command, try `--v1` option.
To emurate the version 1.x behaviour in API, specify `store_dense_gp_map=False` To emurate the version 1.x behavior in API, specify `store_dense_gp_map=False`
and `store_dense_svecs=False` in instatiation of `Phono3py` class or phon3py and `store_dense_svecs=False` in instantiation of `Phono3py` class or phono3py
loader. loader.
## Mar-17-2021: Version 1.22.3 ## Mar-17-2021: Version 1.22.3
@ -281,7 +281,7 @@ loader.
## Feb-21-2021: Version 1.22.1 ## Feb-21-2021: Version 1.22.1
- `phono3py` command didn't work. This was fixed. - `phono3py` command didn't work. This was fixed.
- Fix behaviour when specifying `--thm` and `--sigma` simultaneously. - Fix behavior when specifying `--thm` and `--sigma` simultaneously.
## Jan-29-2021: Version 1.22.0 ## Jan-29-2021: Version 1.22.0
@ -366,7 +366,7 @@ loader.
- Update to work with phonopy v1.14.2. - Update to work with phonopy v1.14.2.
- Ph-ph interaction can be read (`--read-pp`) and write (`--write-pp`) in RTA - Ph-ph interaction can be read (`--read-pp`) and write (`--write-pp`) in RTA
thermal conductivity calculation, too. Mind that the data stored are different thermal conductivity calculation, too. Mind that the data stored are different
with and without `--full-pp`. Wihtout `--full-pp` the data are stored in with and without `--full-pp`. Without `--full-pp` the data are stored in
complicated way to save data side, so it is not considered readable by usual complicated way to save data side, so it is not considered readable by usual
users. users.
@ -395,7 +395,7 @@ loader.
- `--sym-fc` option is added. This is just an alias to specify both `--sym-fc3r` - `--sym-fc` option is added. This is just an alias to specify both `--sym-fc3r`
and `--sym-fc2` together. and `--sym-fc2` together.
- Documentation on `--write-phonon` and `--read-phonon` options is written. - Documentation on `--write-phonon` and `--read-phonon` options is written.
These options are used to save harmonic phonon infromation on strage. These options are used to save harmonic phonon information on storage.
## Nov-22-2017: version 1.12.5 ## Nov-22-2017: version 1.12.5
@ -410,7 +410,7 @@ loader.
(3) happens when the primitive cell is relatively large. Number of triplets (3) happens when the primitive cell is relatively large. Number of triplets
can be shown using `--stp` option. A race condition of OpenMP multithreading can be shown using `--stp` option. A race condition of OpenMP multithreading
is the source of the bug. Therefore, if it occurs, the same calculation comes is the source of the bug. Therefore, if it occurs, the same calculation comes
up with the different thermal conductivity value in every run time, for whcih up with the different thermal conductivity value in every run time, for which
it behaves like randomly. it behaves like randomly.
- RTA thermal conductivity with smearing method (`--sigma`) is made to run with - RTA thermal conductivity with smearing method (`--sigma`) is made to run with
@ -466,7 +466,7 @@ loader.
## Apr-16-2016: version 1.10.7 ## Apr-16-2016: version 1.10.7
- API example is prepared and it is found in `Si` example. No doucment yet. - API example is prepared and it is found in `Si` example. No documentation yet.
- Si pwscf example was placed in `example-phono3py` directory. - Si pwscf example was placed in `example-phono3py` directory.
- User interface bug fix. - User interface bug fix.
@ -478,10 +478,10 @@ loader.
to phonopy-1.10.4. to phonopy-1.10.4.
- Python3 support - Python3 support
- For the RTA thermal conductivity calculation mode with using the linear - For the RTA thermal conductivity calculation mode with using the linear
tetrahedron method, only necessary part of phonon-phonon interaction strengh tetrahedron method, only necessary part of phonon-phonon interaction strength
among phonons. This improves lifetime calculation performance, but as the among phonons is calculated. This improves lifetime calculation performance,
drawback, averaged ph-ph interaction strength can not be given. See but as the drawback, averaged ph-ph interaction strength can not be given.
{ref}`full_pp_option`. See {ref}`full_pp_option`.
- Pwscf interface ({ref}`calculator_interfaces`) - Pwscf interface ({ref}`calculator_interfaces`)
## Oct-10-2015: version 0.9.14 ## Oct-10-2015: version 0.9.14
@ -578,7 +578,7 @@ loader.
## Changes in version 0.8.0 ## Changes in version 0.8.0
- `--q_direction` didn't work. Fix it. - `--q_direction` didn't work. Fix it.
- Implementation of tetrahedron method whcih is activated by `--thm`. - Implementation of tetrahedron method which is activated by `--thm`.
- Grid addresses are written out by `--wgp` option. - Grid addresses are written out by `--wgp` option.
## Changes in version 0.7.6 ## Changes in version 0.7.6
@ -592,8 +592,9 @@ loader.
that needed for creating fc3 if index permutation symmetry is considered. that needed for creating fc3 if index permutation symmetry is considered.
Therefore using index permutation symmetry, some elements of fc3 can be Therefore using index permutation symmetry, some elements of fc3 can be
recovered even if some of supercell force calculations are missing. In recovered even if some of supercell force calculations are missing. In
paticular, all pair distances among triplet atoms are larger than cutoff pair particular, all pair distances among triplet atoms are larger than cutoff
distance, any fc3 elements are not recovered, i.e., the element will be zero. pair distance, any fc3 elements are not recovered, i.e., the element will be
zero.
## Changes in version 0.7.2 ## Changes in version 0.7.2

View File

@ -377,7 +377,7 @@ To use different force constants calculators for fc2 and fc3
% phono3py-load --fc-calc "symfc|" ... % phono3py-load --fc-calc "symfc|" ...
``` ```
Those for fc2 and fc3 are seprated by `|` such as `symfc|` . Blank means to Those for fc2 and fc3 are separated by `|` such as `symfc|` . Blank means to
employ the finite difference method for systematic displacements generated by employ the finite difference method for systematic displacements generated by
the option `-d`. the option `-d`.
@ -804,7 +804,7 @@ $\Gamma^\text{U}_\lambda(\omega_\lambda)$ processes. The sum of them is usual
$\Gamma_\lambda(\omega_\lambda) = $\Gamma_\lambda(\omega_\lambda) =
\Gamma^\text{N}_\lambda(\omega_\lambda) + \Gamma^\text{N}_\lambda(\omega_\lambda) +
\Gamma^\text{U}_\lambda(\omega_\lambda)$ \Gamma^\text{U}_\lambda(\omega_\lambda)$
and this is used to calcualte thermal conductivity in single-mode RTA. The and this is used to calculate thermal conductivity in single-mode RTA. The
separation, i.e., the choice of G-vector, is made based on the first Brillouin separation, i.e., the choice of G-vector, is made based on the first Brillouin
zone. zone.
@ -1051,7 +1051,7 @@ See also {ref}`reference papers <spectral_function_reference>`.
Spectral function of self energy $A_\lambda(\omega)$ is calculated with respect Spectral function of self energy $A_\lambda(\omega)$ is calculated with respect
to frequency $\omega$, where $\omega$ is sampled following to frequency $\omega$, where $\omega$ is sampled following
{ref}`freq_sampling_option`. First, imaginary part of self-energy is calculated {ref}`freq_sampling_option`. First, imaginary part of self-energy is calculated
and then the real part is calculatd using the KramersKronig relation. The and then the real part is calculated using the KramersKronig relation. The
output of $A_\lambda(\omega)$ is written to `spectral-mxxx-gx(-sx)-tx-bx.dat` in output of $A_\lambda(\omega)$ is written to `spectral-mxxx-gx(-sx)-tx-bx.dat` in
THz (without $2\pi$) with respect to samplied frequency points of $\omega$ in THz (without $2\pi$) with respect to samplied frequency points of $\omega$ in
THz (without $2\pi$), and `spectral-mxxx-gx.hdf5`. THz (without $2\pi$), and `spectral-mxxx-gx.hdf5`.
@ -1210,7 +1210,7 @@ information.
```{table} ```{table}
| dataset | Array shape | | dataset | Array shape |
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| gamma_detail for `--ise` | (temperature, sampling frequency point, symmetry reduced set of triplets at a grid point, band1, band2, band3) in THz (without $2\pi$) | | gamma_detail for `--ise` | (temperature, sampling frequency point, symmetry reduced set of triplets at a grid point, band1, band2, band3) in THz (without $2\pi$) |
| gamma_detail for `--br` | (temperature, symmetry reduced set of triplets at a grid point, band1, band2, band3) in THz (without $2\pi$) | | gamma_detail for `--br` | (temperature, symmetry reduced set of triplets at a grid point, band1, band2, band3) in THz (without $2\pi$) |
| mesh | Numbers of sampling mesh along reciprocal axes. | | mesh | Numbers of sampling mesh along reciprocal axes. |
@ -1259,7 +1259,7 @@ grid_address = ph['grid_address'][:]
q_triplets = grid_address[triplets] / mesh.astype('double') q_triplets = grid_address[triplets] / mesh.astype('double')
# Phonons of triplets[2] # Phonons of triplets[2]
phonon_tp = [(ph['frequency'][i], ph['eigenvector'][i]) for i in triplets[2]] phonon_tp = [(ph['frequency'][i], ph['eigenvector'][i]) for i in triplets[2]]
# Fractions of contributions of tripltes at this grid point and temperture index 30 # Fractions of contributions of triplets at this grid point and temperature index 30
gamma_sum_over_bands = np.dot(weight, gd['gamma_detail'][30].sum(axis=-1).sum(axis=-1).sum(axis=-1)) gamma_sum_over_bands = np.dot(weight, gd['gamma_detail'][30].sum(axis=-1).sum(axis=-1).sum(axis=-1))
contrib_tp = [gd['gamma_detail'][30, i].sum() / gamma_sum_over_bands for i in range(len(weight))] contrib_tp = [gd['gamma_detail'][30, i].sum() / gamma_sum_over_bands for i in range(len(weight))]
np.dot(weight, contrib_tp) # is one np.dot(weight, contrib_tp) # is one

View File

@ -142,7 +142,7 @@ pygments_style = "sphinx"
# # Allow a separate homepage from the master_doc # # Allow a separate homepage from the master_doc
# "homepage": "index", # "homepage": "index",
# # Allow the project link to be overriden to a custom URL. # # Allow the project link to be overridden to a custom URL.
# "projectlink": "http://myproject.url", # "projectlink": "http://myproject.url",
# # Visible levels of the global TOC; -1 means unlimited # # Visible levels of the global TOC; -1 means unlimited

View File

@ -253,10 +253,10 @@ contained.
:width: 50% :width: 50%
:name: coleigplot :name: coleigplot
Eigenvalues are plotted in log scale (Si-PBEsol exmaple with Eigenvalues are plotted in log scale (Si-PBEsol example with
15x15x15 mesh). The number in x-axis is just the index where each 15x15x15 mesh). The number in x-axis is just the index where each
eigenvalue is stored. Normally the eigenvalues are stored ascending eigenvalue is stored. Normally the eigenvalues are stored ascending
order. The bule points show the positive values, and order. The blue points show the positive values, and
the red points show the negative values as positive values the red points show the negative values as positive values
(absolute values) to be able to plot in log scale. In this plot, we (absolute values) to be able to plot in log scale. In this plot, we
can see the gap between $10^{-4}$ and $10^{-16}$, which can see the gap between $10^{-4}$ and $10^{-16}$, which

View File

@ -6,7 +6,7 @@ the supercell approach. For example, the following physical values are obtained:
- {ref}`Lattice thermal conductivity by relaxation time approximation - {ref}`Lattice thermal conductivity by relaxation time approximation
and direct-solution of phonon Boltzmann equation and and direct-solution of phonon Boltzmann equation and
the Wigner transport equation <LTC_options>` the Wigner transport equation <LTC_options>`
- {ref}`Cummulative lattice thermal conductivity and related properties <auxiliary_tools_kaccum>` - {ref}`Cumulative lattice thermal conductivity and related properties <auxiliary_tools_kaccum>`
- {ref}`self_energy_options` (Phonon lifetime/linewidth) - {ref}`self_energy_options` (Phonon lifetime/linewidth)
- {ref}`jdos_option` - {ref}`jdos_option`
- {ref}`spectral_function_option` - {ref}`spectral_function_option`

View File

@ -1,4 +1,5 @@
(tips)= (tips)=
# Tips # Tips
```{contents} ```{contents}
@ -7,6 +8,7 @@
``` ```
(brillouinzone_sum)= (brillouinzone_sum)=
## Brillouin zone summation ## Brillouin zone summation
Brillouin zone (BZ) summations appear at different two points in Brillouin zone (BZ) summations appear at different two points in
@ -97,6 +99,7 @@ the displacement distance by the {ref}`amplitude option <amplitude_option>` redu
higher order anharmonicity is involved (renormalized) into fc3 and fc2. higher order anharmonicity is involved (renormalized) into fc3 and fc2.
(file_format_compatibility)= (file_format_compatibility)=
## File format compatibility with phonopy ## File format compatibility with phonopy
- `FORCES_FC3` and `FORCES_FC2` are not - `FORCES_FC3` and `FORCES_FC2` are not
@ -108,4 +111,4 @@ higher order anharmonicity is involved (renormalized) into fc3 and fc2.
- `fc2.hdf5` can be used in phonopy in the `hdf5` mode when it is - `fc2.hdf5` can be used in phonopy in the `hdf5` mode when it is
renamed to `force_constants.hdf5`. In the previous combinations of renamed to `force_constants.hdf5`. In the previous combinations of
phonopy and phono3py, depending on the physical unit of force phonopy and phono3py, depending on the physical unit of force
constants of calculators, the direct compatibility is not guranteed. constants of calculators, the direct compatibility is not guaranteed.

View File

@ -1,6 +1,6 @@
This is the example of NaCl calculation. Since all atoms are displaced, to This is the example of NaCl calculation. Since all atoms are displaced, to
obtain force constants, an external force constants calculator is necessary, obtain force constants, an external force constants calculator is necessary,
i.e., build-in force constants calculator has no ability to compute force i.e., built-in force constants calculator has no ability to compute force
constants for such dataset. In this example, ALM is used. See constants for such dataset. In this example, ALM is used. See
https://phonopy.github.io/phonopy/setting-tags.html#alm. The easiest way to https://phonopy.github.io/phonopy/setting-tags.html#alm. The easiest way to
install ALM is to use conda. install ALM is to use conda.

View File

@ -267,7 +267,7 @@ class Phono3pyJointDos:
print("Smearing method with sigma=%s is used." % sigma) print("Smearing method with sigma=%s is used." % sigma)
print( print(
f"Calculations at {len(self._frequency_points)} " f"Calculations at {len(self._frequency_points)} "
f"frequency points are devided into {len(batches)} batches." f"frequency points are divided into {len(batches)} batches."
) )
for i_t, temperature in enumerate(temperatures): for i_t, temperature in enumerate(temperatures):
self._jdos.temperature = temperature self._jdos.temperature = temperature

View File

@ -1105,7 +1105,7 @@ class Phono3py:
Ph-ph interaction strength array is replaced by a scalar value. Ph-ph interaction strength array is replaced by a scalar value.
Default is None, which means this feature is not used. Default is None, which means this feature is not used.
frequency_scale_factor : float, optional frequency_scale_factor : float, optional
All phonon frequences are scaled by this value. Default is None, All phonon frequencies are scaled by this value. Default is None,
which means phonon frequencies are not scaled. which means phonon frequencies are not scaled.
symmetrize_fc3q : bool, optional symmetrize_fc3q : bool, optional
fc3 in phonon space is symmetrized by permutation symmetry. fc3 in phonon space is symmetrized by permutation symmetry.
@ -1500,11 +1500,10 @@ class Phono3py:
) )
else: else:
if "displacements" in self._dataset: if "displacements" in self._dataset:
msg = ( raise ForceCalculatorRequiredError(
"fc_calculator has to be set to produce force " "fc_calculator has to be set to produce force constants from this "
"constans from this dataset." "dataset."
) )
raise ForceCalculatorRequiredError(msg)
fc2, fc3 = get_phono3py_fc3( fc2, fc3 = get_phono3py_fc3(
self._supercell, self._supercell,
self._primitive, self._primitive,
@ -1792,7 +1791,7 @@ class Phono3py:
Temperatures where real part of self-energies are calculated. Temperatures where real part of self-energies are calculated.
dtype=float, shape=(temperatures,) dtype=float, shape=(temperatures,)
frequency_points_at_bands : bool, optional frequency_points_at_bands : bool, optional
With False, frequency shifts are calculated at frquency sampling With False, frequency shifts are calculated at frequency sampling
points. When True, they are done at the phonon frequencies. points. When True, they are done at the phonon frequencies.
Default is False. Default is False.
frequency_points : array_like, optional frequency_points : array_like, optional
@ -1997,7 +1996,7 @@ class Phono3py:
calculated. With None, all the grid points that are necessary calculated. With None, all the grid points that are necessary
for thermal conductivity are set internally. for thermal conductivity are set internally.
shape(num_grid_points, ), dtype='int64'. shape(num_grid_points, ), dtype='int64'.
boundary_mfp : float, optiona, default is None boundary_mfp : float, optional, default is None
Mean free path in micrometre to calculate simple boundary Mean free path in micrometre to calculate simple boundary
scattering contribution to thermal conductivity. scattering contribution to thermal conductivity.
None ignores this contribution. None ignores this contribution.
@ -2237,7 +2236,7 @@ class Phono3py:
Parameters for developing MLP. Default is None. When dict is given, Parameters for developing MLP. Default is None. When dict is given,
PypolymlpParams instance is created from the dict. PypolymlpParams instance is created from the dict.
test_size : float, optional test_size : float, optional
Training and test data are splitted by this ratio. test_size=0.1 Training and test data are split by this ratio. test_size=0.1
means the first 90% of the data is used for training and the rest means the first 90% of the data is used for training and the rest
is used for test. Default is 0.1. is used for test. Default is 0.1.
@ -2301,7 +2300,7 @@ class Phono3py:
Parameters for developing MLP. Default is None. When dict is given, Parameters for developing MLP. Default is None. When dict is given,
PypolymlpParams instance is created from the dict. PypolymlpParams instance is created from the dict.
test_size : float, optional test_size : float, optional
Training and test data are splitted by this ratio. test_size=0.1 Training and test data are split by this ratio. test_size=0.1
means the first 90% of the data is used for training and the rest means the first 90% of the data is used for training and the rest
is used for test. Default is 0.1. is used for test. Default is 0.1.

View File

@ -211,7 +211,7 @@ class ConductivityMixIn(HeatCapacityMixIn):
unique_gps = np.unique(gps_rotated) unique_gps = np.unique(gps_rotated)
gvs = {} gvs = {}
for bz_gp in unique_gps.tolist(): # To conver to int type. for bz_gp in unique_gps.tolist(): # To convert to int type.
self._velocity_obj.run([self._get_qpoint_from_gp_index(bz_gp)]) self._velocity_obj.run([self._get_qpoint_from_gp_index(bz_gp)])
gvs[bz_gp] = self._velocity_obj.group_velocities[ gvs[bz_gp] = self._velocity_obj.group_velocities[
0, self._pp.band_indices, : 0, self._pp.band_indices, :
@ -298,13 +298,13 @@ class ConductivityBase(ABC):
Mass variances for isotope scattering calculation. When None, Mass variances for isotope scattering calculation. When None,
the values stored in phono3py are used with `is_isotope=True`. the values stored in phono3py are used with `is_isotope=True`.
shape(atoms_in_primitive, ), dtype='double'. shape(atoms_in_primitive, ), dtype='double'.
boundary_mfp : float, optiona, default is None boundary_mfp : float, optional, default is None
Mean free path in micrometre to calculate simple boundary Mean free path in micrometer to calculate simple boundary
scattering contribution to thermal conductivity. scattering contribution to thermal conductivity.
None ignores this contribution. None ignores this contribution.
is_kappa_star : bool, optional is_kappa_star : bool, optional
When True, reciprocal space symmetry is used to calculate When True, reciprocal space symmetry is used to calculate
lattice thermal conductivity. This calculation is peformed lattice thermal conductivity. This calculation is performed
iterating over specific grid points. With `is_kappa_star=True` iterating over specific grid points. With `is_kappa_star=True`
and `grid_points=None`, ir-grid points are used for the iteration. and `grid_points=None`, ir-grid points are used for the iteration.
Default is True. Default is True.
@ -385,7 +385,7 @@ class ConductivityBase(ABC):
# `self._velocity_obj` is the instance of an inherited class of # `self._velocity_obj` is the instance of an inherited class of
# `GroupVelocity`. `self._init_velocity()` is the method setup the instance, # `GroupVelocity`. `self._init_velocity()` is the method setup the instance,
# which must be implmented in the inherited class of `ConductivityBase`. # which must be implemented in the inherited class of `ConductivityBase`.
self._velocity_obj: GroupVelocity self._velocity_obj: GroupVelocity
self._init_velocity(gv_delta_q) self._init_velocity(gv_delta_q)
@ -626,11 +626,11 @@ class ConductivityBase(ABC):
@property @property
def grid_point_count(self): def grid_point_count(self):
"""Return interator count of self.""" """Return iterator count of self."""
return self._grid_point_count return self._grid_point_count
def get_grid_point_count(self): def get_grid_point_count(self):
"""Return interator count of self.""" """Return iterator count of self."""
warnings.warn( warnings.warn(
"Use attribute, Conductivity.grid_point_count " "Use attribute, Conductivity.grid_point_count "
"instead of Conductivity.get_grid_point_count().", "instead of Conductivity.get_grid_point_count().",
@ -729,7 +729,7 @@ class ConductivityBase(ABC):
def _run_at_grid_point(self): def _run_at_grid_point(self):
"""Run at conductivity calculation at specified grid point. """Run at conductivity calculation at specified grid point.
Should be implementated in Conductivity* class. Should be implemented in Conductivity* class.
""" """
raise NotImplementedError() raise NotImplementedError()
@ -738,7 +738,7 @@ class ConductivityBase(ABC):
def _allocate_values(self): def _allocate_values(self):
"""Allocate necessary data arrays. """Allocate necessary data arrays.
Should be implementated in Conductivity* class. Should be implemented in Conductivity* class.
""" """
raise NotImplementedError() raise NotImplementedError()
@ -747,16 +747,16 @@ class ConductivityBase(ABC):
def _set_velocities(self, i_gp, i_data): def _set_velocities(self, i_gp, i_data):
"""Set velocities at grid point and at data location. """Set velocities at grid point and at data location.
Should be implementated in Conductivity*MixIn. Should be implemented in Conductivity*MixIn.
""" """
raise NotImplementedError() raise NotImplementedError()
@abstractmethod @abstractmethod
def _init_velocity(self, gv_delta_q): def _init_velocity(self, gv_delta_q):
"""Initialize velocitiy class instance. """Initialize velocity class instance.
Should be implementated in Conductivity*MixIn. Should be implemented in Conductivity*MixIn.
""" """
raise NotImplementedError() raise NotImplementedError()
@ -765,7 +765,7 @@ class ConductivityBase(ABC):
def _set_cv(self, i_gp, i_data): def _set_cv(self, i_gp, i_data):
"""Set heat capacity at grid point and at data location. """Set heat capacity at grid point and at data location.
Should be implementated in Conductivity*MixIn. Should be implemented in Conductivity*MixIn.
""" """
raise NotImplementedError() raise NotImplementedError()

View File

@ -728,7 +728,7 @@ class ConductivityLBTEBase(ConductivityBase):
sys.stdout.flush() sys.stdout.flush()
def _average_collision_matrix_by_degeneracy(self): def _average_collision_matrix_by_degeneracy(self):
"""Average symmetrically equivalent elemetns of collision matrix.""" """Average symmetrically equivalent elements of collision matrix."""
start = time.time() start = time.time()
# Average matrix elements belonging to degenerate bands # Average matrix elements belonging to degenerate bands
@ -939,8 +939,8 @@ class ConductivityLBTEBase(ConductivityBase):
if (np.abs(r_sum) < 1e-10).all(): if (np.abs(r_sum) < 1e-10).all():
return None return None
# Same as np.kron(np.eye(size), r_sum), but writen as below # Same as np.kron(np.eye(size), r_sum), but written as below
# to be sure the values in memory C-congiguous with 'double'. # to be sure the values in memory C-contiguous with 'double'.
I_mat = np.zeros((3 * size, 3 * size), dtype="double", order="C") I_mat = np.zeros((3 * size, 3 * size), dtype="double", order="C")
for i in range(size): for i in range(size):
I_mat[(i * 3) : ((i + 1) * 3), (i * 3) : ((i + 1) * 3)] = r_sum I_mat[(i * 3) : ((i + 1) * 3), (i * 3) : ((i + 1) * 3)] = r_sum

View File

@ -161,7 +161,7 @@ class ConductivityRTABase(ConductivityBase):
@abstractmethod @abstractmethod
def set_kappa_at_sigmas(self): def set_kappa_at_sigmas(self):
"""Must be implementated in the inherited class.""" """Must be implemented in the inherited class."""
raise NotImplementedError() raise NotImplementedError()
def _allocate_values(self): def _allocate_values(self):

View File

@ -846,7 +846,7 @@ class ShowCalcProgress:
@staticmethod @staticmethod
def kappa_RTA(br: "ConductivityRTA", log_level): def kappa_RTA(br: "ConductivityRTA", log_level):
"""Show RTA calculation progess.""" """Show RTA calculation progress."""
temperatures = br.temperatures temperatures = br.temperatures
sigmas = br.sigmas sigmas = br.sigmas
kappa = br.kappa kappa = br.kappa
@ -885,7 +885,7 @@ class ShowCalcProgress:
@staticmethod @staticmethod
def kappa_Wigner_RTA(br: "ConductivityWignerRTA", log_level): def kappa_Wigner_RTA(br: "ConductivityWignerRTA", log_level):
"""Show Wigner-RTA calculation progess.""" """Show Wigner-RTA calculation progress."""
temperatures = br.temperatures temperatures = br.temperatures
sigmas = br.sigmas sigmas = br.sigmas
kappa_TOT_RTA = br.kappa_TOT_RTA kappa_TOT_RTA = br.kappa_TOT_RTA

View File

@ -109,7 +109,7 @@ def create_phono3py_force_constants(
'phonopy-load' command. 'phonopy-load' command.
""" """
# Only for build-in fc calculator. # Only for built-in fc calculator.
# These are not applied to external fc calculators. # These are not applied to external fc calculators.
symmetrize_fc3r = settings.is_symmetrize_fc3_r or settings.fc_symmetry symmetrize_fc3r = settings.is_symmetrize_fc3_r or settings.fc_symmetry
symmetrize_fc2 = settings.is_symmetrize_fc2 or settings.fc_symmetry symmetrize_fc2 = settings.is_symmetrize_fc2 or settings.fc_symmetry
@ -267,7 +267,7 @@ def parse_forces(
filename_read_from = force_filename filename_read_from = force_filename
# Units of displacements and forces are converted. If forces don't # Units of displacements and forces are converted. If forces don't
# exist, the convesion will not be performed for forces. # exist, the conversion will not be performed for forces.
if calculator is not None: if calculator is not None:
_convert_unit_in_dataset( _convert_unit_in_dataset(
dataset, dataset,

View File

@ -137,7 +137,7 @@ def load(
also searched in current directory. When 'FORCES_FC2' is not found, also searched in current directory. When 'FORCES_FC2' is not found,
'FORCES_FC3' is used to create fc2. 'FORCES_FC3' is used to create fc2.
Parameters for non-analytical term correctiion (NAC) Parameters for non-analytical term correction (NAC)
---------------------------------------------------- ----------------------------------------------------
Optional. Means to provide NAC parameters and their priority: Optional. Means to provide NAC parameters and their priority:
1. born_filename 1. born_filename
@ -163,10 +163,10 @@ def load(
given, the centring type ('F', 'I', 'A', 'C', 'R', or primitive 'P') is given, the centring type ('F', 'I', 'A', 'C', 'R', or primitive 'P') is
automatically chosen. Default is 'auto'. automatically chosen. Default is 'auto'.
phonon_supercell_matrix : array_like, optional phonon_supercell_matrix : array_like, optional
Supercell matrix used for fc2. In phono3py, supercell matrix for fc3 and Supercell matrix used for fc2. In phono3py, supercell matrix for fc3
fc2 can be different to support longer range interaction of fc2 than and fc2 can be different to support longer range interaction of fc2 than
that of fc3. Unless setting this, supercell_matrix is used. This is only that of fc3. Unless setting this, supercell_matrix is used. This is only
valide when unitcell or unitcell_filename is given. Default is None. valid when unitcell or unitcell_filename is given. Default is None.
is_nac : bool, optional is_nac : bool, optional
If True, look for 'BORN' file. If False, NAS is turned off. Default is If True, look for 'BORN' file. If False, NAS is turned off. Default is
True. True.
@ -178,7 +178,7 @@ def load(
Input unit cell. Default is None. Input unit cell. Default is None.
supercell : PhonopyAtoms, optional supercell : PhonopyAtoms, optional
Input supercell. With given, default value of primitive_matrix is set to Input supercell. With given, default value of primitive_matrix is set to
'auto' (can be overwitten). supercell_matrix is ignored. Default is 'auto' (can be overwritten). supercell_matrix is ignored. Default is
None. None.
nac_params : dict, optional nac_params : dict, optional
Parameters required for non-analytical term correction. Default is None. Parameters required for non-analytical term correction. Default is None.
@ -186,7 +186,7 @@ def load(
(array_like, shape=(primitive cell atoms, 3, 3), dtype=float), (array_like, shape=(primitive cell atoms, 3, 3), dtype=float),
'dielectric': Dielectric constant matrix 'dielectric': Dielectric constant matrix
(array_like, shape=(3, 3), dtype=float), (array_like, shape=(3, 3), dtype=float),
'factor': unit conversion facotr (float)} 'factor': unit conversion factor (float)}
unitcell_filename : os.PathLike, optional unitcell_filename : os.PathLike, optional
Input unit cell filename. Default is None. Input unit cell filename. Default is None.
supercell_filename : os.PathLike, optional supercell_filename : os.PathLike, optional
@ -214,7 +214,7 @@ def load(
fc_calculator_options : str, optional fc_calculator_options : str, optional
Optional parameters that are passed to the external fc-calculator. This Optional parameters that are passed to the external fc-calculator. This
is given as one text string. How to parse this depends on the is given as one text string. How to parse this depends on the
fc-calculator. For alm, each parameter is splitted by comma ',', and fc-calculator. For alm, each parameter is split by comma ',', and
each set of key and value pair is written in 'key = value'. each set of key and value pair is written in 'key = value'.
factor : float, optional factor : float, optional
Phonon frequency unit conversion factor. Unless specified, default unit Phonon frequency unit conversion factor. Unless specified, default unit
@ -233,10 +233,10 @@ def load(
True. True.
is_compact_fc : bool, optional is_compact_fc : bool, optional
fc3 are created in the array whose shape is fc3 are created in the array whose shape is
True: (primitive, supercell, supecell, 3, 3, 3) False: (supercell, True: (primitive, supercell, supercell, 3, 3, 3) False: (supercell,
supercell, supecell, 3, 3, 3) supercell, supercell, 3, 3, 3)
and for fc2 and for fc2
True: (primitive, supecell, 3, 3) False: (supercell, supecell, 3, 3) True: (primitive, supercell, 3, 3) False: (supercell, supercell, 3, 3)
where 'supercell' and 'primitive' indicate number of atoms in these where 'supercell' and 'primitive' indicate number of atoms in these
cells. Default is False. cells. Default is False.
use_pypolymlp : bool, optional use_pypolymlp : bool, optional

View File

@ -683,7 +683,7 @@ def _show_fc_calculator_not_found(log_level):
print("") print("")
print( print(
"Built-in force constants calculator doesn't support the " "Built-in force constants calculator doesn't support the "
"dispalcements-forces dataset. " "displacements-forces dataset. "
"An external force calculator, e.g., symfc (--symfc_ or ALM (--alm), " "An external force calculator, e.g., symfc (--symfc_ or ALM (--alm), "
"has to be used to compute force constants." "has to be used to compute force constants."
) )

View File

@ -613,7 +613,7 @@ def write_real_self_energy_to_hdf5(
frequencies=None, frequencies=None,
filename=None, filename=None,
): ):
"""Wirte real part of self energy (currently only bubble) in hdf5. """Write real part of self energy (currently only bubble) in hdf5.
deltas : ndarray deltas : ndarray
Real part of self energy. Real part of self energy.
@ -702,7 +702,7 @@ def write_spectral_function_to_hdf5(
all_band_exist=False, all_band_exist=False,
filename=None, filename=None,
): ):
"""Wirte spectral functions (currently only bubble) in hdf5. """Write spectral functions (currently only bubble) in hdf5.
spectral_functions : ndarray spectral_functions : ndarray
Spectral functions. Spectral functions.
@ -792,7 +792,7 @@ def write_collision_to_hdf5(
text = "Collisions " text = "Collisions "
if grid_point is not None: if grid_point is not None:
text += "at grid adress %d " % grid_point text += "at grid address %d " % grid_point
if sigma is not None: if sigma is not None:
if grid_point is not None: if grid_point is not None:
text += "and " text += "and "
@ -827,7 +827,7 @@ def write_unitary_matrix_to_hdf5(
): ):
"""Write eigenvectors of collision matrices at temperatures. """Write eigenvectors of collision matrices at temperatures.
Depending on the choice of the solver, eigenvectors are sotred in Depending on the choice of the solver, eigenvectors are stored in
either column-wise or row-wise. either column-wise or row-wise.
""" """
@ -1697,7 +1697,7 @@ def get_length_of_first_line(f):
f.seek(0) f.seek(0)
return len(line.split()) return len(line.split())
raise RuntimeError("File doesn't contain relevant infomration.") raise RuntimeError("File doesn't contain relevant information.")
def _get_filename_suffix( def _get_filename_suffix(

View File

@ -84,7 +84,7 @@ class BZGrid:
The grid systems with (BZ-grid, BZG) and without (GR-grid, GRG) BZ surface The grid systems with (BZ-grid, BZG) and without (GR-grid, GRG) BZ surface
are mutually related up to modulo D_diag. More precisely the conversion are mutually related up to modulo D_diag. More precisely the conversion
of grid adresses are performed as follows: of grid addresses are performed as follows:
From BZG to GRG From BZG to GRG
gr_gp = get_grid_point_from_address(bz_grid.addresses[bz_gp], D_diag) gr_gp = get_grid_point_from_address(bz_grid.addresses[bz_gp], D_diag)
@ -103,12 +103,12 @@ class BZGrid:
Recovering reduced coordinates Recovering reduced coordinates
------------------------------ ------------------------------
q-points with respect to the original recirpocal q-points with respect to the original reciprocal
basis vectors are given by basis vectors are given by
q = np.dot(Q, addresses[gp] / D_diag.astype('double')) q = np.dot(Q, addresses[gp] / D_diag.astype('double'))
for the Gamma cetnred grid. With shifted, where only half grid shifts for the Gamma centred grid. With shifted, where only half grid shifts
that satisfy the symmetry are considered, that satisfy the symmetry are considered,
q = np.dot(Q, (addresses[gp] + np.dot(P, s)) / D_diag.astype('double')) q = np.dot(Q, (addresses[gp] + np.dot(P, s)) / D_diag.astype('double'))
@ -806,7 +806,7 @@ class GridMatrix:
): ):
"""Return grid matrix. """Return grid matrix.
Grid is generated by the distance `length`. `coordinates` is used eighter Grid is generated by the distance `length`. `coordinates` is used either
the grid is defined by supercell in real space or mesh grid in reciprocal the grid is defined by supercell in real space or mesh grid in reciprocal
space. space.
@ -1125,7 +1125,7 @@ def _relocate_BZ_grid_address(
The translationally equivalent grid points corresponding to one grid point The translationally equivalent grid points corresponding to one grid point
on BZ surface are stored in continuously. If the multiplicity (number of on BZ surface are stored in continuously. If the multiplicity (number of
equivalent grid points) is 1, 2, 1, 4, ... for the grid points, equivalent grid points) is 1, 2, 1, 4, ... for the grid points,
``bz_map`` stores the multiplicites and the index positions of the first ``bz_map`` stores the multiplicities and the index positions of the first
grid point of the equivalent grid points, i.e., grid point of the equivalent grid points, i.e.,
bz_map[:] = [0, 1, 3, 4, 8...] bz_map[:] = [0, 1, 3, 4, 8...]

View File

@ -42,7 +42,7 @@ from phonopy.utils import similarity_transformation
class GroupVelocityMatrix(GroupVelocity): class GroupVelocityMatrix(GroupVelocity):
"""Class to calculate group velocities matricies of phonons. """Class to calculate group velocities matrices of phonons.
v_qjj' = 1/(2*sqrt(omega_qj*omega_qj')) * <e(q,j)|dD/dq|e(q,j')> v_qjj' = 1/(2*sqrt(omega_qj*omega_qj')) * <e(q,j)|dD/dq|e(q,j')>

View File

@ -51,11 +51,11 @@ def run_phonon_solver_c(
nac_q_direction=None, # in reduced coordinates nac_q_direction=None, # in reduced coordinates
lapack_zheev_uplo="L", lapack_zheev_uplo="L",
): ):
"""Bulid and solve dynamical matrices on grid in C-API. """Build and solve dynamical matrices on grid in C-API.
Note Note
---- ----
When LAPACKE is linked in C, `phononcalc.phonons_at_gridpoints` constucts When LAPACKE is linked in C, `phononcalc.phonons_at_gridpoints` constructs
and solves dynamical matrices on grid points. Otherwise, it only constructs and solves dynamical matrices on grid points. Otherwise, it only constructs
dynamical matrices and solves them in python. dynamical matrices and solves them in python.
@ -73,7 +73,7 @@ def run_phonon_solver_c(
QDinv : ndarray QDinv : ndarray
See BZGrid.QDinv. See BZGrid.QDinv.
frequency_conversion_factor : float, optional frequency_conversion_factor : float, optional
Frequency convertion factor that is multiplied with sqrt or eigenvalue Frequency conversion factor that is multiplied with sqrt or eigenvalue
of dynamical matrix. Default is VaspToTHz. of dynamical matrix. Default is VaspToTHz.
nac_q_direction : array_like, optional nac_q_direction : array_like, optional
See Interaction.nac_q_direction. Default is None. See Interaction.nac_q_direction. Default is None.
@ -194,7 +194,7 @@ def run_phonon_solver_py(
frequency_conversion_factor, frequency_conversion_factor,
lapack_zheev_uplo, lapack_zheev_uplo,
): ):
"""Bulid and solve dynamical matrices on grid in python.""" """Build and solve dynamical matrices on grid in python."""
gp = grid_point gp = grid_point
if phonon_done[gp] == 0: if phonon_done[gp] == 0:
phonon_done[gp] = 1 phonon_done[gp] = 1

View File

@ -143,7 +143,7 @@ class VelocityOperator(GroupVelocity):
# computed along several directions # computed along several directions
ddms = self._get_dsqrtD_FD(np.array(q)) ddms = self._get_dsqrtD_FD(np.array(q))
# #
# ddms[0] cointains the FD derivative in the direction in which the velocity # ddms[0] contains the FD derivative in the direction in which the velocity
# operator is diagonalized # operator is diagonalized
for id_dir in range(0, 3): for id_dir in range(0, 3):
gv_operator[:, :, id_dir] = ( gv_operator[:, :, id_dir] = (

View File

@ -251,7 +251,7 @@ class CollisionMatrix(ImagSelfEnergy):
"""Return mapping table from grid point index to triplet index. """Return mapping table from grid point index to triplet index.
triplets_map_at_q contains index mapping of q1 in (q0, q1, q2) to triplets_map_at_q contains index mapping of q1 in (q0, q1, q2) to
independet q1 under q0+q1+q2=G with a fixed q0. independent q1 under q0+q1+q2=G with a fixed q0.
Note Note
---- ----

View File

@ -133,7 +133,7 @@ def direction_to_displacement(
def get_third_order_displacements( def get_third_order_displacements(
cell: PhonopyAtoms, symmetry: Symmetry, is_plusminus="auto", is_diagonal=False cell: PhonopyAtoms, symmetry: Symmetry, is_plusminus="auto", is_diagonal=False
): ):
"""Create dispalcement dataset. """Create displacement dataset.
Note Note
---- ----
@ -143,7 +143,7 @@ def get_third_order_displacements(
between Atoms 1, 2, and 3 is calculated. between Atoms 1, 2, and 3 is calculated.
Atom 2: The second displaced atom. Second order force constant Atom 2: The second displaced atom. Second order force constant
between Atoms 2 and 3 is calculated. between Atoms 2 and 3 is calculated.
Atom 3: Force is mesuared on this atom. Atom 3: Force is measured on this atom.
Parameters Parameters
---------- ----------

View File

@ -122,7 +122,7 @@ def run_gruneisen_parameters(
class Gruneisen: class Gruneisen:
"""Calculat mode Grueneisen parameters from fc3.""" """Calculate mode Grueneisen parameters from fc3."""
def __init__( def __init__(
self, self,

View File

@ -288,7 +288,7 @@ class ImagSelfEnergy:
self._temperature = float(temperature) self._temperature = float(temperature)
def set_temperature(self, temperature): def set_temperature(self, temperature):
"""Set temperatures where calculation will be peformed.""" """Set temperatures where calculation will be performed."""
warnings.warn( warnings.warn(
"Use attribute, ImagSelfEnergy.temperature " "Use attribute, ImagSelfEnergy.temperature "
"instead of ImagSelfEnergy.set_temperature().", "instead of ImagSelfEnergy.set_temperature().",
@ -1052,7 +1052,7 @@ def run_ise_at_frequency_points_batch(
if log_level: if log_level:
print( print(
"Calculations at %d frequency points are devided into " "Calculations at %d frequency points are divided into "
"%d batches." % (len(_frequency_points), len(batches)) "%d batches." % (len(_frequency_points), len(batches))
) )

View File

@ -157,7 +157,7 @@ class Interaction:
self._g_zero = None self._g_zero = None
self._phonon_done = None self._phonon_done = None
self._done_nac_at_gamma = False # Phonon at Gamma is calculatd with NAC. self._done_nac_at_gamma = False # Phonon at Gamma is calculated with NAC.
self._frequencies = None self._frequencies = None
self._eigenvectors = None self._eigenvectors = None
self._frequencies_at_gamma = None self._frequencies_at_gamma = None
@ -428,7 +428,7 @@ class Interaction:
shape=(num_bz_grid, num_band, num_band), shape=(num_bz_grid, num_band, num_band),
dtype="c%d" % (np.dtype('double').itemsize * 2), order='C' dtype="c%d" % (np.dtype('double').itemsize * 2), order='C'
phonon_done : ndarray phonon_done : ndarray
1 if phonon at a grid point is calcualted, otherwise 0. 1 if phonon at a grid point is calculated, otherwise 0.
shape=(num_bz_grid, ), dtype='byte' shape=(num_bz_grid, ), dtype='byte'
""" """
@ -626,7 +626,7 @@ class Interaction:
self.run_phonon_solver_at_gamma() self.run_phonon_solver_at_gamma()
else: else:
msg = ( msg = (
"Phonons at Gamma has been calcualted with NAC, " "Phonons at Gamma has been calculated with NAC, "
"but ph-ph interaction is expected to calculate at " "but ph-ph interaction is expected to calculate at "
"non-Gamma point. Setting Interaction.nac_q_direction = " "non-Gamma point. Setting Interaction.nac_q_direction = "
"None, can avoid raising this exception to re-run phonon " "None, can avoid raising this exception to re-run phonon "
@ -693,12 +693,12 @@ class Interaction:
"""Set phonons on grid.""" """Set phonons on grid."""
if bz_grid_addresses.shape != self._bz_grid.addresses.shape: if bz_grid_addresses.shape != self._bz_grid.addresses.shape:
raise RuntimeError( raise RuntimeError(
"Input grid address size is inconsistent. Setting phonons faild." "Input grid address size is inconsistent. Setting phonons failed."
) )
if (self._bz_grid.addresses - bz_grid_addresses).all(): if (self._bz_grid.addresses - bz_grid_addresses).all():
raise RuntimeError( raise RuntimeError(
"Input grid addresses are inconsistent. Setting phonons faild." "Input grid addresses are inconsistent. Setting phonons failed."
) )
else: else:
self._phonon_done[:] = 1 self._phonon_done[:] = 1

View File

@ -103,7 +103,7 @@ class JointDos:
self._tetrahedron_method = None self._tetrahedron_method = None
self._phonon_done = None self._phonon_done = None
self._done_nac_at_gamma = False # Phonon at Gamma is calculatd with NAC. self._done_nac_at_gamma = False # Phonon at Gamma is calculated with NAC.
self._frequencies = None self._frequencies = None
self._eigenvectors = None self._eigenvectors = None
@ -255,7 +255,7 @@ class JointDos:
self._phonon_done[gamma_gp] = 0 self._phonon_done[gamma_gp] = 0
else: else:
msg = ( msg = (
"Phonons at Gamma has been calcualted with NAC, " "Phonons at Gamma has been calculated with NAC, "
"but ph-ph interaction is expected to calculate at " "but ph-ph interaction is expected to calculate at "
"non-Gamma point. Setting Interaction.nac_q_direction = " "non-Gamma point. Setting Interaction.nac_q_direction = "
"None, can avoid raising this exception to re-run phonon " "None, can avoid raising this exception to re-run phonon "

View File

@ -63,9 +63,9 @@ class RealSelfEnergy:
How to test epsilon How to test epsilon
------------------- -------------------
At a sampling mesh, choose one band and calcualte frequency shifts at At a sampling mesh, choose one band and calculate frequency shifts at
various epsilon values and plot over the epsilons. Decreasing epsinon, various epsilon values and plot over the epsilons. Decreasing epsilon,
at some point, discontinous change may be found. at some point, discontinuous change may be found.
""" """

View File

@ -41,7 +41,7 @@ class ReciprocalToNormal:
"""Class to transform fc3 in reciprocal space to phonon space. """Class to transform fc3 in reciprocal space to phonon space.
This is an implementation in python for prototyping and the test. This is an implementation in python for prototyping and the test.
Equivalent routine is implementated in C, and this is what usually Equivalent routine is implemented in C, and this is what usually
we use. we use.
""" """

View File

@ -71,7 +71,7 @@ def get_triplets_at_q(
is_time_reversal : bool, optional is_time_reversal : bool, optional
Inversion symemtry is added if it doesn't exist. Default is True. Inversion symemtry is added if it doesn't exist. Default is True.
swappable : bool, optional swappable : bool, optional
q1 and q2 among (q0, q1, q2) can be swapped. Deafult is True. q1 and q2 among (q0, q1, q2) can be swapped. Default is True.
Returns Returns
------- -------

View File

@ -64,7 +64,7 @@ def plot_one_file(ax, args):
temperatures = f["temperature"][:] temperatures = f["temperature"][:]
plot_one(ax, coleigs, temperatures, args) plot_one(ax, coleigs, temperatures, args)
else: else:
print("File %s doens't exist." % filename) print("File %s doesn't exist." % filename)
sys.exit(1) sys.exit(1)
@ -86,7 +86,7 @@ def plot_more_files(ax, args):
coleigs.append(f["collision_eigenvalues"][:]) coleigs.append(f["collision_eigenvalues"][:])
temperatures.append(f["temperature"][:]) temperatures.append(f["temperature"][:])
else: else:
print("File %s doens't exist." % filename) print("File %s doesn't exist." % filename)
sys.exit(1) sys.exit(1)
plot_more(ax, coleigs, temperatures, args) plot_more(ax, coleigs, temperatures, args)

View File

@ -260,7 +260,7 @@ def main(args):
if os.path.isfile(args.filenames[0]): if os.path.isfile(args.filenames[0]):
f = h5py.File(args.filenames[0], "r") f = h5py.File(args.filenames[0], "r")
else: else:
print("File %s doens't exist." % args.filenames[0]) print("File %s doesn't exist." % args.filenames[0])
sys.exit(1) sys.exit(1)
if args.title: if args.title:

View File

@ -8,7 +8,7 @@ from phono3py.api_phono3py import Phono3py
@pytest.mark.skipif( @pytest.mark.skipif(
not phono3c.include_lapacke(), reason="test for phono3py compliled with lapacke" not phono3c.include_lapacke(), reason="test for phono3py compiled with lapacke"
) )
@pytest.mark.parametrize("pinv_solver", [1, 2, 6]) @pytest.mark.parametrize("pinv_solver", [1, 2, 6])
def test_kappa_LBTE_126(si_pbesol: Phono3py, pinv_solver: int): def test_kappa_LBTE_126(si_pbesol: Phono3py, pinv_solver: int):
@ -41,7 +41,7 @@ def _test_kappa_LBTE(si_pbesol: Phono3py, pinv_solver: int):
@pytest.mark.skipif( @pytest.mark.skipif(
phono3c.include_lapacke(), reason="test for phono3py compliled without lapacke" phono3c.include_lapacke(), reason="test for phono3py compiled without lapacke"
) )
@pytest.mark.parametrize("pinv_solver", [1, 2]) @pytest.mark.parametrize("pinv_solver", [1, 2])
def test_kappa_LBTE_witout_lapacke(si_pbesol: Phono3py, pinv_solver: int): def test_kappa_LBTE_witout_lapacke(si_pbesol: Phono3py, pinv_solver: int):

View File

@ -36,7 +36,7 @@ def test_cutoff_fc3_all_forces(
By definition, displacement datasets are kept unchanged when By definition, displacement datasets are kept unchanged when
cutoff-pair-distance is specified. cutoff-pair-distance is specified.
This test checkes only supercell forces that satisfy specified cutoff pairs This test checks only supercell forces that satisfy specified cutoff pairs
are chosen properly. are chosen properly.
""" """
@ -259,7 +259,7 @@ def test_phonon_smat_alm_cutoff_fc3(si_pbesol_111_222_alm_cutoff_fc3: Phono3py):
@pytest.mark.skipif( @pytest.mark.skipif(
not phono3c.include_lapacke(), reason="requires to complile with lapacke" not phono3c.include_lapacke(), reason="requires to compile with lapacke"
) )
def test_fc3_lapacke_solver(si_pbesol_111: Phono3py): def test_fc3_lapacke_solver(si_pbesol_111: Phono3py):
"""Test fc3 with Si PBEsol 1x1x1 using lapacke solver.""" """Test fc3 with Si PBEsol 1x1x1 using lapacke solver."""
@ -298,7 +298,7 @@ def test_fc3_lapacke_solver(si_pbesol_111: Phono3py):
def test_fc3_symfc(si_pbesol_111_symfc: Phono3py): def test_fc3_symfc(si_pbesol_111_symfc: Phono3py):
"""Test fc3 with Si PBEsol 1x1x1 calcualted using symfc.""" """Test fc3 with Si PBEsol 1x1x1 calculated using symfc."""
ph = si_pbesol_111_symfc ph = si_pbesol_111_symfc
fc3_ref = [ fc3_ref = [
[ [

View File

@ -840,7 +840,7 @@ def test_imag_self_energy_npoints_with_sigma(si_pbesol: Phono3py):
def test_imag_self_energy_detailed(si_pbesol: Phono3py): def test_imag_self_energy_detailed(si_pbesol: Phono3py):
"""Imaginary part of self energy spectrum of Si. """Imaginary part of self energy spectrum of Si.
* specified frquency points * specified frequency points
* contribution from each triplet is returned. * contribution from each triplet is returned.
""" """
@ -914,7 +914,7 @@ def test_imag_self_energy_detailed(si_pbesol: Phono3py):
def test_imag_self_energy_scat_classes(si_pbesol: Phono3py, scattering_class: int): def test_imag_self_energy_scat_classes(si_pbesol: Phono3py, scattering_class: int):
"""Imaginary part of self energy spectrum of Si. """Imaginary part of self energy spectrum of Si.
* specified frquency points * specified frequency points
* scattering event class 1 * scattering event class 1
""" """

View File

@ -248,10 +248,10 @@ def test_interaction_nac_direction_phonon_NaCl_second_no_error(nacl_pbe: Phono3p
def test_interaction_run_phonon_solver_at_gamma_NaCl(nacl_pbe: Phono3py): def test_interaction_run_phonon_solver_at_gamma_NaCl(nacl_pbe: Phono3py):
"""Test run_phonon_solver_at_gamma with nac_q_direction on NaCl. """Test run_phonon_solver_at_gamma with nac_q_direction on NaCl.
Phonon calculation at Gamma without NAC is peformed at itr.init_dynamical_matrix(). Phonon calculation at Gamma without NAC is performed at itr.init_dynamical_matrix().
The phonons at Gamma without NAC are saved in dedicated variables. The phonons at Gamma without NAC are saved in dedicated variables.
Phonon calculation at Gamma with NAC is peformed at itr.set_grid_point(0) and Phonon calculation at Gamma with NAC is performed at itr.set_grid_point(0) and
stored in phonon variables on grid. stored in phonon variables on grid.
itr.run_phonon_solver_at_gamma() stored phonons at Gamma without NAC are copied itr.run_phonon_solver_at_gamma() stored phonons at Gamma without NAC are copied

View File

@ -67,7 +67,7 @@ def test_real_self_energy_with_band_indices(si_pbesol: Phono3py):
def test_real_self_energy_with_frequency_points(si_pbesol: Phono3py): def test_real_self_energy_with_frequency_points(si_pbesol: Phono3py):
"""Real part of self energy spectrum of Si. """Real part of self energy spectrum of Si.
* specified frquency points * specified frequency points
""" """
if si_pbesol._make_r0_average: if si_pbesol._make_r0_average: