Hi MP team,
I’m trying to download the frequency-dependent dielectric tensor using mp-api. For example, for mp-19338, I can get the absorption data with materials.absorption.search(material_ids=[“mp-19338”]), which returns energies, average_real_dielectric, average_imaginary_dielectric, absorption_coefficient, and task_id. So the averaged real and imaginary dielectric functions are available. Then I used this task_id to query the corresponding Optic task:
from mp_api.client import MPRester
with MPRester() as mpr:
d = mpr.materials.absorption.search(material_ids=[“mp-19338”])[0]
task_id = str(d[“task_id”])
task = mpr.materials.tasks.search(
task_ids=[task_id],
fields=[“task_id”, “task_type”, “calc_type”, “output”]
)[0]
out = task.model_dump(mode=“json”)[“output”]
fdd = out[“frequency_dependent_dielectric”]
print(fdd.keys())
print(fdd[“real”])
print(fdd[“imaginary”])
I found that frequency_dependent_dielectric[“real”] is available with shape 2001 × 6, but frequency_dependent_dielectric[“imaginary”] is None. I also checked all materials returned by materials.absorption.search(), and it looks like the imaginary tensor is None for all of them.
So I wanted to ask: is there a way to get the full tensor imaginary part Im ε_ij(ω) through the API? If not, is only the averaged average_imaginary_dielectric available right now?
Thanks!