Skip to content

Commit

Permalink
More cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Mar 22, 2022
1 parent bae95d5 commit d34bb96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pymatgen/core/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2063,8 +2063,9 @@ def factors(n):
if all(getattr(p_latt, pp) == getattr(s_latt, pp) for pp in constrain_latt):
return p
elif type(constrain_latt).__name__ == "dict":
if all(getattr(p_latt, pp) == constrain_latt[pp]
for pp in constrain_latt.keys()): # type: ignore
if all(
getattr(p_latt, pp) == constrain_latt[pp] for pp in constrain_latt.keys() # type: ignore
):
return p

return self.copy()
Expand Down
3 changes: 2 additions & 1 deletion pymatgen/electronic_structure/boltztrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ def write_intrans(self, output_file):
with open(output_file, "w") as fout:
fout.write("GENE # use generic interface\n")
fout.write(
f"1 0 {setgap} {Energy(self.scissor, 'eV').to('Ry')} # iskip (not presently used) idebug setgap shiftgap \n"
f"1 0 {setgap} {Energy(self.scissor, 'eV').to('Ry')} "
"# iskip (not presently used) idebug setgap shiftgap \n"
)
fout.write(
"0.0 %f %f %6.1f # Fermilevel (Ry),energygrid,energy "
Expand Down

0 comments on commit d34bb96

Please sign in to comment.