Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong assumption for LUMO #182

Open
cpignedoli opened this issue Mar 13, 2023 · 0 comments
Open

Wrong assumption for LUMO #182

cpignedoli opened this issue Mar 13, 2023 · 0 comments

Comments

@cpignedoli
Copy link
Collaborator

cpignedoli commented Mar 13, 2023

In many cases a CP2K calculation will not have "ADDED_MOS" and the assumption LUMO = nel+1 is wrong

lumo_spin1_idx = result_dict["init_nel_spin1"]

One should check if nel-alpha < len(neig_spin1)
if true we can assume LUMO_alpha as eig_alpha[nel_alpha] and the same for LUMO_beta (if UKS)
if not the calculation did not have added_mos still a GAP could be available (e.g. if MO_CUBES with NLUMO>0 was specified)
and one could parse:

patch for the wrong gap in the parser

gap =[]
for line in lines: # lines of aiida.out
    if line.startswith(' HOMO - LUMO gap'):
        gap.append(float(line.split()[-1]))
if dft_type == 'UKS':
  html +=  "<b>Gap spin1: </b> %s (eV)<br>" % round(gap[0],3)
  html +=  "<b>Gap spin2: </b> %s (eV)<br>" % round(gap[1],3)
else:
   html +=  "<b>Gap: </b> %s (eV)<br>" % round(gap[0],3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant