def extract_xmax(mfile):
    """
    Extract the maximum X-coordinates of the band structure and return
    that value.
    """
    xmax = 0.0
    for line in mfile:
        words = line.split()
        if len(words) == 0:
            return xmax
        else:
            xmax = float(words[0])
    return xmax