From 822ea4d45fd173421dd38444ca62bcd20c3e142c Mon Sep 17 00:00:00 2001 From: Zishen Wang <64644075+zz11ss11zz@users.noreply.github.com> Date: Sat, 21 Sep 2024 21:46:53 -0700 Subject: [PATCH] Update describer.py Signed-off-by: Zishen Wang <64644075+zz11ss11zz@users.noreply.github.com> --- src/maml/apps/gbe/describer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maml/apps/gbe/describer.py b/src/maml/apps/gbe/describer.py index 8a9ba5a7..8847a79b 100644 --- a/src/maml/apps/gbe/describer.py +++ b/src/maml/apps/gbe/describer.py @@ -266,7 +266,7 @@ def get_elemental_feature( rester = MPRester(mp_api) else: raise MPRestError("Please provide API key to access Materials Project") - bulk = rester.materials.search(material_ids=[db_entry["material_id"]])[0] + bulk = rester.materials.search(material_ids=[db_entry["material_id"]])[0] # type: ignore bulk_s = rester.get_structure_by_material_id(db_entry["material_id"]) # type: ignore if bulk: f_dict[preset.bdensity.str_name] = bulk[0]["density"] @@ -274,7 +274,7 @@ def get_elemental_feature( el = Element(db_entry["pretty_formula"]) f_dict[preset.ar.str_name] = el.atomic_radius f_dict[preset.a0.str_name] = bulk_s.lattice.a - f_dict[preset.e_coh.str_name] = rester.get_cohesive_energy(db_entry["material_id"]) + f_dict[preset.e_coh.str_name] = rester.get_cohesive_energy(db_entry["material_id"]) # type: ignore f_dict[preset.hb.str_name] = el.brinell_hardness f_dict[preset.CLTE.str_name] = el.coefficient_of_linear_thermal_expansion