Skip to content

Commit 451227a

Browse files
authored
Nbands convergence check (vasp)
Transfer pyiron/pyiron#1080
1 parent e7ba3b6 commit 451227a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pyiron_atomistics/dft/job/generic.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,16 @@ def calc_md(
337337
time_step=time_step,
338338
)
339339

340+
def nbands_convergence_check(self):
341+
"""
342+
Function to check the convergence of nbands in the Vasp calculation
343+
344+
Returns:
345+
346+
bool : True if the highest band is unoccupied, False if the highest band is occupied
347+
"""
348+
return np.all(np.isclose(self["output/electronic_structure/occ_matrix"][:,:,-1], 0)) #shape is n_spin x n_kpoints x n_bands
349+
340350
# Backward compatibility
341351
def get_encut(self):
342352
return self.encut

0 commit comments

Comments
 (0)