Esempio n. 1
0
spin_names = ['up', 'down']  # Outer (non-hybridizing) blocks
orb_names = ['%s' % i for i in range(n_orbs)]  # Orbital indices
off_diag = False  # Include orbital off-diagonal elements?
n_loop = 2  # Number of DMFT self-consistency loops

# Solver parameters
p = {}
p["n_warmup_cycles"] = 10000  # Number of warmup cycles to equilibrate
p["n_cycles"] = 100000  # Number of measurements
p["length_cycle"] = 500  # Number of MC steps between consecutive measures
p["move_double"] = True  # Use four-operator moves

# Block structure of Green's functions
# gf_struct = {'up':[0,1,2,3,4], 'down':[0,1,2,3,4]}
# This can be computed using the TRIQS function as follows:
gf_struct = op.set_operator_structure(spin_names, orb_names, off_diag=off_diag)

# Construct the 4-index U matrix U_{ijkl}
# The spherically-symmetric U matrix is parametrised by the radial integrals
# F_0, F_2, F_4, which are related to U and J. We use the functions provided
# in the TRIQS library to construct this easily:
U_mat = op.U_matrix(l=l, U_int=U, J_hund=J, basis='spherical')

# Set the interacting part of the local Hamiltonian
# Here we use the full rotationally-invariant interaction parametrised
# by the 4-index tensor U_{ijkl}.
# The TRIQS library provides a function to build this Hamiltonian from the U tensor:
H = op.h_int_slater(spin_names, orb_names, U_mat, off_diag=off_diag)

# Construct the solver
S = Solver(beta=beta, gf_struct=gf_struct)
Esempio n. 2
0
from pytriqs.applications.dft.converters.wien2k_converter import *
from pytriqs.operators.util import set_operator_structure
from pytriqs.utility.comparison_tests import *
from pytriqs.utility.h5diff import h5diff

# Basic input parameters
beta = 40

# Init the SumK class
SK=SumkDFT(hdf_file='SrVO3.h5',use_dft_blocks=True)

num_orbitals = SK.corr_shells[0]['dim']
l = SK.corr_shells[0]['l']
spin_names = ['up','down']
orb_names = ['%s'%i for i in range(num_orbitals)]
orb_hybridized = False

gf_struct = set_operator_structure(spin_names,orb_names,orb_hybridized)
glist = [ GfImFreq(indices=inner,beta=beta) for block,inner in gf_struct.iteritems()]
Sigma_iw = BlockGf(name_list = gf_struct.keys(), block_list = glist, make_copies = False)

SK.set_Sigma([Sigma_iw])
Gloc = SK.extract_G_loc()

if mpi.is_master_node():
    with HDFArchive('srvo3_Gloc.out.h5','w') as ar:
        ar['Gloc'] = Gloc[0]

if mpi.is_master_node():
    h5diff("srvo3_Gloc.out.h5","srvo3_Gloc.ref.h5")
Esempio n. 3
0
from pytriqs.utility.comparison_tests import *
from pytriqs.utility.h5diff import h5diff

# Basic input parameters
beta = 40

# Init the SumK class
SK = SumkDFT(hdf_file='SrVO3.h5', use_dft_blocks=True)

num_orbitals = SK.corr_shells[0]['dim']
l = SK.corr_shells[0]['l']
spin_names = ['up', 'down']
orb_names = ['%s' % i for i in range(num_orbitals)]
orb_hybridized = False

gf_struct = set_operator_structure(spin_names, orb_names, orb_hybridized)
glist = [GfImFreq(indices=inner, beta=beta) for block, inner in gf_struct]
Sigma_iw = BlockGf(name_list=[block for block, inner in gf_struct],
                   block_list=glist,
                   make_copies=False)

SK.set_Sigma([Sigma_iw])
Gloc = SK.extract_G_loc()

if mpi.is_master_node():
    with HDFArchive('srvo3_Gloc.out.h5', 'w') as ar:
        ar['Gloc'] = Gloc[0]

if mpi.is_master_node():
    h5diff("srvo3_Gloc.out.h5", "srvo3_Gloc.ref.h5")
Esempio n. 4
0
spin_names = ['up','down']                   # Outer (non-hybridizing) blocks
orb_names = ['%s'%i for i in range(n_orbs)]  # Orbital indices
off_diag = False                             # Include orbital off-diagonal elements?
n_loop = 2                                   # Number of DMFT self-consistency loops

# Solver parameters
p = {}
p["n_warmup_cycles"] = 10000     # Number of warmup cycles to equilibrate
p["n_cycles"] = 100000           # Number of measurements
p["length_cycle"] = 500          # Number of MC steps between consecutive measures
p["move_double"] = True          # Use four-operator moves

# Block structure of Green's functions
# gf_struct = {'up':[0,1,2,3,4], 'down':[0,1,2,3,4]}
# This can be computed using the TRIQS function as follows:
gf_struct = op.set_operator_structure(spin_names,orb_names,off_diag=off_diag) 

# Construct the 4-index U matrix U_{ijkl}
# The spherically-symmetric U matrix is parametrised by the radial integrals
# F_0, F_2, F_4, which are related to U and J. We use the functions provided
# in the TRIQS library to construct this easily:
U_mat = op.U_matrix(l=l, U_int=U, J_hund=J, basis='spherical')

# Set the interacting part of the local Hamiltonian
# Here we use the full rotationally-invariant interaction parametrised 
# by the 4-index tensor U_{ijkl}.
# The TRIQS library provides a function to build this Hamiltonian from the U tensor:
H = op.h_int_slater(spin_names,orb_names,U_mat,off_diag=off_diag)

# Construct the solver
S = Solver(beta=beta, gf_struct=gf_struct)
Esempio n. 5
0

if __name__ == '__main__':
    mkind = triqs_ops_util.get_mkind(off_diag=False,
                                     map_operator_structure=None)
    parms = load_parms_from_file(sys.argv[1])
    if parms['INTERACTION'].upper() not in ('SLATER', 'KANAMORI'):
        raise ValueError('Key INTERACTION must be either "Slater" or "Kanamori"')
    is_kanamori = True if parms['INTERACTION'].upper() == 'KANAMORI'\
                  else False
    assert parms['NSPINS'] == 2
    nspins = parms['NSPINS']
    spin_names = ('up', 'dn')
    nflavors = parms['NFLAVORS']
    flavor_names = [str(i) for i in range(nflavors)]
    gf_struct = triqs_ops_util.set_operator_structure(spin_names, flavor_names,
                                                      off_diag=False)

    solver = triqs_solver.Solver(beta=parms['BETA'], gf_struct=gf_struct,
                                 n_tau=parms['N_TAU'], n_iw=parms['N_MAX_FREQ'])
    solver_parms = {}
    for s in parms:
        if s.lower() == s: solver_parms[s] = parms[s]
    assign_weiss_field(solver.G0_iw, parms, nspins, spin_names, 
                       nflavors, flavor_names)
    ham_int = get_interaction_hamiltonian(parms, spin_names, flavor_names,
                                          is_kanamori)
    if solver_parms['partition_method'] == 'quantum_numbers':
        solver_parms['quantum_numbers'] = get_quantum_numbers(parms, 
                                            spin_names, flavor_names, 
                                            is_kanamori)