def read_wien2k_G_vectors(filename):
    """
    Read the Wien2K G-vectors and return
    the vectors
    - G1
    - G2
    - G3
    In Wien2K the G-vectors are stored in a file with the extension
    .outputkgen, and are listed under
    G1 G2 G3
    so we need to be looking for lines that start with that content.
    """
    a = []
    b = []
    c = []
    line = ""
    with open(filename,"r") as fp:
        while True:
            line = fp.readline()
            if not line:
                break
            if line.find("G1        G2        G3") > -1:
                for ii in range(0,3):
                    line = fp.readline()
                    point = line.split()
                    a.append(float(point[0]))
                    b.append(float(point[1]))
                    c.append(float(point[2]))
                break
    return (a,b,c)