Example #1
0
    if ((iteration_number == 1) and (previous_present == False)):
        dc_value_init = U_int / 2.0
        dm = S.G.density()
        SK.calc_dc(dm,
                   U_interact=U_int,
                   J_hund=J_hund,
                   orb=0,
                   use_dc_formula=DC_type,
                   use_dc_value=dc_value_init)

    # calculate non-interacting atomic level positions:
    eal = SK.eff_atomic_levels()[0]
    S.set_atomic_levels(eal=eal)

    # solve it:
    S.solve(U_int=U_int, J_hund=J_hund, verbosity=1)

    # Now mix Sigma and G with factor Mix, if wanted:
    if (iteration_number > 1 or previous_present):
        if (mpi.is_master_node() and (mixing < 1.0)):
            with HDFArchive(dft_filename + '.h5', 'r') as ar:
                mpi.report("Mixing Sigma and G with factor %s" % mixing)
                S.Sigma << mixing * S.Sigma + (
                    1.0 - mixing) * ar['dmft_output']['Sigma']
                S.G << mixing * S.G + (1.0 - mixing) * ar['dmft_output']['G']
        S.G << mpi.bcast(S.G)
        S.Sigma << mpi.bcast(S.Sigma)

    # after the Solver has finished, set new double counting:
    dm = S.G.density()
    SK.calc_dc(dm,
Example #2
0
        if ((Iteration_Number==1)and(previous_present==False)):
	    SK.set_dc( dens_mat=dm, U_interact = U_int, J_hund = J_hund, orb = 0, use_dc_formula = DC_type, use_val=use_val)

        # set atomic levels:
        eal = SK.eff_atomic_levels()[0]
        S.set_atomic_levels( eal = eal )

        # update hdf5
        if (mpi.is_master_node()):
            ar = HDFArchive(HDFfilename,'a')
            ar['Chemical_Potential%s'%itn] = Chemical_potential
            del ar

        # solve it:
        S.solve(U_int = U_int, J_hund = J_hund, verbosity = 1)

        if (mpi.is_master_node()):
            ar = HDFArchive(HDFfilename)
            ar['iterations'] = itn
 
        # Now mix Sigma and G:
        if ((itn>1)or(previous_present)):
            if (mpi.is_master_node()and (Mix<1.0)):
                mpi.report("Mixing Sigma and G with factor %s"%Mix)
                if ('SigmaF' in ar):
                    S.Sigma <<= Mix * S.Sigma + (1.0-Mix) * ar['SigmaF']
                if ('GF' in ar):
                    S.G <<= Mix * S.G + (1.0-Mix) * ar['GF']

            S.G = mpi.bcast(S.G)
Example #3
0
    SK.put_Sigma([S.Sigma])  # put Sigma into the SumK class:

    chemical_potential = SK.calc_mu(precision=0.000001)

    # Density
    S.G << SK.extract_G_loc()[0]
    mpi.report("Total charge of Gloc : %.6f" % S.G.total_density())

    # set atomic levels:
    eal = SK.eff_atomic_levels()[0]
    S.set_atomic_levels(eal=eal)

    # solve it:
    S.solve(U_int=U_int,
            J_hund=J_hund,
            verbosity=1,
            N_lev=GSM_mult,
            remove_split=True,
            Iteration_Number=itn)

    if (mpi.is_master_node()):
        ar = HDFArchive(HDFfilename)

    # Now mix Sigma and G:
    if ((itn > 1) or (previous_present)):
        if (mpi.is_master_node()):
            mpi.report("Mixing Sigma and G with factor %s" % Mix)
            if ('SigmaF' in ar):
                S.Sigma <<= Mix * S.Sigma + (1.0 - Mix) * ar['SigmaF']
            if ('GF' in ar):
                S.G <<= Mix * S.G + (1.0 - Mix) * ar['GF']