Matrix elements of the momentum operator in Quantum Espresso

Last week I was trying to find what the format of the filp file is for Quantum Espresso that produced by bands.x with the appropriate variable set, and which contains the matrix elements of the momentum operator between valence and conduction bands.

As I couldn’t find any documentation on is format, or any .gnu files to plot it, I thought it would be faster for me to go through the code, and indeed it was quite easy to figure out what was being printed, so I thought I would post this here too.

I will also upload a python notebook that converts them into .csv file, as soon as I double check that it is working properly. Continue reading