def get_colvar_header(colvar_file):
    """Grabs the names of the collective variables from COLVAR file.

    Parameters
    ----------
    colvar_file : str

    Returns
    -------
    header : list of str
        List containing all the names of the collective variables."""
    with open(colvar_file, 'r') as f:
        header = f.readline()
    header = header.split(' ')[3:]
    header[-1] = header[-1].rstrip()
    return header