def get_atom_lines(alllines):
    order = []
    for (i, line) in enumerate(alllines):
        if ('_atom' in line):
            order.append(line)
            start = (i + 1)
    end = None
    for (i, line) in enumerate(alllines[start:]):
        if (len(line.split()) == 0):
            end = ((start + i) - 1)
            break
    if (not end):
        end = (len(alllines) - 1)
    new_order = []
    for (i, o) in enumerate(order):
        if ('site_label' in o):
            new_order.append(i)
        if ('site_type_symbol' in o):
            new_order.append(i)
        if ('fract_x' in o):
            new_order.append(i)
        if ('fract_y' in o):
            new_order.append(i)
        if ('fract_z' in o):
            new_order.append(i)
    return (start, end, new_order)
def get_atom_lines(alllines):
    order = []
    for (i, line) in enumerate(alllines):
        if ('_atom' in line):
            order.append(line)
            start = (i + 1)
    end = None
    for (i, line) in enumerate(alllines[start:]):
        if (len(line.split()) == 0):
            end = ((start + i) - 1)
            break
    if (not end):
        end = (len(alllines) - 1)
    new_order = []
    for (i, o) in enumerate(order):
        if ('site_label' in o):
            new_order.append(i)
        if ('site_type_symbol' in o):
            new_order.append(i)
        if ('fract_x' in o):
            new_order.append(i)
        if ('fract_y' in o):
            new_order.append(i)
        if ('fract_z' in o):
            new_order.append(i)
    return (start, end, new_order)