def orig_atom(atom,big_table):
    """
    Returns the 0-indexed position of atom from the full list of atoms in the
    supercell mapped back into the original unit cell
    """
    n = 0
    bonds_per_pair = len(big_table[0])/len(big_table)
    while atom > bonds_per_pair:
        atom -= bonds_per_pair
        n += 1
    # n is the index of atom in the original atom list
    # atom is now the index of the unit cell the atom came from
    return n