Elastic_tensor from mpr.summary.search?

Hello,

I am a first-time API user and wish to acquire elastic constants Cij from the elastic_tensor. I have managed to deduce a way to find polycrystalline elastic moduli via something like:

with MPRester(my_api_key) as mpr:

docs = mpr.summary.search(chemsys="Ti-Al",
                          has_props=[HasProps.elasticity],
                          fields=["material_id","k_vrh"],
                          )

for doc in docs:
    print(f"{doc.material_id}: {doc.k_vrh}")

However, I can’t seem to find the implementation of elastic_tensor in “fields”. Am I missing something?

Any help is appreciated!

Warm regards,
Erik

Hi @Erik_Johansson,

Sorry for the delayed reply. If you want to access the full elastic tensor you will have to instead query the elasticity endpoint directly. summary only contains a subset of the elasticity data. You can use the MPRester.elasticity.search method.

– Jason

Thank you for the reply, Jason.

Is it advised to first acquire the material_id with .summary.search, and then using the .elasticity.get_data_by_id to finally get the tensor through .elasticity.elastic_tensor? (I used this post for inspiration: Best practices for heavy API usage?)

I ask because I struggled to get .elasticity.search to understand my chemsys and material_id field commands, etc.

Using the longer route I managed to get the full elastic tensor, as I wished.

Warm regards,
Erik

No problem. In this case, yes. Although, that will be changing soon with new elasticity data we have in the pipeline. Then it will be commensurate with other endpoints and their search methods.

Since there are a total of ~7k elastic data entries, you could also consider pulling every tensor, MPID, and chemsys with MPRester.elasticity.search, and then filter through it.

– Jason

excuse me, I want to ask a question about the number of elastic data. Last year, I extracted all the elasticity data, which amounted to about 10,000. Why is the elastic data reduced so much now and why is it deleted?