Skip to content

Commit

Permalink
adapting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresOrtegaGuerrero committed Nov 20, 2024
1 parent 115f6a8 commit 1a3447c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/aiida_quantumespresso/workflows/pdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,23 +429,23 @@ def run_nscf(self):
"""
inputs = AttributeDict(self.exposed_inputs(PwBaseWorkChain, 'nscf'))

if 'scf' in self.inputs:
inputs.pw.parent_folder = self.ctx.scf_parent_folder

if 'nbands_factor' in self.inputs:
factor = self.inputs.nbands_factor.value
parameters = self.ctx.workchain_scf.outputs.output_parameters.get_dict()
nbands = int(parameters['number_of_bands'])
nelectron = int(parameters['number_of_electrons'])
nbnd = max(int(0.5 * nelectron * factor), int(0.5 * nelectron) + 4, nbands)
inputs.pw.parameters['SYSTEM']['nbnd'] = nbnd
if 'nbands_factor' in self.inputs:
inputs.pw.parameters = inputs.pw.parameters.get_dict()
factor = self.inputs.nbands_factor.value
parameters = self.ctx.workchain_scf.outputs.output_parameters.get_dict()
nbands = int(parameters['number_of_bands'])
nelectron = int(parameters['number_of_electrons'])
nbnd = max(int(0.5 * nelectron * factor), int(0.5 * nelectron) + 4, nbands)
inputs.pw.parameters['SYSTEM']['nbnd'] = nbnd

inputs.pw.structure = self.inputs.structure

inputs.metadata.call_link_label = 'nscf'



inputs = prepare_process_inputs(PwBaseWorkChain, inputs)

if self.ctx.dry_run:
Expand Down

0 comments on commit 1a3447c

Please sign in to comment.