Skip to content

Commit

Permalink
Minor formatting improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRue committed Mar 27, 2024
1 parent 8bffa49 commit 604543a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions masci_tools/io/parsers/kkrparser_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_rms(outfile, outfile2, debug=False, is_imp_calc=False):
rms_charge = parse_array_float(outfile, 'average rms-error', [2, '=', 1, 0], ['D', 'E'], debug=debug)
if debug:
print(rms_charge)
if is_imp_calc == True:
if is_imp_calc:
rms_ldau = parse_array_float(outfile, 'TOTAL RMS-ERROR for LDA+U:', [2, ':', 1, 0], debug=debug)
if debug:
print(rms_ldau)
Expand All @@ -102,10 +102,11 @@ def get_rms(outfile, outfile2, debug=False, is_imp_calc=False):
niter) # number of atoms in system, needed to take only atom resolved rms of last iteration
if debug:
print(natoms)
if is_imp_calc == True:

if is_imp_calc:
return rms_charge, rms_ldau, rms_spin, rms_charge_atoms[-natoms:], rms_spin_atoms[-natoms:]
else:
return rms_charge, rms_spin, rms_charge_atoms[-natoms:], rms_spin_atoms[-natoms:]

return rms_charge, rms_spin, rms_charge_atoms[-natoms:], rms_spin_atoms[-natoms:]


def get_noco_rms(outfile, debug=False):
Expand Down Expand Up @@ -720,9 +721,8 @@ def parse_kkr_outputfile(out_dict,
# also initialize convegence_group where all info stored for all iterations is kept
out_dict['convergence_group'] = tmp_dict
try:
rms_charge, rms_spin, result_atoms_last_charge, result_atoms_last_spin = get_rms(outfile,
outfile_000,
debug=debug)
rms_charge, rms_spin, result_atoms_last_charge, result_atoms_last_spin = get_rms( # pylint: disable=unbalanced-tuple-unpacking
outfile, outfile_000, debug=debug)
tmp_dict['rms'] = rms_charge[-1]
tmp_dict['rms_all_iterations'] = rms_charge
tmp_dict['rms_per_atom'] = result_atoms_last_charge
Expand Down

0 comments on commit 604543a

Please sign in to comment.