Skip to content

Commit

Permalink
Minor tweaks to make refactored DFPT workflow work
Browse files Browse the repository at this point in the history
  • Loading branch information
elinscott committed Jun 24, 2024
1 parent 3e64d39 commit 62a5b04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/koopmans/workflows/_koopmans_dfpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ def _run(self):
if self._perform_ham_calc:
kc_ham_calc = self.new_calculator('kc_ham', kpts=self.kpoints.path)
self.link(wann2kc_calc, wann2kc_calc.parameters.outdir, kc_ham_calc, kc_ham_calc.parameters.outdir)
if self.parameters.calculate_alpha and self.parameters.dfpt_coarse_grid is None:
if kc_ham_calc.parameters.lrpa != kc_screen_calc.parameters.lrpa:
raise ValueError('Do not set "lrpa" to different values in the "screen" and "ham" blocks')
self.run_calculator(kc_ham_calc)

# Postprocessing
Expand Down
2 changes: 1 addition & 1 deletion src/koopmans/workflows/_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ def _parent_context(self, subdirectory: Optional[str] = None,
# Add the alpha and error history if the length of the bands match
if len(self.parent.bands) == len(self.bands):
for b, b_sub in zip(self.parent.bands, self.bands):
b.alpha_history += b_sub.alpha_history[1:]
b.alpha_history += b_sub.alpha_history
b.error_history += b_sub.error_history
b.self_hartree = b_sub.self_hartree
b.spread = b_sub.spread
Expand Down

0 comments on commit 62a5b04

Please sign in to comment.