Skip to content
Snippets Groups Projects
Commit 9be703a6 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Better handling of missing basis set settings.

parent 68f6b652
No related branches found
No related tags found
3 merge requests!115V0.8.0 beta,!113V0.8.0,!105Better handling of missing basis set settings
Pipeline #74479 passed
...@@ -168,33 +168,33 @@ class BasisSetExciting(BasisSet): ...@@ -168,33 +168,33 @@ class BasisSetExciting(BasisSet):
label = group.x_exciting_geometry_atom_labels label = group.x_exciting_geometry_atom_labels
try: try:
muffin_tin_settings["{}_muffin_tin_radius".format(label)] = "%.6f" % (group.x_exciting_muffin_tin_radius.to(ureg.angstrom).magnitude) muffin_tin_settings["{}_muffin_tin_radius".format(label)] = "%.6f" % (group.x_exciting_muffin_tin_radius.to(ureg.angstrom).magnitude)
except KeyError: except Exception:
muffin_tin_settings["{}_muffin_tin_radius".format(label)] = None muffin_tin_settings["{}_muffin_tin_radius".format(label)] = None
try: try:
muffin_tin_settings["{}_muffin_tin_points".format(label)] = "%d" % group.x_exciting_muffin_tin_points muffin_tin_settings["{}_muffin_tin_points".format(label)] = "%d" % group.x_exciting_muffin_tin_points
except KeyError: except Exception:
muffin_tin_settings["{}_muffin_tin_points".format(label)] = None muffin_tin_settings["{}_muffin_tin_points".format(label)] = None
self.settings["muffin_tin_settings"] = muffin_tin_settings self.settings["muffin_tin_settings"] = muffin_tin_settings
except KeyError: except Exception:
pass pass
# Other important method settings # Other important method settings
system = self._ctx.representative_system system = self._ctx.representative_system
try: try:
self.settings['rgkmax'] = "%.6f" % (system.x_exciting_rgkmax.magnitude) self.settings['rgkmax'] = "%.6f" % (system.x_exciting_rgkmax.magnitude)
except KeyError: except Exception:
pass pass
try: try:
self.settings['gkmax'] = "%.6f" % (1e-10 * system.x_exciting_gkmax.magnitude) self.settings['gkmax'] = "%.6f" % (1e-10 * system.x_exciting_gkmax.magnitude)
except KeyError: except Exception:
pass pass
try: try:
self.settings['lo'] = "%d" % (system.x_exciting_lo) self.settings['lo'] = "%d" % (system.x_exciting_lo)
except KeyError: except Exception:
pass pass
try: try:
self.settings['lmaxapw'] = "%d" % (system.x_exciting_lmaxapw) self.settings['lmaxapw'] = "%d" % (system.x_exciting_lmaxapw)
except KeyError: except Exception:
pass pass
return self.settings return self.settings
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment