Exemplo n.º 1
0
        previous_runs = 0
        previous_present = False
    del ar

mpi.barrier()
previous_runs    = mpi.bcast(previous_runs)
previous_present = mpi.bcast(previous_present)

# Init the SumK class
SK=SumkLDA(hdf_file=lda_filename+'.h5',use_lda_blocks=False)

Norb = SK.corr_shells[0][3]
l    = SK.corr_shells[0][2]

# Init the Solver:
S = Solver(beta = beta, l = l)

if (previous_present):
    # load previous data:
    mpi.report("Using stored data for initialisation")
    if (mpi.is_master_node()):
        ar = HDFArchive(HDFfilename,'a')
        S.Sigma <<= ar['SigmaF']
        del ar
    S.Sigma = mpi.bcast(S.Sigma)
    SK.load()

# DMFT loop:
for Iteration_Number in range(1,Loops+1):
    
        itn = Iteration_Number + previous_runs
Exemplo n.º 2
0
            if 'iterations' in ar:
                previous_present = True
                previous_runs = ar['iterations']
        else:
            f.create_group('dmft_output')
previous_runs = mpi.bcast(previous_runs)
previous_present = mpi.bcast(previous_present)

# Init the SumK class
SK = SumkDFT(hdf_file=dft_filename + '.h5', use_dft_blocks=False)

Norb = SK.corr_shells[0]['dim']
l = SK.corr_shells[0]['l']

# Init the Hubbard-I solver:
S = Solver(beta=beta, l=l)

chemical_potential = chemical_potential_init
# load previous data: old self-energy, chemical potential, DC correction
if previous_present:
    if mpi.is_master_node():
        with HDFArchive(dft_filename + '.h5', 'r') as ar:
            S.Sigma << ar['dmft_output']['Sigma']
        SK.chemical_potential, SK.dc_imp, SK.dc_energ = SK.load(
            ['chemical_potential', 'dc_imp', 'dc_energ'])
    S.Sigma << mpi.bcast(S.Sigma)
    SK.chemical_potential = mpi.bcast(SK.chemical_potential)
    SK.dc_imp = mpi.bcast(SK.dc_imp)
    SK.dc_energ = mpi.bcast(SK.dc_energ)

# DMFT loop:
Exemplo n.º 3
0
    del ar

mpi.barrier()
previous_runs    = mpi.bcast(previous_runs)
previous_present = mpi.bcast(previous_present)

# if previous runs are present, no need for recalculating the bloc structure
# It has to be commented, if you run this script for the first time, starting
# from a converted h5 archive.

# Init the SumK class
SK = SumkLDATools(hdf_file=lda_filename+'.h5',use_lda_blocks=False)


if (mpi.is_master_node()):
    print 'DC after reading SK: ',SK.dc_imp[SK.invshellmap[0]]

N = SK.corr_shells[0][3]
l = SK.corr_shells[0][2]

# Init the Solver:
S = Solver(beta = Beta, l = l)
S.Nmoments= 8

# set atomic levels:
eal = SK.eff_atomic_levels()[0]
S.set_atomic_levels( eal = eal )
S.GF_realomega(ommin=ommin, ommax = ommax, N_om=N_om,U_int=U_int,J_hund=J_hund)
SK.put_Sigma(Sigma_imp = [S.Sigma])
SK.dos_partial(broadening=broadening)
Exemplo n.º 4
0
        previous_runs = 0
        previous_present = False
    del ar

mpi.barrier()
previous_runs = mpi.bcast(previous_runs)
previous_present = mpi.bcast(previous_present)

# Init the SumK class
SK = SumkLDA(hdf_file=LDAFilename + '.h5', use_lda_blocks=False)

Norb = SK.corr_shells[0][3]
l = SK.corr_shells[0][2]

# Init the Solver:
S = Solver(beta=Beta, l=l)

if (previous_present):
    # load previous data:
    mpi.report("Using stored data for initialisation")
    if (mpi.is_master_node()):
        ar = HDFArchive(HDFfilename, 'a')
        S.Sigma <<= ar['SigmaF']
        del ar
    S.Sigma = mpi.bcast(S.Sigma)
    SK.load()

# DMFT loop:
for Iteration_Number in range(1, Loops + 1):

    itn = Iteration_Number + previous_runs
Exemplo n.º 5
0
# if previous runs are present, no need for recalculating the bloc structure
# It has to be commented, if you run this script for the first time, starting
# from a converted h5 archive.

# Init the SumK class
SK = SumkDFT(hdf_file=LDAFilename + '.h5', use_dft_blocks=False)
CF_tools = CF_dmft_utils(SK)

