def get_indices(cif):
    '\n    This is a tool that will read a CIF file and return the unique T-sites,\n    their multiplicities, and an example atom index.\n\n    It also does the same for the unique O-sites in the framework.\n\n    This tool only works on CIFs that are formatted the same way as the IZA\n    Structure Database CIFs.\n    '
    (tsites, tmults, osites, omults) = get_mults(cif)
    f = open(cif, 'r')
    alllines = f.read()
    f.close()
    for (i, line) in enumerate(alllines):
        if ('IT_coordinate_system_code' in line):
            fields = line.split()
            alllines[i] = '_symmetry_space_group_setting {0}'.format(fields[(- 1)])
    atoms = read(cif)
    oinds = [atom.index for atom in atoms if (atom.symbol == 'O')]
    index = 0
    first_os = []
    for (i, m) in enumerate(omults):
        first_os.append(oinds[index])
        index += m
    tinds = [atom.index for atom in atoms if (atom.symbol != 'O')]
    index = 0
    first_ts = []
    for (i, m) in enumerate(tmults):
        first_ts.append(tinds[index])
        index += m
    return (tsites, tmults, first_ts, osites, omults, first_os)
This is a tool that will read a CIF file and return the unique T-sites,
their multiplicities, and an example atom index.

It also does the same for the unique O-sites in the framework.

This tool only works on CIFs that are formatted the same way as the IZA
Structure Database CIFs.
def get_indices(cif):
    '\n    This is a tool that will read a CIF file and return the unique T-sites,\n    their multiplicities, and an example atom index.\n\n    It also does the same for the unique O-sites in the framework.\n\n    This tool only works on CIFs that are formatted the same way as the IZA\n    Structure Database CIFs.\n    '
    (tsites, tmults, osites, omults) = get_mults(cif)
    f = open(cif, 'r')
    alllines = f.read()
    f.close()
    for (i, line) in enumerate(alllines):
        if ('IT_coordinate_system_code' in line):
            fields = line.split()
            alllines[i] = '_symmetry_space_group_setting {0}'.format(fields[(- 1)])
    atoms = read(cif)
    oinds = [atom.index for atom in atoms if (atom.symbol == 'O')]
    index = 0
    first_os = []
    for (i, m) in enumerate(omults):
        first_os.append(oinds[index])
        index += m
    tinds = [atom.index for atom in atoms if (atom.symbol != 'O')]
    index = 0
    first_ts = []
    for (i, m) in enumerate(tmults):
        first_ts.append(tinds[index])
        index += m
    return (tsites, tmults, first_ts, osites, omults, first_os)