mirror of https://github.com/phonopy/phono3py.git
Merge branch 'develop' into rc
This commit is contained in:
commit
398acb1dc7
|
@ -1,45 +1,55 @@
|
||||||
# See https://pre-commit.com for more informatio
|
# See https://pre-commit.com for more information
|
||||||
# See https://pre-commit.com/hooks.html for more hooks
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v5.0.0
|
rev: v5.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
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.4
|
rev: v0.9.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: [ "--fix", "--show-fixes" ]
|
args: [ "--fix", "--show-fixes" ]
|
||||||
- id: ruff-format
|
- id: ruff-format
|
||||||
|
|
||||||
- repo: https://github.com/Takishima/cmake-pre-commit-hooks
|
- repo: https://github.com/Takishima/cmake-pre-commit-hooks
|
||||||
rev: v1.9.6
|
rev: v1.9.6
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
args:
|
args:
|
||||||
- '-B_build-pre-commit'
|
- "-B_build-pre-commit"
|
||||||
- '-DWITH_Fortran=ON'
|
- "-DWITH_Fortran=ON"
|
||||||
- '-DWITH_TESTS=ON'
|
- "-DWITH_TESTS=ON"
|
||||||
- '-i'
|
- "-i"
|
||||||
stages: [manual]
|
stages: [manual]
|
||||||
- id: clang-tidy
|
- id: clang-tidy
|
||||||
args:
|
args:
|
||||||
- '-B_build-pre-commit'
|
- "-B_build-pre-commit"
|
||||||
- '-DWITH_Fortran=ON'
|
- "-DWITH_Fortran=ON"
|
||||||
- '-DWITH_TESTS=ON'
|
- "-DWITH_TESTS=ON"
|
||||||
# - '--'
|
# "- --"
|
||||||
# - '-I/Users/togo/.miniforge/envs/dev/include'
|
# "- -I/Users/togo/.miniforge/envs/dev/include"
|
||||||
# - '-I/Users/togo/.miniforge/envs/dev/include/python3.10'
|
# "- -I/Users/togo/.miniforge/envs/dev/include/python3.10"
|
||||||
# - '-I/Users/togo/.miniforge/envs/dev/lib/python3.10/site-packages/numpy/core/include'
|
# "- -I/Users/togo/.miniforge/envs/dev/lib/python3.10/site-packages/numpy/core/include"
|
||||||
stages: [manual]
|
stages: [manual]
|
||||||
|
|
||||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||||
rev: v0.6.13
|
rev: v0.6.13
|
||||||
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
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
|
@ -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(
|
||||||
|
|
14
c/gridsys.h
14
c/gridsys.h
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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(
|
||||||
|
|
10
c/recgrid.h
10
c/recgrid.h
|
@ -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.
|
||||||
|
|
|
@ -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 */
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -4,30 +4,33 @@ This directory contains python-sphinx documentation source.
|
||||||
|
|
||||||
## How to compile
|
## How to compile
|
||||||
|
|
||||||
```
|
```bash
|
||||||
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,
|
||||||
```
|
|
||||||
|
```bash
|
||||||
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,
|
||||||
```
|
|
||||||
|
```bash
|
||||||
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,
|
||||||
```
|
|
||||||
|
```bash
|
||||||
git add .
|
git add .
|
||||||
git commit -a -m "Update documentation ..."
|
git commit -a -m "Update documentation ..."
|
||||||
git push
|
git push
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## Feb-7-2025: Version 3.14.0
|
||||||
|
|
||||||
|
- Release to follow the change of phonopy
|
||||||
|
|
||||||
## Feb-5-2025: Version 3.13.0
|
## Feb-5-2025: Version 3.13.0
|
||||||
|
|
||||||
- Release to follow the change of phonopy
|
- Release to follow the change of phonopy
|
||||||
|
@ -151,7 +155,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`.
|
||||||
|
@ -179,7 +183,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
|
||||||
|
@ -239,7 +243,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
|
||||||
|
@ -269,9 +273,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
|
||||||
|
@ -285,7 +289,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
|
||||||
|
|
||||||
|
@ -370,7 +374,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.
|
||||||
|
|
||||||
|
@ -399,7 +403,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
|
||||||
|
|
||||||
|
@ -414,7 +418,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
|
||||||
|
@ -470,7 +474,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.
|
||||||
|
|
||||||
|
@ -482,10 +486,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
|
||||||
|
@ -582,7 +586,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
|
||||||
|
@ -596,8 +600,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
|
||||||
|
|
||||||
|
|
|
@ -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`.
|
||||||
|
|
||||||
|
@ -721,7 +721,7 @@ out, i.e., `gamma` is still imaginary part of self energy of ph-ph scattering.
|
||||||
|
|
||||||
A most simple phonon boundary scattering treatment is included. $v_g/L$ is just
|
A most simple phonon boundary scattering treatment is included. $v_g/L$ is just
|
||||||
used as the scattering rate, where $v_g$ is the group velocity and $L$ is the
|
used as the scattering rate, where $v_g$ is the group velocity and $L$ is the
|
||||||
boundary mean free path. The value is given in micrometre. The default value, 1
|
boundary mean free path. The value is given in micrometer. The default value, 1
|
||||||
metre, is just used to avoid divergence of phonon lifetime and the contribution
|
metre, is just used to avoid divergence of phonon lifetime and the contribution
|
||||||
to the thermal conductivity is considered negligible.
|
to the thermal conductivity is considered negligible.
|
||||||
|
|
||||||
|
@ -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 Kramers–Kronig relation. The
|
and then the real part is calculated using the Kramers–Kronig 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
|
||||||
|
|
|
@ -58,9 +58,9 @@ copyright = "2015, Atsushi Togo"
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = "3.13"
|
version = "3.14"
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = "3.13.0"
|
release = "3.14.0"
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@ -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
|
||||||
|
|
|
@ -25,7 +25,7 @@ In phono3py, to obtain supercell-fc3,
|
||||||
$\Phi_{\alpha\beta\gamma}(jl, j'l', j''l'')$, forces in many
|
$\Phi_{\alpha\beta\gamma}(jl, j'l', j''l'')$, forces in many
|
||||||
supercells having different pairs of displaced atoms are computed
|
supercells having different pairs of displaced atoms are computed
|
||||||
using some force-calculator such as ab-initio code. In the phono3py
|
using some force-calculator such as ab-initio code. In the phono3py
|
||||||
default behaviour, full elements of supercell-fc3 are computed. In
|
default behavior, full elements of supercell-fc3 are computed. In
|
||||||
this case, though depending on the number of atoms in the supercell
|
this case, though depending on the number of atoms in the supercell
|
||||||
and the crystal symmetry, the number of atomic-pair configuration can
|
and the crystal symmetry, the number of atomic-pair configuration can
|
||||||
be huge and beyond our computational resource.
|
be huge and beyond our computational resource.
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -269,7 +269,7 @@ has to be specified (see {ref}`full_pp_option`).
|
||||||
### boundary_mfp
|
### boundary_mfp
|
||||||
|
|
||||||
A value specified by {ref}`boundary_mfp_option`. The physical unit is
|
A value specified by {ref}`boundary_mfp_option`. The physical unit is
|
||||||
micrometre.
|
micrometer.
|
||||||
|
|
||||||
When `--boundary-mfp` option is explicitly specified, its value is stored here.
|
When `--boundary-mfp` option is explicitly specified, its value is stored here.
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ array([ 1.02050201e+03, 1.02050201e+03, 1.02050201e+03,
|
||||||
|
|
||||||
## How to know grid point index number corresponding to grid address
|
## How to know grid point index number corresponding to grid address
|
||||||
|
|
||||||
Runngin with `--write-gamma`, hdf5 files are written out with file names
|
Running with `--write-gamma`, hdf5 files are written out with file names
|
||||||
such as `kappa-m202020-g4448.hdf5`. You may want to know the grid point
|
such as `kappa-m202020-g4448.hdf5`. You may want to know the grid point
|
||||||
index number with given grid address. This is done as follows:
|
index number with given grid address. This is done as follows:
|
||||||
|
|
||||||
|
|
|
@ -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`
|
||||||
|
|
|
@ -9,7 +9,7 @@ over many different force calculators. Once `phono3py_disp.yaml` is created, the
|
||||||
following operations will be the same using this command.
|
following operations will be the same using this command.
|
||||||
|
|
||||||
This is used almost in the same way as `phono3py` command, e.g., but there are
|
This is used almost in the same way as `phono3py` command, e.g., but there are
|
||||||
some differences. The following default behaviours are different from that of
|
some differences. The following default behaviors are different from that of
|
||||||
those of `phono3py` command:
|
those of `phono3py` command:
|
||||||
|
|
||||||
1. `phono3py_xxx.yaml` type file is always necessary in either of two ways:
|
1. `phono3py_xxx.yaml` type file is always necessary in either of two ways:
|
||||||
|
|
|
@ -22,7 +22,7 @@ The option `--rd NUM` is used instead of `-d` in generating displacements as fol
|
||||||
|
|
||||||
`NUM` means the number of supercells with random directional displacements. This
|
`NUM` means the number of supercells with random directional displacements. This
|
||||||
must be specified, and the initial guess may be from around the number of
|
must be specified, and the initial guess may be from around the number of
|
||||||
supecells generated for the systematic displacements by `-d`. In the case of the
|
supercells generated for the systematic displacements by `-d`. In the case of the
|
||||||
`NaCl-rd` example, 146 supercells are generated with `-d`, so similar
|
`NaCl-rd` example, 146 supercells are generated with `-d`, so similar
|
||||||
number `--rd 100` was chosen here.
|
number `--rd 100` was chosen here.
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
(tips)=
|
(tips)=
|
||||||
|
|
||||||
# Tips
|
# Tips
|
||||||
|
|
||||||
```{contents}
|
```{contents}
|
||||||
:depth: 2
|
:depth: 2
|
||||||
:local:
|
:local:
|
||||||
```
|
```
|
||||||
|
|
||||||
(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 +98,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 +110,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.
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -335,8 +335,8 @@ class Phono3py:
|
||||||
"""Setter and getter of third order force constants (fc3).
|
"""Setter and getter of third order force constants (fc3).
|
||||||
|
|
||||||
ndarray
|
ndarray
|
||||||
fc3 shape is either (supercell, supecell, supercell, 3, 3, 3) or
|
fc3 shape is either (supercell, supercell, supercell, 3, 3, 3) or
|
||||||
(primitive, supercell, supecell, 3, 3, 3),
|
(primitive, supercell, supercell, 3, 3, 3),
|
||||||
where 'supercell' and 'primitive' indicate number of atoms in
|
where 'supercell' and 'primitive' indicate number of atoms in
|
||||||
these cells.
|
these cells.
|
||||||
|
|
||||||
|
@ -352,8 +352,8 @@ class Phono3py:
|
||||||
"""Setter and getter of second order force constants (fc2).
|
"""Setter and getter of second order force constants (fc2).
|
||||||
|
|
||||||
ndarray
|
ndarray
|
||||||
fc2 shape is either (supercell, supecell, 3, 3) or
|
fc2 shape is either (supercell, supercell, 3, 3) or
|
||||||
(primitive, supecell, 3, 3),
|
(primitive, supercell, 3, 3),
|
||||||
where 'supercell' and 'primitive' indicate number of atoms in
|
where 'supercell' and 'primitive' indicate number of atoms in
|
||||||
these cells.
|
these cells.
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
@ -1378,7 +1378,7 @@ class Phono3py:
|
||||||
Note
|
Note
|
||||||
----
|
----
|
||||||
is_diagonal=False is chosen as the default setting intentionally to be
|
is_diagonal=False is chosen as the default setting intentionally to be
|
||||||
consistent to the first displacements of the fc3 pair displacemets in
|
consistent to the first displacements of the fc3 pair displacements in
|
||||||
supercell.
|
supercell.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -1390,7 +1390,7 @@ class Phono3py:
|
||||||
replace generated random distances smaller than this value by this
|
replace generated random distances smaller than this value by this
|
||||||
value.
|
value.
|
||||||
is_plusminus : True, False, or 'auto', optional
|
is_plusminus : True, False, or 'auto', optional
|
||||||
With True, atomis are displaced in both positive and negative
|
With True, atoms are displaced in both positive and negative
|
||||||
directions. With False, only one direction. With 'auto', mostly
|
directions. With False, only one direction. With 'auto', mostly
|
||||||
equivalent to is_plusminus=True, but only one direction is chosen
|
equivalent to is_plusminus=True, but only one direction is chosen
|
||||||
when the displacements in both directions are symmetrically
|
when the displacements in both directions are symmetrically
|
||||||
|
@ -1475,8 +1475,8 @@ class Phono3py:
|
||||||
False.
|
False.
|
||||||
is_compact_fc : bool, optional
|
is_compact_fc : bool, optional
|
||||||
fc3 shape is
|
fc3 shape is
|
||||||
False: (supercell, supercell, supecell, 3, 3, 3) True:
|
False: (supercell, supercell, supercell, 3, 3, 3) True:
|
||||||
(primitive, supercell, supecell, 3, 3, 3)
|
(primitive, supercell, supercell, 3, 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.
|
||||||
fc_calculator : str, optional
|
fc_calculator : str, optional
|
||||||
|
@ -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,
|
||||||
|
@ -1561,8 +1560,8 @@ class Phono3py:
|
||||||
calculator such as ALM. Default is False.
|
calculator such as ALM. Default is False.
|
||||||
is_compact_fc : bool
|
is_compact_fc : bool
|
||||||
fc2 shape is
|
fc2 shape is
|
||||||
False: (supercell, supecell, 3, 3)
|
False: (supercell, supercell, 3, 3)
|
||||||
True: (primitive, supecell, 3, 3)
|
True: (primitive, 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.
|
||||||
fc_calculator : str or None
|
fc_calculator : str or None
|
||||||
|
@ -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
|
||||||
|
@ -1948,7 +1947,7 @@ class Phono3py:
|
||||||
is_isotope: bool = False,
|
is_isotope: bool = False,
|
||||||
mass_variances: Optional[Sequence] = None,
|
mass_variances: Optional[Sequence] = None,
|
||||||
grid_points: Optional[Sequence[int]] = None,
|
grid_points: Optional[Sequence[int]] = None,
|
||||||
boundary_mfp: Optional[float] = None, # in micrometre
|
boundary_mfp: Optional[float] = None, # in micrometer
|
||||||
solve_collective_phonon: bool = False,
|
solve_collective_phonon: bool = False,
|
||||||
use_ave_pp: bool = False,
|
use_ave_pp: bool = False,
|
||||||
is_reducible_collision_matrix: bool = False,
|
is_reducible_collision_matrix: bool = False,
|
||||||
|
@ -1997,8 +1996,8 @@ 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 micrometer to calculate simple boundary
|
||||||
scattering contribution to thermal conductivity.
|
scattering contribution to thermal conductivity.
|
||||||
None ignores this contribution.
|
None ignores this contribution.
|
||||||
solve_collective_phonon : bool, optional, default is False
|
solve_collective_phonon : bool, optional, default is False
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
@ -921,12 +921,12 @@ class ConductivityBase(ABC):
|
||||||
if self._boundary_mfp is not None:
|
if self._boundary_mfp is not None:
|
||||||
if self._boundary_mfp > 1000:
|
if self._boundary_mfp > 1000:
|
||||||
print(
|
print(
|
||||||
"Boundary mean free path (millimetre): %.3f"
|
"Boundary mean free path (millimeter): %.3f"
|
||||||
% (self._boundary_mfp / 1000.0)
|
% (self._boundary_mfp / 1000.0)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
"Boundary mean free path (micrometre): %.5f"
|
"Boundary mean free path (micrometer): %.5f"
|
||||||
% self._boundary_mfp
|
% self._boundary_mfp
|
||||||
)
|
)
|
||||||
if self._is_isotope:
|
if self._is_isotope:
|
||||||
|
|
|
@ -77,11 +77,11 @@ class ConductivityLBTEBase(ConductivityBase):
|
||||||
sigma_cutoff=None,
|
sigma_cutoff=None,
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
solve_collective_phonon=False,
|
solve_collective_phonon=False,
|
||||||
is_reducible_collision_matrix=False,
|
is_reducible_collision_matrix=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
gv_delta_q=None, # finite difference for group veolocity
|
gv_delta_q=None, # finite difference for group velocity
|
||||||
is_full_pp=False,
|
is_full_pp=False,
|
||||||
read_pp=False,
|
read_pp=False,
|
||||||
pp_filename=None,
|
pp_filename=None,
|
||||||
|
@ -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
|
||||||
|
@ -1700,7 +1700,7 @@ def get_thermal_conductivity_LBTE(
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
grid_points=None,
|
grid_points=None,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
solve_collective_phonon=False,
|
solve_collective_phonon=False,
|
||||||
is_reducible_collision_matrix=False,
|
is_reducible_collision_matrix=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
|
@ -1731,7 +1731,7 @@ def get_thermal_conductivity_LBTE(
|
||||||
if sigmas is None:
|
if sigmas is None:
|
||||||
sigmas = []
|
sigmas = []
|
||||||
if log_level:
|
if log_level:
|
||||||
print("-" * 19 + " Lattice thermal conducitivity (LBTE) " + "-" * 19)
|
print("-" * 19 + " Lattice thermal conductivity (LBTE) " + "-" * 19)
|
||||||
print(
|
print(
|
||||||
"Cutoff frequency of pseudo inversion of collision matrix: %s" % pinv_cutoff
|
"Cutoff frequency of pseudo inversion of collision matrix: %s" % pinv_cutoff
|
||||||
)
|
)
|
||||||
|
|
|
@ -76,7 +76,7 @@ class ConductivityRTABase(ConductivityBase):
|
||||||
sigma_cutoff=None,
|
sigma_cutoff=None,
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
use_ave_pp=False,
|
use_ave_pp=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
gv_delta_q=None,
|
gv_delta_q=None,
|
||||||
|
@ -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):
|
||||||
|
@ -539,7 +539,7 @@ class ConductivityRTA(ConductivityMixIn, ConductivityRTABase):
|
||||||
sigma_cutoff=None,
|
sigma_cutoff=None,
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
use_ave_pp=False,
|
use_ave_pp=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
gv_delta_q=None,
|
gv_delta_q=None,
|
||||||
|
@ -669,7 +669,7 @@ class ConductivityWignerRTA(ConductivityWignerMixIn, ConductivityRTABase):
|
||||||
sigma_cutoff=None,
|
sigma_cutoff=None,
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
use_ave_pp=False,
|
use_ave_pp=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
gv_delta_q=None,
|
gv_delta_q=None,
|
||||||
|
@ -867,7 +867,7 @@ class ConductivityKuboRTA(ConductivityKuboMixIn, ConductivityRTABase):
|
||||||
sigma_cutoff=None,
|
sigma_cutoff=None,
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
use_ave_pp=False,
|
use_ave_pp=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
gv_delta_q=None,
|
gv_delta_q=None,
|
||||||
|
@ -1010,7 +1010,7 @@ def get_thermal_conductivity_RTA(
|
||||||
mass_variances=None,
|
mass_variances=None,
|
||||||
grid_points=None,
|
grid_points=None,
|
||||||
is_isotope=False,
|
is_isotope=False,
|
||||||
boundary_mfp=None, # in micrometre
|
boundary_mfp=None, # in micrometer
|
||||||
use_ave_pp=False,
|
use_ave_pp=False,
|
||||||
is_kappa_star=True,
|
is_kappa_star=True,
|
||||||
gv_delta_q=None,
|
gv_delta_q=None,
|
||||||
|
@ -1046,7 +1046,7 @@ def get_thermal_conductivity_RTA(
|
||||||
|
|
||||||
if log_level:
|
if log_level:
|
||||||
print(
|
print(
|
||||||
"-------------------- Lattice thermal conducitivity (RTA) "
|
"-------------------- Lattice thermal conductivity (RTA) "
|
||||||
"--------------------"
|
"--------------------"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,14 +267,15 @@ 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,
|
||||||
distance_to_A=physical_units["distance_to_A"],
|
distance_to_A=physical_units["distance_to_A"],
|
||||||
force_to_eVperA=physical_units["force_to_eVperA"],
|
force_to_eVperA=physical_units["force_to_eVperA"],
|
||||||
)
|
)
|
||||||
assert dataset is not None
|
if dataset is None:
|
||||||
|
raise RuntimeError("Dataset is not found.")
|
||||||
|
|
||||||
if "natom" in dataset and dataset["natom"] != natom:
|
if "natom" in dataset and dataset["natom"] != natom:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
|
|
@ -115,7 +115,7 @@ def load(
|
||||||
|
|
||||||
When force_sets_filename and force_constants_filename are not given,
|
When force_sets_filename and force_constants_filename are not given,
|
||||||
'FORCES_FC3' and 'FORCES_FC2' are looked for in the current directory as the
|
'FORCES_FC3' and 'FORCES_FC2' are looked for in the current directory as the
|
||||||
default behaviour. When 'FORCES_FC3' ('FORCES_FC2') is given in the type-1
|
default behavior. When 'FORCES_FC3' ('FORCES_FC2') is given in the type-1
|
||||||
format, 'phono3py_disp.yaml' is also necessary and read.
|
format, 'phono3py_disp.yaml' is also necessary and read.
|
||||||
|
|
||||||
Crystal structure
|
Crystal structure
|
||||||
|
@ -140,7 +140,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
|
||||||
|
@ -166,10 +166,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.
|
||||||
|
@ -181,7 +181,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.
|
||||||
|
@ -189,7 +189,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
|
||||||
|
@ -217,7 +217,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
|
||||||
|
@ -236,10 +236,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
|
||||||
|
|
|
@ -105,7 +105,7 @@ def get_parser(fc_symmetry=False, is_nac=False, load_phono3py_yaml=False):
|
||||||
type=float,
|
type=float,
|
||||||
default=None,
|
default=None,
|
||||||
help=(
|
help=(
|
||||||
"Boundary mean free path in micrometre for thermal conductivity calculation"
|
"Boundary mean free path in micrometer for thermal conductivity calculation"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -264,7 +264,7 @@ def get_parser(fc_symmetry=False, is_nac=False, load_phono3py_yaml=False):
|
||||||
# dest="emulate_v2",
|
# dest="emulate_v2",
|
||||||
# action="store_true",
|
# action="store_true",
|
||||||
# default=False,
|
# default=False,
|
||||||
# help="Emulate v2.x behaviour.",
|
# help="Emulate v2.x behavior.",
|
||||||
# )
|
# )
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--factor",
|
"--factor",
|
||||||
|
@ -770,6 +770,14 @@ def get_parser(fc_symmetry=False, is_nac=False, load_phono3py_yaml=False):
|
||||||
default=None,
|
default=None,
|
||||||
help="Use symfc for generating force constants",
|
help="Use symfc for generating force constants",
|
||||||
)
|
)
|
||||||
|
if load_phono3py_yaml:
|
||||||
|
parser.add_argument(
|
||||||
|
"--symfc-memshow",
|
||||||
|
dest="show_symfc_memory_usage",
|
||||||
|
action="store_true",
|
||||||
|
default=None,
|
||||||
|
help="Show symfc memory usage with respect to cutoff distance",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--spf",
|
"--spf",
|
||||||
dest="is_spectral_function",
|
dest="is_spectral_function",
|
||||||
|
|
|
@ -95,6 +95,7 @@ from phono3py.file_IO import (
|
||||||
write_fc3_to_hdf5,
|
write_fc3_to_hdf5,
|
||||||
write_phonon_to_hdf5,
|
write_phonon_to_hdf5,
|
||||||
)
|
)
|
||||||
|
from phono3py.interface.fc_calculator import estimate_symfc_memory_usage
|
||||||
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
||||||
from phono3py.phonon.grid import get_grid_point_from_address, get_ir_grid_points
|
from phono3py.phonon.grid import get_grid_point_from_address, get_ir_grid_points
|
||||||
from phono3py.phonon3.dataset import forces_in_dataset
|
from phono3py.phonon3.dataset import forces_in_dataset
|
||||||
|
@ -680,7 +681,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."
|
||||||
)
|
)
|
||||||
|
@ -1042,6 +1043,30 @@ def main(**argparse_control):
|
||||||
"and supercell structures."
|
"and supercell structures."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###############################
|
||||||
|
# Memory estimation for symfc #
|
||||||
|
###############################
|
||||||
|
if settings.show_symfc_memory_usage and load_phono3py_yaml:
|
||||||
|
print("Quick estimation of memory size required for solving fc3 by symfc")
|
||||||
|
vecs, _ = ph3py.primitive.get_smallest_vectors()
|
||||||
|
dists = np.unique(
|
||||||
|
np.round(np.linalg.norm(vecs @ ph3py.primitive.cell, axis=-1), decimals=1)
|
||||||
|
)
|
||||||
|
print("cutoff memsize")
|
||||||
|
print("------ -------")
|
||||||
|
for cutoff in dists[1:] + 0.1:
|
||||||
|
memsize, memsize2 = estimate_symfc_memory_usage(
|
||||||
|
ph3py.supercell, ph3py.symmetry, cutoff
|
||||||
|
)
|
||||||
|
print(
|
||||||
|
f"{cutoff:5.1f} {memsize + memsize2:6.2f} GB "
|
||||||
|
f"({memsize:.2f}+{memsize2:.2f})"
|
||||||
|
)
|
||||||
|
|
||||||
|
if log_level:
|
||||||
|
print_end_phono3py()
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Check settings #
|
# Check settings #
|
||||||
##################
|
##################
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Phono3pySettings(Settings):
|
||||||
"""Setting parameter container."""
|
"""Setting parameter container."""
|
||||||
|
|
||||||
_default = {
|
_default = {
|
||||||
# In micrometre. The default value is just set to avoid divergence.
|
# In micrometer. The default value is just set to avoid divergence.
|
||||||
"boundary_mfp": 1.0e6,
|
"boundary_mfp": 1.0e6,
|
||||||
"conductivity_type": None,
|
"conductivity_type": None,
|
||||||
"constant_averaged_pp_interaction": None,
|
"constant_averaged_pp_interaction": None,
|
||||||
|
@ -95,6 +95,7 @@ class Phono3pySettings(Settings):
|
||||||
"sigma_cutoff_width": None,
|
"sigma_cutoff_width": None,
|
||||||
"solve_collective_phonon": False,
|
"solve_collective_phonon": False,
|
||||||
"emulate_v2": False,
|
"emulate_v2": False,
|
||||||
|
"show_symfc_memory_usage": False,
|
||||||
"subtract_forces": None,
|
"subtract_forces": None,
|
||||||
"subtract_forces_fc2": None,
|
"subtract_forces_fc2": None,
|
||||||
"temperatures": None,
|
"temperatures": None,
|
||||||
|
@ -323,6 +324,10 @@ class Phono3pySettings(Settings):
|
||||||
"""Set solve_collective_phonon."""
|
"""Set solve_collective_phonon."""
|
||||||
self._v["solve_collective_phonon"] = val
|
self._v["solve_collective_phonon"] = val
|
||||||
|
|
||||||
|
def set_show_symfc_memory_usage(self, val):
|
||||||
|
"""Set show_symfc_memory_usage."""
|
||||||
|
self._v["show_symfc_memory_usage"] = val
|
||||||
|
|
||||||
def set_subtract_forces(self, val):
|
def set_subtract_forces(self, val):
|
||||||
"""Set subtract_forces."""
|
"""Set subtract_forces."""
|
||||||
self._v["subtract_forces"] = val
|
self._v["subtract_forces"] = val
|
||||||
|
@ -615,6 +620,10 @@ class Phono3pyConfParser(ConfParser):
|
||||||
if self._args.solve_collective_phonon:
|
if self._args.solve_collective_phonon:
|
||||||
self._confs["collective_phonon"] = ".true."
|
self._confs["collective_phonon"] = ".true."
|
||||||
|
|
||||||
|
if "show_symfc_memory_usage" in self._args:
|
||||||
|
if self._args.show_symfc_memory_usage:
|
||||||
|
self._confs["show_symfc_memory_usage"] = ".true."
|
||||||
|
|
||||||
if "subtract_forces" in self._args:
|
if "subtract_forces" in self._args:
|
||||||
if self._args.subtract_forces:
|
if self._args.subtract_forces:
|
||||||
self._confs["subtract_forces"] = self._args.subtract_forces
|
self._confs["subtract_forces"] = self._args.subtract_forces
|
||||||
|
@ -695,6 +704,7 @@ class Phono3pyConfParser(ConfParser):
|
||||||
"N_U",
|
"N_U",
|
||||||
"spectral_function",
|
"spectral_function",
|
||||||
"reducible_collision_matrix",
|
"reducible_collision_matrix",
|
||||||
|
"show_symfc_memory_usage",
|
||||||
"symmetrize_fc2",
|
"symmetrize_fc2",
|
||||||
"symmetrize_fc3_q",
|
"symmetrize_fc3_q",
|
||||||
"symmetrize_fc3_r",
|
"symmetrize_fc3_r",
|
||||||
|
@ -879,7 +889,7 @@ class Phono3pyConfParser(ConfParser):
|
||||||
if "cutoff_pair_distance" in params:
|
if "cutoff_pair_distance" in params:
|
||||||
self._settings.set_cutoff_pair_distance(params["cutoff_pair_distance"])
|
self._settings.set_cutoff_pair_distance(params["cutoff_pair_distance"])
|
||||||
|
|
||||||
# Emulate v2.x behaviour
|
# Emulate v2.x behavior
|
||||||
if "emulate_v2" in params:
|
if "emulate_v2" in params:
|
||||||
self._settings.set_emulate_v2(params["emulate_v2"])
|
self._settings.set_emulate_v2(params["emulate_v2"])
|
||||||
|
|
||||||
|
@ -1035,6 +1045,12 @@ class Phono3pyConfParser(ConfParser):
|
||||||
if "scattering_event_class" in params:
|
if "scattering_event_class" in params:
|
||||||
self._settings.set_scattering_event_class(params["scattering_event_class"])
|
self._settings.set_scattering_event_class(params["scattering_event_class"])
|
||||||
|
|
||||||
|
# Show symfc memory usage
|
||||||
|
if "show_symfc_memory_usage" in params:
|
||||||
|
self._settings.set_show_symfc_memory_usage(
|
||||||
|
params["show_symfc_memory_usage"]
|
||||||
|
)
|
||||||
|
|
||||||
# Cutoff width of smearing function (ratio to sigma value)
|
# Cutoff width of smearing function (ratio to sigma value)
|
||||||
if "sigma_cutoff_width" in params:
|
if "sigma_cutoff_width" in params:
|
||||||
self._settings.set_sigma_cutoff_width(params["sigma_cutoff_width"])
|
self._settings.set_sigma_cutoff_width(params["sigma_cutoff_width"])
|
||||||
|
|
|
@ -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(
|
||||||
|
|
|
@ -39,6 +39,7 @@ from __future__ import annotations
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from phonopy.interface.symfc import SymfcFCSolver
|
||||||
from phonopy.structure.atoms import PhonopyAtoms
|
from phonopy.structure.atoms import PhonopyAtoms
|
||||||
from phonopy.structure.cells import Primitive
|
from phonopy.structure.cells import Primitive
|
||||||
from phonopy.structure.symmetry import Symmetry
|
from phonopy.structure.symmetry import Symmetry
|
||||||
|
@ -173,3 +174,21 @@ def update_cutoff_fc_calculator_options(
|
||||||
fc_calc_opts = f"cutoff = {cutoff_pair_distance}"
|
fc_calc_opts = f"cutoff = {cutoff_pair_distance}"
|
||||||
|
|
||||||
return fc_calc_opts
|
return fc_calc_opts
|
||||||
|
|
||||||
|
|
||||||
|
def estimate_symfc_memory_usage(
|
||||||
|
supercell: PhonopyAtoms, symmetry: Symmetry, cutoff: float, batch_size: int = 100
|
||||||
|
):
|
||||||
|
"""Estimate memory usage to run symfc for fc3 with cutoff.
|
||||||
|
|
||||||
|
Total memory usage is memsize + memsize2. These are separated because
|
||||||
|
they behave differently with respect to cutoff distance.
|
||||||
|
|
||||||
|
batch_size is hardcoded to 100 because it is so in symfc.
|
||||||
|
|
||||||
|
"""
|
||||||
|
symfc_solver = SymfcFCSolver(supercell, symmetry, options={"cutoff": {3: cutoff}})
|
||||||
|
basis_size = symfc_solver.estimate_basis_size(orders=[3])[3]
|
||||||
|
memsize = basis_size**2 * 3 * 8 / 10**9
|
||||||
|
memsize2 = len(supercell) * 3 * batch_size * basis_size * 8 / 10**9
|
||||||
|
return memsize, memsize2
|
||||||
|
|
|
@ -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...]
|
||||||
|
|
|
@ -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')>
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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] = (
|
||||||
|
|
|
@ -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
|
||||||
----
|
----
|
||||||
|
|
|
@ -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
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 "
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -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
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -34,4 +34,4 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
__version__ = "3.13.0"
|
__version__ = "3.14.0"
|
||||||
|
|
|
@ -16,7 +16,7 @@ dependencies = [
|
||||||
"matplotlib",
|
"matplotlib",
|
||||||
"h5py",
|
"h5py",
|
||||||
"spglib",
|
"spglib",
|
||||||
"phonopy>=2.36,<2.37",
|
"phonopy>=2.37,<2.38",
|
||||||
]
|
]
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
|
|
||||||
|
|
|
@ -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):
|
||||||
|
|
|
@ -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 = [
|
||||||
[
|
[
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue