awk 'NR == 6 { vfe = $4 } NR > 6 && $1 > vfe && $2 > 0 { print vfe, $1; exit }' file For the given input data in file this will produce
1.95329810 4.152 The awk script ignores the first five lines of input. At line six, it picks out the fourth field an assigns it to the variable vfe (short ofr "Fermi energy".
The code then assumes that the values in column one are increasing, and when the first of these first column values reaches a value above the value stored in vfe, and if the second column is non-zero, it prints out vfe and the value from the first column and exits.
Unfortunately, I don't fully understand your longer code segment as there is no explanation of what you actually want it to do.