Skip to content

Commit

Permalink
Update describer.py
Browse files Browse the repository at this point in the history
Signed-off-by: Zishen Wang <[email protected]>
  • Loading branch information
zz11ss11zz authored Sep 22, 2024
1 parent 32ea875 commit 822ea4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/maml/apps/gbe/describer.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ 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"]
f_dict[preset.G.str_name] = bulk[0]["elasticity"]["G_VRH"]
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

Expand Down

0 comments on commit 822ea4d

Please sign in to comment.