def METHOD_NAME(filename):
    """Read crystal structure."""
    elk_in = ElkIn(open(filename).readlines())
    tags = elk_in.get_variables()
    avec = [tags["scale"][i] * np.array(tags["avec"][i]) for i in range(3)]
    spfnames = tags["atoms"]["spfnames"]
    symbols = [x.split(".")[0] for x in spfnames]
    numbers = []
    for s in symbols:
        if s in symbols:
            numbers.append(symbol_map[s])
        else:
            numbers.append(0)
    for i, n in enumerate(numbers):
        if n == 0:
            for j in range(1, 119):
                if not (j in numbers):
                    numbers[i] = j
                    break
    pos_all = []
    num_all = []
    for num, pos in zip(numbers, tags["atoms"]["positions"]):
        pos_all += pos
        num_all += [num] * len(pos)
    return Atoms(numbers=num_all, cell=avec, scaled_positions=pos_all), spfnames