Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using base attribute to get number_of_bands
Browse files Browse the repository at this point in the history
AndresOrtegaGuerrero committed Nov 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d4057cc commit 2a94358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aiida_quantumespresso/workflows/pdos.py
Original file line number Diff line number Diff line change
@@ -434,7 +434,7 @@ def run_nscf(self):

if 'nbands_factor' in self.inputs:
factor = self.inputs.nbands_factor.value
parameters = self.ctx.workchain_scf.outputs.output_parameters.get_dict()
parameters = self.ctx.workchain_scf.outputs.output_parameters.base.attributes.get('number_of_bands')
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)

0 comments on commit 2a94358

Please sign in to comment.