diff --git a/phono3py/conductivity/base.py b/phono3py/conductivity/base.py index 4e750b16..4e5d04af 100644 --- a/phono3py/conductivity/base.py +++ b/phono3py/conductivity/base.py @@ -128,7 +128,7 @@ def kappa(self): def get_kappa(self): """Return kappa.""" warnings.warn( - "Use attribute, Conductivity.kappa " "instead of Conductivity.get_kappa().", + "Use attribute, Conductivity.kappa instead of Conductivity.get_kappa().", DeprecationWarning, stacklevel=2, ) @@ -550,7 +550,7 @@ def gamma(self, gamma): def get_gamma(self): """Return gamma.""" warnings.warn( - "Use attribute, Conductivity.gamma " "instead of Conductivity.get_gamma().", + "Use attribute, Conductivity.gamma instead of Conductivity.get_gamma().", DeprecationWarning, stacklevel=2, ) @@ -559,7 +559,7 @@ def get_gamma(self): def set_gamma(self, gamma): """Set gamma.""" warnings.warn( - "Use attribute, Conductivity.gamma " "instead of Conductivity.set_gamma().", + "Use attribute, Conductivity.gamma instead of Conductivity.set_gamma().", DeprecationWarning, stacklevel=2, ) @@ -603,8 +603,7 @@ def sigmas(self): def get_sigmas(self): """Return sigmas.""" warnings.warn( - "Use attribute, Conductivity.sigmas " - "instead of Conductivity.get_sigmas().", + "Use attribute, Conductivity.sigmas instead of Conductivity.get_sigmas().", DeprecationWarning, stacklevel=2, ) diff --git a/phono3py/conductivity/direct_solution.py b/phono3py/conductivity/direct_solution.py index 8bca4a8b..21f5e790 100644 --- a/phono3py/conductivity/direct_solution.py +++ b/phono3py/conductivity/direct_solution.py @@ -730,7 +730,7 @@ def _average_collision_matrix_by_degeneracy(self): # Average matrix elements belonging to degenerate bands if self._log_level: sys.stdout.write( - "- Averaging collision matrix elements " "by phonon degeneracy " + "- Averaging collision matrix elements by phonon degeneracy " ) sys.stdout.flush() diff --git a/phono3py/cui/kaccum_script.py b/phono3py/cui/kaccum_script.py index b32d327f..c08ac3c7 100644 --- a/phono3py/cui/kaccum_script.py +++ b/phono3py/cui/kaccum_script.py @@ -230,7 +230,7 @@ def _get_parser(): parser.add_argument( "--trace", action="store_true", - help=("Output the traces of the tensors " "rather than the unique elements"), + help=("Output the traces of the tensors rather than the unique elements"), ) parser.add_argument( "--smearing", @@ -329,7 +329,7 @@ def main(): conditions = frequencies > 0 if np.logical_not(conditions).sum() > 3: sys.stderr.write( - "# Imaginary frequencies are found. " "They are set to be zero.\n" + "# Imaginary frequencies are found. They are set to be zero.\n" ) frequencies = np.where(conditions, frequencies, 0) diff --git a/phono3py/file_IO.py b/phono3py/file_IO.py index e8f6fb5e..40aa472c 100644 --- a/phono3py/file_IO.py +++ b/phono3py/file_IO.py @@ -1333,7 +1333,7 @@ def read_pp_from_hdf5( # check_consistency==True in write_pp_to_hdf5 required. if check_consistency and g_zero is not None: if verbose: - print("Checking consistency of ph-ph interanction " "strength.") + print("Checking consistency of ph-ph interanction strength.") assert (g_zero == f["g_zero"][:]).all() assert np.allclose(pp, f["pp"][:]) else: diff --git a/phono3py/phonon/grid.py b/phono3py/phonon/grid.py index 972f481d..31c596fc 100644 --- a/phono3py/phonon/grid.py +++ b/phono3py/phonon/grid.py @@ -741,7 +741,7 @@ def _get_mock_symmetry_dataset(self, transformation_matrix) -> dict: tmat_inv = np.linalg.inv(transformation_matrix) tmat_inv_int = np.rint(tmat_inv).astype(int) if (tmat_inv - tmat_inv_int > 1e-8).all(): - msg = "Inverse of transformation matrix has to be an " "integer matrix." + msg = "Inverse of transformation matrix has to be an integer matrix." raise RuntimeError(msg) if determinant(tmat_inv_int) < 0: msg = "Determinant of transformation matrix has to be positive." diff --git a/phono3py/phonon3/imag_self_energy.py b/phono3py/phonon3/imag_self_energy.py index 6c06a86b..ba9c4018 100644 --- a/phono3py/phonon3/imag_self_energy.py +++ b/phono3py/phonon3/imag_self_energy.py @@ -732,7 +732,7 @@ def get_imag_self_energy( "--------------------" ) print("Grid point: %d" % gp) - print("Number of ir-triplets: " "%d / %d" % (len(weights), weights.sum())) + print("Number of ir-triplets: %d / %d" % (len(weights), weights.sum())) ise.run_interaction() frequencies = interaction.get_phonons()[0][gp] diff --git a/phono3py/phonon3/interaction.py b/phono3py/phonon3/interaction.py index c4555bb5..f58c61e4 100644 --- a/phono3py/phonon3/interaction.py +++ b/phono3py/phonon3/interaction.py @@ -261,7 +261,7 @@ def fc3(self) -> np.ndarray: def get_fc3(self): """Return fc3.""" warnings.warn( - "Use attribute, Interaction.fc3 " "instead of Interaction.get_fc3().", + "Use attribute, Interaction.fc3 instead of Interaction.get_fc3().", DeprecationWarning, stacklevel=2, ) @@ -693,12 +693,12 @@ def set_phonon_data(self, frequencies, eigenvectors, bz_grid_addresses): """Set phonons on grid.""" if bz_grid_addresses.shape != self._bz_grid.addresses.shape: raise RuntimeError( - "Input grid address size is inconsistent. " "Setting phonons faild." + "Input grid address size is inconsistent. Setting phonons faild." ) if (self._bz_grid.addresses - bz_grid_addresses).all(): raise RuntimeError( - "Input grid addresses are inconsistent. " "Setting phonons faild." + "Input grid addresses are inconsistent. Setting phonons faild." ) else: self._phonon_done[:] = 1 @@ -797,7 +797,7 @@ def run_phonon_solver_with_eigvec_rotation(self): bz_grid_points_solved = self._get_phonons_at_minus_q() if bz_grid_points_solved: - print("DEBUG: BZ-grid points additionally solved " "than ir-grid-points.") + print("DEBUG: BZ-grid points additionally solved than ir-grid-points.") qpoints = np.dot( self._bz_grid.addresses[bz_grid_points_solved] / self._bz_grid.D_diag.astype("double"),