Calculation of thetae in flag = 5 is enabled, improved OpenMP directive to speed up