Matching parsers based on h5 (or similar) outputs
As I was discussing with @ladinesa and @mscheidg, it will be good to have a different function to match the correct parser when the mainfile is a h5 or hdf5 file. I'd like to include @lucamghi and @jrudz also in the loop. Feel free to extend it to someone who might be interested
The situation right now is that
MatchingParserInterface has a variable called
mainfile_binary_header_re. This is based on reading the first few lines of the file and match a regex expression. This is a bit cumbersome because the first few lines might not contain code-specific or any relevant tag (e.g., in the code w2dynamics for DMFT, the header contains names such as 'general.nat', 'atoms', ..., which of course are not tags specific to that code but they are for the method, DMFT).
I think there is an "easy" solution for this, which also implies also convincing developers of the codes to modify slightly their outputs.
This would be to create a group with a name 'program_name' (or any similar string) and assign this key to the string / byte of the code name. Hence, the MatchingParserInterface should open and read the h5/hdf5 file, and get the pair
.get('program_name') and its value, and matching them with the correct parser.
What do you think? Please feel free to give other possible solutions, and also to asign this task to someone