def is_doscar(filename):
    """Determine whether file is a DOSCAR by checking fourth line"""
    with open(filename, 'r') as f:
        for i in range(3):
            f.readline()
        if f.readline().strip() == 'CAR':
            return True
        else:
            return False
