def remove_permutations(Par, _Nucsvec, w, Force=False):
    """remove_double_combinations(Sys,Sys__Nucsvec,w,Force =False)

    in:  Sys             (one class with definitions of spin system parameters)
         Sys__Nucsvec     (vector with all combinations of isotopes)
         w               (corresponding weighting factors)
         Force=False    (forces the operations independent of the conditions)

    Caution: Works directly on the passed variables due to call by reference.
    Removes permutations which are doubled. Assume a spin system with
    n = [2,2], Nucs = "N,H" is transformed in the fast-motion regime to a
    system "N,N,H,H". There requirement is still that the coupling is
    to equivalent nuclei (in general the A-tensor is identical within the
    H's and N's). The isotopes combiniations above the probability threshhold
    will be:

        1. "14N,14N,1H,1H"
        2. "14N,15N,1H,1H"
        3. "15N,14N,1H,1H"
        4. "14N,14N,2H,1H"
        5. "14N,14N,1H,2H"

    Since 2. and 3. (and 4 and 5) are indentical (just a perumation of a
    isotope within the equivalent coupling nuclei group) one of them can be
    removed and the other douled in weight. Leaving:

        1. "14N,14N,1H,1H"
        2. "14N,15N,1H,1H"    weight*2
        3. "14N,14N,1H,2H"    weight*2

    This was a description using an example of the very general procedure
    implemented in this function. The new reduced list of isotope combinations
    as well as the new weighting factors are produced (call by reference).
    """
    if (Force or Par.tcorr is not None) and Par._m is not None:
        s = len(_Nucsvec) - 1
        if isinstance(Par._m, int):
            Par._m = [Par._m]
        for s in range(s, -1, -1):
            str_tmp1 = _Nucsvec[s].split(',')
            for k in range(0, s):
                str_tmp2 = _Nucsvec[k].split(',')
                q = 0
                str1 = []
                str2 = []
                issame = True
                for t in range(0, len(Par._m)):
                    str1.append(str_tmp1[q:q + Par._m[t]])
                    str2.append(str_tmp2[q:q + Par._m[t]])
                    if sorted(str1[t]) != sorted(str2[t]):
                        issame = False
                    q += Par._m[t]
                if issame:
                    del _Nucsvec[s]
                    w[k] += w[s]
                    del w[s]
                    break
    return
