diff --git a/sumo/cli/bandplot.py b/sumo/cli/bandplot.py index 9748af94..6bd43473 100644 --- a/sumo/cli/bandplot.py +++ b/sumo/cli/bandplot.py @@ -387,9 +387,7 @@ def bandplot( else: logging.info(f"Found PDOS file {pdos_file}") else: - logging.info( - f"Cell file {cell_file} does not exist, " "cannot plot PDOS." - ) + logging.info(f"Cell file {cell_file} does not exist, cannot plot PDOS.") dos, pdos = read_castep_dos( dos_file, @@ -641,13 +639,13 @@ def _get_parser(): "--mode", default="rgb", type=str, - help=("mode for orbital projections (options: rgb, " "stacked)"), + help=("mode for orbital projections (options: rgb, stacked)"), ) parser.add_argument( "--normalise", default="all", type=str, - help=("how to normalise projections (options: all, " "select)"), + help=("how to normalise projections (options: all, select)"), ) parser.add_argument( "--interpolate-factor", @@ -655,7 +653,7 @@ def _get_parser(): default=4, dest="interpolate_factor", metavar="N", - help=("interpolate factor for band structure " "projections (default: 4)"), + help=("interpolate factor for band structure projections (default: 4)"), ) parser.add_argument( "--cartesian", diff --git a/sumo/cli/bandstats.py b/sumo/cli/bandstats.py index d7d63e78..bd5a4a21 100644 --- a/sumo/cli/bandstats.py +++ b/sumo/cli/bandstats.py @@ -333,7 +333,7 @@ def _get_parser(): "--nonparabolic", default=True, action="store_false", - help=("use a nonparabolic model to fit the " "effective masses"), + help=("use a nonparabolic model to fit the effective masses"), ) parser.add_argument( "-s", diff --git a/sumo/cli/dosplot.py b/sumo/cli/dosplot.py index 0df40fbc..97b3ddca 100644 --- a/sumo/cli/dosplot.py +++ b/sumo/cli/dosplot.py @@ -285,7 +285,7 @@ def dosplot( if shift: logging.warning( - "Fermi level shift requested, but not implemented " "for Questaal DOS." + "Fermi level shift requested, but not implemented for Questaal DOS." ) dos, pdos = sumo.io.questaal.read_dos( diff --git a/sumo/cli/kgen.py b/sumo/cli/kgen.py index 87efa6e9..0f06fd9e 100644 --- a/sumo/cli/kgen.py +++ b/sumo/cli/kgen.py @@ -256,10 +256,10 @@ def _parse_ibzkpt(ibzkpt): try: ibz = Kpoints.from_file(ibzkpt) if ibz.tet_number != 0: - logging.error("\nERROR: IBZKPT contains tetrahedron " "information.") + logging.error("\nERROR: IBZKPT contains tetrahedron information.") sys.exit() except OSError: - logging.error("\nERROR: Hybrid specified but no IBZKPT file " "found.") + logging.error("\nERROR: Hybrid specified but no IBZKPT file found.") sys.exit() else: ibz = None diff --git a/sumo/cli/phonon_bandplot.py b/sumo/cli/phonon_bandplot.py index 2c8fe3aa..4bac8105 100644 --- a/sumo/cli/phonon_bandplot.py +++ b/sumo/cli/phonon_bandplot.py @@ -520,14 +520,14 @@ def _get_parser(): metavar="M", dest="primitive_axis", default=None, - help="conventional to primitive cell " "transformation matrix", + help="conventional to primitive cell transformation matrix", ) prim_axis.add_argument( "--primitive-auto", action="store_const", dest="primitive_axis", const="auto", - help="Let phonopy automatically determine primitive" " cell transformation", + help="Let phonopy automatically determine primitive cell transformation", ) parser.add_argument( "--symprec", @@ -541,7 +541,7 @@ def _get_parser(): metavar="UNITS", default="THz", choices=("THz", "thz", "cm-1", "eV", "ev", "meV", "mev"), - help=("choose units of phonon frequency " "(THz, cm-1, eV, meV)"), + help=("choose units of phonon frequency (THz, cm-1, eV, meV)"), ) parser.add_argument( "--spg", type=str, default=None, help="space group number or symbol" @@ -569,13 +569,13 @@ def _get_parser(): "--kpoints", type=str, default=None, - help=("specify a list of kpoints " '(e.g. "0 0 0, 0.5 0 0")'), + help=('specify a list of kpoints (e.g. "0 0 0, 0.5 0 0")'), ) parser.add_argument( "--labels", type=str, default=None, - help=("specify the labels for kpoints " r'(e.g. "\Gamma,X")'), + help=r'specify the labels for kpoints (e.g. "\Gamma,X")', ) parser.add_argument( "--height", type=float, default=None, help="height of the graph" @@ -639,7 +639,7 @@ def _get_parser(): type=str, default=None, dest="to_web", - help="(Output JSON file for " "http://henriquemiranda.github.io/phononwebsite)", + help="(Output JSON file for http://henriquemiranda.github.io/phononwebsite)", ) parser.add_argument( "--legend", diff --git a/sumo/io/castep.py b/sumo/io/castep.py index ab81748d..708213dc 100644 --- a/sumo/io/castep.py +++ b/sumo/io/castep.py @@ -347,7 +347,7 @@ def read_dos( if pdos_file is not None and not total_only: if cell_file is None: raise OSError( - f"Cell file {cell_file} not found: this must be " "provided for PDOS." + f"Cell file {cell_file} not found: this must be provided for PDOS." ) pdos_raw = compute_pdos(pdos_file, eigenvalues, weights, bins) # Also we, need to read the structure, but have it sorted with increasing @@ -481,7 +481,7 @@ def labels_from_cell(cell_file, phonon=False): while blockstart.match(line.lower()) is None: line = f.readline() if line == "": - logging.error("Could not find start of k-point block in " "cell file.") + logging.error("Could not find start of k-point block in cell file.") sys.exit() line = f.readline() # Skip past block start line @@ -494,7 +494,7 @@ def labels_from_cell(cell_file, phonon=False): labels[label] = kpt line = f.readline() if line == "": - logging.error("Could not find end of k-point block in " "cell file.") + logging.error("Could not find end of k-point block in cell file.") sys.exit() return labels diff --git a/sumo/io/questaal.py b/sumo/io/questaal.py index 7db751e6..57476a07 100644 --- a/sumo/io/questaal.py +++ b/sumo/io/questaal.py @@ -248,12 +248,12 @@ def _get_structure_from_spcgrp(self): ) self.lattice["GAMMA"] = 120 else: - logging.info("Lattice angle GAMMA not given, " "assume right-angle") + logging.info("Lattice angle GAMMA not given, assume right-angle") self.lattice["GAMMA"] = 90 if self.cartesian: logging.info( - "Warning: Cartesian positions used without " "explicit lattice vectors" + "Warning: Cartesian positions used without explicit lattice vectors" ) if "UNITS" not in self.lattice or self.lattice["UNITS"] is None: @@ -562,7 +562,7 @@ def write_kpoint_files( if e.errno == errno.EEXIST: import sys - logging.error("\nERROR: Folders already exist, won't " "overwrite.") + logging.error("\nERROR: Folders already exist, won't overwrite.") sys.exit() else: raise diff --git a/sumo/io/vasp.py b/sumo/io/vasp.py index 57b266d4..12c30825 100644 --- a/sumo/io/vasp.py +++ b/sumo/io/vasp.py @@ -107,7 +107,7 @@ def write_kpoint_files( os.makedirs(folder) except OSError as e: if e.errno == errno.EEXIST: - logging.error("\nERROR: Folders already exist, won't " "overwrite.") + logging.error("\nERROR: Folders already exist, won't overwrite.") sys.exit() else: raise diff --git a/sumo/plotting/dos_plotter.py b/sumo/plotting/dos_plotter.py index 259e65a7..2d9b0111 100644 --- a/sumo/plotting/dos_plotter.py +++ b/sumo/plotting/dos_plotter.py @@ -158,7 +158,7 @@ def dos_plot_data( energy_shift = -dos.efermi if zero_to_efermi else 0.0 elif zero_to_efermi: raise ValueError( - "Cannot use zero_energy and " "zero_to_efermi simultaneously." + "Cannot use zero_energy and zero_to_efermi simultaneously." ) else: energy_shift = -zero_energy