Only download certain files upon /raw/query
The current behavior of /raw/query?path=...
is what you explained. The path is used to find NOMAD calculations (i.e. entries). We consider all files in the same directory as the mainfile (e.g. vasp.run.*.xml.*
) as part of the calculation. Therefore, if you download with a path query, you get all files of all matching calculations.
I understand, that this is not always desirable. You want to be able to download the mainfiles only? Or do you need an additional wildcard-pattern-thing that should further filter the files? I could add something like this:
/raw/query?external_id=mp-32800&file_pattern=vasprun.xml.*
will give you only:
[
"block_2012-03-26-08-53-28-847937/launcher_2012-03-26-10-04-19-144570/engine_32800/relax1/vasprun.xml.gz",
"block_2012-03-26-08-53-28-847937/launcher_2012-03-26-10-04-19-144570/engine_32800/relax2/vasprun.xml.gz"
]
or even better
/raw/query?external_id=mp-2383&file_pattern=vasprun.xml.*&strip=true
[ "relax1/vasprun.xml.gz", "relax2/vasprun.xml.gz" ]
Otherwise, the only option is to know the NOMAD upload_id/calc_id and use an exact path: /raw/upload_id/calc_id/path