api icon indicating copy to clipboard operation
api copied to clipboard

How to obtain the k_vrh and g_vrh of the material

Open dream123321 opened this issue 2 years ago • 2 comments

Problem

with MPRester("API_KEY") as mpr:
    docs = mpr.materials.summary.search(material_ids=['mp-66'],fields=['elements','k_vrh','g_vrh','band_gap'])

i = docs[0]
print(i.elements)
print(i.band_gap)

Result: [Element C] 4.1145

But add it after the code: print(i.k_vrh)

Result: File "/home/jh/mp/test.py", line 22, in print(i.k_vrh) File "/home/jh/anaconda3/envs/mp_test/lib/python3.10/site-packages/mp_api/client/core/client.py", line 925, in new_getattr raise AttributeError( AttributeError: 'MPDataDoc' object has no attribute 'k_vrh'

Proposed Solution

How to obtain the k_vrh and g_vrh of the material?

Alternatives

No response

dream123321 avatar Nov 24 '23 14:11 dream123321

See this thread

munrojm avatar Nov 25 '23 01:11 munrojm

See this thread

Thank you very much!

dream123321 avatar Nov 25 '23 02:11 dream123321