Norb = SK.corr_shells[0]['dim']
Nlm = Norb / 2
mpi.report("Norb = %s , Nlm = %s " % (Norb, Nlm))
l = SK.corr_shells[0]['l']

# Init the Solver:
S = Solver(beta=beta, l=l, use_spin_orbit=True)

spinmat, orbmat = CF_tools.spin_orb_matrix(l)

if (previous_present):
    # load previous data:
    mpi.report("Using stored data for initialisation")
    if (mpi.is_master_node()):
        ar = HDFArchive(HDFfilename, 'a')
        if run_dmft: S.Sigma <<= ar['SigmaF']
        del ar
        SK.chemical_potential, SK.dc_imp, SK.dc_energ = SK.load(
            ['chemical_potential', 'dc_imp', 'dc_energ'])
    if run_dmft: S.Sigma = mpi.bcast(S.Sigma)
    SK.chemical_potential = mpi.bcast(SK.chemical_potential)
    SK.dc_imp = mpi.bcast(SK.dc_imp)
Exemplo n.º 6
0
            previous_present = True
            previous_runs = ar['iterations']
    else:
        f.create_group('dmft_output')
    del f
previous_runs    = mpi.bcast(previous_runs)
previous_present = mpi.bcast(previous_present)

# Init the SumK class
SK=SumkDFT(hdf_file=dft_filename+'.h5',use_dft_blocks=False)

Norb = SK.corr_shells[0]['dim']
l    = SK.corr_shells[0]['l']

# Init the Hubbard-I solver:
S = Solver(beta = beta, l = l)

chemical_potential=chemical_potential_init
# load previous data: old self-energy, chemical potential, DC correction
if previous_present:
    if mpi.is_master_node():
        ar = HDFArchive(dft_filename+'.h5','a')
        S.Sigma << ar['dmft_output']['Sigma']
        del ar
        SK.chemical_potential,SK.dc_imp,SK.dc_energ = SK.load(['chemical_potential','dc_imp','dc_energ'])
    S.Sigma << mpi.bcast(S.Sigma)
    SK.chemical_potential = mpi.bcast(SK.chemical_potential)
    SK.dc_imp = mpi.bcast(SK.dc_imp)
    SK.dc_energ = mpi.bcast(SK.dc_energ)

# DMFT loop:
SK = SumkDFTTools(hdf_file=dft_filename + '.h5', use_dft_blocks=False)

# load old chemical potential and DC
if mpi.is_master_node():
    SK.chemical_potential, SK.dc_imp, SK.dc_energ = SK.load(
        ['chemical_potential', 'dc_imp', 'dc_energ'])

SK.chemical_potential = mpi.bcast(SK.chemical_potential)
SK.dc_imp = mpi.bcast(SK.dc_imp)
SK.dc_energ = mpi.bcast(SK.dc_energ)

if (mpi.is_master_node()):
    print 'DC after reading SK: ', SK.dc_imp[0]

N = SK.corr_shells[0]['dim']
l = SK.corr_shells[0]['l']

# Init the Solver:
S = Solver(beta=beta, l=l)

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

# Run the solver to get GF and self-energy on the real axis
S.GF_realomega(ommin=ommin, ommax=ommax, N_om=N_om, U_int=U_int, J_hund=J_hund)
SK.set_Sigma([S.Sigma])

# compute DOS
SK.dos_parproj_basis(broadening=broadening)
Exemplo n.º 8
0
# Init the SumK class
SK = SumkDFTTools(hdf_file=dft_filename+'.h5',use_dft_blocks=False)

# load old chemical potential and DC
if mpi.is_master_node():
    SK.chemical_potential,SK.dc_imp,SK.dc_energ = SK.load(['chemical_potential','dc_imp','dc_energ'])

SK.chemical_potential = mpi.bcast(SK.chemical_potential)
SK.dc_imp = mpi.bcast(SK.dc_imp)
SK.dc_energ = mpi.bcast(SK.dc_energ)

if (mpi.is_master_node()):
    print 'DC after reading SK: ',SK.dc_imp[0]

N = SK.corr_shells[0]['dim']
l = SK.corr_shells[0]['l']

# Init the Solver:
S = Solver(beta = beta, l = l)

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

# Run the solver to get GF and self-energy on the real axis
S.GF_realomega(ommin=ommin, ommax = ommax, N_om=N_om,U_int=U_int,J_hund=J_hund)
SK.set_Sigma([S.Sigma])

# compute DOS
SK.dos_parproj_basis(broadening=broadening)