Download/save specific raw files from NOMAD?

I’m interested in downloading/saving specific raw files from NOMAD using Python. I’m aware of accessing archives in Python and the NOMAD client library, but those simply retrieve metadata that I don’t need. For my case, I need to download (a few hundred) specific raw files. Is there a way to do so at the moment?

Hello and welcome to the forum.

If you look at our API dashboard (NOMAD API), there are a couple of endpoints dedicated for raw files. Here it depends what you want to do. Under the section raw, for example, you find functions that allow you to download a single file from a calculation or upload:

  • /raw/calc/{upload_id}/{calc_id}/{path}
  • /raw/{upload_id}/{path}

If you need more help, give us a specific scenario (what file, from what calculation) and I can provide some example URLs.

Hi, thanks for the quick response! I’m trying to download from my group’s NOMAD server, specifically querying from “origin=Julia Lies”. I’m interested in downloading all of the POSCAR and eps.out files that the author has uploaded into the group server.

One possible way is this:

https://nomad-lab.eu/prod/rae/api/raw/query?uploader=Julia%20Lies&file_pattern=POSCAR&file_pattern=eps.out

Of course, you have to replace the host with your local server. The file_pattern parameter also accepts * if you need more flexible patterns. This API endpoint, will do a search based on uploader=... (you can use other search parameters as well) and apply the file_pattern to all raw files. It will give you a .zip file with all files that match one of the pattern.

If you already now the upload and calc ids from the respective entries from other API call, you can also download single files like this:

https://nomad-lab.eu/prod/rae/api/raw/calc/VEsiniwQTPWvebqVZDs4hQ/BuwVIYZTPMwnsBDwxOC6o04tzf1I/POSCAR

The first id is the upload id, the second the calc id. The last URL segment is the file name.