Example #1
0
def get_tb_model(t, U, n, m, mu=0., vanilla_tb=False):

    h_loc = -U * m * np.diag([+1., -1.]) + (0.5 * U * n - mu) * np.eye(2)
    T = -t * np.eye(2)

    if vanilla_tb:
        from pytriqs.lattice.tight_binding import TBLattice
    else:
        from triqs_tprf.tight_binding import TBLattice

    t_r = TBLattice(
        units=[(1, 0, 0)],
        hopping={
            # nearest neighbour hopping -t
            (
                0, ): h_loc,
            (+1, ): T,
            (-1, ): T,
        },
        orbital_positions=[(0, 0, 0)] * 2,
        orbital_names=['up', 'do'],
    )

    return t_r
S = Solver(beta=beta, gf_struct=[('up', [0]), ('down', [0])])
h_int = U * n('up', 0) * n('down', 0)  #local interating hamiltonian

hop = {
    (1, 0): [[t]],
    (-1, 0): [[t]],
    (0, 1): [[t]],
    (0, -1): [[t]],
    (1, 1): [[tp]],
    (-1, -1): [[tp]],
    (1, -1): [[tp]],
    (-1, 1): [[tp]]
}

L = TBLattice(units=[(1, 0, 0), (0, 1, 0)],
              hopping=hop,
              orbital_names=range(1),
              orbital_positions=[(0., 0., 0.)] * 1)
SL = TBSuperLattice(tb_lattice=L, super_lattice_units=[(1, 1, 0), (1, -1, 0)])
SK = SumkDiscreteFromLattice(lattice=SL, n_points=nk)

mesh = S.G_iw.mesh
Gloc = BlockGf(name_block_generator=[
    (s, GfImFreq(indices=SK.GFBlocIndices, mesh=mesh)) for s in ['up', 'down']
],
               make_copies=False)
Sigma_lat = Gloc.copy()


#function to extract density for a given mu, to be used by dichotomy function to determine mu
def Dens(mu):
    dens = SK(mu=mu, Sigma=Sigma_lat).total_density()
Example #3
0
t = -1.00  # First neighbour Hopping
tp = 0.0 * t  # Second neighbour Hopping
hop = {
    (1, 0): [
        [t]
    ],  # Hopping[ Displacement on the lattice] = [[t11, t12, t13....], [t21, t22, t23....], ..., [...., tnn]]
    (-1, 0): [[t]],  # where n=Number_Orbitals
    (0, 1): [[t]],
    (0, -1): [[t]],
    (1, 1): [[tp]],
    (-1, -1): [[tp]],
    (1, -1): [[tp]],
    (-1, 1): [[tp]]
}

L = TBLattice(units=[(1, 0, 0), (0, 1, 0)], hopping=hop)
SL = TBSuperLattice(tb_lattice=L, super_lattice_units=[(2, 0), (0, 2)])

# SumK function that will perform the sum over the BZ
SK = SumkDiscreteFromLattice(lattice=SL, n_points=8, method="Riemann")

# Defines G and Sigma with a block structure compatible with the SumK function
G = BlockGf(name_block_generator=[(s,
                                   GfImFreq(indices=SK.GFBlocIndices,
                                            mesh=S.G.mesh))
                                  for s in ['up', 'down']],
            make_copies=False)
Sigma = G.copy()

# Init Sigma
for n, B in S.Sigma: