Esempio n. 1
0
def solver_input_data(parms, L, hyb_data_all, AvgDispersion, VCoulomb, nf):
    # prepare hybtau file for CTQMC
    N_LAYERS = int(parms["N_LAYERS"])
    FLAVORS = int(parms["FLAVORS"])
    SPINS = int(parms["SPINS"])
    corr_id = system.getCorrIndex(parms)
    dmft_id = system.getDMFTCorrIndex(parms)
    dmft_FLAVORS = 2 * len(dmft_id) / N_LAYERS
    # 2 for SPINS

    hyb_data = []
    for n, d in enumerate(hyb_data_all):
        data = hyb_data_all[n][:, :, dmft_id[L::N_LAYERS]]
        data_out = zeros((size(data, 1), dmft_FLAVORS), dtype=data.dtype)
        data_out[:, ::2] = data[0]
        data_out[:, 1::2] = data[0] if SPINS == 1 else data[1]
        hyb_data.append(data_out)

    Eav = AvgDispersion[:, 0, dmft_id[L::N_LAYERS]]
    inertHFSelfEnergy = get_inert_band_HF(parms, nf[:, L::N_LAYERS])

    MU = array([float(parms["MU"]) - VCoulomb[L] - Eav[s] - inertHFSelfEnergy[s] for s in range(SPINS)])
    MU_out = zeros(dmft_FLAVORS)
    MU_out[::2] = MU[0]
    MU_out[1::2] = MU[0] if SPINS == 1 else MU[1]
    parms_copy = parms.copy()
    parms_copy["FLAVORS"] = dmft_FLAVORS

    print "Inert HF Self Energy: ", inertHFSelfEnergy
    return {"hybtau": hyb_data[0], "hybmat": hyb_data[1], "hybtail": hyb_data[2], "MU": MU_out, "parms": parms_copy}
Esempio n. 2
0
def show_DOS_results(h5file, filter = '', plot_what = None, L = None, f = None, Navg = 1):
    print '# BETA  T    U    Delta  N_LAYERS Ndtot DOStot               Nd                   DOS';
    for s in h5file:
        if filter not in s: continue;
        it = h5file[s+'/iter'][0];
        if str(it+1) in h5file[s+'/avgGreen'].keys(): added = 1;
        else: added = 0;
        try: parms = gget(h5file[s], 'parms');
        except: print 'ID %s not work'%s; continue;
        N_LAYERS = int(parms['N_LAYERS']); SPINS = int(parms['SPINS']);
        if L is None: L = arange(N_LAYERS);
        corr_id = system.getCorrIndex(parms);
        nf = None;
        for i in range(Navg):
            if nf is None:
                nf = getDensity(h5file[s], it-i);
                bG = getFermiDOS(h5file[s], it+added-i);
            else:
                nf += getDensity(h5file[s], it-i);
                bG += getFermiDOS(h5file[s], it+added-i);
        nf /= Navg; bG /= Navg;
        if SPINS == 1: nf = r_[nf, nf]; bG = r_[bG, bG];
        nn = sum(nf[:, corr_id][:, ::N_LAYERS], 0);
        bbG = sum(bG[:, corr_id][:, ::N_LAYERS], 0);

        print '%s: %s  %.4f  %.2f  %.4f   %d  %.4f   %.4f  '%(s, parms['BETA'], 1/float(parms['BETA']), float(parms['U']), float(parms['DELTA']), N_LAYERS,\
                sum(nf[:,corr_id])/N_LAYERS, sum(bG)/N_LAYERS), \
                (len(nn)*'  %.4f' + ' ' + len(bbG)*'  %.4f')%tuple(r_[nn, bbG]);

    if plot_what is not None:
        for s in h5file:
            if filter in s: plot_data(h5file[s], plot_what, f = f, L = L);
Esempio n. 3
0
def show_mag_results(h5file, filter = '', plot_what = None, L = 0, Navg = 1):
    print '# BETA  T  Nd  magnetization  inv_susceptibility';
    for s in h5file:
        if filter not in s: continue;
        try: parms = gget(h5file[s], 'parms');
        except: print 'ID %s not work'%s; continue;
        tmp = gget(h5file[s], 'log');
        nd = sum(mean(tmp[1][-Navg:, :], 0));
        magnetization = sum(mean(tmp[5][-Navg:, :], 0))/int(parms['N_LAYERS']);
        susceptibility = magnetization / float(parms['H']);
        print '%s: %s  %.4f  %.4f'%(s, parms['BETA'], 1/float(parms['BETA']), sum(nd)/int(parms['N_LAYERS'])), magnetization, 1./susceptibility;

    if plot_what is not None:
        corr_id = system.getCorrIndex(parms);
        for s in h5file:
            if filter in s: plot_data(h5file[s], plot_what, f = corr_id, L = L);
Esempio n. 4
0
def run_solver(AvgDispersion, nf, w, it, parms, aWeiss, np=1, VCoulomb=None):
    ID = parms["ID"]
    N_LAYERS = int(parms["N_LAYERS"])
    FLAVORS = int(parms["FLAVORS"])
    SPINS = int(parms["SPINS"])
    DATA_FILE = parms["DATA_FILE"]
    TMPH5FILE = "." + DATA_FILE + ".id" + str(ID) + ".i" + str(it) + ".solver_out.h5"
    if VCoulomb is None:
        VCoulomb = zeros(N_LAYERS)
    solver = solver_types.init_solver(parms, np)
    corr_id = system.getCorrIndex(parms)
    NCOR = int(parms["NCOR"])
    NDMFT = 2 * len(system.getDMFTCorrIndex(parms))
    # 2 for SPINS

    # check save point and initialize for new iteration
    try:
        tmph5 = h5py.File(TMPH5FILE, "r+")
        hyb_tau = tmph5["Hybtau"][:]
        hyb_mat = tmph5["Hybmat"][:]
        hyb_coefs = tmph5["hyb_asym_coeffs"][:].reshape(SPINS, -1, NCOR)
    except:
        try:
            tmph5.close()
        except:
            pass
        tmph5 = h5py.File(TMPH5FILE, "w")
        tmph5.create_dataset("L", (2,), dtype=int, data=array([it, 0]))

        # asymptotic coefficients, upto 3rd order for hyb
        hyb_coefs = zeros((SPINS, 3, NCOR), dtype=float)
        # electric chemical potential
        eMU = float(parms["MU"]) - VCoulomb
        for L in range(N_LAYERS):
            hyb_coefs[:, :, L::N_LAYERS] = get_asymp_hybmat(
                parms, nf[:, L::N_LAYERS], eMU[L], AvgDispersion[:, :, corr_id[L:NCOR:N_LAYERS]]
            )

        # get practical hybmat, and hybtau
        Eav = AvgDispersion[:, 0, corr_id]
        hyb_mat = zeros((SPINS, int(parms["N_MAX_FREQ"]), NCOR), dtype=complex)
        hyb_tau = zeros((SPINS, int(parms["N_TAU"]) + 1, NCOR), dtype=float)
        for s in range(SPINS):
            for f in range(NCOR):
                hyb_mat[s, :, f] = w + eMU[f % N_LAYERS] - Eav[s, f] - aWeiss[s, :, f]
                tmp = cppext.IFT_mat2tau(
                    hyb_mat[s, :, f].copy(),
                    int(parms["N_TAU"]) + 1,
                    float(parms["BETA"]),
                    float(hyb_coefs[s, 0, f]),
                    float(hyb_coefs[s, 1, f]),
                )

                # set value >= 0 to be smaller than 0, the mean of left and right neighbors
                ind = nonzero(tmp >= 0)[0]
                for i in ind:
                    lefti = righti = i
                    while tmp[lefti] >= 0 and lefti > 0:
                        lefti -= 1
                    while tmp[righti] >= 0 and righti < len(tmp) - 1:
                        righti += 1
                    leftval = tmp[lefti] if tmp[lefti] < 0 else 0
                    rightval = tmp[righti] if tmp[righti] < 0 else 0
                    tmp[i] = (leftval + rightval) / 2.0
                hyb_tau[s, :, f] = tmp
        tmph5.create_dataset("Hybmat", hyb_mat.shape, dtype=complex, data=hyb_mat)
        tmph5.create_dataset("Hybtau", hyb_tau.shape, dtype=float, data=hyb_tau)

        # initialize output dataset
        Gtau_shape = (int(parms["N_TAU"]) + 1, NDMFT)
        tmph5.create_dataset("Gtau", Gtau_shape, dtype=float, data=zeros(Gtau_shape, dtype=float))
        tmph5.create_group("Observables")
        tmph5.create_dataset("hyb_asym_coeffs", hyb_coefs.flatten().shape, dtype=float, data=hyb_coefs.flatten())

    # run
    hyb_data = [hyb_tau, hyb_mat, hyb_coefs]
    MEASURE_freq = True if "Gw" in tmph5 else False
    startL = tmph5["L"][1]
    sym_layers = getSymmetricLayers(tmph5, parms)
    for L in range(startL, N_LAYERS):
        print "Processing task ", ID, ": iteration ", it, ", layer ", L
        tmph5["L"][1] = L
        TMPFILE = "." + DATA_FILE + ".id" + str(ID) + ".i" + str(it) + ".L" + str(L)

        if float(parms["U"]) == 0:
            break

        if (sym_layers is None) or (L not in sym_layers[:, 1]):
            solver.prepare(TMPFILE, solver_input_data(parms, L, hyb_data, AvgDispersion, VCoulomb, nf))
            tmph5.close()
            ret_val = solver.run()
            tmph5 = h5py.File(TMPH5FILE, "r+")
            if ret_val > 0:
                print "Not finish running impurity solver or problem occurs while running the solver."
                os.system("rm " + TMPFILE + ".*")
                tmph5.close()
                return None
            solver_out = solver.collect()
            if solver_out is None:
                tmph5.close()
                return None
            Gtau = solver_out[0]
            obs = solver_out[1]
            if len(solver_out) > 2:
                MEASURE_freq = True
                Giwn = solver_out[2]
                Siwn = solver_out[3]
            os.system("rm " + TMPFILE + ".*")

        elif L in sym_layers[:, 1]:  # symmetric layer, no need to calculate
            sym_index = nonzero(sym_layers[:, 1] == L)[0]
            sym_L = sym_layers[sym_index, 0][0]
            print "L=%d is the symmetric layer of layer L=%d" % (L, sym_L)
            Gtau = tmph5["Gtau"][:, sym_L::N_LAYERS]
            obs = None
            if tmph5["Observables"].keys() != []:
                obs = dict()
                for k, v in tmph5["Observables/L" + str(sym_L)].iteritems():
                    obs[k] = v
            if MEASURE_freq:
                Giwn = tmph5["Gw"][:, sym_L::N_LAYERS]
                Siwn = tmph5["Sw"][:, sym_L::N_LAYERS]
            # this is the only place for AFM
            # only works for the 4-cell unitcell (GdFeO3 distortion)
            # G-type AFM: 0-3 are the same, 0-1 and 0-2 are opposite in spin
            # here I just swap values of opposite spins
            if int(val_def(parms, "AFM", 0) > 0) and (L in [1, 2]):
                print "AFM processing on this L"
                Ntmp = NDMFT / N_LAYERS
                # correlated bands per site
                mapid = zeros(Ntmp, dtype=int)
                mapid[0::2] = arange(1, Ntmp, 2)
                mapid[1::2] = arange(0, Ntmp, 2)
                Gtau = Gtau[:, mapid]
                if MEASURE_freq:
                    Giwn = Giwn[:, mapid]
                    Siwn = Siwn[:, mapid]
                if "nn" in obs:
                    tmp = obs["nn"][:]
                    nn = zeros((Ntmp, Ntmp), dtype=float)
                    pos = 0
                    for i in range(Ntmp):
                        for j in range(i + 1):
                            nn[i, j] = nn[j, i] = tmp[pos]
                            pos += 1
                    nn = nn[mapid]
                    nn = nn[:, mapid]
                    tmp = array([])
                    for i in range(Ntmp):
                        for j in range(i + 1):
                            tmp = r_[tmp, nn[i, j]]
                    obs["nn"] = tmp

        tmph5["Gtau"][:, L::N_LAYERS] = Gtau
        if MEASURE_freq:
            if "Gw" not in tmph5:
                matsubara_shape = (len(Giwn), NDMFT)
                tmph5.create_dataset("Gw", matsubara_shape, dtype=complex, data=zeros(matsubara_shape, dtype=complex))
                tmph5.create_dataset("Sw", matsubara_shape, dtype=complex, data=zeros(matsubara_shape, dtype=complex))
            tmph5["Gw"][:, L::N_LAYERS] = Giwn
            tmph5["Sw"][:, L::N_LAYERS] = Siwn

        if obs is not None:
            new_group_str = "Observables/L" + str(L)
            tmph5.create_group(new_group_str)
            for k, v in obs.iteritems():
                tmph5.create_dataset(new_group_str + "/" + k, v.shape, dtype=v.dtype, data=v)

        print "Finish iteration ", it, ", layer ", L, "\n"
    print "DONE: iteration %d\n" % it
    tmph5["L"][1] = N_LAYERS
    tmph5.close()
    return TMPH5FILE
Esempio n. 5
0
def gget(data, st, iter = None, L = None, f = None):
    if iter == None: iter = str(data['iter'][0]);
    iter = str(iter);
    parms = load_parms(data, int(iter));
    N_LAYERS = int(parms['N_LAYERS']); FLAVORS = int(parms['FLAVORS']); SPINS = int(parms['SPINS']);
    NORB = int(parms['NORB']); NCOR = int(parms['NCOR']);
    corr_id = system.getCorrIndex(parms);
    dmft_id = system.getDMFTCorrIndex(parms);
    dmft_site_id = system.getDMFTCorrIndex(parms, all = False);
    
    if st == 'wn':
        NMaxFreq = int(parms['N_MAX_FREQ']);
        BETA = float(parms['BETA']);
        return (2*arange(0, NMaxFreq)+1)*pi/BETA;
    if st == 'parms': return parms;
    if st == 'log':
        log = data['log_density'][:];
        num_iter = len(log);
        nraw = log[:,4:];
        orbital = zeros((num_iter, FLAVORS, N_LAYERS));
        orbital_abs = zeros((num_iter, FLAVORS, N_LAYERS));
        spinup = zeros((num_iter, N_LAYERS));
        spindn = zeros((num_iter, N_LAYERS));
        density = zeros((num_iter, N_LAYERS));
        magnetization = zeros((num_iter, N_LAYERS));

        for n in range(num_iter):
            nf = nraw[n].reshape(SPINS, -1)[:, :NCOR];
            noxy = nraw[n].reshape(SPINS, -1)[:, -1]/N_LAYERS;
#            if n > 0: 
#                nf_gtau = -data['SolverData/Gtau/'+str(n)][:, -1, :];
#                nf[:, dmft_id] = nf_gtau[:, dmft_id];
            nf = nf.reshape(SPINS, FLAVORS, N_LAYERS);
            if SPINS == 1: nf = r_[nf, nf]; noxy = r_[noxy, noxy];

            density[n] = array([sum(nf[:,:,i]) for i in range(N_LAYERS)]);
            orbital[n] = (nf[0] + nf[1])/density[n];
            orbital_abs[n] = (nf[0] + nf[1]);
            spinup[n] = sum(nf[0], 0)/density[n] - 1./2;
            spindn[n] = sum(nf[1], 0)/density[n] - 1./2;
#            magnetization[n] = sum(nf[0, dmft_site_id, :] - nf[1, dmft_site_id], 0);
            magnetization[n] = sum(nf[0] - nf[1], 0) + noxy[0] - noxy[1];
#            magnetization[n] = sum(nf[0] - nf[1], 0);

        out = (log[:,:4], density, spinup, spindn, orbital, magnetization, orbital_abs);
        return out;
    
    if L == None: L = arange(N_LAYERS);
    if f == None: f = arange(FLAVORS);
    L = array([L]).flatten(); f = asarray([f]).flatten();
    idx = array([], dtype = 'i4');
    for i in range(0,len(f)): idx = r_[idx, L + f[i]*N_LAYERS];
    idx = sort(idx);

    if st == 'idx': return idx;
    if st == 'Gimp': return data['ImpurityGreen/' + iter][:,:,idx];
    if st == 'se': return data['SelfEnergy/' + iter][:,:,idx];
    if st == 'as': return data['WeissField/' + iter][:,:,idx];
    if st == 'Gavg': return data['avgGreen/' + iter][:,:, corr_id][:,:,idx];
    if st == 'hybmat': return data['SolverData/Hybmat/' + iter][:,:,idx];
    if st == 'hybtau': return data['SolverData/Hybtau/' + iter][:,:,idx];
    if st == 'Gtau': return data['SolverData/Gtau/' + iter][:,:,idx];
    if st == 'G0': return 1. / data['WeissField/' + iter][:,:,idx];
    if st == 'bG': return getFermiDOS(data, iter);
    if st == 'Gtot': return getTotalGtau(data, iter);
    if st == 'Z'   : return getRenormFactor(data, npoint = 2, it = iter);
