HfSe2 band scaling code.
Unscaled is a picture of the unscaled HfSe2 band structure, if you analyze it there is a small offset between the base cell and supercell.
Implementing my code (change it to your corresponding data files and k-points) will scale the supercell supercell to fit the base cell.
I've provided inputs for HfSe2 3x3 supercell but they may take long so I have provided one for graphene 2x2 supercell as well ans it should be much shorter.