Skip to content

Commit

Permalink
update parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
t-reents authored and mbercx committed May 10, 2023
1 parent c80b9a7 commit f9d5ef0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/aiida_quantumespresso/workflows/pdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ def _generate_dos_inputs(self):
dos_inputs = AttributeDict(self.exposed_inputs(DosCalculation, 'dos'))
dos_inputs.parent_folder = self.ctx.nscf_parent_folder
dos_parameters = self.inputs.dos.parameters.get_dict()
fermi_energy_range = self.inputs.fermi_energy_range
energy_range_vs_fermi = self.inputs.energy_range_vs_fermi

if fermi_energy_range:
dos_parameters['DOS']['Emin'] = fermi_energy_range[0] + self.ctx.nscf_fermi
dos_parameters['DOS']['Emax'] = fermi_energy_range[1] + self.ctx.nscf_fermi
if energy_range_vs_fermi:
dos_parameters['DOS']['Emin'] = energy_range_vs_fermi[0] + self.ctx.nscf_fermi
dos_parameters['DOS']['Emax'] = energy_range_vs_fermi[1] + self.ctx.nscf_fermi
else:
dos_parameters['DOS'].setdefault('Emin', self.ctx.nscf_emin)
dos_parameters['DOS'].setdefault('Emax', self.ctx.nscf_emax)
Expand All @@ -498,11 +498,11 @@ def _generate_projwfc_inputs(self):
projwfc_inputs = AttributeDict(self.exposed_inputs(ProjwfcCalculation, 'projwfc'))
projwfc_inputs.parent_folder = self.ctx.nscf_parent_folder
projwfc_parameters = self.inputs.projwfc.parameters.get_dict()
fermi_energy_range = self.inputs.fermi_energy_range
energy_range_vs_fermi = self.inputs.energy_range_vs_fermi

if fermi_energy_range:
projwfc_parameters['PROJWFC']['Emin'] = fermi_energy_range[0] + self.ctx.nscf_fermi
projwfc_parameters['PROJWFC']['Emax'] = fermi_energy_range[1] + self.ctx.nscf_fermi
if energy_range_vs_fermi:
projwfc_parameters['PROJWFC']['Emin'] = energy_range_vs_fermi[0] + self.ctx.nscf_fermi
projwfc_parameters['PROJWFC']['Emax'] = energy_range_vs_fermi[1] + self.ctx.nscf_fermi
else:
projwfc_parameters['PROJWFC'].setdefault('Emin', self.ctx.nscf_emin)
projwfc_parameters['PROJWFC'].setdefault('Emax', self.ctx.nscf_emax)
Expand Down

0 comments on commit f9d5ef0

Please sign in to comment.