mapidoc icon indicating copy to clipboard operation
mapidoc copied to clipboard

Unique icsd_id

Open jmm10 opened this issue 6 years ago • 6 comments

Hello, My question is if it is possible to query for a structure's specific ICSD number through pymatgen. I am aware that the "icds_id" property is no longer available, but is there any other way to get this? For example: -material id=mp-20305 -actual ICSD number is 24518 However, "icsd_ids" returns all of the following: [610682 610687 610699 43974 43360 610683 610697 610694 190415 184924 185083 610689 44845 610686 610700 24518 610684 610698 181197 610685 165462 600849 610695 610701 41444] Thank you very much for your help

jmm10 avatar Dec 31 '19 02:12 jmm10

I am not sure but the information might be in the transformations history. @mkhorton can confirm

shyuep avatar Dec 31 '19 03:12 shyuep

Thanks again. I would appreciate that.

jmm10 avatar Dec 31 '19 14:12 jmm10

The structures returned from Materials Project have been optimized via DFT, so it's not really correct to say that a structure corresponds exactly to any one ICSD structure. This is why a group of numbers is provided. There is no "actual ICSD number" because the relaxed Materials Project structure does not exist in the ICSD.

However, in the sense that some relaxations do start from a specific ICSD structure, you can structure match on initial_structure. We also have the "SNL" (Structure + associated metadata including references) containing this information, but I'm not sure if this is readily available via the API.

(@shyamd do the recent SNL changes affect this? I noticed the snl key contains all icsd_ids now, what's the distinction between the snl and final_snl in the current database builder?)

mkhorton avatar Jan 01 '20 23:01 mkhorton

Thank you very much for your help

jmm10 avatar Jan 07 '20 15:01 jmm10

@mkhorton @shyamd Seriously the mapidoc is very out of date. For example, anonymous_formula is still there even though it has been deprecated in favor of formula_anonymous. The key icsd_ids does not contain anything as far as I know (I tried). What exactly is happening with the MP database?

shyuep avatar Jan 08 '20 21:01 shyuep

Both are still present I believe: I just queried icsd_ids and got a result (tried on mp-13), and anonymous_formula and formula_anonymous are both still present as documented in the mapidoc here and here -- they are not equivalent, though it's very confusing to have both imo (not my call, not sure when or why this happened, "anonymous_formula" seems closer to "anonymous_composition" to me).

The icsd_ids specifically are added in the build step here, anonymous_formula gets added here.

To answer the larger question, the current API is pretty poorly documented, and it needs to be replaced. The API docs need to follow modern API standards, e.g. documented using Swagger/OpenAPI. The mapidoc will then be deprecated, since it was only updated when Donny ran his update script and has frequently been out of date.

mkhorton avatar Jan 09 '20 01:01 mkhorton