Esempio n. 6
0
def initialize(h5file, parms):
    if parms['ID'] in h5file.keys():
        # group exists
        h5 = h5file[parms['ID']];
        it = h5["iter"][0];
        if it < 0: del h5file[parms['ID']];
        else:
            parms1 = parms.copy();
            # not allow to change these fixed parameters
            for s in ('DELTA', 'U', 'J', 'UJRAT', 'BETA'):
                if s in parms1: del parms1[s];
            parms = load_parms(h5, it+1);
            for k, v in parms1.iteritems():
                try: 
                    if parms[k] != parms1[k]: parms[k] = parms1[k];
                except: parms[k] = parms1[k];
        
    # NOTE: basic information for the structure
    N_LAYERS = int(parms['N_LAYERS']);
    SPINS    = int(val_def(parms, 'SPINS', 2));
    if int(val_def(parms, 'PARAMAGNET', 0)) > 0: SPINS = 1;
    DENSITY  = N_LAYERS*float(parms['DENSITY']);
    BETA     = float(parms["BETA"]);
    Nd       = N_LAYERS*float(val_def(parms, 'ND', -1));
    if 'DTYPE' not in parms: parms['DTYPE'] = '';
    if 'RHAM' in parms: 
        FLAVORS = 5;   # 5 d-bands
        HR, R = getHamiltonian(parms['RHAM'], 4); # max distance is 4
        NORB = len(HR[0]);
        if parms['DTYPE'] == '3bands': FLAVORS = 3;
    else: 
        FLAVORS = int(parms['FLAVORS']);
        NORB = int(parms['NORB']);

    if int(val_def(parms, 'AFM', 0)) > 0: 
        print 'This is AFM self consistent loop!';
        if SPINS == 1: exit('SPINS must be 2 for AFM calculation');

    if int(val_def(parms, 'FORCE_DIAGONAL', 0)) > 0:
        print 'FORCE_DIAGONAL is used';
        ind = nonzero(sum(R**2, 1)==0)[0][0];
        H0 = HR[ind];
    else: H0 = None;
    rot_mat = getRotationMatrix(N_LAYERS, FLAVORS, val_def(parms, 'ROT_MAT', None), H0);


    if 'MAX_FREQ' in parms.keys(): parms['N_MAX_FREQ'] = int(round((BETA*float(parms['MAX_FREQ'])/pi - 1)/2.));
    if 'N_CUTOFF' not in parms.keys(): 
        cutoff_factor = float(val_def(parms, 'CUTOFF_FACTOR', 7));
        parms['N_CUTOFF'] = int(round((BETA/pi*float(val_def(parms,'CUTOFF_FREQ', cutoff_factor*float(parms['U']))) - 1)/2.));
    parms['CUTOFF_FREQ'] = (2*int(parms['N_CUTOFF'])+1)*pi/BETA;
    parms['MAX_FREQ'] = (2*int(parms['N_MAX_FREQ'])+1)*pi/BETA;
    parms['FLAVORS']  = FLAVORS;
    
    # mixing
    mixer = Mixing(float(val_def(parms, "MIXING", 1)), int(val_def(parms, 'MIXING_FIXED', 1)));
    mixer_SE = Mixing(float(val_def(parms, "MIXING", 1)), int(val_def(parms, 'MIXING_FIXED', 1)));
    
    wn = (2*arange(int(parms['N_MAX_FREQ']))+1)*pi/BETA;
    extra = {
            'correction'   : zeros(SPINS),
            'GaussianData' : grule(int(val_def(parms, 'NUMK', 30))),
            'rot_mat'      : rot_mat
            };
    if 'RHAM' in parms: extra.update({'HR' : HR, 'R' : R });
    else: extra.update({ 'tight_binding_parms' : array([float(s) for s in parms['TB_PARMS'].split()]) });

    corr_id = system.getCorrIndex(parms);
    NCOR = len(corr_id);
    
    if not parms['ID'] in h5file.keys():
        it = 0;
    
        # create main group ID and its subgroups
        h5 = h5file.create_group(parms['ID']);
        h5.create_dataset("iter", (1,), int, data = -1);
    
        crt_tuple = ("ImpurityGreen", "avgGreen", "SelfEnergy", "WeissField", 
                     "parms", "StaticCoulomb", "SolverData", 
                     "SolverData/Gtau", "SolverData/Hybmat", 
                     "SolverData/Hybtau", "SolverData/Observables");
        for obj in crt_tuple: h5.create_group(obj);
    
        parms['SPINS'] = SPINS;
        parms['NORB']  = NORB;
        parms['ND']    = Nd/float(N_LAYERS);
        parms['NCOR']  = NCOR;
        parms['N_TAU'] = val_def(parms, 'N_TAU', 400);
        if 'UJRAT' in parms.keys(): parms['J'] = float(parms['U']) / float(parms['UJRAT']);
    
        # generate initial conditions
        if 'USE_DATAFILE' in parms.keys():
            print 'Get initial data from file ' + parms['USE_DATAFILE'];
            is_hdf5 = True
            if os.path.abspath(parms['USE_DATAFILE']) != os.path.abspath(parms['DATA_FILE']):
                try: 
                    g5file = h5py.File(parms['USE_DATAFILE'], 'r');
                    g5 = g5file[val_def(parms, 'USE_DATAFILE_ID', g5file.keys()[0])];
                except: is_hdf5 = False
            else:
                g5file = None;
                g5     = h5file[val_def(parms, 'USE_DATAFILE_ID', h5file.keys()[0])];
            if is_hdf5:
                g5it = g5['iter'][0];
                parms['MU'] = val_def(parms, 'MU0', str(g5['parms/%d/MU'%(g5it+1)][...]));
                parms['DELTA'] = val_def(parms, 'DELTA', str(g5['parms/%d/DELTA'%(g5it+1)][...]));
                SelfEnergy, se_coef = get_self_energy_hdf5(g5, parms, wn)
                if not g5file is None: g5file.close();
                del g5file, g5;
            else:
                parms['MU'] = val_def(parms, 'MU0', 0);
                parms['DELTA'] = val_def(parms, 'DELTA', 0);
                SelfEnergy, se_coef = get_self_energy_text(parms['USE_DATAFILE'], parms, wn)
        else:
            SelfEnergy = zeros((SPINS, int(parms["N_MAX_FREQ"]), NCOR), dtype = complex);
            if int(val_def(parms, 'HARTREE_INIT', 0)) == 1: 
                delta, mu, nf, VCoulomb = hartree.HartreeRun(parms, extra);
                nf = nf[:, corr_id];
                parms['MU'] = mu; parms['DELTA'] = delta;
            else:
                mu    = float(val_def(parms, 'MU0', 0)); # don't know which default MU is good
                delta = float(val_def(parms, 'DELTA', 0));
                parms['MU'] = mu; parms['DELTA'] = delta;
                Gavg, Gavg0, delta, mu, VCoulomb = averageGreen(delta, mu, 1j*wn, SelfEnergy, parms, Nd, DENSITY, False, extra);
                nf = getDensityFromGmat(Gavg, BETA, extra);
            se_coef = zeros((SPINS, 2, NCOR), dtype = float);
            for L in range(N_LAYERS): se_coef[:, :, L::N_LAYERS] = get_asymp_selfenergy(parms, nf[:, L::N_LAYERS]);
            for s in range(SPINS):
                for f in range(NCOR): SelfEnergy[s, :, f] = se_coef[s, 0, f];
            if int(val_def(parms, 'NO_TUNEUP', 0)) == 0: parms['MU'] = mu; parms['DELTA'] = delta;

        log_data(h5['SolverData'], 'selfenergy_asymp_coeffs', it, se_coef.flatten(), data_type = float);
        save_data(h5, it, ['SelfEnergy'], [SelfEnergy]);
        save_parms(h5, it,   parms);
        save_parms(h5, it+1, parms);

        # get average dispersion up to nth order
        NthOrder = 3;
        dispersion_avg = system.getAvgDispersion(parms, NthOrder, extra);
        h5.create_dataset('SolverData/AvgDispersion', dispersion_avg.shape, dtype = float, data = dispersion_avg);

        h5["iter"][...] = it; # this is the mark that iteration 'it' is done

    return {
            'parms'   : parms,
            'h5'      : h5,
            'mixer'   : mixer,
            'mixer_SE': mixer_SE,
            'extra'   : extra,
            'N_LAYERS': N_LAYERS,
            'NCOR'    : NCOR,
            'Nd'      : Nd,
            'DENSITY' : DENSITY,
            'wn'      : wn,
            'corr_id' : corr_id
            }