Dear Nordland, I am interested in your suggestion, "From the bandgap to determine the stress", I have read some papers, and they just investigate how the bandgap change with the stress, which is what I want to do.
In your suggestion, it seems that we should first construct some structures of the same bulk material, but have slightly difference in the lattice constants to simulate the effect of the pressure, after the internal atomic relaxation and calculate its energy and bandgap, then using the Birch–Murnaghan state of equations to fit the energy and the volume change, we can get the exact pressure value. Then we can have the corresponding bandgap and the pressure relationship.
This is useful for the hydrostatic pressure, what about for the axis pressure, such as compress in Z direction?