Changing the name of the downloadable .json file found in the XRD JSON button or include some information inside the file

Greetings!

When I download a json file form XRD JSON button, the file name only contains the ID, element used as X-ray source and the technique XRD.
Inside the file, the following data is available: {“meta”: [“amplitude”, “hkl”, “two_theta”, “d_spacing”], “created_at”: “2020-09-03T18:21:48.286063”, “wavelength”: {“element”: “Cu”, “in_angstroms”: 1.54184}}
Followed by the pattern.

When programming a script, it is not easy to obtain other information, such as the elements, the structure, formula, “pretty_formula”, etc.

I’d like to request that either the file contains the pretty_formula in the name or inside the file and, if possible, the structure. Each mp card available has a web page and the web page’s title contains the necessary information. For example, for mp-1206743: HfS (hexagonal, P-6m2, 187), the title of the page is: mp-1206743: HfS (hexagonal, P-6m2, 187)

If this could be present in the XRD JSON filename as: mp-1206743_HfS_(hexagonal, P-6m2, 187)_xrd_Cu.json, for the Cu source as an example, it would be awesome! :slight_smile: or inside the file.

Thank you!

Hi @davidmsousa,

Thanks for the feature suggestion, I’ll add it to our suggestion list.

If you’re familiar with Python, I would advise instead that you download the Structure and calculate the XRD pattern directly (e.g. with pymatgen), it’s a fast operation, and you have more control e.g. on the specific wavelength you want. You will also then have any the ability to add any metadata, including Material ID, from the API call.

The general advice is that if you want to script a solution, you should use the API directly rather than using the download buttons on the website which are designed for manual usage.

Best,

Matt