Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/pymatgen/io/vasp/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,7 @@ def __init__(self, filename: PathLike) -> None:
self.final_energy = e0
self.final_energy_wo_entrp = e_wo_entrp
self.final_fr_energy = e_fr_energy
self.data: dict = {}
self.data: dict[str, Any] = {}

# Read "number of bands" (NBANDS)
self.read_pattern(
Expand Down Expand Up @@ -2202,11 +2202,11 @@ def __init__(self, filename: PathLike) -> None:

# Check if calculation is spin polarized
self.read_pattern({"spin": r"ISPIN\s*=\s*2"})
self.spin = bool(self.data.get("spin", []))
self.spin = bool(self.data.get("spin", False))

# Check if calculation is non-collinear
self.read_pattern({"noncollinear": r"LNONCOLLINEAR\s*=\s*T"})
self.noncollinear = bool(self.data.get("noncollinear", []))
self.noncollinear = bool(self.data.get("noncollinear", False))

# Check if the calculation type is DFPT
self.read_pattern(
Expand All @@ -2222,7 +2222,7 @@ def __init__(self, filename: PathLike) -> None:

# Check if LEPSILON is True and read piezo data if so
self.read_pattern({"epsilon": r"LEPSILON\s*=\s*T"})
if self.data.get("epsilon", []):
if self.data.get("epsilon", False):
self.lepsilon = True
self.read_lepsilon()
# Only read ionic contribution if DFPT is turned on
Expand All @@ -2233,7 +2233,7 @@ def __init__(self, filename: PathLike) -> None:

# Check if LCALCPOL is True and read polarization data if so
self.read_pattern({"calcpol": r"LCALCPOL\s*=\s*T"})
if self.data.get("calcpol", []):
if self.data.get("calcpol", False):
self.lcalcpol = True
self.read_lcalcpol()
self.read_pseudo_zval()
Expand All @@ -2245,7 +2245,7 @@ def __init__(self, filename: PathLike) -> None:
self.ngf = None
self.sampling_radii: list[float] | None = None
self.read_pattern({"electrostatic": r"average \(electrostatic\) potential at core"})
if self.data.get("electrostatic", []):
if self.data.get("electrostatic", False):
self.read_electrostatic_potential()

self.read_pattern({"nmr_cs": r"LCHIMAG\s*=\s*(T)"})
Expand Down
Loading