Skip to content

Commit

Permalink
revert to strict=False for some zip
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Sep 29, 2024
1 parent e9ea813 commit eb59d90
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pymatgen/io/cp2k/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def parse_structures(self, trajectory_file=None, lattice_file=None):
self.structures = []
gs = self.initial_structure.site_properties.get("ghost")
if not self.is_molecule:
for mol, latt in zip(mols, lattices, strict=True):
for mol, latt in zip(mols, lattices, strict=False):
self.structures.append(
Structure(
lattice=latt,
Expand Down Expand Up @@ -520,7 +520,7 @@ def parse_ionic_steps(self):
if not self.data.get("stress_tensor"):
self.parse_stresses()

for i, (structure, energy) in enumerate(zip(self.structures, self.data.get("total_energy"), strict=True)):
for i, (structure, energy) in enumerate(zip(self.structures, self.data.get("total_energy"), strict=False)):
self.ionic_steps.append(
{
"structure": structure,
Expand Down Expand Up @@ -627,8 +627,8 @@ def parse_dft_params(self):
suffix = ""
for ll in self.data.get("vdw"):
for _possible, _name in zip(
["RVV10", "LMKLL", "DRSLL", "DFT-D3", "DFT-D2"],
["RVV10", "LMKLL", "DRSLL", "D3", "D2"],
("RVV10", "LMKLL", "DRSLL", "DFT-D3", "DFT-D2"),
("RVV10", "LMKLL", "DRSLL", "D3", "D2"),
strict=True,
):
if _possible in ll[0]:
Expand Down Expand Up @@ -1463,7 +1463,7 @@ def _gauss_smear(densities, energies, npts, width):
dct = np.zeros(npts)
e_s = np.linspace(min(energies), max(energies), npts)

for e, _pd in zip(energies, densities, strict=True):
for e, _pd in zip(energies, densities, strict=False):
weight = np.exp(-(((e_s - e) / width) ** 2)) / (np.sqrt(np.pi) * width)
dct += _pd * weight

Expand Down

0 comments on commit eb59d90

Please sign in to comment.