Calculate momentum matrix element

Hi developers,
I want to calculate momentum matrix elements, as I read in References, we can obtain the PMAT.OUT by putting “taskname=pmat” in gw calculations and
<momentummatrix

fastpmat=“true”

I am trying to use output file but it’s not readable. Is there any way to make it readable?

On the other hand I need to change the source file to compute in different way, and in exciting book I read in source part in “genpmat.f90” I will find the subroutine related the calculating momentum matrix elements, I guess this book is related to previous version of exciting, cause I didn’t find the “genpmat.f90”, but Can you guide me please which subroutine produced result for momentum matrix element, maybe by some changes, I can make it readable and do necessary changes for desired result??
I am looking forward your kind answer,
Best Regards,
Nasrin