diff --git a/aiida_sssp_workflow/protocol/control.yml b/aiida_sssp_workflow/protocol/control.yml index b207bb87..3f236577 100644 --- a/aiida_sssp_workflow/protocol/control.yml +++ b/aiida_sssp_workflow/protocol/control.yml @@ -3,7 +3,7 @@ precheck: description: run on 150 v.s 200 v.s 300 Ry wavefunction cutoff with fix dual to give sense whether 200 Ry enough # max_wfc: 0 # Not used if run precision measurement veri with this protocol, just raise exception. - wfc_scan: [150, 200, 300] # at fix rho + wfc_scan: [150, 200, 300] # at fix dual nc_dual_scan: [] # set empty so rho test not run nonnc_dual_scan: [] nonnc_high_dual_scan: [] @@ -12,7 +12,7 @@ standard: description: high wavefunction cutoff set and cutoffs dense interval therefore time consuming max_wfc: 200 # The max wfc cut for precision measurement - wfc_scan: [30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 90, 100, 120, 150, 200] # at fix rho + wfc_scan: [30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 90, 100, 120, 150, 200] # at fix dual nc_dual_scan: [2.0, 2.5, 3.0, 3.5, 4.0] # at fix wfc nonnc_dual_scan: [6.0, 6.5, 7.0, 7.5, 8.0] nonnc_high_dual_scan: [8.0, 9.0, 10.0, 12.0, 16.0, 18.0] @@ -21,7 +21,7 @@ quick: description: low wavefunction cutoff set and cutoffs sparse interval therefore can run on local max_wfc: 200 # The max wfc cut for precision measurement - wfc_scan: [30, 40, 50, 60, 75, 100, 150, 200] # at fix rho + wfc_scan: [30, 40, 50, 60, 75, 100, 150, 200] # at fix dual nc_dual_scan: [3.0, 3.5, 4.0] # at fix wfc nonnc_dual_scan: [6.0, 7.0, 8.0] nonnc_high_dual_scan: [8.0, 10.0, 12.0, 18.0] @@ -30,7 +30,7 @@ test: description: test only max_wfc: 35 # The max wfc cut for precision measurement - wfc_scan: [30, 35] # at fix rho + wfc_scan: [30, 35] # at fix dual nc_dual_scan: [] # at fix wfc nonnc_dual_scan: [] # at fix rho nonnc_high_dual_scan: [8.0, 12.0] @@ -39,7 +39,7 @@ opsp: description: To running opsp verification, make the calculations finished fast. max_wfc: 40 # The max wfc cut for precision measurement - wfc_scan: [30, 35] # at fix rho + wfc_scan: [30, 35] # at fix dual nc_dual_scan: [2.0, 4.0] # at fix wfc nonnc_dual_scan: [6.0, 8.0] nonnc_high_dual_scan: [8.0, 12.0] diff --git a/aiida_sssp_workflow/workflows/evaluate/_bands.py b/aiida_sssp_workflow/workflows/evaluate/_bands.py index ca5ce495..c6260b69 100644 --- a/aiida_sssp_workflow/workflows/evaluate/_bands.py +++ b/aiida_sssp_workflow/workflows/evaluate/_bands.py @@ -170,13 +170,17 @@ def inspect_bands(self): # -1 colume for the highest eigenvalue of every kpoints # which might not be belong to one band if there are degeneracy # not enough until eigenvalues of all kpoints are greater than shift value. - highest_band = bands[:, -1] + if bands.ndim == 2: + highest_band = bands[:, -1] + elif bands.ndim == 3: + # for magnetization structure, the bands are 3d array. + highest_band = bands[:, :, -1] if np.all(highest_band > fermi_energy + self.inputs.fermi_shift.value): self.ctx.should_run_bands = False else: self.report( - f"highest band eigenvalue above fermi is {min(highest_band) - fermi_energy}, not enough, you want {self.inputs.fermi_shift.value}." + f"highest band eigenvalue above fermi is {highest_band.min() - fermi_energy}, not enough, you want {self.inputs.fermi_shift.value}." ) self.ctx.ecutwfc = workchain.inputs.scf.pw.parameters["SYSTEM"]["ecutwfc"]