Checks if two given sites are an anion and a cation.
    :param valences: list of site valences
    :param ii: index of a site
    :param jj: index of another site
    :return: True if one site is an anion and the other is a cation (from the valences)

def is_anion_cation_bond(valences, ii, jj):
    """
    Checks if two given sites are an anion and a cation.
    :param valences: list of site valences
    :param ii: index of a site
    :param jj: index of another site
    :return: True if one site is an anion and the other is a cation (from the valences)
    """
    if valences == 'undefined':
        return True
    if valences[ii] == 0 or valences[jj] == 0:
        return True
    return (valences[ii] > 0 > valences[jj]) or (valences[jj] > 0 > valences[ii])