materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
106 stars 38 forks source link

Clarification: `inc_structure` behaviour? #920

Open kavanase opened 2 months ago

kavanase commented 2 months ago

Hi! Thanks for your work developing this package and sorry to be bugging about this, but I was wondering if we could get clarification about the new default inc_structure behaviour with the new API methods. The previous inc_structure argument has now been deprecated:

inc_structure (str): *This is a deprecated argument*. Previously, if None, entries
                returned were ComputedEntries. If inc_structure="initial",
                ComputedStructureEntries with initial structures were returned.
                Otherwise, ComputedStructureEntries with final structures
                were returned. This is no longer needed as all entries will contain
                structure data by default.

As it says in the docstrings now, it's no longer needed as structure data is always returned, but it doesn't say which structure (i.e. initial or final) is returned. I've tried searching through the code but I can't really tell how this is now handled by default, though from some manual checks it seems like it's returning the final MP-relaxed structure. But it would be good to get confirmation of this if possible please? We've found in a few cases that when relaxing with different functional setups (e.g. hybrid DFT, vdW corrections etc), sometimes starting from the MP-relaxed structure can result in a different structure than starting from the "initial'" (often ICSD) structure, due to being in a local minimum, so important to know. Is there any way to access the "initial" structures through the new MP API? (as was possible before with the legacy API) Thanks!

munrojm commented 1 month ago

Hi @kavanase, I can confirm it is the final relaxed MP structure that is included in the entry object. We should clarify that in the docs.