Skip to content

Commit ed0e8ec

Browse files
linting
1 parent 04eb1ad commit ed0e8ec

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

pymatgen/io/vasp/inputs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,8 +2737,8 @@ def __init__(
27372737
incar: dict | Incar,
27382738
kpoints: Kpoints | None,
27392739
poscar: Poscar,
2740-
potcar: Potcar | list[str] | None,
2741-
potcar_spec : bool = False,
2740+
potcar: Potcar | str | None,
2741+
potcar_spec: bool = False,
27422742
optional_files: dict[PathLike, object] | None = None,
27432743
**kwargs,
27442744
) -> None:
@@ -2749,7 +2749,7 @@ def __init__(
27492749
incar (Incar): The Incar object.
27502750
kpoints (Kpoints): The Kpoints object.
27512751
poscar (Poscar): The Poscar object.
2752-
potcar (Potcar or list[str]): The Potcar object.
2752+
potcar (Potcar or str): The Potcar object.
27532753
potcar_spec (bool = False) : used to share POTCAR info without license issues.
27542754
True --> POTCAR is a list of symbols, write POTCAR.spec
27552755
False --> POTCAR is a VASP POTCAR, write POTCAR

pymatgen/io/vasp/sets.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class DictSet(VaspInputSet):
385385
international_monoclinic: bool = True
386386
validate_magmom: bool = True
387387
inherit_incar: bool | list[str] = False
388-
auto_kspacing : bool = False
388+
auto_kspacing: bool = False
389389
auto_ismear: bool = False
390390
auto_ispin: bool = False
391391
auto_lreal: bool = False
@@ -414,7 +414,7 @@ def __post_init__(self):
414414
# self.user_kpoints_settings will never be `None` because it is set to
415415
# an empty dict if it is `None`.
416416
warnings.warn(
417-
f"You have specified KSPACING and also supplied KPOINTS "
417+
"You have specified KSPACING and also supplied KPOINTS "
418418
"settings. KSPACING only has effect when there is no "
419419
"KPOINTS file. Since both settings were given, pymatgen"
420420
"will generate a KPOINTS file and ignore KSPACING."
@@ -553,8 +553,8 @@ def get_input_set(
553553
incar=self.incar,
554554
kpoints=self.kpoints,
555555
poscar=self.poscar,
556-
potcar= "\n".join(self.potcar_symbols) if potcar_spec else self.potcar,
557-
potcar_spec = potcar_spec
556+
potcar="\n".join(self.potcar_symbols) if potcar_spec else self.potcar,
557+
potcar_spec=potcar_spec,
558558
)
559559

560560
@property
@@ -615,7 +615,7 @@ def incar(self) -> Incar:
615615

616616
# breaking change - order in which settings applied inconsistent with atomate2
617617
# apply updates from input set generator to SETTINGS
618-
#_apply_incar_updates(settings, incar_updates)
618+
# _apply_incar_updates(settings, incar_updates)
619619

620620
# apply user incar settings to SETTINGS not to INCAR
621621
_apply_incar_updates(settings, self.user_incar_settings)
@@ -633,7 +633,7 @@ def incar(self) -> Incar:
633633
if key == "MAGMOM":
634634
mag = []
635635
for site in structure:
636-
if uic_magmom := self.user_incar_settings.get("MAGMOM",{}).get(site.species_string):
636+
if uic_magmom := self.user_incar_settings.get("MAGMOM", {}).get(site.species_string):
637637
mag.append(uic_magmom)
638638
elif hasattr(site, "magmom"):
639639
mag.append(site.magmom)
@@ -740,7 +740,7 @@ def incar(self) -> Incar:
740740
"Hybrid functionals only support Algo = All, Damped, or Normal.",
741741
BadInputSetWarning,
742742
)
743-
743+
744744
if self.auto_ismear:
745745
if self.bandgap is None:
746746
# don't know if we are a metal or insulator so set ISMEAR and SIGMA to
@@ -821,11 +821,9 @@ def poscar(self) -> Poscar:
821821
site_properties = self.structure.site_properties
822822
return Poscar(
823823
self.structure,
824-
velocities = site_properties.get("velocities"),
824+
velocities=site_properties.get("velocities"),
825825
predictor_corrector=site_properties.get("predictor_corrector"),
826-
predictor_corrector_preamble = self.structure.properties.get(
827-
"predictor_corrector_preamble"
828-
),
826+
predictor_corrector_preamble=self.structure.properties.get("predictor_corrector_preamble"),
829827
lattice_velocities=self.structure.properties.get("lattice_velocities"),
830828
)
831829

@@ -1350,7 +1348,7 @@ class MPScanRelaxSet(DictSet):
13501348
"""
13511349

13521350
bandgap: float | None = None
1353-
auto_kspacing : bool = True
1351+
auto_kspacing: bool = True
13541352
user_potcar_functional: UserPotcarFunctional = "PBE_54"
13551353
auto_ismear: bool = True
13561354
CONFIG = _load_yaml_config("MPSCANRelaxSet")
@@ -1365,6 +1363,7 @@ def __post_init__(self):
13651363
for k in vdw_par[self.vdw]:
13661364
self._config_dict["INCAR"].pop(k, None)
13671365

1366+
13681367
@dataclass
13691368
class MPMetalRelaxSet(DictSet):
13701369
"""
@@ -1526,6 +1525,7 @@ def __post_init__(self):
15261525
if self.xc_functional.upper().endswith("+U"):
15271526
self._config_dict["INCAR"]["LDAU"] = True
15281527

1528+
15291529
@dataclass
15301530
class MPScanStaticSet(MPScanRelaxSet):
15311531
"""Create input files for a static calculation using the accurate and numerically
@@ -1545,7 +1545,7 @@ class MPScanStaticSet(MPScanRelaxSet):
15451545
lepsilon: bool = False
15461546
lcalcpol: bool = False
15471547
inherit_incar: bool = True
1548-
auto_kspacing : bool = True
1548+
auto_kspacing: bool = True
15491549

15501550
@property
15511551
def incar_updates(self) -> dict:

0 commit comments

Comments
 (0)